DevOps Building a Continuous Delivery Pipeline
Who Am I Bobby Warner Founder & President @bobbywarner
What is the goal?
Infrastructure as Code Write code to describe our infrastructure Never manually execute a command on a Linux server Support multiple primary Linux distributions with different package managers Ubuntu uses apt, Centos uses yum
Continuous Integration Checking code into source control kicks off a build Builds automatically run tests Builds automatically publish results
Continuous Delivery Creates all infrastructure components required Picks up build artifacts from CI server and deploys to the infrastructure environment(s) Supports automatic releases or scheduled releases based on business needs
Continuous Delivery No longer SSH ing in to patch/configure servers Rather we release versions of our infrastructure Everything is stored in source-control
Process I thought DevOps was about getting Ops and Developers to work together? Yes, but this presentation is focused on tools
What are the tools?
Tools Git VirtualBox Vagrant Chef Jenkins
Git
Git Distributed version control that is now ubiquitous
Enterprise Git Atlassian Stash GitHub Enterprise
Git Flow
Git Demo Create a repo Commit a change Alias
VirtualBox & Vagrant
VirtualBox Do all your development in VMs Mirror your production environment Eliminate cross platform issues between developers
Vagrant Describe the type of machine and software that needs to be installed Store this file in source code control
Chef
What is Chef? Configuration management tool for your infrastructure Used to automate how you build, deploy, and manage your infrastructure Infrastructure becomes as versionable, testable, and repeatable as application code
Chef Testing Test Kitchen (test harness runner) ServerSpec (integration testing) ChefSpec (unit testing)
ServerSpec
What is AWS OpsWorks? AWS version of Chef Server Uses chef-client in local mode which launches a local in-memory Chef server called chef-zero
Chef Demo https://github.com/bobbywarner/devops-demo
Jenkins
What is Jenkins? Continuous integration server Create and monitor execution of repeatable jobs Used with many different languages and frameworks Excluding.NET, see Microsoft Team Foundation Server
Importance of Jenkins Future of Jenkins is a federated master model. No more single master enterprise installs of Jenkins. Jenkins is the orchestrator for your CI/CD pipelines, if it s down you won t be pushing any code
Jenkins Fail Don t create Jenkins jobs by hand though as there is no way to scale, audit, or track changes!
Jenkins Win Use Jenkins Job DSL plugin!
Jenkins Job DSL Plugin allows the definition of a job with Groovy code Offers a useful set of functions to configure common Jenkins items Jobs (i.e. Groovy code) can be stored in source code control
Jenkins Job DSL You can peer review job changes You can write tests for jobs You can make and extend classes of jobs
Jenkins Job DSL
Jenkins Chef DSL Example for getting started with the Jenkins Chef cookbook and the Jenkins Job DSL Automate Jenkins Infrastructure and Job management https://github.com/erichelgeson/jenkins-chef-dsl/
Wrap Up
Call to Action Install Chef DK and create a Chef Cookbook! https://downloads.getchef.com/chef-dk/ Setup Jenkins if you don t already use it! http://jenkins-ci.org/ Configure one job with the DSL plugin! https://wiki.jenkins-ci.org/display/jenkins/job+dsl+plugin
Conclusion Thanks for attending this talk! I hope you found it useful to get an introduction to some of the tools for DevOps! Please get in touch if you are looking for DevOps consultants here in the Twin Cities! info@agileorbit.com