opinionated continuous delivery

14
Opinionated Continuous Delivery Dwi Sasongko S <[email protected]>

Upload: dwi-sasongko-supriyadi

Post on 06-May-2015

223 views

Category:

Technology


0 download

DESCRIPTION

A very opinionated continuous delivery implementation. It's not perfect, it may or may not work for your organisation, but it tries to follow the sense of correctness and conventions agreed by all stakeholder.

TRANSCRIPT

Page 1: Opinionated continuous delivery

Opinionated Continuous Delivery

Dwi Sasongko S<[email protected]>

Page 2: Opinionated continuous delivery

Challenges

● How can I deploy this to production?● How can I be sure that this will work in

production?● How long does it take to go to production?

Page 3: Opinionated continuous delivery

Answers

Question #1 How can I deploy this to production?● Delivery Pipeline● Stages● Automation from day one● Discipline

Page 4: Opinionated continuous delivery

Q#1 How can I deploy this to production?

● Delivery Pipelineo Build once, promote to different environment/stageso Deploy early, break early, fix earlyo Master/trunk as production ready branch

No revert, but incremental changes

Page 5: Opinionated continuous delivery

Q#1 How can I deploy this to production?

● Stageso Development

Developero Test

Developer + QAo Integration

QAo Staging

QAo Production

Everyone

Page 6: Opinionated continuous delivery

Q#1 How can I deploy this to production?

● Automation from day oneo Infrastructure as code

puppetize!o Avoid dirty hack

Never SSH to machine Use API whenever possible

o One click deployment Launch machine and provision Automated code deployment

Page 7: Opinionated continuous delivery

Q#1 How can I deploy this to production?

● Disciplineo … best practiceso … conventions or configuration?o Company as one big teamo It’s not about you and me, it’s about us!o If I screw up, I will screw the whole company!

Page 8: Opinionated continuous delivery

Answers

Question #2 How can I be sure that this will work in production?● Environment similarity● Build/Deploy similarity● Efficient testing

Page 9: Opinionated continuous delivery

Q#2 How can I be sure that this will work in production?

● Environment setup matterso development on top of virtual machine, same setup

as productiono other environments are small sets of production

machineo same configuration on every environment

Page 10: Opinionated continuous delivery

Q#2 How can I be sure that this will work in production?

● Build/Deploy similarityo Same package for all environmento Same deployment step for all environmento A switch to differentiate each environmento Differences on configuration for each environment

Test different configuration More eyes to verify changes

Page 11: Opinionated continuous delivery

Q#2 How can I be sure that this will work in production?

● Efficient testingo Unit test during build time

unit test & coverageo Automated Smoke & Functional test in

test/integration Feature = Feature + Test

o Automated Regression test in stagingo Post deployment test

Page 12: Opinionated continuous delivery

Answers

Question #3 How long does it take to go to production?● 10 minutes

o Parallel provisioningo Parallel deploymento Parallel testing

Page 13: Opinionated continuous delivery

Responsibility vs Headache

● Whose responsibility?o Everyone’s responsibility

● Whose headacheo Everyone’s headache

Page 14: Opinionated continuous delivery

Tools

● vagrant (http://www.vagrantup.com/)● puppet (http://puppetlabs.com/)● jenkins (http://jenkins-ci.org/)● docker (http://www.docker.com/)● phantomjs (http://phantomjs.org/) ● casperjs (http://casperjs.org/)