JUDCon 2011 - Box Grinder
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • 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
489
On Slideshare
489
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
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. Saturday, 4 June 2011
  • 2. Marek  GoldmannSaturday, 4 June 2011
  • 3. Who’s  Marek? •   • JBoss  Developer • Cloud-­related  projects:  lead  of                                                             • Part  of   • Electronic  music  loverSaturday, 4 June 2011
  • 4. Agenda • Some  background  and  terminology • BoxGrinder • Appliance  definition  files • Architecture  overview • Build  process • Small  demoSaturday, 4 June 2011
  • 5. Some  terminologySaturday, 4 June 2011
  • 6. Appliance  is  a  preconfigured  disk  image   (virtual  machine)  with  an  operating   system  and  all  required  applications  to   do  a  specific  jobSaturday, 4 June 2011
  • 7. Appliance  examples  with  tasks • Database • Storing  data • Front-­end • Load  balancing • Back-­end • Actual  serversSaturday, 4 June 2011
  • 8. 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.Saturday, 4 June 2011
  • 9. Bake! We  think  baking  is  The  Right  Way,  especially   for  developers  simply  looking  for  reliable   platforms.Saturday, 4 June 2011
  • 10. Bake,  then  fry If  you  bake  an  image  you  can  fry  it   later  too!  The  baked  image  can  be   your  starting  point.Saturday, 4 June 2011
  • 11. Saturday, 4 June 2011
  • 12.                                          is  a  family  of  tools  to  grind   out  appliances  for  various  platformsSaturday, 4 June 2011
  • 13. Saturday, 4 June 2011
  • 14. Current  status stable development planningSaturday, 4 June 2011
  • 15. Repo Repo Repo EC2 Appliance BoxGrinder VMware Definition KVMSaturday, 4 June 2011
  • 16. Closer  look  at  appliance  definition  filesSaturday, 4 June 2011
  • 17. Appliance  definition,  huh? • Plain  text  file  –  YAML  format • Very  easy  to  understand,  modify • Inheritance  (mixins)Saturday, 4 June 2011
  • 18. 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 ...Saturday, 4 June 2011
  • 19. General  information should match the filename: back-end.appl name:  back-­end version:  1 release:  1 summary:  back-­end  appliance  with  JBoss  AS  6Saturday, 4 June 2011
  • 20. Hardware hardware: 512MB    memory:  512    partitions: 2GB        "/":            size:  2Saturday, 4 June 2011
  • 21. Appliance  Mix-­ins Mixing  in  fedora-­base.appl appliances:    -­  fedora-­baseSaturday, 4 June 2011
  • 22. 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 ...Saturday, 4 June 2011
  • 23. 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    -­  wgetSaturday, 4 June 2011
  • 24. Appliance  Mix-­ins back-­end.appl fedora-­base.appl overrides hardware: hardware:    memory:  512    memory:  256    partitions:    partitions:        "/":        "/":            size:  2            size:  1Saturday, 4 June 2011
  • 25. Appliance  content packages:    -­  jboss-­as6    -­  jboss-­as6-­cloud-­profiles    -­  java-­1.6.0-­openjdkSaturday, 4 June 2011
  • 26. Appliance  content packages:    -­  jboss-­as6    -­  jboss-­as6-­cloud-­profiles    -­  java-­1.6.0-­openjdk Plus  everything  from   fedora-­base.applSaturday, 4 June 2011
  • 27. There  is  a  lot  more! • Additional  sections • repos • ephemeral  repos • post • What  should  be  done  after  you  build  your  appliance • Different  commands  for  different  platforms • Using  libguestfs • Learn  more!   http://boxgrinder.org/tutorials/appliance-definition/Saturday, 4 June 2011
  • 28. Saturday, 4 June 2011
  • 29. BoxGrinder  Build  architectureSaturday, 4 June 2011
  • 30. Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI Operating system Platform DeliverySaturday, 4 June 2011
  • 31. Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI Operating system Platform Delivery Write  your  own  plugins,  it’s  easy! http://boxgrinder.org/tutorials/how-­to-­write-­a-­plugin-­for-­boxgrinder-­build/Saturday, 4 June 2011
  • 32. Plugin  skeleton require  boxgrinder-­build/plugins/base-­plugin class  YourPlugin  <  BoxGrinder::BasePlugin    def  execute        #  PLACE  YOUR  CODE  HERE    end endSaturday, 4 June 2011
  • 33. Plugin  registration require  boxgrinder-­build/managers/plugin-­manager require  xyz-­your-­plugin/your-­plugin plugin  :class  =>  YourPlugin,              :type  =>  :platform,              :name  =>  :mycloud,              :full_name    =>  "MyCloud"Saturday, 4 June 2011
  • 34. How  to  install  BoxGrinder  BuildSaturday, 4 June 2011
  • 35. Saturday, 4 June 2011
  • 36. yum  install  rubygem-­boxgrinder-­buildSaturday, 4 June 2011
  • 37. 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://boxgrinder.org/download/boxgrinder-­build-­meta-­ appliance/Saturday, 4 June 2011
  • 38. Demo:  build  a  simple  applianceSaturday, 4 June 2011
  • 39. convert  and  deliver Demo:  build  a  simple  applianceSaturday, 4 June 2011
  • 40. Demo  setup  and  planSaturday, 4 June 2011
  • 41. Step  1:  create  base  image Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI boxgrinder-­build  f14-­jeos.applSaturday, 4 June 2011
  • 42. 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 ...Saturday, 4 June 2011
  • 43. Step  3:  deliver  it  to  a  SFTP   server Plugins SFTP Simple Build Convert EC2 Deliver RAW CloudFront Definition VMware AMI boxgrinder-­build  f14-­jeos.appl  -­p  vmware  -­d  sftp -­d  ebs -­d  s3 ...Saturday, 4 June 2011
  • 44. Of  course  you  can  run  the  command   just  once  with  same  result! boxgrinder-­build  f14-­jeos.appl  -­p  vmware  -­d  sftpSaturday, 4 June 2011
  • 45. What’s  hot?Saturday, 4 June 2011
  • 46. 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,  AMI • Many  public  clouds  supported:  EC2,  ElasticHosts,   Serverlove,  Open  Hosting,  SKALI  Cloud,  CloudSigmaSaturday, 4 June 2011
  • 47. 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:  20  minutes  (on   EC2,  using  meta-­appliance)Saturday, 4 June 2011
  • 48. Notes • If  you’re  building  AMI’s  –  do  it  on  EC2  –  this  will  save   your  time  (uploading  to  S3  from  your  local  machine   isn’t  fun...) • Building  EBS-­based  AMI’s  requires  to  run   BoxGrinder  on  EC2Saturday, 4 June 2011
  • 49. Questions? http://github.com/boxgrinder/ http://boxgrinder.org/ http://boxgrinder.org/blog/ IRC:  #boxgrinder @boxgrinder @marekgoldmannSaturday, 4 June 2011
  • 50. Thanks!Saturday, 4 June 2011