5. PackerPacker
● Open Source tool to make OS imagesOpen Source tool to make OS images
● Supports Cloud Providers, Docker, Vbox, …Supports Cloud Providers, Docker, Vbox, …
(builders)(builders)
● Has hooks to provision the base imagesHas hooks to provision the base images
(provisioners)(provisioners)
● Create artifacts (Post-Processors)Create artifacts (Post-Processors)
8. VagrantVagrant
● Open Source tool to bootstrap vmsOpen Source tool to bootstrap vms
● Supports many vm Providers, Docker, Vbox, …Supports many vm Providers, Docker, Vbox, …
● Has hooks to provision the base imagesHas hooks to provision the base images
(provisioners), Puppet, Chef, Ansible(provisioners), Puppet, Chef, Ansible
11. TerraformTerraform
● Open Source Automation ToolOpen Source Automation Tool
● ““cloud” orientedcloud” oriented
● Cloud are API’sCloud are API’s
● API’s orientedAPI’s oriented
Terraform is an open source automation toolTerraform is an open source automation tool
which can deal with any kind of CRUD api’s –which can deal with any kind of CRUD api’s –
including major cloud providersincluding major cloud providers
12. The Terraform modelThe Terraform model
● You model your infrastructureYou model your infrastructure
● You make a planYou make a plan
● If ok, you apply that planIf ok, you apply that plan
● Current state is saved for future changesCurrent state is saved for future changes
13. HCLHCL
● Hashicorp Configuration LanguageHashicorp Configuration Language
● Yet another cfgmgmt DSLYet another cfgmgmt DSL
● Desired stateDesired state
● Used by multiple hashicorp tool but also 3rdUsed by multiple hashicorp tool but also 3rd
party toolsparty tools
18. ConsulConsul
● Open Source Service Discovery ToolOpen Source Service Discovery Tool
● Service Mesh toolService Mesh tool
● Build-in KV storeBuild-in KV store
25. So your boss wants a cloudSo your boss wants a cloud
Lets build a self-service cloudLets build a self-service cloud
We are getting closeWe are getting close
26. So your boss wants a cloudSo your boss wants a cloud
Lets build a self-service cloudLets build a self-service cloud
We are getting closeWe are getting close
We forgot about that self-service thingWe forgot about that self-service thing
27. Puppet FactsPuppet Facts
● Facter is very coolFacter is very cool
● Facts are very usefulFacts are very useful
● Facts are also very very insecureFacts are also very very insecure
ifif versioncmp($::puppetversion, '4.0.0') <= 0 {versioncmp($::puppetversion, '4.0.0') <= 0 {
file { 'hiera.yaml':file { 'hiera.yaml':
mode => '0644',mode => '0644',
owner => 'puppet',owner => 'puppet',
group => 'puppet',group => 'puppet',
content => template('profiles/hiera.yaml.erb'),content => template('profiles/hiera.yaml.erb'),
path => '/etc/puppetlabs/puppet/hiera.yaml',path => '/etc/puppetlabs/puppet/hiera.yaml',
}}
Class['::puppet']Class['::puppet']
-> File['hiera.yaml']-> File['hiera.yaml']
}}
29. Puppet Trusted FactsPuppet Trusted Facts
cat default.ppcat default.pp
if $trusted['extensions']['pp_role'] {if $trusted['extensions']['pp_role'] {
include "roles::${trusted['extensions']['pp_role']}"include "roles::${trusted['extensions']['pp_role']}"
} else {} else {
fail("No role is set for this node.")fail("No role is set for this node.")
}}
37. ConclusionConclusion
● Packer and Terraform are great tools to build aPacker and Terraform are great tools to build a
cloud infracloud infra
● Adding Puppet on top of it enables you toAdding Puppet on top of it enables you to
configure and run the nodes in a well-knownconfigure and run the nodes in a well-known
way (cloud without bash :) )way (cloud without bash :) )
● Make the right tradeoffs between puppet inMake the right tradeoffs between puppet in
base image vs puppet on machine bootbase image vs puppet on machine boot