SlideShare a Scribd company logo
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Simon McCartney, Site Reliability Engineering
cfgmgmtcamp 2015
CI/CD Pipeline to
Deploy and Maintain an
OpenStack IaaS Cloud
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Who is this guy anyway?
● Dev, then Ops, then Management, back to WebOps
● Solaris & Makefiles
● CentOS w/ kickstart & hairy bash/php → puppet
● Chef
● Salt
● Likes to take the best tools to the next job (kitchen-salt)
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Background
● This project predates HP Helion OpenStack
● We’re using Ubuntu 12.04, OpenStack Grizzly & SaltStack 0.16.2
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Why?
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Why Continuous Integration & Delivery?
• Repeatable, Reliable & Incrementally Improving
• Constant flow of changes to benefit users
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Why Continuous Integration & Delivery?
● Infrastructure as Code > Infrastructure as Art
● Frequent Small Batches > Infrequent Big Batches
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Why Continuous Integration & Delivery?
● Time Vampires
● Manual Builds
● Manual Testing
● Improved consistency & quality
● Faster Cycle Time
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Why Continuous Integration & Delivery
● Unit Tests - salt formulae
● Integration Tests - do these salt formulae work together?
● End-to-End Tests - does the OpenStack Cloud we built work?
● Performance Test - did we break/de-tune something?
● Deployment Tests - do we have everything?
● Configuration Tests - can we test different environments before
hitting the real environment?
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Our Pipeline
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Our Tech Stack
● Vendor packages for OpenStack (Ubuntu)
● Configuration management (SaltStack)
● Software Engineering
● git, gerrit, gitshelf & jenkins
● test-kitchen (kitchen-salt, serverspec)
● Infrastructure Engineering
● Vagrant/VirtualBox & Public Cloud
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Our Pipeline
1. Individual Salt Formula development
2. Personal multi-node, package based OpenStack environment on your
workstation for dev & validation
3. Go public – push to gerrit for review & automated testing
4. Pull in to the deploy-kit
5. deploy-kit tooling kicks in & builds deploy artefacts
6. Auto deploy to ephemeral public cloud test environment
7. Deploy to physical staging environment
8. Ready for production
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Validating & Approving a change
• gerrit - defacto web based open source code review system
• submit changes (a patch set) for review by your peers..
• ..and for testing by Jenkins
• Jenkins, Jenkins Job Builder & Gerrit Trigger
• Gerrit plugins allow certain jobs to be triggered on patch-set events
(create, merge etc)
• results of these jobs are then recorded in gerrit
• test-kitchen
• test harness to execute your configuration management code in isolation (i.e.
fresh VMs)
• providers (vagrant, LXC, openstack, gce, aws etc)
• provisioners (Chef, Salt, Puppet)
• testing frameworks (Bats, RSpec, serverspec etc)
• can be used interactively in your dev environment as well as in validation jobs
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Jenkins Job Builder
● Because nobody like XML
● Generate Jenkins Jobs from re-useable & composable YAML
fragments
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
gitshelf
● Accidentally re-invented the wheel
● BUT, it's still very useful
● ~= Librarian Puppet or Berkshelf or dependencies.txt
● Specify specific versions of the contents of a git repo at specific
location (tag, branch, SHA1 etc)
● Also supports variable expansion & symlink management
● You should probably use repo from Google's AOSP
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
In-cloud validation
1. contractor creates instances &
networks
2. bootstrap.sh used prepare vanilla
image for use with salt
3. Jenkins uploads release artifacts and
deploys salt states
4. Performa validation tests
"roles": {
...
"compute": {
"image": "261844b3-479c-...",
"flavor": "101",
"keypair": "jenkins",
"instances": {
"ae1": [{
"az": "az3",
"number": 1,
"nics": [{
"network": "public-net",
"fixed_ip": "172.16.0.101",
"floating_ip": "15.126.241.109"
},
{
"network": "private-net",
"fixed_ip": "10.0.0.101"
}]
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Deployment Automation
• Production Deploys
• Move slowly when required
• Confirm host is still “good” using existing monitoring framework
• Caution over nova-* service restarts
• Next
• rundeck
• chatops
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Links
● http://devops.com/blogs/continuous-delivery-pipeline/
● http://martinfowler.com/bliki/DeploymentPipeline.html
● https://github.com/secure-pipeline/jenkins-example
● https://speakerdeck.com/garethr/continuous-integration-for-infrastructure
● https://github.com/gitshelf/gitshelf
● https://github.com/moniker-dns/contractor
● https://github.com/macgreagoir/gobstack
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Questions?
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
Thank you!
Simon McCartney
@simonmcc
© Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.

More Related Content

PPTX
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
PDF
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
PPTX
Fluo CICD OpenStack Summit
PDF
Rundeck + Nexus (from Nexus Live on June 5, 2014)
PDF
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
PDF
Continuous Delivery with Jenkins Workflow
PDF
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
PPTX
Javaone 2014 - Git & Docker with Jenkins
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
Fluo CICD OpenStack Summit
Rundeck + Nexus (from Nexus Live on June 5, 2014)
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
Continuous Delivery with Jenkins Workflow
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Javaone 2014 - Git & Docker with Jenkins

What's hot (20)

PPTX
JavaOne 2014: Next Step in Automation: Elastic Build Environment
PDF
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
PPTX
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
PDF
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
PDF
Building a Service Delivery Platform - JCICPH 2014
PDF
Master Continuous Delivery with CloudBees Jenkins Platform
PDF
Jenkins Workflow Webinar - Dec 10, 2014
PPTX
Anatomy of a Build Pipeline
PPTX
Continuous Delivery with Jenkins and Wildfly (2014)
PDF
Docker Enables DevOps
PPTX
CI/CD for everyone else
PDF
How Nuxeo uses the open-source continuous integration server Jenkins
PPTX
Continuous Integration With Jenkins Docker SQL Server
PDF
Rise of the Machines - Automate your Development
PPTX
Workflow, container, and beyond
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
PDF
Git and GitHub for Documentation
PDF
Scaling Jenkins
PDF
DCSF 19 Building Your Development Pipeline
PDF
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
JavaOne 2014: Next Step in Automation: Elastic Build Environment
From Continuous Integration to Continuous Delivery with Jenkins - javaland.de...
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
Building a Service Delivery Platform - JCICPH 2014
Master Continuous Delivery with CloudBees Jenkins Platform
Jenkins Workflow Webinar - Dec 10, 2014
Anatomy of a Build Pipeline
Continuous Delivery with Jenkins and Wildfly (2014)
Docker Enables DevOps
CI/CD for everyone else
How Nuxeo uses the open-source continuous integration server Jenkins
Continuous Integration With Jenkins Docker SQL Server
Rise of the Machines - Automate your Development
Workflow, container, and beyond
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Git and GitHub for Documentation
Scaling Jenkins
DCSF 19 Building Your Development Pipeline
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Ad

Viewers also liked (14)

PPTX
Creating a CI/CD Pipeline for a Java EE Application in the Cloud
PPTX
Cloud computing ppt
PDF
Immutable Service Delivery Shenzhen 2016
PPT
Platform
PPTX
The DevOps Tool Kit: Building the Software Supply Chain
PPTX
PaaS Design & Architecture: A Deep Dive into Apache Stratos
PPTX
SDLC Using Docker for Fun and Profit
PDF
Talking to people: the forgotten DevOps tool
PDF
DevOps: Process, Tool or Mindset?
PPTX
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
PDF
Running OpenStack in Production
PPT
CI and CD with Jenkins
PPTX
SS Introduction to Docker
PDF
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Creating a CI/CD Pipeline for a Java EE Application in the Cloud
Cloud computing ppt
Immutable Service Delivery Shenzhen 2016
Platform
The DevOps Tool Kit: Building the Software Supply Chain
PaaS Design & Architecture: A Deep Dive into Apache Stratos
SDLC Using Docker for Fun and Profit
Talking to people: the forgotten DevOps tool
DevOps: Process, Tool or Mindset?
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
Running OpenStack in Production
CI and CD with Jenkins
SS Introduction to Docker
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Ad

Similar to A CI/CD Pipeline to Deploy and Maintain OpenStack - cfgmgmtcamp2015 (20)

PPTX
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
PPTX
Continuous Integration and Deployment with Jenkins for PCF
PPTX
Continuous Integration and Deployment with Jenkins for PCF
PDF
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
PDF
Software Delivery in 2016 - A Continuous Delivery Approach
PDF
Continuous Integration/Deployment with Docker and Jenkins
PPTX
Devops
PDF
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
PDF
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
PPTX
Apache Geode Test Automation and Continuous Integration & Deployment (CI-CD)
PPTX
Continous delivery devoops Session no 26_new.pptx
PDF
Continuous Integration using Jenkins with Python
PDF
Infrastructure-as-Code and CI Infrastructure at OpenStack
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
PDF
From Dev to DevOps - Codemotion ES 2012
PDF
Jenkins Pipelines
ODP
Ci for all
PDF
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
PPTX
Successful Practices for Continuous Delivery CodeCPH
PDF
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
Software Delivery in 2016 - A Continuous Delivery Approach
Continuous Integration/Deployment with Docker and Jenkins
Devops
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Apache Geode Test Automation and Continuous Integration & Deployment (CI-CD)
Continous delivery devoops Session no 26_new.pptx
Continuous Integration using Jenkins with Python
Infrastructure-as-Code and CI Infrastructure at OpenStack
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
From Dev to DevOps - Codemotion ES 2012
Jenkins Pipelines
Ci for all
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Successful Practices for Continuous Delivery CodeCPH
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand

Recently uploaded (20)

PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
Digital Literacy And Online Safety on internet
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
Introduction to Information and Communication Technology
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
DOCX
Unit-3 cyber security network security of internet system
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
presentation_pfe-universite-molay-seltan.pptx
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Digital Literacy And Online Safety on internet
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
SAP Ariba Sourcing PPT for learning material
522797556-Unit-2-Temperature-measurement-1-1.pptx
Introduction to Information and Communication Technology
Cloud-Scale Log Monitoring _ Datadog.pdf
Unit-1 introduction to cyber security discuss about how to secure a system
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Design_with_Watersergyerge45hrbgre4top (1).ppt
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Unit-3 cyber security network security of internet system
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
RPKI Status Update, presented by Makito Lay at IDNOG 10
Decoding a Decade: 10 Years of Applied CTI Discipline
An introduction to the IFRS (ISSB) Stndards.pdf
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Power Point - Lesson 3_2.pptx grad school presentation
presentation_pfe-universite-molay-seltan.pptx

A CI/CD Pipeline to Deploy and Maintain OpenStack - cfgmgmtcamp2015

  • 1. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Simon McCartney, Site Reliability Engineering cfgmgmtcamp 2015 CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
  • 2. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Who is this guy anyway? ● Dev, then Ops, then Management, back to WebOps ● Solaris & Makefiles ● CentOS w/ kickstart & hairy bash/php → puppet ● Chef ● Salt ● Likes to take the best tools to the next job (kitchen-salt)
  • 3. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Background ● This project predates HP Helion OpenStack ● We’re using Ubuntu 12.04, OpenStack Grizzly & SaltStack 0.16.2
  • 4. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Why?
  • 5. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Why Continuous Integration & Delivery? • Repeatable, Reliable & Incrementally Improving • Constant flow of changes to benefit users
  • 6. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Why Continuous Integration & Delivery? ● Infrastructure as Code > Infrastructure as Art ● Frequent Small Batches > Infrequent Big Batches
  • 7. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Why Continuous Integration & Delivery? ● Time Vampires ● Manual Builds ● Manual Testing ● Improved consistency & quality ● Faster Cycle Time
  • 8. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Why Continuous Integration & Delivery ● Unit Tests - salt formulae ● Integration Tests - do these salt formulae work together? ● End-to-End Tests - does the OpenStack Cloud we built work? ● Performance Test - did we break/de-tune something? ● Deployment Tests - do we have everything? ● Configuration Tests - can we test different environments before hitting the real environment?
  • 9. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Our Pipeline
  • 10. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Our Tech Stack ● Vendor packages for OpenStack (Ubuntu) ● Configuration management (SaltStack) ● Software Engineering ● git, gerrit, gitshelf & jenkins ● test-kitchen (kitchen-salt, serverspec) ● Infrastructure Engineering ● Vagrant/VirtualBox & Public Cloud
  • 11. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Our Pipeline 1. Individual Salt Formula development 2. Personal multi-node, package based OpenStack environment on your workstation for dev & validation 3. Go public – push to gerrit for review & automated testing 4. Pull in to the deploy-kit 5. deploy-kit tooling kicks in & builds deploy artefacts 6. Auto deploy to ephemeral public cloud test environment 7. Deploy to physical staging environment 8. Ready for production
  • 12. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
  • 13. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Validating & Approving a change • gerrit - defacto web based open source code review system • submit changes (a patch set) for review by your peers.. • ..and for testing by Jenkins • Jenkins, Jenkins Job Builder & Gerrit Trigger • Gerrit plugins allow certain jobs to be triggered on patch-set events (create, merge etc) • results of these jobs are then recorded in gerrit • test-kitchen • test harness to execute your configuration management code in isolation (i.e. fresh VMs) • providers (vagrant, LXC, openstack, gce, aws etc) • provisioners (Chef, Salt, Puppet) • testing frameworks (Bats, RSpec, serverspec etc) • can be used interactively in your dev environment as well as in validation jobs
  • 14. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Jenkins Job Builder ● Because nobody like XML ● Generate Jenkins Jobs from re-useable & composable YAML fragments
  • 15. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
  • 16. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
  • 17. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. gitshelf ● Accidentally re-invented the wheel ● BUT, it's still very useful ● ~= Librarian Puppet or Berkshelf or dependencies.txt ● Specify specific versions of the contents of a git repo at specific location (tag, branch, SHA1 etc) ● Also supports variable expansion & symlink management ● You should probably use repo from Google's AOSP
  • 18. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.
  • 19. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. In-cloud validation 1. contractor creates instances & networks 2. bootstrap.sh used prepare vanilla image for use with salt 3. Jenkins uploads release artifacts and deploys salt states 4. Performa validation tests "roles": { ... "compute": { "image": "261844b3-479c-...", "flavor": "101", "keypair": "jenkins", "instances": { "ae1": [{ "az": "az3", "number": 1, "nics": [{ "network": "public-net", "fixed_ip": "172.16.0.101", "floating_ip": "15.126.241.109" }, { "network": "private-net", "fixed_ip": "10.0.0.101" }]
  • 20. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Deployment Automation • Production Deploys • Move slowly when required • Confirm host is still “good” using existing monitoring framework • Caution over nova-* service restarts • Next • rundeck • chatops
  • 21. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Links ● http://devops.com/blogs/continuous-delivery-pipeline/ ● http://martinfowler.com/bliki/DeploymentPipeline.html ● https://github.com/secure-pipeline/jenkins-example ● https://speakerdeck.com/garethr/continuous-integration-for-infrastructure ● https://github.com/gitshelf/gitshelf ● https://github.com/moniker-dns/contractor ● https://github.com/macgreagoir/gobstack
  • 22. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Questions?
  • 23. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice. Thank you! Simon McCartney @simonmcc
  • 24. © Copyright 2013 Hewlett-Packrd Development Company, L.P. The information contained herein is subject to change without notice.

Editor's Notes

  • #2: Good afternoon, my name is Simon McCartney & today I would like to talk to you about a continuous delivery pipeline we built to help us maintain an openstack private cloud. There should have been 2 of us on stage today, but one of my colleagues, Mick Gregg, decided to change jobs at the last minute, so was unable to join us, I have to thank him for all his hard work on this project & this presentation, thank you Mick, it’s unfortunate that you can’t be here today.
  • #4: This project predates HP Helion OpenStack, so it’s not about tripleO. We’re using Ubuntu 12.04 as our base operating system, Ubuntu’s OpenStack packages & SaltStack for configuration management & orchestration, but that’s largely irrelevant, our real challenge was about building a pipeline that worked with packaged OpenStack deploys & realistic multi-node setups for dev & test. Your environment may vary, however, many of the principles are transferable.
  • #5: Why Continuous Integration, Continuous Delivery & the pipeline that comes with a CI/CD environment? Lets walk through the advantages we saw from previous experience that motivated us to build our pipeline
  • #6: Continuous Delivery is a software development & deployment strategy that enables organizations to deliver new features to users as fast and efficiently as possible. The core idea of CD is to create a repeatable, reliable and incrementally improving process for taking software from concept to customer. Of course, configuration management is software too, it wraps & coordinates your actual payload, in our case, an OpenStack environment built on Ubuntu and packaged OpenStack. The goal of Continuous Delivery is to enable a constant flow of changes into production via an automated software production line. The Continuous Delivery pipeline is what makes it all happen.
  • #7: Snowflakes are unique & beautiful things. Services built on snowflake servers are bad, snowflakes are especially bad when you are running a service that you know will span to hundreds or thousands of machines. By making your configuration management & deployment strategy part of a codified & enforced system, we’re saying that “this is the way things will be, this is the way we will configure everything”, it brings dependability & stability, at the inconvenience of not just diving in & fixing things in production by hand. That stability comes from forcing all changes through the same pipeline, all code & configuration changes go through the same test & deployment procedures, nothing jumps from a laptop to production, reducing incidents due to environment configuration errors and getting rid of that “it worked on my laptop” excuse. Having an automated build & deployment system also means that you have the ability to quickly build test systems to check urgent changes – none of the “oh crap, where can we test that” panic that we often find ourselves in for the latest security fix. Frequent Small Batches has many benefits, it forces you to automate, out of sheer boredom & frustration at the very least, but also when you provide frequent small changes you have a much better chance of constantly improving your systems & procedures, the big bang may have worked for the start of the universe, but constant evolution & improvement has worked much better for us since then. Frequent Small Batches also helps decrease scrap & rework due to long running patches that become unmaintainable, after all getting the features your customers want is actually what we’re all about.
  • #8: Removing the manual steps in a process can have many benefits, if you have to do something manually, invariably it is slower, automation allows you to reduce the time taken to complete a given set of steps & reduces the potential for user error . Of course it’s not all rosey, we now have to codify our processes & remove all of the tiny judgement calls we may make when working on a live system. However the pay off for that is consistency and hopefully a faster cycle time, especially if we’ve just removed bottlenecks in a manual process, as manual processes are often tied to people or functional silos.
  • #9: Why Continuous Integration & delivery – so we can test everything! With a well built pipeline, we can test early and often, testing at each layer of the components that go to make up your deployment system, unit testing for the puppet modules, chef cookbooks or salt formula that are your building blocks. We can then test that the particular versions of each of these components work together as we expect, and that the system they build also works as expected. Now that we have a consistent baseline on how to building & deploy, we can layer in performance tests to check for expected or unexpected changes in performance. We can validate that our deployment strategy is complete, it can do clean deploys & upgrade deploys, validate that we haven’t forgotten something required for a new environments, as well as upgrading existing environments. Configuration Tests – here’s a challenge, much of a configuration management strategy is about making sure that we supply the right data for a given environment to the configuration management tooling, how much of an environment can we emulate by using compute & network virtualisation, can we use neutron to build networks that match our target physical environment & validate that the ip ranges, default gateways & netmasks in our production environment work together correctly in a completely virtual & isolated environment?
  • #10: Now that we’ve outlined why you would want a pipeline for a configuration management system, lets move on to how our pipeline works
  • #11: To recap, our private cloud implementation is built on Ubuntu Precise using Ubuntu’s OpenStack packaging, we’re using SaltStack for configuration management & orchestration Our development environments make extensive use of vagrant, either directly or via test-kitchen to give developers & admins production like environments. Our pipeline is built on gerrit, jenkins, test-kitchen & some custom “whole environment” automation scripts. We build volatile local development environments using vagrant & virtualbox and remote test environments in cloud using contractor
  • #12: With our layered approach, all work begins with the configuration management module or data that controls a behavior, for our salt formula, most of this can be developed & tested in isolation using test-kitchen, which makes it light weight & quick to validate, and the use of in-module testing & validation means that this testing propagates on up to the larger CI system (the same per-module environment settings & tests get re-used for module testing when jenkins gets fired for an incoming review) Engineers can then use our personal dev environment, built using some wrappers around vagrant to build a multi-node, multi-network dev environment, that has the same MySQL/Galera Cluster, RabbitMQ cluster & OpenStack packages as production, to validate that their changes behave as expected, once they are happy that they have a working solution, it’s time to go public. When a patch-set hits gerrit, jenkins fires off the relevant tests, including per-module testing & an integration test that helps ensure that this module still works with all of the other modules used to build the system, at this stage we’re looking to validate that a complete system has been built & that all OpenStack components are still working – we hope to add a more complete tempest style validation soon. Our pipeline has several brakes at our choosing, we manually pick what goes forward for full system integration testing & subsequent production deploys, we pick specific versions of configuration management modules for the deploy-kit, this is us being exceptionally cautious, the more adventurous could just have your deploy-kit track master for all modules, gitshelf fully supports that. A patch-set on the deploy-kit repo, bumping the version of one or more configuration management modules, triggers validation of the SHA1’s for each module, does that module version actually exist? After peer review by colleagues & the subsequent merge, a fuller test starts, building a complete system using compute instances & neutron networking in our public cloud to validate that we’ve built an OpenStack Control Plane that successfully talks to itself, and that we have nova-compute nodes that we can create instances on. At this stage, jenkins then builds the deploy-kit artifact for each of our environments, stage & multiple production environments, in our case, this is just a tarball ready for the next stage, deploying to our physical staging environment. Deploying from an artifact is a matter of untarring & running the contained deploy script, which uses salt orchestration to activate the changes in a controlled fashion, depending on the content of the deploy. Once the staging deploy completes successfully, we move on to production.
  • #13: So this is what our local vagrant/virtualbox dev environment looks like, a 3 node control plane with 2 compute nodes. We also have a multi-az version of this, which gets kind of heavy to run on workstation, as it needs a few more nodes to be useful. There are a few differences between this and real production, the use of qemu for one, but were more interested in making sure that we have a working configuration management system at this stage – the actual virtualization system being used by nova-compute is of lesser interest to us. The fact that this is fully scripted means that it takes about 30min to create 5 empty VMs & build a fully working mini-cloud, on your laptop, that’s a huge stepforward from when we started this project, where people committed hypothetical changes & worked it out in production, we now have somewhere sane & sensible & disposable to validate changes.
  • #14: So lets just run through those validation steps tools we use: We’re using gerrit for all source code management, it’s our main git repo host & our code review system We have jenkins hooked up to gerrit, to validate incoming reviews & build artifacts on successful merges, all of our jobs are built using Jenkins Job Builder, because XML is horrible. We make pretty extensive use of test-kitchen for configuration management module testing, test-kitchen was born in the Chef community, but pretty generic & extendable, we added a salt provisioner for our needs, and a puppet provisioner is also available. With test-kitchen you have a number of test & validation frameworks available. When we run test-kitchen locally, it’s with vagrant & virtualbox, when test-kitchen is being run by jenkins, it uses LXC as it’s provider. To come, tempest testing in the pipeline
  • #19: Gitshelf is what drives our deploy-kit building, it’s a simple tool we wrote that’s a somewhere between berkshelf, librarian-puppet and the Android Open Source Projects’ repo tool. We use it to make sure that we have a specific version of a given git repo laid out on disk as we want, it supports token expansion & creating symlinks too, just some bits & pieces we needed to build our deploy artifacts as we wanted. In this diagram, percona, rabbitmq, openstack etc are all individual git repo, testable & useable in their own right, the gitshelf.yml in deploy-kit is used to maintain a pointer to version of the repo we want.
  • #20: When jenkins is doing a full system integration test, it builds a set of openstack resources, nova compute instances, multiple neutron networks & a neutron router, and then we let our salt based deployment system take over, building the database & rabbitmq clusters before starting the openstack install. The openstack resources are built using contractor, a small utility for building nova & neutron objects from a JSON definition, you could call it super light weight HEAT. Once the instances are built and we’ve installed openstack and it’s supporting dependencies, we validate that we can build instances & inspect other specific behaviour. Having this all virtualised means that we’re not blocked on physical hardware being in use for another build or other issues, after all, we’re a cloud company, we should take advantage of that!
  • #21: So now to talk about how we actually deploy to production, we have some custom tooling that apples salt states in a coordinated fashion, ensuring that we move slowly through the nodes in a cluster so that we don’t break a database or messaging cluster in a single hit. We also update control plane & compute nodes on a per-AZ basis, to minimise risk. Part of the per-host deploy is to wait for it to fully recover in our monitoring system before proceeding to the next host – this slow roll can feel very frustrating for simple changes, but any update that involves nova service restarts is inherently risky as compute & network failing to recover has a big knock on impact to our customers. We’re pretty close to making deploys fully hands off, once we have that sorted, I want to put deploy behind some middle ware so that we can trigger deploys from rundeck or hubot or some other communal deploy mechanism.