SlideShare uma empresa Scribd logo
1 de 24
© 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.

Mais conteúdo relacionado

Mais procurados

Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
dcjuengst
 
Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014
CloudBees
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and ComposeDockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 

Mais procurados (20)

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

Destaque

Destaque (14)

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

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

Using Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at SplunkUsing Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at Splunk
Docker, Inc.
 
Robust Network Security and Observability with GitOps and Cilium
Robust Network Security and Observability with GitOps and CiliumRobust Network Security and Observability with GitOps and Cilium
Robust Network Security and Observability with GitOps and Cilium
Weaveworks
 

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

Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_video
 
Using Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at SplunkUsing Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at Splunk
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Core os dna_automacon
Core os dna_automaconCore os dna_automacon
Core os dna_automacon
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
OpenStack in 10 minutes with Devstack
OpenStack in 10 minutes with DevstackOpenStack in 10 minutes with Devstack
OpenStack in 10 minutes with Devstack
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at Yelp
 
MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disks
 
State of Big Data on ARM64 / AArch64 - Apache Bigtop
State of Big Data on ARM64 / AArch64 - Apache BigtopState of Big Data on ARM64 / AArch64 - Apache Bigtop
State of Big Data on ARM64 / AArch64 - Apache Bigtop
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
 
Robust Network Security and Observability with GitOps and Cilium
Robust Network Security and Observability with GitOps and CiliumRobust Network Security and Observability with GitOps and Cilium
Robust Network Security and Observability with GitOps and Cilium
 
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
 
Continuous Integration Testing Techniques to Improve Chef Cookbook Quality
Continuous Integration Testing Techniques to Improve Chef Cookbook QualityContinuous Integration Testing Techniques to Improve Chef Cookbook Quality
Continuous Integration Testing Techniques to Improve Chef Cookbook Quality
 
Kirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for AutomatizationKirill Rozin - Practical Wars for Automatization
Kirill Rozin - Practical Wars for Automatization
 
Openstack Summit Tokyo 2015 - Building a private cloud to efficiently handle ...
Openstack Summit Tokyo 2015 - Building a private cloud to efficiently handle ...Openstack Summit Tokyo 2015 - Building a private cloud to efficiently handle ...
Openstack Summit Tokyo 2015 - Building a private cloud to efficiently handle ...
 

Último

📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 

Último (20)

Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 

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.

Notas do Editor

  1. 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.
  2. 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.
  3. 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
  4. 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.
  5. 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.
  6. 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.
  7. 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?
  8. Now that we’ve outlined why you would want a pipeline for a configuration management system, lets move on to how our pipeline works
  9. 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
  10. 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.
  11. 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.
  12. 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
  13. 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.
  14. 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!
  15. 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.