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

Post on 27-Aug-2014

498 views 1 download

Tags:

description

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

transcript

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 Teamcity 6. Questions?

What I’m Going to Talk About

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 live node.

•  The Serverspec Gem allows you to compare the end state of that live node to a set of RSpec

•  Expectations.

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?