Continuous Deployment
using Hiera as an ENC
of Dynamic Environments
Scott Phelps
Puppet Camp
June 5th, 2014
Washington, DC
1. Hieradata
2. Roles using Hieradata
3. Profiles
4. Testing
a.  rspec-puppet
b.  beaker
5. Continuous Integration with Te...
Hieradata
the single source of truth
with Hiera it’s easy to
specify parameter values specific to
a location, role, profile, fqdn, or
whatever facts you decide
no defaults in modules
to be the single source of truth for all modules
allows Hieradata
Roles
defined exclusively in Hiera
roles provide the layer
of abstraction between
business logic and
operations logic
Profiles
modules that abstract modules
profiles provide the
layer of
abstraction between
operations logic and
module logic
Testing
using rspec-puppet and beaker
Test Driven Development
● Provides rapid feedback
● Produces high quality,
robust code
Unit tests are provided using the
rspec-puppet Gem.
They help to ensure that your
module passes the compilation
phase.
•  Acceptance tests are provided
using the Beaker Gem.
•  They help to ensure that your
module does what you expect
on a l...
Continuous
Integration
using Teamcity
Automated Building of Pull Requests….
Merging and Promotion of Branches...
Module Deployment…
CI R10K PE
R10k is a tool for
deploying puppet code
Agent
it creates a new environment for each branch
R10k Results
Puppetfile
Questions?
Upcoming SlideShare
Loading in …5
×

Puppet Camp DC 2014: Continuous Deployment of Dynamic Environments Using Hiera ENC

1,564 views

Published on

Puppet Camp DC 2014: Continuous Deployment of Dynamic Environments Using Hiera ENC

Puppet Camp DC 2014: Continuous Deployment of Dynamic Environments Using Hiera ENC

  1. 1. Continuous Deployment using Hiera as an ENC of Dynamic Environments Scott Phelps Puppet Camp June 5th, 2014 Washington, DC
  2. 2. 1. Hieradata 2. Roles using Hieradata 3. Profiles 4. Testing a.  rspec-puppet b.  beaker 5. Continuous Integration with Teamcity 6. Questions? What I’m Going to Talk About
  3. 3. Hieradata the single source of truth
  4. 4. with Hiera it’s easy to specify parameter values specific to a location, role, profile, fqdn, or whatever facts you decide
  5. 5. no defaults in modules to be the single source of truth for all modules allows Hieradata
  6. 6. Roles defined exclusively in Hiera
  7. 7. roles provide the layer of abstraction between business logic and operations logic
  8. 8. Profiles modules that abstract modules
  9. 9. profiles provide the layer of abstraction between operations logic and module logic
  10. 10. Testing using rspec-puppet and beaker
  11. 11. Test Driven Development ● Provides rapid feedback ● Produces high quality, robust code
  12. 12. Unit tests are provided using the rspec-puppet Gem. They help to ensure that your module passes the compilation phase.
  13. 13. •  Acceptance tests are provided using the Beaker Gem. •  They help to ensure that your module does what you expect on a live node. •  The Serverspec Gem allows you to compare the end state of that live node to a set of RSpec •  Expectations.
  14. 14. Continuous Integration using Teamcity
  15. 15. Automated Building of Pull Requests….
  16. 16. Merging and Promotion of Branches...
  17. 17. Module Deployment… CI R10K PE R10k is a tool for deploying puppet code Agent it creates a new environment for each branch
  18. 18. R10k Results
  19. 19. Puppetfile
  20. 20. Questions?

×