opinionated continuous delivery
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
Opinionated Continuous Delivery
Dwi Sasongko S<[email protected]>
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?
Answers
Question #1 How can I deploy this to production?● Delivery Pipeline● Stages● Automation from day one● Discipline
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
Q#1 How can I deploy this to production?
● Stageso Development
Developero Test
Developer + QAo Integration
QAo Staging
QAo Production
Everyone
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
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!
Answers
Question #2 How can I be sure that this will work in production?● Environment similarity● Build/Deploy similarity● Efficient testing
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
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
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
Answers
Question #3 How long does it take to go to production?● 10 minutes
o Parallel provisioningo Parallel deploymento Parallel testing
Responsibility vs Headache
● Whose responsibility?o Everyone’s responsibility
● Whose headacheo Everyone’s headache
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/)