continuous deployment asas 2016

Post on 12-Apr-2017

150 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

DEPLOYMENT.@ Coolblue.

PAUL.Technical Pathfinder

DEPLOYING SOFTWARE.Delivering packaged high quality software on servers.

• +/- 50 deploys per day on all platforms

• Single button deployment

• Developers do their own deployment

FACTS AND FIGURES.

LANGUAGE AGNOSTIC.Same principles apply.

DEVELOPING FEATURE 'X'.To make the customer smile.

UNIT TESTS.All code is guilty, until proven otherwise.

CODING STANDARDS.Rules may apply.

More Octocats at https://octodex.github.com/

GITHUB FLOW.Proven technique.

FORKS.Personal cutlery.

PULL REQUESTS.Share, review and discuss.

PULL REQUESTS.Small commits, small context.

TEAM CHECK.None of us is as smart as all of us.

QUALITY CONTROL.Check standards have been met.

BUILD SERVER.Construction completed.

TEAMCITY.Central point of inspection and deployment.

BUILD CHAINS.Sequence of builds with specific purpose.

BUILD SCRIPTS.Describe automation workflow.

RECYCLE YOUR CONFIGURATIONS.Create a default for all projects and allow overrides.

BUILD CHAINS.Sequence of builds with specific purpose.

BUILD STEP 1.Continuous inspection.

• Automated tests • Unit testing • Functional testing

• Static code analysers • Lint checkers • Code duplication checkers • Code sniffers • Code metrics

QUALITY ASSURANCE.

BE LAZY; YOU DON’T HAVE TO DO IT YOURSELFScrutinizer offers a continuous inspection platform.

REPORTING ON EACH COMMIT.Integrating all information available.

Examples:

• Scrutinizer

• SonarSource

• Codacy

CONTINUOUS INSPECTION PLATFORMS.

MERGE PULL REQUEST.Integrate into the main repository.

REMEMBER GITHUB FLOW.In our case its merged on master branch of forked repo.

ACHIEVEMENT.Continuous integration.

BUILD STEP 2: PACKAGING.Not a box of chocolates..

• Close to the OS • RPMs on package repository • Installed/Updated via OS package manager

• Updates triggered via puppet

LINUX.

• Control over file permissions & rights • Clean uninstallation • Package managers are simple and well-known • Easily distributed • No added complexity of third-party tools

RPMS ARE POWERFUL.

• Octopus Deploy so we can deploy: • Web Services • Windows services • Desktop applications

WINDOWS.

OCTOPUS DEPLOY.Pushing packages to servers.

BUILD STEP 3.Publish to test environment.

ACHIEVEMENT.Continuous delivery.

BUILD STEP 4: PUBLISH TO ACCEPT.Publish to accept environment.

BUILD STEP 5.Publish to production environment.

ACHIEVEMENT.Continuous deployment.

ACHIEVEMENT.Continuous deployment.

CONTINUOUS.delivery vs deployment

• Automated inspection • Automated delivery

• Except production • May have automated post deployment tests

Every change is proven to be deployable!Deployment after manual trigger

CONTINUOUS DELIVERY.

• Continuous delivery • Automated deployment to production • Has automated post-deploy tests

CONTINUOUS DEPLOYMENT.

POST-DEPLOYTests

• Website still up? • Does the functionality work?

• New functionality • Old functionality

• especially old functionality (regression)

• Haven’t I killed the infrastructure?

CHECK FOR SUCCESS.

AUTOMATE.Post-deploy smoke test.

MONITORING.Monitor infrastructure state.

APPLICATION STATISTICS.Measure everything.

give you uplet you downrun you down & desert youmake you crysay goodbyetell a lie & hurt you

FUNCTIONAL TESTS.Automated regression testing.

APPROACHESautomated deployment

DEPLOY & REVERT.Revert in case of problems.

PRE-DEPLOYMENT TESTS.Run post-deploy test on acceptance environment.

CANARY DEPLOYMENT.Deploy to part of a cluster and test in production.

• Deploy to part of the cluster

• X% percentage live

• A/B testing (?)

CANARY DEPLOYMENT.

DEVELOP, TEST, DEPLOY, REPEAT.

Review & testWrite code

Commit &

push

Open pull

request

Build

Package

Staging

Production

Post-deploy

tests

Post-deploytests

ACHIEVEMENT.Continuous deployment.

PROBLEM / CHALLENGE.Reverting data/data structures.

NUTS.Are you.

NO TESTERS NO QUARANTINE

NO 1000+ PAGE TEST SCRIPT NO SIGN-OFF

TAKING RISKS.What suits your comfort zone.

WAIT A MINUTEWhat do you actually have in place

• Automated smoke tests on acceptance environment

• User acceptance tests (AKA The PO test)

POST-DEPLOY TESTS @ COOLBLUE.

REVIEWING OUR BUILD PIPELINE.Build steps in our continuous delivery currently.

TESTING DEPLOY & REVERTA few services have continuous deployment as a test.

CONTINUOUS DELIVERY.

FEEDBACK.You got something to say.

• p.deraaij@coolblue.nl

• @pderaaij

• http://slideshare.net/pderaaij

• http://devblog.coolblue.nl/

• http://careersatcoolblue.com/

THANK YOU.

top related