SlideShare a Scribd company logo
1 of 50
1
Dev/QA/Ops Friendly Docker Pipeline
Chris Mague / Shokunin
12/13/2016
2
Today's Talk

The Goal

The Problem

The Stack

The Process

The Conclusion
3
Quote
“a problem well put is half solved.”
― John Dewey
4
The Goal
“We want to release more frequently”
5
The Goal – Restated as Solvable
Build a continuous delivery pipeline for the Trulia Mobile API that
is usable for all stakeholders.
6
The Problem(s) – Dev Version
- my code works on the shared dev host, but not on prod
- no real visibility into what is happening in prod
- troubleshooting is difficult
- the Ops team is not helpful
7
The Problem(s) – QA Version
- code tested in QA doesn’t work in prod
- inability to test multiple builds at the same time
- no shared language to bridge the Dev/Ops teams
- the Ops team is not helpful
8
The Problem(s) – Ops Version
- Dev/Stage environments are inconsistent
- Prod environment is un-reproducable
- Files are copied around in prod
- Incoming requests are difficult to parse
9
The Problems – Stated as Solvable
- Need to build a common language (culture)
- Need to build a reproducable platform in all environments (tech)
- Need to provide automation and visibility tools (tech/culture)
10
The Stack
11
Docker
- Build a reproducable/immutable(ish) platform
- Control Application dependencies
- Automated build capabilities
- Low overhead compared to virtualization
- Stateless application
12
Step 1 / Base Image
- Packer instead of Dockerfiles
- Puppet to build container
- Build on Jenkins
- Vagrant option available
- Tagged with latest
- Pushed to our Docker registry
13
Step 2 / Develop Locally
- create separate run
directories per environment
- modules per environment
- consul_shared
14
Local Terraform
- Sets up the docker container
- Sources variable
- calls the shared keys
- uses the run_locatoin
15
Run Location
- list of containers
- mobileapi-base only is not
cached
16
Run Location
- Run supervisor
- expose port 80 as 8080
- link to dependencies
- set env vars
- mount volumes
17
Configuration
- done in consul
- consul template to json
- creates
/etc/trulia/<APPNAME>.json
- separated by environment
18
Running
19
Step 3 / Kickoff
20
An aside on Jenkins
- Configure with Puppet
- Install SCM Sync Plugin
- Vanilla as possible
- Configure with Puppet
21
${BUILD_NUMBER}
Jenkins provides several environment variables and the build
number of the software packaging now becomes our shared
key
22
Communication
QA to Dev - “tcd-mobileapi(container) build 12 failed to pass
smoke tests can you please look at class foo”
QA to Ops - “tcd-mobileapi(container) build 12 went is having
trouble connecting to the user database”
Ops to Dev - “after we rolled out tcd-mobileapi(container) build
12 we noticed the app_v1_userlookup(KPI) time doubled”
23
Pipeline - Package Software
- Spin up a build container
- Mount the current directory
- Pull in dependencies
- Build a .deb with FPM
- Push to aptly
24
25
Pipeline – Build Deployable Container
- Take base container
- Install packaged software
- Tag with build number
- Upload to registry
26
Docker tags
Be SUPER careful with latest
When in doubt do not use
27
Pipeline – Run in QATCD
- Spin up container in our QATCD Nomad cluster
- Run terraform to update
all of the configurations in consul
- Set up credentials using Vault
- container is now available
http://tcd-mobileapi-10.qatcd.example.com
28
Pipeline – Deploy Test
- health checks are crucial
- needed for monitoring
- needed for LB
- needed for consul
- get hit like 20 times/second
- engineer came up with the
idea of deploy tests
- only hit occasionally
- more detailed
29
Pipeline – Smoke test
- Calls another Jenkins server
- Managed by the QA team
- Detailed application level test
30
Pipeline - Repointer
- allows for static hostnames
for applications or external
testers
- does some checking
31
Pipeline – Next Steps
1) Preprod environment
- Push configuration LIVE
- Run a single container with the newer version
- Other tests run
- Build number is put in a Jenkins form and push button
2) Release to Production
- Put a build number in a Jenkins form
- Only allowed if the build is on preprod
- Containers are rolled out with sleep and concurrency set
32
33
Pipeline
Dev, QA and Ops teams keep an eye on KPIs and various
dashboards
QED
34
Internals
35
Nomad
- Job scheduler
- Not limited to Docker
- Integrates with Consul
- Easy setup
- Sane configuration
36
Nomad Config
37
Traefik
- HAProxy restart issue
- Performant
- Easily templatable
configuration
- Nice quick front end
38
39
Vault / Consul Template
- Easily generate config files from key/value store
- Feature flags are easily implimented
- Store and filter Database credentials
40
Logging
- Big challenge
- All Apache/Nginx logs include APPNAME/BUILD_NUMBER
information and are in JSON format
- Application logs are in JSON format and often include unique
IDs
- Stacktraces are fingerprinted
- Logstash picks up from the Nomad alloc dirs
41
42
43
44
Stats / KPIs
- Data is pulled from the logs and sent to statsd→influxdb with a
Grafana front end
- Host and container level stats are picked up via cAdvisor
45
46
47
Troubleshooting
- Devs have exec access to all containers through Vault
SSH
- This is audited
- After completion of any activities the container is
terminated
48
No silver bullets...
- Unit tests are slow
- Initial learning curve
- Docker on anything other than Linux is painful
- Apps need to be modified
- Less control for devs compared to old method
49
Improvements
- Better troubleshooting tools
- Shared docker host for apps with heavy upstream dependencies
- More local services to make development easier
- Better training/support for desktop Docker issues
- More code libraries to handle common app issues
50
Thanks
Kevin - AppDynamics Sonal Joshi – Trulia Sr.
Automation Engineer
Vincent Lam – Trulia Sr.
Application Developer

More Related Content

What's hot

What's hot (20)

Improving security with Istio | DevNation Tech Talk
Improving security with Istio | DevNation Tech TalkImproving security with Istio | DevNation Tech Talk
Improving security with Istio | DevNation Tech Talk
 
A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
Luca Relandini - Microservices and containers networking: Contiv, deep dive a...
 
Load Balancing Applications on Kubernetes with NGINX
Load Balancing Applications on Kubernetes with NGINXLoad Balancing Applications on Kubernetes with NGINX
Load Balancing Applications on Kubernetes with NGINX
 
Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1
 
NGINX Ingress Controller for Kubernetes
NGINX Ingress Controller for KubernetesNGINX Ingress Controller for Kubernetes
NGINX Ingress Controller for Kubernetes
 
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
Challenges in a Microservices Age: Monitoring, Logging and Tracing on Red Hat...
 
OSDC 2018 | Monitoring Kubernetes at Scale by Monica Sarbu
OSDC 2018 | Monitoring Kubernetes at Scale by Monica SarbuOSDC 2018 | Monitoring Kubernetes at Scale by Monica Sarbu
OSDC 2018 | Monitoring Kubernetes at Scale by Monica Sarbu
 
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java ApplicationsAutomating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
 
What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0
What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0
What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShift
 
KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...
KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...
KubeCon EU 2016: Templatized Application Configuration on OpenShift and Kuber...
 
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Kubernetes debug like a pro
Kubernetes debug like a proKubernetes debug like a pro
Kubernetes debug like a pro
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCFContinuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
 
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEANGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
 
WSO2 Kubernetes Reference Architecture - Nov 2017
WSO2 Kubernetes Reference Architecture - Nov 2017WSO2 Kubernetes Reference Architecture - Nov 2017
WSO2 Kubernetes Reference Architecture - Nov 2017
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
 

Viewers also liked (9)

Menu juin2016
Menu juin2016Menu juin2016
Menu juin2016
 
E learning
E learningE learning
E learning
 
Interests
InterestsInterests
Interests
 
Station
StationStation
Station
 
Contents page analysis
Contents page analysisContents page analysis
Contents page analysis
 
JJ Lonsdale Portfolio 1 - Exemplar Group
JJ Lonsdale Portfolio 1 - Exemplar GroupJJ Lonsdale Portfolio 1 - Exemplar Group
JJ Lonsdale Portfolio 1 - Exemplar Group
 
Mi Barca...
Mi  Barca...Mi  Barca...
Mi Barca...
 
Politicas alimentarias
Politicas alimentariasPoliticas alimentarias
Politicas alimentarias
 
2007 owner manual honda cbr600rr
2007 owner manual honda cbr600rr2007 owner manual honda cbr600rr
2007 owner manual honda cbr600rr
 

Similar to Docker pipelines

Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
Aleksandra Gavrilovska
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
Magento Dev
 

Similar to Docker pipelines (20)

TestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé Mochtar
TestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé MochtarTestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé Mochtar
TestWorks Conf Scalable QA with docker - Maarten van den Ende and Adé Mochtar
 
Magento 2 Deploy Strategies
Magento 2 Deploy StrategiesMagento 2 Deploy Strategies
Magento 2 Deploy Strategies
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
Streamlining Agile Linux Development with Docker and RHEL Atomic
Streamlining Agile Linux Development with Docker and RHEL AtomicStreamlining Agile Linux Development with Docker and RHEL Atomic
Streamlining Agile Linux Development with Docker and RHEL Atomic
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
 
Cloud Foundry Roadmap Update - OSCON - May 2017
Cloud Foundry Roadmap Update - OSCON - May 2017Cloud Foundry Roadmap Update - OSCON - May 2017
Cloud Foundry Roadmap Update - OSCON - May 2017
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Introduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New YorkIntroduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New York
 
CocoaPods.pptx
CocoaPods.pptxCocoaPods.pptx
CocoaPods.pptx
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
Docker 102 - Immutable Infrastructure
Docker 102 - Immutable InfrastructureDocker 102 - Immutable Infrastructure
Docker 102 - Immutable Infrastructure
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
Uri Cohen & Dan Kilman, GigaSpaces - Orchestration Tool Roundup - OpenStack l...
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
KubeCon 2017: Kubernetes from Dev to Prod
KubeCon 2017: Kubernetes from Dev to ProdKubeCon 2017: Kubernetes from Dev to Prod
KubeCon 2017: Kubernetes from Dev to Prod
 
AWS Community Day 2022 David Kirk_Hybrid Local Development Environments with...
AWS Community Day 2022  David Kirk_Hybrid Local Development Environments with...AWS Community Day 2022  David Kirk_Hybrid Local Development Environments with...
AWS Community Day 2022 David Kirk_Hybrid Local Development Environments with...
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Devoxx 2016 - Docker Nuts and Bolts
Devoxx 2016 - Docker Nuts and BoltsDevoxx 2016 - Docker Nuts and Bolts
Devoxx 2016 - Docker Nuts and Bolts
 

Recently uploaded

📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Recently uploaded (20)

📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 

Docker pipelines

  • 1. 1 Dev/QA/Ops Friendly Docker Pipeline Chris Mague / Shokunin 12/13/2016
  • 2. 2 Today's Talk  The Goal  The Problem  The Stack  The Process  The Conclusion
  • 3. 3 Quote “a problem well put is half solved.” ― John Dewey
  • 4. 4 The Goal “We want to release more frequently”
  • 5. 5 The Goal – Restated as Solvable Build a continuous delivery pipeline for the Trulia Mobile API that is usable for all stakeholders.
  • 6. 6 The Problem(s) – Dev Version - my code works on the shared dev host, but not on prod - no real visibility into what is happening in prod - troubleshooting is difficult - the Ops team is not helpful
  • 7. 7 The Problem(s) – QA Version - code tested in QA doesn’t work in prod - inability to test multiple builds at the same time - no shared language to bridge the Dev/Ops teams - the Ops team is not helpful
  • 8. 8 The Problem(s) – Ops Version - Dev/Stage environments are inconsistent - Prod environment is un-reproducable - Files are copied around in prod - Incoming requests are difficult to parse
  • 9. 9 The Problems – Stated as Solvable - Need to build a common language (culture) - Need to build a reproducable platform in all environments (tech) - Need to provide automation and visibility tools (tech/culture)
  • 11. 11 Docker - Build a reproducable/immutable(ish) platform - Control Application dependencies - Automated build capabilities - Low overhead compared to virtualization - Stateless application
  • 12. 12 Step 1 / Base Image - Packer instead of Dockerfiles - Puppet to build container - Build on Jenkins - Vagrant option available - Tagged with latest - Pushed to our Docker registry
  • 13. 13 Step 2 / Develop Locally - create separate run directories per environment - modules per environment - consul_shared
  • 14. 14 Local Terraform - Sets up the docker container - Sources variable - calls the shared keys - uses the run_locatoin
  • 15. 15 Run Location - list of containers - mobileapi-base only is not cached
  • 16. 16 Run Location - Run supervisor - expose port 80 as 8080 - link to dependencies - set env vars - mount volumes
  • 17. 17 Configuration - done in consul - consul template to json - creates /etc/trulia/<APPNAME>.json - separated by environment
  • 19. 19 Step 3 / Kickoff
  • 20. 20 An aside on Jenkins - Configure with Puppet - Install SCM Sync Plugin - Vanilla as possible - Configure with Puppet
  • 21. 21 ${BUILD_NUMBER} Jenkins provides several environment variables and the build number of the software packaging now becomes our shared key
  • 22. 22 Communication QA to Dev - “tcd-mobileapi(container) build 12 failed to pass smoke tests can you please look at class foo” QA to Ops - “tcd-mobileapi(container) build 12 went is having trouble connecting to the user database” Ops to Dev - “after we rolled out tcd-mobileapi(container) build 12 we noticed the app_v1_userlookup(KPI) time doubled”
  • 23. 23 Pipeline - Package Software - Spin up a build container - Mount the current directory - Pull in dependencies - Build a .deb with FPM - Push to aptly
  • 24. 24
  • 25. 25 Pipeline – Build Deployable Container - Take base container - Install packaged software - Tag with build number - Upload to registry
  • 26. 26 Docker tags Be SUPER careful with latest When in doubt do not use
  • 27. 27 Pipeline – Run in QATCD - Spin up container in our QATCD Nomad cluster - Run terraform to update all of the configurations in consul - Set up credentials using Vault - container is now available http://tcd-mobileapi-10.qatcd.example.com
  • 28. 28 Pipeline – Deploy Test - health checks are crucial - needed for monitoring - needed for LB - needed for consul - get hit like 20 times/second - engineer came up with the idea of deploy tests - only hit occasionally - more detailed
  • 29. 29 Pipeline – Smoke test - Calls another Jenkins server - Managed by the QA team - Detailed application level test
  • 30. 30 Pipeline - Repointer - allows for static hostnames for applications or external testers - does some checking
  • 31. 31 Pipeline – Next Steps 1) Preprod environment - Push configuration LIVE - Run a single container with the newer version - Other tests run - Build number is put in a Jenkins form and push button 2) Release to Production - Put a build number in a Jenkins form - Only allowed if the build is on preprod - Containers are rolled out with sleep and concurrency set
  • 32. 32
  • 33. 33 Pipeline Dev, QA and Ops teams keep an eye on KPIs and various dashboards QED
  • 35. 35 Nomad - Job scheduler - Not limited to Docker - Integrates with Consul - Easy setup - Sane configuration
  • 37. 37 Traefik - HAProxy restart issue - Performant - Easily templatable configuration - Nice quick front end
  • 38. 38
  • 39. 39 Vault / Consul Template - Easily generate config files from key/value store - Feature flags are easily implimented - Store and filter Database credentials
  • 40. 40 Logging - Big challenge - All Apache/Nginx logs include APPNAME/BUILD_NUMBER information and are in JSON format - Application logs are in JSON format and often include unique IDs - Stacktraces are fingerprinted - Logstash picks up from the Nomad alloc dirs
  • 41. 41
  • 42. 42
  • 43. 43
  • 44. 44 Stats / KPIs - Data is pulled from the logs and sent to statsd→influxdb with a Grafana front end - Host and container level stats are picked up via cAdvisor
  • 45. 45
  • 46. 46
  • 47. 47 Troubleshooting - Devs have exec access to all containers through Vault SSH - This is audited - After completion of any activities the container is terminated
  • 48. 48 No silver bullets... - Unit tests are slow - Initial learning curve - Docker on anything other than Linux is painful - Apps need to be modified - Less control for devs compared to old method
  • 49. 49 Improvements - Better troubleshooting tools - Shared docker host for apps with heavy upstream dependencies - More local services to make development easier - Better training/support for desktop Docker issues - More code libraries to handle common app issues
  • 50. 50 Thanks Kevin - AppDynamics Sonal Joshi – Trulia Sr. Automation Engineer Vincent Lam – Trulia Sr. Application Developer