Published on

Babushka is a lightweight dependency based tool that could help you improve your deployment process.

There are plenty of good dedicated deployment tools out there, but they are often very prescriptive about how your code gets deployed. Can't use SSH or rsync? What happens when you want to deploy to heroku? Rake is fine, but making your deploys robust is a lot of work. Babushka has an elegant solution to this problem, as well as helping to automate other annoying tasks reliably.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Babushka Richard McGain @mcgain
  2. 2. the nameBabushka in Russian means "mother" But. . . In Australia, it is the name for Russian Nesting Dolls
  3. 3. the installer .$ sh -c "`curl`"This installs Babushka, ruby and git(if they are not already installed)
  4. 4. the purpose Automates system tasks such as:● Deploys● Setting up your dev box● Other important stuff you dont want screwed up
  5. 5. the basics$ babushka deploy A dependency or "dep"The command
  6. 6. the conceptdep "dep names can have spaces" do met? { return true or false no side effects } meet { do the actual work here }end
  7. 7. the codedep "precompile assets" do met? { "public/assets" } meet { `rake assets:precompile` }end
  8. 8. the requiredep "deploy" do requires [ "precompile assets", "push to heroku" ]end
  9. 9. the variables .$ babushka push ref=master remote=origindep "push", :ref, :remote do requires("repo exists").with(remote) `git push #{remote} #{ref}:#{ref}`end
  10. 10. the fileWhere does Babushka look for this dep?./babushka-deps/~/.babushka-deps/ /usr/local/bin/babushka/deps/it looks for all ruby filesrecursively.
  11. 11. the github$ babushka mcgain:deployit loads the repo and runs the depWARNING: only do this for deps youtrust
  12. 12. the shellshell "rake annotate"
  13. 13. the shellshell "[ 1 == 0 ]" do |s| if s.result == 1 math_seems_to_work endend
  14. 14. the stdoutAlso stderr!shell "grep" do |s| puts s.stdout #prints nothing puts s.stderr #prints helpful errorend
  15. 15. the cdWe can cdcd "~/.vim/bundle"shell "git clone"cd "~/.vim/bundle" do shell "git clone"end
  16. 16. the gitdef rails_repo @repo ||= some-git-repo )endrails_repo.repo_shell "git push"
  17. 17. the methodsThere are some convenience methods: rebasing? current_head branch! checkout! reset_hard! ahead? behind?
  18. 18. the installdep "colors.npm"will install the node package colorsbut if the name doesnt matchdep django.pip do installs Django provides django-admin.pyend
  19. 19. the list.lib for libraries.bin for binaries.gem for ....npm ...
  20. 20. the rubydep ruby.bin do installs { via [:lenny, :hardy, :lucid], %w[ruby irb ruby1.8-dev] via :apt, %w[ruby ruby1.8-dev] via :yum, %w[ruby ruby-irb] otherwise ruby } provides ruby >= 1.8.6, irbend
  21. 21. the versionsdep postgres.bin do installs postgresql provides psql ~> 9.0.0end
  22. 22. the integration .Although it is a standalone tool it isalso a library (with / without DSL )Babushka does not scale, 1 system onlyChef, Capistrano, Vagrant, Puppet allsolve a slightly different problem andare complementary.
  23. 23. the futuregoogle babushka-deps Questions? Richard McGain @mcgain
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.