10. Single CI Job
• rspec-puppet
• syntax check
• lint
Single Release Job
• create/push tag
Single Deploy Job
• Capistrano tasks
• poor man’s dynamic environments
• kludgy git logic w/conditionals in Capfile
For All Modules
13. task "create_puppet_env", :roles => :puppet_master do
if exists?(:branchname)
run "if [ -d #{environment_basedir}/#{branchname} ]; then cd
#{environment_basedir}/#{branchname} && git pull origin
#{branchname} ; else
git clone #{module_repository} #{environment_basedir}/
#{branchname} --branch #{branchname} ; fi"
else
puts "Please provide a valid git branch name as an argument"
end
end
14. task "create_puppet_env", :roles => :puppet_master do
if exists?(:branchname)
run "if [ -d #{environment_basedir}/#{branchname} ]; then cd
#{environment_basedir}/#{branchname} && git pull origin
#{branchname} ; else
git clone #{module_repository} #{environment_basedir}/
#{branchname} --branch #{branchname} ; fi"
else
puts "Please provide a valid git branch name as an argument"
end
end
39. r10k deploy environment test -p
deploys all modules in Puppetfile
for the test branch
r10k deploy module tomcat
deploys a single module!
40. CI Job Per Module
• rspec-puppet
• syntax check
• lint
Release Job Per Module
• create/push tag
• select module from dropdown list
Deploy Job For Each Module And Hiera
• simpler Capistrano tasks
• wrap r10k calls to each master/node
41. desc "for specified branch in puppetfile repo, use r10k to
deploy all modules for the specified environment."
task "update_environment", :roles => :puppet_master do
if exists?(:branchname)
run "r10k -v debug deploy environment #{branchname}
-p"
else
puts "Please provide a valid git branch name as an
argument"
end
end