Software-Deployments ohne graue HaareContinuous Delivery24. Juni 2013 – Corsin Decurtins
2 20deploymentsper yeardeploymentsper day
Netcetera | 3Some numbers…On the leftTraditional application from something like a bank, an insurance company, agovernment...
Netcetera | 4Some numbers…Both applications need a high up-time.Deployments to the production environment are risky.Comple...
Netcetera | 5Two completely different approaches"Banks" try to reduce the risk and effort for deployments by reducing the ...
Netcetera | 6If it hurts,do it often.
Netcetera | 7Our goalsImprove QualityFewer errors, less (unexpected) down-time.StandardizationDifferent applications shoul...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 9Software Delivery PipelineThe Software Delivery Pipeline is the combined set of processes, procedures andtool...
Netcetera | 10Software Delivery PipelineBuilds Propagate through the PipelineSuccessful completion of a step triggers the ...
Netcetera | 11Software Delivery PipelineA few things that you should notice right here:Everybody has a Software Delivery P...
Netcetera | 12Continuous DeliveryDeliver software changes continuously and in a fully-automated way from thedeveloper to t...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 14Source Code Management (SCM)CVSand many moreFilesystem
Netcetera | 15Source Code Management (SCM)We are currently moving from Subversion to GitGit has interesting properties rel...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 17Artifact RepositoryFilesystemand many more
Netcetera | 18Artifact RepositoryImportant for the reproducability of builds and releasesWe use Nexus
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 20Build Serverand many more
Netcetera | 21Build ServerWe use Jenkins (with some plugins)Continuous Delivery requires a lot of build server powerWe cur...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 23Issue Managementand many more
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 25Metrics / Monitoringand many moreInfostore
Netcetera | 26MetricsContinuous collection of metrics about the code, deployments, performancenumbers,…We use SonarQube fo...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 29Testingand many more
Netcetera | 30TestingFully automated and continuous testing is crucialTesting on very different levels and in different pl...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 32DeploymentInstallation of a software release on a target environmentReplacement of existing software release...
Netcetera | 33Automation of the Deployment Process$ deploy <application> <version> <environment>Deployment was successful$...
Netcetera | 34DeploymentScriptsgluand many more
Netcetera | 35Deployment Tools (1/2)We use Puppet for the deployment of infrastructure componentsApplication servers, web ...
Netcetera | 36Deployment Tools (2/2)The kind of deployment tool that you need, depends a bit on your needs.Scripts/Rundeck...
Netcetera | 37Error Handling and RollbacksAbility to roll back at any timeBack up the preexisting state of the systemTry t...
Netcetera | 38Manual RollbackIts just a workaround, but often a viable optionProbability of failing deployments is relativ...
Netcetera | 39Disruption-FreeDeployments
Netcetera | 40Disruption-Free DeploymentsIf you make very frequent deployments, a downtime is not acceptable anymore.Diffe...
Netcetera | 41http://martinfowler.com/bliki/BlueGreenDeployment.htmlBlue/Green DeploymentsTwo production environments; blu...
Netcetera | 42
Netcetera | 43LiveRebelProduct from ZeroTurnaroundBased on the JRebel technologyReplace running code without the need for ...
Netcetera | 44Tomcat ParallelDeployments
Netcetera | 45http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deploymentTomcat Parallel DeploymentsTo...
Netcetera | 46Data MigrationData migration is a tricky thingSlowComplexError-proneStop-the-WorldAutomation and continuous ...
Netcetera | 47Data Migration PatternsOn-the-fly migrationApplication can deal with multiple versions of the databaseData m...
Netcetera | 48DeploymentTesting
Netcetera | 49Deployment TestingDeployments are tested continuouslyContinuous Testing environmentContinuously, triggered a...
Netcetera | 50Health-Check PagesSimple page/resource in the applicationReports the current health status of an application...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 53How far do you want to go?How far can you go?Is the effort worth it?Is the customer ready?Is the operations ...
Netcetera | 54A way towards Continuous DeliveryIts a maturity processIt takes time to get thereAddress what is hurting mos...
Netcetera | 55Our ExperiencesIncrease of qualityLowering of costsDevelopersOperationsCustomersReduction of stressYou can d...
Netcetera | 56Continuous DeliverySoftware Delivery Pipeline AutomationContinuation of Continuous IntegrationContinuous…… B...
Netcetera | 57> deploy "Continuous Delivery" audiencedeployment of Continuous Deliverywas started by user corsinContinuous...
proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetesti...
Netcetera | 59Further ReadingContinuous DeliveryJez Humble, David FarleyLiterally the book on "Continuous Delivery".
Netcetera | 60Further "Reading"Continuous Delivery (Talk by Jez Humble, DevOps Day 2012)http://www.infoq.com/presentations...
Netcetera | 61corsin.decurtins@netcetera.com+41 44 247 70 70Corsin DecurtinsContact@corsin
Continuous Delivery
Continuous Delivery
Upcoming SlideShare
Loading in …5
×

Continuous Delivery

2,470 views

Published on

Deployments of larger server applications are often risky and error-prone. They cost development teams, system administrators and customers a lot of nerves and gray hair. The path from the development environment into production is often much more difficult than planned. Continuous Delivery - against all intuition - propagates as the solution for this problem to make more deployments.

In this talk, we want to have a look at this paradox and show how ideas from Continuous Delivery can help to optimize the software delivery process. We talk about our experiences in customer projects and what tools we use to automate and optimize our software delivery process, to minimize effort and risk and increase the quality of deployments.

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,470
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide

Continuous Delivery

  1. 1. Software-Deployments ohne graue HaareContinuous Delivery24. Juni 2013 – Corsin Decurtins
  2. 2. 2 20deploymentsper yeardeploymentsper day
  3. 3. Netcetera | 3Some numbers…On the leftTraditional application from something like a bank, an insurance company, agovernment agency, a transport authority … you name it.On the rightOne of those new fancy social network, Web 2.0-ish application.Think Facebook, Google Mail, Flickr, Twitter, …Both are serious applications with serious business value and mission-critical ITsystems.
  4. 4. Netcetera | 4Some numbers…Both applications need a high up-time.Deployments to the production environment are risky.Complex deployments with a lot of dependencies.Both companies try to reduce the risk of deployments.Deployments are painful and stressful.
  5. 5. Netcetera | 5Two completely different approaches"Banks" try to reduce the risk and effort for deployments by reducing the number ofdeployments.The "Web 2.0" side tries to reduce the risk of deployments by making much, muchsmaller deployments … but a lot of them.
  6. 6. Netcetera | 6If it hurts,do it often.
  7. 7. Netcetera | 7Our goalsImprove QualityFewer errors, less (unexpected) down-time.StandardizationDifferent applications should deploy in a similar way.Make it easier for the operations and the development teams.Faster DeploymentsLess downtime, smaller need for off-hour deployments.More DeploymentsFaster time-to-market for features and bug fixes.Less Stress
  8. 8. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  9. 9. Netcetera | 9Software Delivery PipelineThe Software Delivery Pipeline is the combined set of processes, procedures andtools that you use to bring code from the development environment intoproduction.Of course you would make the pipeline even wider by including requirementsengineering etc. but for the context of this talk, we will start with code.
  10. 10. Netcetera | 10Software Delivery PipelineBuilds Propagate through the PipelineSuccessful completion of a step triggers the next steps.Errors interrupt the PipelineIn case of an error, the pipeline processing is interrupted.Expensive steps are only done if the previous steps workedFor example (manual) User Testing is only done on builds that passed theautomated tests.Some Pipeline steps might require manual triggeringDeployment to uat or prod is probably still triggered manually
  11. 11. Netcetera | 11Software Delivery PipelineA few things that you should notice right here:Everybody has a Software Delivery Pipeline.You might not have thought about it yet, it might be automated or manual, verysimple or complex, but you have a pipeline.Whether you want it or not, whether you manage it or not.Your pipeline might look differently.Depends on the project, the customer, the business domain, the degree ofmaturity, …
  12. 12. Netcetera | 12Continuous DeliveryDeliver software changes continuously and in a fully-automated way from thedeveloper to the production environment.Very small incrementsAutomationFully automated QAContinuouslyDisruption-free deployments
  13. 13. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  14. 14. Netcetera | 14Source Code Management (SCM)CVSand many moreFilesystem
  15. 15. Netcetera | 15Source Code Management (SCM)We are currently moving from Subversion to GitGit has interesting properties related to Continuous DeliveryPotentially different software delivery pipelines per branchFeature branchesbuild, run unit tests, deploy to test, run integration tests, …but no deployment to QA and prodMaster branchfull software delivery pipeline
  16. 16. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  17. 17. Netcetera | 17Artifact RepositoryFilesystemand many more
  18. 18. Netcetera | 18Artifact RepositoryImportant for the reproducability of builds and releasesWe use Nexus
  19. 19. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  20. 20. Netcetera | 20Build Serverand many more
  21. 21. Netcetera | 21Build ServerWe use Jenkins (with some plugins)Continuous Delivery requires a lot of build server powerWe currently have more than 400 build jobs on our main Jenkins server1 main server and 6 slavesFeature builds are yet to comeWe (normally) build at most once per hourExpensive build jobs (UI tests, performance tests) normally run only once per day
  22. 22. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  23. 23. Netcetera | 23Issue Managementand many more
  24. 24. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  25. 25. Netcetera | 25Metrics / Monitoringand many moreInfostore
  26. 26. Netcetera | 26MetricsContinuous collection of metrics about the code, deployments, performancenumbers,…We use SonarQube for code analysisSonarQube rocks!Summary data from Sonar as well as other metrics are imported into InfostoreInfostore is our company databaseIncludes information on dependenciesHopefully soon as continuously measure performance metrics
  27. 27. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  28. 28. Netcetera | 29Testingand many more
  29. 29. Netcetera | 30TestingFully automated and continuous testing is crucialTesting on very different levels and in different places in the software delivery pipelineUnit testing, integration testing, smoke tests, performance tests, load tests, UI tests, …
  30. 30. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  31. 31. Netcetera | 32DeploymentInstallation of a software release on a target environmentReplacement of existing software releasesData migrationSystem reconfiguration
  32. 32. Netcetera | 33Automation of the Deployment Process$ deploy <application> <version> <environment>Deployment was successful$ deploy <application> <version> <environment>Deployment failed, rolled back to old version
  33. 33. Netcetera | 34DeploymentScriptsgluand many more
  34. 34. Netcetera | 35Deployment Tools (1/2)We use Puppet for the deployment of infrastructure componentsApplication servers, web servers, …Not suited for the application deployments that we doSecurity (push vs. pull)Lack of control over the deployment timeFor application deployment, we currently use scripts and Rundeck as well as Flywayfor database migrationsKISSWe have looked at other tools.
  35. 35. Netcetera | 36Deployment Tools (2/2)The kind of deployment tool that you need, depends a bit on your needs.Scripts/Rundeck: very low level, but simple and effectiveLiveRebel: great for disruption-free deployments, but expensive if you do not need thisfeatureglu (and similar tools): great if you need to deploy an application on a farm of servers(and monitor them)Puppet/Chef: great if you do not (have to) care about deployment times
  36. 36. Netcetera | 37Error Handling and RollbacksAbility to roll back at any timeBack up the preexisting state of the systemTry to make the deployment non-destructiveDetecting errorsDeployment process has to be able to detect errorsAutomated RollbacksVery desirableBut also very complexHas to be tested (continuously)
  37. 37. Netcetera | 38Manual RollbackIts just a workaround, but often a viable optionProbability of failing deployments is relatively smallWe are testing the deployment continuously after allAutomated deployment process provides operations people with the necessary toolsand artifacts to roll back easilyBackupsNon-destructive deployments
  38. 38. Netcetera | 39Disruption-FreeDeployments
  39. 39. Netcetera | 40Disruption-Free DeploymentsIf you make very frequent deployments, a downtime is not acceptable anymore.Different tools, technologies and architectures for doing disruption-free deployments.
  40. 40. Netcetera | 41http://martinfowler.com/bliki/BlueGreenDeployment.htmlBlue/Green DeploymentsTwo production environments; blue and green.Green is running as the current production system.Deploy to blue, test and verify.Switch from green to blue.Very elegant solution.State (database, session) is an issue.
  41. 41. Netcetera | 42
  42. 42. Netcetera | 43LiveRebelProduct from ZeroTurnaroundBased on the JRebel technologyReplace running code without the need for restartingVery cool technologyCommercial product, but worth every penny (if you ask me)Far too expensive, if you do not really need disruption-free deployments
  43. 43. Netcetera | 44Tomcat ParallelDeployments
  44. 44. Netcetera | 45http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deploymentTomcat Parallel DeploymentsTomcat 7 Parallel DeploymentsDifferent version of a web application can be deployed in parallelTomcat routes requests to the different versions:If no session information is present in the request, use the latest version.If session information is present in the request, check the session manager of eachversion for a matching session and if one is found, use that version.If session information is present in the request but no matching session can befound, use the latest version.
  45. 45. Netcetera | 46Data MigrationData migration is a tricky thingSlowComplexError-proneStop-the-WorldAutomation and continuous testing helpsMore frequent and therefore smaller deployments help
  46. 46. Netcetera | 47Data Migration PatternsOn-the-fly migrationApplication can deal with multiple versions of the databaseData migration is done on-the-fly (batch job or touch-and-go)Read-Only availabilityDatabase is read-only as long as the migration is on-goingStorage Layer abstractionEncapsulation of the storage layerNoSQL storage layerLess stringent requirements on schema compliance
  47. 47. Netcetera | 48DeploymentTesting
  48. 48. Netcetera | 49Deployment TestingDeployments are tested continuouslyContinuous Testing environmentContinuously, triggered automaticallyPre-Production environmentRegularly, triggered manually"Same" configuration as the production environment"Same" state as the production environment
  49. 49. Netcetera | 50Health-Check PagesSimple page/resource in the applicationReports the current health status of an applicationBasically:Im fine, thanks. Got everything that I need.Not doing very well, missing some dependencies. Trying my best.Im giving up. Some crucial dependencies missing. Please help.<no answer at all>Can be used for monitoring purposes, but also for deployment smoke tests.
  50. 50. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  51. 51. Netcetera | 53How far do you want to go?How far can you go?Is the effort worth it?Is the customer ready?Is the operations team ready?Mobile and client applicationsTechnical limitationsBuild and test infrastructureProduction infrastructure
  52. 52. Netcetera | 54A way towards Continuous DeliveryIts a maturity processIt takes time to get thereAddress what is hurting mostAutomate further and furtherRun continuously
  53. 53. Netcetera | 55Our ExperiencesIncrease of qualityLowering of costsDevelopersOperationsCustomersReduction of stressYou can do a lot without asking for permission
  54. 54. Netcetera | 56Continuous DeliverySoftware Delivery Pipeline AutomationContinuation of Continuous IntegrationContinuous…… Builds, Integration, Testing… Deployment, MigrationDeployment TestingSmaller and faster deploymentsReduction of Deployment RisksQuality ImprovementFaster DeploymentsDown-Time minimalizationShorter time-to-productionLess stressful deploymentsPotential for more frequent deployments
  55. 55. Netcetera | 57> deploy "Continuous Delivery" audiencedeployment of Continuous Deliverywas started by user corsinContinuous Delivery was successfully deployedto environment audiencelog file has been stored to:http://www.slideshare.net/netceteragroup/>
  56. 56. proddevdevtest-int test-uatMetricsSCM Repobuildunit testingcheck-in deploy deploy deployintegrationtestingperformancetestinguseracceptancesecurityreviewqaCSOops
  57. 57. Netcetera | 59Further ReadingContinuous DeliveryJez Humble, David FarleyLiterally the book on "Continuous Delivery".
  58. 58. Netcetera | 60Further "Reading"Continuous Delivery (Talk by Jez Humble, DevOps Day 2012)http://www.infoq.com/presentations/Continuous-DeliveryInterview with Martin Fowler and Jez Humble on Continuous Deliveryhttp://www.infoq.com/interviews/jez-humble-martin-fowler-cdContinuous Delivery (Blog by Jez Humble)http://continuousdelivery.com/
  59. 59. Netcetera | 61corsin.decurtins@netcetera.com+41 44 247 70 70Corsin DecurtinsContact@corsin

×