BoxGrinder – FUDCon 2011 Tempe

  • 782 views
Uploaded on

Introduction to BoxGrinder – a family of tools to grind out appliances for various platforms.

Introduction to BoxGrinder – a family of tools to grind out appliances for various platforms.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
782
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
27
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Marek Goldmann
  • 2. Agenda • whoami • Some background and terminology • BoxGrinder • Appliance definition files • Architecture overview • Build process • Writing a plugin • Small demoFUDCon Tempe 2011
  • 3. Who’s Marek? • • JBoss Developer • Cloud-related projects: lead of • Part of • Electronic music loverFUDCon Tempe 2011
  • 4. Some terminologyFUDCon Tempe 2011
  • 5. Appliance is a preconfigured disk image (virtual machine) with operating system and all required applications to do specific jobFUDCon Tempe 2011
  • 6. Appliance examples with tasks • Database • Storing data • Front-end • Load balancing • Back-end • Actual serversFUDCon Tempe 2011
  • 7. Bake vs. Fry Bake: Produce a complete virtual machine offline, before first use. Fry: Produce a complete virtual machine by booting a basic VM and then applying configuration.FUDCon Tempe 2011
  • 8. Bake! We think baking is The Right Way, especially for developers simply looking for reliable platforms.FUDCon Tempe 2011
  • 9. Bake, then fry If you bake an image you can fry it then later too! Baked image can be your start point.FUDCon Tempe 2011
  • 10. is a family of tools to grind out appliances for various platformsFUDCon Tempe 2011
  • 11. FUDCon Tempe 2011
  • 12. Current status stable development planningFUDCon Tempe 2011
  • 13. Repo Repo Repo EC2 Appliance BoxGrinder VMware Definition KVMFUDCon Tempe 2011
  • 14. Closer look at appliance definition fileFUDCon Tempe 2011
  • 15. Appliance definition, huh? • Plain text file – YAML format • Very easy to understand, modify • Inheritance (mixins)FUDCon Tempe 2011
  • 16. Appliance example name: back-end version: 1 release: 1 summary: back-end appliance with JBoss AS 6 hardware: memory: 512 partitions: "/": size: 2 appliances: - fedora-base packages: - jboss-as6 - jboss-as6-cloud-profiles - java-1.6.0-openjdk ...FUDCon Tempe 2011
  • 17. General information should match the filename: back-end.appl name: back-end version: 1 release: 1 summary: back-end appliance with JBoss AS 6FUDCon Tempe 2011
  • 18. Hardware hardware: 512MB memory: 512 partitions: 2GB "/": size: 2FUDCon Tempe 2011
  • 19. Appliance Mix-ins Mixing in fedora-base.appl appliances: - fedora-baseFUDCon Tempe 2011
  • 20. back-end.appl name: back-end version: 1 release: 1 summary: back-end appliance with JBoss AS 6 hardware: memory: 512 partitions: "/": size: 2 appliances: - fedora-base packages: - jboss-as6 - jboss-as6-cloud-profiles - java-1.6.0-openjdk ...FUDCon Tempe 2011
  • 21. fedora-base.appl name: fedora-base summary: Basic Fedora OS os: name: fedora version: 14 hardware: memory: 256 partitions: "/": size: 1 packages: - @core - openssh-server - openssh-clients - wgetFUDCon Tempe 2011
  • 22. Appliance Mix-ins back-end.appl fedora-base.appl overrides hardware: hardware: memory: 512 memory: 256 partitions: partitions: "/": "/": size: 2 size: 1FUDCon Tempe 2011
  • 23. Appliance content packages: - jboss-as6 - jboss-as6-cloud-profiles - java-1.6.0-openjdkFUDCon Tempe 2011
  • 24. Appliance content packages: - jboss-as6 - jboss-as6-cloud-profiles - java-1.6.0-openjdk Plus everything from fedora-base.applFUDCon Tempe 2011
  • 25. There is a lot more! • Additional sections • repos • ephemeral repos • post • What should be done after you build you appliance • Different commands for different platform • Using libguestfs • Learn more! http://community.jboss.org/wiki/FUDCon Tempe 2011 BoxGrinderBuildApplianceDefinitionFile
  • 26. BoxGrinder Build architectureFUDCon Tempe 2011
  • 27. Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI Operating system Platform DeliveryFUDCon Tempe 2011
  • 28. Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI Operating system Platform Delivery Write your own plugins, it’s easy! http://community.jboss.org/wiki/BoxGrinderBuildHowToWriteAPluginFUDCon Tempe 2011
  • 29. Plugin skeleton require boxgrinder-build/plugins/base-plugin class YourPlugin < BoxGrinder::BasePlugin def execute # PLACE YOUR CODE HERE end endFUDCon Tempe 2011
  • 30. Plugin registration require boxgrinder-build/managers/plugin-manager require xyz-your-plugin/your-plugin plugin :class => YourPlugin, :type => :platform, :name => :mycloud, :full_name => "MyCloud"FUDCon Tempe 2011
  • 31. How to install BoxGrinder BuildFUDCon Tempe 2011
  • 32. FUDCon Tempe 2011
  • 33. BoxGrinder Build installation 1.Install BoxGrinder Build yum install rubygem-boxgrinder-buildFUDCon Tempe 2011
  • 34. BoxGrinder Build installation 2.Install plugins you need yum install rubygem-boxgrinder-build-fedora-os-plugin yum install rubygem-boxgrinder-build-centos-os-plugin yum install rubygem-boxgrinder-build-rhel-os-plugin yum install rubygem-boxgrinder-build-ec2-platform-plugin yum install rubygem-boxgrinder-build-vmware-platform-plugin yum install rubygem-boxgrinder-build-virtualbox-platform-plugin yum install rubygem-boxgrinder-build-s3-delivery-plugin yum install rubygem-boxgrinder-build-local-delivery-plugin yum install rubygem-boxgrinder-build-sftp-delivery-pluginFUDCon Tempe 2011
  • 35. Meta appliance • A preconfigured appliance to build other appliances using BoxGrinder • Easy to jump in • Available for different platforms: Xen, KVM, EC2, VMware • Best way to build EC2 appliances • http://www.jboss.org/boxgrinder/downloads/build/meta- appliance.htmlFUDCon Tempe 2011
  • 36. Demo: build a simple applianceFUDCon Tempe 2011
  • 37. convert and deliver Demo: build a simple applianceFUDCon Tempe 2011
  • 38. Step 1: create base image Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI boxgrinder build f14-jeos.applFUDCon Tempe 2011
  • 39. Step 2: convert it to VMware type Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI boxgrinder build f14-jeos.appl -p vmware -p ec2 ...FUDCon Tempe 2011
  • 40. Step 3: deliver it to a SFTP server Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMIboxgrinder build f14-jeos.appl -p vmware -d sftp -d ebs -d s3 FUDCon Tempe 2011 ...
  • 41. Of course you can run the command just once with same result!boxgrinder build back-end.appl -p vmware -d sftp FUDCon Tempe 2011
  • 42. What’s hot?FUDCon Tempe 2011
  • 43. BoxGrinder Build features • Supported OSes: Fedora, CentOS, RHEL • Supported platforms: EC2 (S3-based and EBS- based too!), KVM, VMware, VirtualBox • Many delivery options: local, SFTP, S3 or CloudFront as tarred image, AMIFUDCon Tempe 2011
  • 44. BoxGrinder Build features • Cross-arch builds: producing i386 images on x86_64 hosts • Caching downloaded resources (RPM’s) • Pretty fast – from .appl to registered AMI: 15 minutes (on EC2, using meta-appliance)FUDCon Tempe 2011
  • 45. Notes • If you’re building AMI’s – do it on EC2 – this will safe your time (uploading to S3 from your local machine isn’t fun...) • Building EBS-based AMI’s requires to run BoxGrinder on EC2FUDCon Tempe 2011
  • 46. Questions?http://github.com/boxgrinder/ # Codehttp://jboss.org/boxgrinder/ # Home pagehttp://cloudpress.org/ # Blog#boxgrinder # IRC @boxgrinder @marekgoldmann
  • 47. Thanks!