SlideShare a Scribd company logo
Babushka


   Richard McGain
       @mcgain
 richardmcgain.com
the name
Babushka in Russian means "mother"

             But. . .

 In Australia, it is the name for
       Russian Nesting Dolls
the installer               .




$ sh -c "`curl https://babushka.me/up`"

This installs Babushka, ruby and git
(if they are not already installed)
the purpose
   Automates system tasks such as:

● Deploys
● Setting up your dev box
● Other important stuff you don't want
  screwed up
the basics
$ babushka deploy
                    A dependency or "dep"

The command
the concept
dep "dep names can have spaces" do
  met? {
    return true or false
    no side effects
  }
  meet {
    do the actual work here
  }
end
the code
dep "precompile assets" do
  met? {
    File.directory? "public/assets"
  }

  meet {
    `rake assets:precompile`
  }
end
the require
dep "deploy" do
  requires [
    "precompile assets",
    "push to heroku"
  ]
end
the variables                     .




$ babushka push ref=master remote=origin

dep "push", :ref, :remote do
  requires("repo exists").with(remote)
  `git push #{remote} #{ref}:#{ref}`
end
the file
Where does Babushka look for this dep?

./babushka-deps/
~/.babushka-deps/
 /usr/local/bin/babushka/deps/

it looks for all ruby files
recursively.
the github
$ babushka mcgain:deploy

it clones:
github.com/mcgain/babushka-deps

then loads the repo and runs the dep

WARNING: only do this for deps you
trust
the shell
shell "rake annotate"
the shell
shell "[ 1 == 0 ]" do |s|
  if s.result == 1
    math_seems_to_work
  end
end
the stdout
Also stderr!

shell "grep" do |s|
  puts s.stdout #prints nothing
  puts s.stderr #prints helpful error
end
the cd
We can cd

cd "~/.vim/bundle"
shell "git clone gh.co/tpope/vim-repo"

cd "~/.vim/bundle" do
  shell "git clone gh.co/vim/plugin"
end
the git
def rails_repo
  @repo ||= Babushka::GitRepo.new(
    'some-git-repo'
  )
end

rails_repo.repo_shell "git push"
the methods
There are some convenience methods:

  rebasing?
  current_head
  branch!
  checkout!
  reset_hard!
  ahead?
  behind?
the install
dep "colors.npm"
will install the node package colors

but if the name doesn't match

dep 'django.pip' do
 installs 'Django'
 provides 'django-admin.py'
end
the list
.lib for libraries
.bin for binaries
.gem for gems
.py ...
.npm ...
the ruby
dep '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', 'irb'
end
the versions
dep 'postgres.bin' do
  installs 'postgresql'
  provides 'psql ~> 9.0.0'
end
the integration                     .




Although it is a standalone tool it is
also a library (with / without DSL )

Babushka does not scale, 1 system only

Chef, Capistrano, Vagrant, Puppet all
solve a slightly different problem and
are complementary.
the future
google for:

site:github.com babushka-deps


       Questions?
            Richard McGain
                @mcgain
          richardmcgain.com

More Related Content

What's hot

Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Jude A. Goonawardena
 
Writing webapps with Perl Dancer
Writing webapps with Perl DancerWriting webapps with Perl Dancer
Writing webapps with Perl DancerAlexis Sukrieh
 
Automation and Ansible
Automation and AnsibleAutomation and Ansible
Automation and Ansiblejtyr
 
More tips n tricks
More tips n tricksMore tips n tricks
More tips n tricksbcoca
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done rightDan Vaida
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to AnsibleDan Vaida
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0bcoca
 
Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmersxSawyer
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)xSawyer
 
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupAnsible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupOrestes Carracedo
 
Getting Started with Capistrano
Getting Started with CapistranoGetting Started with Capistrano
Getting Started with CapistranoLaunchAny
 
Capistrano - automate all the things
Capistrano - automate all the thingsCapistrano - automate all the things
Capistrano - automate all the thingsJohn Cleary
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsLessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsPuppet
 
Intro to Rails
Intro to Rails Intro to Rails
Intro to Rails epiineg1
 
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with AnsibleProvisioning iOS CI Server with Ansible
Provisioning iOS CI Server with AnsibleShashikant Jagtap
 

What's hot (20)

Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)
 
Writing webapps with Perl Dancer
Writing webapps with Perl DancerWriting webapps with Perl Dancer
Writing webapps with Perl Dancer
 
Automation and Ansible
Automation and AnsibleAutomation and Ansible
Automation and Ansible
 
More tips n tricks
More tips n tricksMore tips n tricks
More tips n tricks
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to Ansible
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
 
Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmers
 
Ansible 2.0
Ansible 2.0Ansible 2.0
Ansible 2.0
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
 
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupAnsible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User Group
 
Getting Started with Capistrano
Getting Started with CapistranoGetting Started with Capistrano
Getting Started with Capistrano
 
Capistrano - automate all the things
Capistrano - automate all the thingsCapistrano - automate all the things
Capistrano - automate all the things
 
Ansible 202 - sysarmy
Ansible 202 - sysarmyAnsible 202 - sysarmy
Ansible 202 - sysarmy
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsLessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet Agents
 
Lies, Damn Lies, and Benchmarks
Lies, Damn Lies, and BenchmarksLies, Damn Lies, and Benchmarks
Lies, Damn Lies, and Benchmarks
 
Ansible 202
Ansible 202Ansible 202
Ansible 202
 
Intro to Rails
Intro to Rails Intro to Rails
Intro to Rails
 
Capistrano
CapistranoCapistrano
Capistrano
 
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with AnsibleProvisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
 

Similar to Babushka

Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012alexismidon
 
Boxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsBoxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsPuppet
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Derek Willian Stavis
 
macos installation automation
macos installation automationmacos installation automation
macos installation automationJon Fuller
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItPuppet
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Building scala with bazel
Building scala with bazelBuilding scala with bazel
Building scala with bazelNatan Silnitsky
 
Painless Deployment with Capistrano
Painless Deployment with CapistranoPainless Deployment with Capistrano
Painless Deployment with CapistranoNick Kugaevsky
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHErica Windisch
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
ASU DUG - SVN and CVS
ASU DUG - SVN and CVSASU DUG - SVN and CVS
ASU DUG - SVN and CVSJeff Beeman
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Robert Treat
 
Bash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageBash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageRené Ribaud
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
Packaging Software, Puppet Labs Style - PuppetConf 2014
Packaging Software, Puppet Labs Style - PuppetConf 2014Packaging Software, Puppet Labs Style - PuppetConf 2014
Packaging Software, Puppet Labs Style - PuppetConf 2014Puppet
 

Similar to Babushka (20)

Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
 
Boxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsBoxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of Laptops
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
 
macos installation automation
macos installation automationmacos installation automation
macos installation automation
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About It
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Os Treat
Os TreatOs Treat
Os Treat
 
Building scala with bazel
Building scala with bazelBuilding scala with bazel
Building scala with bazel
 
Painless Deployment with Capistrano
Painless Deployment with CapistranoPainless Deployment with Capistrano
Painless Deployment with Capistrano
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOps
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
ASU DUG - SVN and CVS
ASU DUG - SVN and CVSASU DUG - SVN and CVS
ASU DUG - SVN and CVS
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
 
Bash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageBash is not a second zone citizen programming language
Bash is not a second zone citizen programming language
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Capistrano for non-rubyist
Capistrano for non-rubyistCapistrano for non-rubyist
Capistrano for non-rubyist
 
Packaging Software, Puppet Labs Style - PuppetConf 2014
Packaging Software, Puppet Labs Style - PuppetConf 2014Packaging Software, Puppet Labs Style - PuppetConf 2014
Packaging Software, Puppet Labs Style - PuppetConf 2014
 
EC2
EC2EC2
EC2
 

Recently uploaded

Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 

Recently uploaded (20)

Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Babushka

  • 1. Babushka Richard McGain @mcgain richardmcgain.com
  • 2. the name Babushka in Russian means "mother" But. . . In Australia, it is the name for Russian Nesting Dolls
  • 3. the installer . $ sh -c "`curl https://babushka.me/up`" This installs Babushka, ruby and git (if they are not already installed)
  • 4. the purpose Automates system tasks such as: ● Deploys ● Setting up your dev box ● Other important stuff you don't want screwed up
  • 5. the basics $ babushka deploy A dependency or "dep" The command
  • 6. the concept dep "dep names can have spaces" do met? { return true or false no side effects } meet { do the actual work here } end
  • 7. the code dep "precompile assets" do met? { File.directory? "public/assets" } meet { `rake assets:precompile` } end
  • 8. the require dep "deploy" do requires [ "precompile assets", "push to heroku" ] end
  • 9. the variables . $ babushka push ref=master remote=origin dep "push", :ref, :remote do requires("repo exists").with(remote) `git push #{remote} #{ref}:#{ref}` end
  • 10. the file Where does Babushka look for this dep? ./babushka-deps/ ~/.babushka-deps/ /usr/local/bin/babushka/deps/ it looks for all ruby files recursively.
  • 11. the github $ babushka mcgain:deploy it clones: github.com/mcgain/babushka-deps then loads the repo and runs the dep WARNING: only do this for deps you trust
  • 13. the shell shell "[ 1 == 0 ]" do |s| if s.result == 1 math_seems_to_work end end
  • 14. the stdout Also stderr! shell "grep" do |s| puts s.stdout #prints nothing puts s.stderr #prints helpful error end
  • 15. the cd We can cd cd "~/.vim/bundle" shell "git clone gh.co/tpope/vim-repo" cd "~/.vim/bundle" do shell "git clone gh.co/vim/plugin" end
  • 16. the git def rails_repo @repo ||= Babushka::GitRepo.new( 'some-git-repo' ) end rails_repo.repo_shell "git push"
  • 17. the methods There are some convenience methods: rebasing? current_head branch! checkout! reset_hard! ahead? behind?
  • 18. the install dep "colors.npm" will install the node package colors but if the name doesn't match dep 'django.pip' do installs 'Django' provides 'django-admin.py' end
  • 19. the list .lib for libraries .bin for binaries .gem for gems .py ... .npm ...
  • 20. the ruby dep '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', 'irb' end
  • 21. the versions dep 'postgres.bin' do installs 'postgresql' provides 'psql ~> 9.0.0' end
  • 22. the integration . Although it is a standalone tool it is also a library (with / without DSL ) Babushka does not scale, 1 system only Chef, Capistrano, Vagrant, Puppet all solve a slightly different problem and are complementary.
  • 23. the future google for: site:github.com babushka-deps Questions? Richard McGain @mcgain richardmcgain.com