continuous deployment - developers conference hamburg #dchh
DESCRIPTION
We want to talk about our approach towards Continuous Deployment and how we have setup our process with integrations to Jenkins, Hipchat, Rackspace and GitHub. We want to show you how a easy to use environment enables every developer to do production releases with just a few lines.TRANSCRIPT
![Page 1: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/1.jpg)
!
Continuous Deployment
![Page 2: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/2.jpg)
Me: Hajo Eichler !!!
‣ Head Product Development
‣ DevQaOps
!!!!
‣ github.com/hajoeichler
!!!
‣ founded 2006
‣ Munich & Berlin
‣ 40 people
‣ Cloud eCommerce Software provider
‣ company behind SPHERE.IO, first eCommerce PaaS
!‣ commercetools.com
‣ @commercetools
‣ @sphereio
![Page 3: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/3.jpg)
SPHERE.IO !
‣ Single Source Commerce
‣ Open API for products, customer, cards, orders, tax ...
‣ SDK, templates, CLI, connectors, examples, plugin-ins, etc as Open Source
![Page 4: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/4.jpg)
SPHERE API
![Page 5: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/5.jpg)
📱PHP
JAVA
"
NODE.JS
RUBYIOS
ANDROID
SPHERE API
![Page 6: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/6.jpg)
App Stack !
‣ Scala
‣ Play 2
‣ REST/JSON
‣ Netty
‣ Mongo
‣ ElasticSearch
Ops Stack
!
‣ Puppet
‣ mcollective
‣ hiera/raziel
‣ Ruby
‣ nginx
‣ Rackspace
![Page 7: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/7.jpg)
Today’s challenge...
Code Server
![Page 8: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/8.jpg)
... in practice !
LB
LB
different languages
config
several environment
multiple serverfast
iterationssensitive data
![Page 9: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/9.jpg)
Packaging !
‣ One system to rule them all (OS, services and apps)
‣ Yum or apt update, rollback and handle config files
‣ fpm is you friend
Repository !
‣ Repository categories for stages
‣ Using S3 for hosting
‣ Implemented with s3cmd
‣ Access controlled
![Page 10: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/10.jpg)
System automation - bootstrapping !
‣ Running on Rackspacebootstrap with http://fog.io
‣ We build nodes from scratch based on standard distro image
‣ Automated DNS management using AWS Route53
![Page 11: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/11.jpg)
System automation - configuration !hiera packed with YAML = plain text
!!!!!!!!! Define for each environment
Versioned in GitHub
System automation - provisioning
‣ Infrastructure as code
‣ Role based puppet
‣ Puppet standalone
Config
Package
Service
![Page 12: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/12.jpg)
System automation - configuration !hiera packed with YAML = plain text
!!!!!!!!! Define for each environment
Versioned in GitHub
System automation - configuration
‣ Hiera with YAML - just text files
‣ Treat config as code
‣ Versioning via GitHub
![Page 13: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/13.jpg)
System automation - credentials !!
Raziel
‣ Take care of sensitive data
‣ Using GPG encryption
‣ Keep versioning and history
!
‣ github.com/hajoeichler/raziel
![Page 14: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/14.jpg)
System automation - orchestration
!
‣ How to deal with more than 10 servers? mcollective
‣ Facts/roles link puppet modules to mcollective filters
!
‣ mco ping
‣ mco ping -F roles=sphere-merchantcenter
‣ mco ping -F group=black
‣ mco ping -F roles=sphere-merchantcenter -F group=black
‣ Plugin system
‣ Write your own agents
![Page 15: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/15.jpg)
Pretty complex... !
LB
LB
different languages
config
several environment
multiple serverfast
iterationssensitive data
![Page 16: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/16.jpg)
Demystify !
‣ Build tooling that brings complexity of systems down to a
!
‣ single command line
‣ click of a button
![Page 17: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/17.jpg)
Demystify puppet !
‣ vagrant brings puppet down to the developer machine
!
‣ run production squeezed in one vm
‣ bit of port magic
‣ port forwarding to developer host
‣ shared folders
!
‣ no more “but it works on my machine”
![Page 18: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/18.jpg)
Demystify operations !
‣ git like interface (GLI)
‣ mcollective agent
![Page 19: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/19.jpg)
github.com/hajoeichler/JenkinsJobConfigGenerator
Demystify Continuous Integration
!
‣ we use Jenkins and travis ci
‣ build.sh for all projects
‣ build / test / package / publish
‣ trigger deployments and acceptance tests
‣ build it once only! (no releases)
!
‣ But, what runs where?
![Page 20: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/20.jpg)
Demystify deployments !
!
!
!
!
!
!
HipChat with
robut = mco client
![Page 21: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/21.jpg)
The big picture !
!
!
!
!
!
!
CI ProductionStaging
S3 repo
robut robutrobut
GitHub UserVoice
JIRA PagerDuty
...
Mission Control
![Page 22: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/22.jpg)
BTW: Quality matters !
‣ All this works only when you can trust your security net = automated tests
!
‣ No explicit QA team, task whatever
‣ Let all involve in the story
we use cucumber for specifying
‣ web
‣ command line
‣ API
![Page 23: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/23.jpg)
Data Source: eMarketer 2012
Data Source: eMarketer 2012
Things to take home !
‣ There is a new eCommerce platform
!
‣ Package everything and build it only once
‣ Automate what ever possible - test it!
‣ You build it you deploy it
‣ Give trust to developers and provide nice tooling
‣ Build an audit log on what happens visible to all
![Page 25: Continuous Deployment - Developers Conference Hamburg #dchh](https://reader033.vdocuments.net/reader033/viewer/2022052822/554f5c6fb4c905c8088b4719/html5/thumbnails/25.jpg)
!
SPHERE.IO - from developers to developers!
Try: admin.sphere.io ‣ 60 days for free!
‣ no cc required
‣ #holyshit