cdsummit Continuous Delivery Seminars Automating the deployment process 9 th September 2014
A bit about me Co-founder and Director Worked in Deployment Automation Solutions in regulated environments for 10 years With MidVision since 2008 A toolsmith at heart
Gartner think s we re cool Born in a Bank regulation, risk and compliance Application Release Automation Platform, RapidDeploy deploy environments AND applications at scale Cross industry customer success proven in large complex regulated enterprises Core Platform with ability to integrate to Open Source and Commercial tool chains Gartner DevOps Cool Vendor Customers
Agenda Relationship between DevOps, CD and Automation Desired state, Packaging and versioning Deployment models Toolchains Automation and self service
DevOps, Continuous Delivery and Automation DevOps (Philosophy) Continuous Delivery (Practice) The process of packaging and deploying an application or update of an application from development, across various environments, and ultimately to production Application Release Automation (ARA) Application Release Automation a.k.a. Deployment Automation
Continuous Delivery / Release Pipelines APPLICATION DEPLOYMENT Release Management Application Deploy Application Infrastructure Automation Image Provisioning
Automated Deployment Principles Version control and build configuration Release versions of configuration change in the same way as code Allows linking of configuration releases and application releases together comprising a business application Build Once, Deploy Anywhere
Model Driven Deployment Model defines complete configuration for a logical unit of automation Define similarities and differences Always contain the complete configuration for a target technology Deltas become part of the template so configuration changes are not made in isolation Idempotent 8
Properties / Template DevTst01 QMGR_NAME SALESDEVQM01 QMGR_HOST lnxdev01 QMGR_PORT 1414 MQSC Template ------<QMGR_NAME>-------- ------<QMGR_HOST>-------- ------<QMGR_PORT>-------- 9
Properties / Template DevTst01 QMGR_NAME SALESDEVQM01 QMGR_HOST lnxdev01 QMGR_PORT 1414 MQSC Template ------<QMGR_NAME>-------- ------<QMGR_HOST>-------- ------<QMGR_PORT>-------- SysTst01 QMGR_NAME SALESTSTQM02 QMGR_HOST lnxtst01 QMGR_PORT 1415 10
Properties / Template DevTst01 QMGR_NAME SALESDEVQM01 QMGR_HOST lnxdev01 QMGR_PORT 1414 DB_USER devtstuser SysTst01 QMGR_NAME SALESTSTQM02 QMGR_HOST lnxtst01 QMGR_PORT 1415 DB_USER syststuser MQSC Template ------<QMGR_NAME>-------- ------<QMGR_HOST>-------- ------<QMGR_PORT>-------- ------<DB_USER>-------- 11
Creating the Deploy Package Business Appliation dev_area \DeployDesc \database(s) \source Infrastructure Desired State release_area \jee \scripts \static \database DEPLOY PACKAGE SALESAPP_BUILD_01_02_003.zip Baseline File: SALESAPP_BUILD_01_02_003
Implementation-Version=SALESAPP_BUILD_01_02_003
DevOps Toolchain
` Composite Deployment Directed Deployment httpd.conf IHS Release Manager SALESAPP_BUILD_01_02_003.tar SALESAPP_BUILD_01_02_004.tar cluster/ds/jms WAS qmgr/queue MQ httpd.conf IHS Implementation Manager selects: Application Environment httpd.conf IHS cluster/ds/jms WAS qmgr/queue httpd.conf IHS cluster/ds/jms WAS qmgr/queue cluster/ds/jms WAS qmgr/queue MQ Version MQ MQ
DevOps Toolchain
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc 17
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel 18
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip 19
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ 20
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ x.py JMS Queue Dest 21
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ x.py JMS Queue Dest SALES_JBOSS_01_02_046.zip 22
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ x.py JMS Queue Dest SALES_JBOSS_01_02_046.zip SALES_JBOSS_01_02_046 JBoss 23
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ x.py JMS Queue Dest SALES_JBOSS_01_02_046.zip SALES_JBOSS_01_02_046 JBoss x.ddl Column, View, etc 24
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ x.py JMS Queue Dest SALES_JBOSS_01_02_046.zip SALES_JBOSS_01_02_046 JBoss x.ddl Column, View, etc SALES_DB_01_02_012.zip 25
Version Control Management Build Process Release Mechanism Targets Code Commandline / WebUI / REST / Eclipse Generate Versioned Release Components Ideally web based, self service Web / Application / Database / etc x.mqsc Alter channel SALES_MQ_01_02_033.zip SALES_MQ_01_02_033 MQ x.py JMS Queue Dest SALES_JBOSS_01_02_046.zip SALES_JBOSS_01_02_046 JBoss x.ddl Column, View, etc SALES_DB_01_02_012.zip SALES_DB_01_02_012 Oracle 26
Provisioning New Environments Products AppServer - products Apache HTTP Jboss 6.2 RabbitMQ RHEL 6 Update 5 Database - products Oracle 11.1.0.7.0 RHEL 6 Update 5 27
Provisioning New Environments Products > AppServer - products / App Apache HTTP Jboss 6.2 RabbitMQ RHEL 6 Update 5 Database - products Oracle 11.1.0.7.0 RHEL 6 Update 5 WEB_CONFIG_SALES_1_2_056 JBOSS_CONFIG_SALES_1_2_087 MQ_CONFIG_SALES_1_2_032 STANDARD ORG IMAGE / App ORA_CONFIG_SALES_1_2_042 STANDARD ORG IMAGE 28
Provisioning New Environments Products > > Code AppServer - products / App APP_CONTENT_SALES_1_2_124 Apache HTTP Jboss 6.2 RabbitMQ RHEL 6 Update 5 Database - products Oracle 11.1.0.7.0 RHEL 6 Update 5 WEB_CONFIG_SALES_1_2_056 JBOSS_CONFIG_SALES_1_2_087 MQ_CONFIG_SALES_1_2_032 STANDARD ORG IMAGE / App ORA_CONFIG_SALES_1_2_042 STANDARD ORG IMAGE Sales Release 1.2 29
Continuous Delivery Overview
Packaging Principles, Build Once, Deploy Anywhere when does Continuous Beer start!
Packaging Principle Build Once, Deploy Anywhere Build once, deploy to any (defined) environment in the pipeline. A package should be a single compressed, versioned file. Package integrity across all environments Check-summed and labeled The package should contains all deployment instructions, environment configuration and resources (or address locations to remote resources). Package should be runnable as a standalone process.- not dependent on the deployment tool. Store and retrieve deployment artifacts in a DSL. Use Jenkins and to build your deployment package and store it in the DSL.
Packaging Model for Deployment Artifacts Topology of different environments can define the packaging model to use. Single App / Single Cluster Deploy application and configuration together Deployment Package App Config Multiple App / Multiple Cluster Deploy applications and configurations separately Deployment Package 1 App 1 App 2 Deployment Package 2 Config
Prerequisite Resource & Environment Testing Define which environment resources need testing: file permissions disk space port availability user accounts Do not continue with the deployment if the prerequisite tests fail. Automating prerequisite testing of resources saves a lot of pain and time. Keep adding tests to the deployment as you get a better understanding of the environment. Sometimes known as a Deployment Dry Run.
Automated Testing Strategy Use Jenkins post build plugins to initiate the tests after successful a deployment. Building pipelines can be quick, converting your manual tests to automated tests can be laborious and take months..stick with it.
Rollback Strategy Rollback strategy depends on the technology of the deployment. Database changes cannot be rolled back automatically if business data has been added or amended since the deployment took place. Need a DBA. Make sure DB changes are backwards compatible. Generally with databases, use a fix forward strategy. Middleware can be rolled back if the code is deployed with the configuration.
Metrics, Analytics & Feedback Loop Measure the release process. Deployment times No. of deployments (successful & failed). Velocity Report on the release process measurements. Show management the improvements CD is making to your organization. Fully automating CD is not cheap. Use the metrics to get management onside with investing in CD. Make use of the CI and CD metrics from Jenkins to help with the analytics.
What are we trying to achieve? Faster (Acceleration) We automate processes carried out by IT Faster deployments through whole lifecycle Bring products to market quicker Safer (Lower Operational Risk) Eliminate outages Workflow-scheduling Audit & compliance controls Cheaper (Reduce TCO) More resource time for value-creation Why outsource when you can automate
Continuous Delivery.e2e Pipeline Continuous Integration Automated Unit Testing Artifact creation Automated Acceptance testing / Approval Automated Deployment
Automation Automate your tool chain empower your team III