Eat the Whole Bowl: Building a Full-Stack Installer with Omnibus

Eat the Whole Bowl: Building a Full-Stack Installer with Omnibus

An introduction to Omnibus, Opscode's tool for creating cross-platform full-stack installers.

Video recording of the presentation available here:
http://www.youtube.com/watch?v=q8iJAntXCNY

E7ca21b1c981fab7302315cbf09840c3?s=128

Seth Chisamore

April 27, 2013
Tweet

Transcript

  1. 1.

    EAT THE WHOLE BOWL Building a Full-Stack Installer with Omnibus

    Seth Chisamore Christopher Maier Opscode Engineering
  2. 3.
  3. 4.
  4. 6.

    I was playing 80's power rock ballads. Probably wrote much

    of it while I was listening to Warrant's “Heaven”.
  5. 7.

    I called it “Fatty”, because it was making “fat” binary

    packages. I didn't really realize I was being offensive until later.
  6. 9.
  7. 10.
  8. 14.

    name "chef-server" maintainer "Opscode, Inc." homepage "http://www.opscode.com" replaces "chef-server" install_path

    "/opt/chef-server" build_version Omnibus::BuildVersion.new.semver build_iteration 1 dependency "postgresql" dependency "rabbitmq" dependency "chef-solr" dependency "erchef" # more... exclude "\.git*" exclude "bundler\/git"
  9. 16.

    name "erchef" version "1.2.6" dependency "erlang" dependency "rsync" dependency "curl"

    source :git => "git://github.com/opscode/erchef" relative_path "erchef" env = { "PATH" => "#{install_dir}/embedded/bin:#{ENV["PATH"]}", "LDFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", # more... } continued...
  10. 17.

    build do command "make distclean", :env => env command "make

    rel", :env => env command "mkdir -p #{install_dir}/embedded/service/erchef" command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./rel/erchef/ #{install_dir}/embedded/service/erchef/" command "rm -rf #{install_dir}/embedded/service/erchef/log" end
  11. 19.
  12. 20.

    $ omnibus project foobar create foobar/config/software/README.md create foobar/Gemfile create foobar/.gitignore

    create foobar/config/projects/foobar.rb create foobar/README.md create foobar/package-scripts/foobar/makeselfinst create foobar/package-scripts/foobar/postinst create foobar/package-scripts/foobar/postrm ...
  13. 22.

    $ omnibus build project foobar Building foobar mkdir -p /var/cache/omnibus/build/opt_foobar

    mkdir -p /var/cache/omnibus/src/preparation touch /var/cache/omnibus/build/opt_foobar/preparation.fetch [builder:preparation] building preparation [builder:preparation] preparation build succeeded,0.000755s touch /var/cache/omnibus/build/opt_foobar/preparation.manif mkdir -p /var/cache/omnibus/src/version-manifest touch /var/cache/omnibus/build/opt_foobar/version-manifest. [builder:version-manifest] building version-manifest [builder:version-manifest] version-manifest build succeeded ...
  14. 24.

    $ omnibus build software foobar version-manifest Building version-manifest for foobar

    project [builder:preparation] building preparation [builder:preparation] preparation build succeeded, 0.000383s touch /var/cache/omnibus/build/opt_foobar/ preparation.manifest [builder:version-manifest] building version-manifest [builder:version-manifest] version-manifest build succeeded, 0.000229s touch /var/cache/omnibus/build/opt_foobar/ version-manifest.manifest ...
  15. 25.
  16. 26.

    $ omnibus clean foobar --purge remove /var/cache/omnibus/src/preparation remove /var/cache/omnibus/src/version-manifest remove

    /var/cache/omnibus/build/opt_foobar remove /var/cache/omnibus/build/opt_foobar/preparation.fet remove /var/cache/omnibus/build/opt_foobar/preparation.man remove /var/cache/omnibus/build/opt_foobar/version-manifes remove /var/cache/omnibus/build/opt_foobar/version-manifes remove /var/cache/omnibus/pkg/foobar-0.0.0+20130405022120_ remove /opt/foobar
  17. 27.
  18. 28.
  19. 29.

    DEPENDENCY MANAGEMENT name "opscode-push-jobs-server" maintainer "Opscode, Inc." homepage "http://www.opscode.com" replaces

    "opscode-push-jobs-server" install_path "/opt/opscode-push-jobs-server" build_version Omnibus::BuildVersion.new.semver build_iteration 1 runtime_dependency "private-chef" # creates required build directories dependency "preparation" ...
  20. 30.

    (REAL) RE-USE • * Software definitions become specialized cookbooks •

    * These cookbooks live in standalone Git repositories source 'https://rubygems.org' gem 'omnibus', '~> 1.0.0' gem 'omnibus-software', :git => 'git://github.com/opscode/omnibus-software.git' Current: Future:
  21. 31.

    RELEASE COMMAND • Based on lessons learned from Omnitruck (think

    install.sh) • Will perform checksumming (md5, sha256) • Initially will push packages to an S3 bucket • Would like to support “real” repos using something like PRM
  22. 32.
  23. 34.

    Photo Credits Noodle Bowl http://www.insockmonkeyslippers.com/swiss-chard-and-noodle-soup-with-poached-egg Suitcases http://www.flickr.com/photos/rubyblossom/7413242342/ Stones http://www.flickr.com/photos/erix/4645279944/ Worried

    Man http://www.flickr.com/photos/pedrosimoes7/145220445/ Skateboard http://www.flickr.com/photos/14degrees/2714047400/ Gears http://www.flickr.com/photos/wwarby/4782904694/ Blueprints http://www.flickr.com/photos/pulpolux/838363289/ Tool Shed Interior http://www.flickr.com/photos/matthigh/4050429719/ Compass Rose http://www.flickr.com/photos/marfis75/5374308475/ Measuring Tape http://www.flickr.com/photos/hippie/2466583497/ Factory Pipes http://www.flickr.com/photos/cycloctopus/8181800285/ Glass Bottles http://www.flickr.com/photos/afropicmusing/8089260503/ Freddie Mercury Statue http://www.flickr.com/photos/nick_c/112111560/