SlideShare a Scribd company logo
1 of 39
SAW DevOps Docker usages
1
Anat Kisel
SAW DevOps
July 2016
Agenda
- SAW Product and our DevOps Challenges
- Docker as solutions to our challenges
- Docker CI Pipeline
- Local Dev Docker Deployment
- SND: Single Docker Node Deployment
- AWS & Public Cloud
- SNB: Single Node Docker Based Build
SAW-ESS Product &
Our DevOps Challenges
3
ESS (Employee Self Service)
SAW (Reports)
SAW (Live Support)
SAW Architecture
Platform
Cluster
Rabbit
Cluster
IDOL
Cluster
Redis
Cluster
ESS Cluster
Postgress DB
Cluster
Mongo DB
Cluster
Portal
XMPP
Ngnix Cluster
Logger ClusterGateway
Cluster
SMTP Vertica Elastic Search
Notification
Service
Central
Logs
Live Chat
EMS: Entity
Management
System
Analytics
RMS
Resources
Management
FRS
File System Search
Cache
Message
System
SAW DevOps challenges given our architecture
- Our Architecture is very advanced & complex (many
components)
- In the past (Before Docker and our automatic deployment
done today by ansible) we did a lot of manual steps
- Dev Env – challenge is to encapsulate the infra complexity from
developer, allowing him independency from shared infra
- CI Build has big challenges in its scale
Our Docker Solutions
9
We began to use Docker ~2.5 years ago
Today we are using Docker as solution in 4 areas:
- Local Developer Docker Deployment
- Single Node Docker Deployment internal farms
- AWS Docker Deployment
- CI: Docker Based Build
Docker Solution #1 (of 4):
Local Developer Docker Deployment
-First we used it for Docker Deployment locally for our
developers to avoid “infra noise” for them when they
work
-This made huge difference in our RnD Efficiency
Docker Solution #2 (of 4):
Single Node Docker Deployment internal farms
-Second we created farm of Single Node Docker Farm
we use for many e2e use cases:
-Deployment on feature branches
-Deployment for Bug hunts and Regressions
-Deployment for PMs, Discover etc
-Third we began to use Docker deployment for
Public Clouds
-Started with AWS
-Used today for internal users only
Docker Solution #3 (of 4):
AWS Docker Deployment
Docker Solution #4 (of 4):
CI: Docker Based Build
- We’ve implemented Docker for CI builds.
-We provision dedicated Docker infrastructure
services for each build
-We maintain unified infrastructure across
development, build & deployment environment.
Docker CI Pipeline
(to be used in deployment after)
15
Our Docker Images…
- We have 16 Infra & App images, deployed as 32 container instances:
- Infra Images such as: redis, idol, elastic search, mongo, postgress etc
- App Images such as: tomcat, gateway, lcm, platform, saw, ui etc
- In addition as have Base images such as JDK, Consul-template etc
- And last we have, Utilities images such as Provision, selenium etc.
Pipeline to create Docker images – our flow
Triggers Build Integration
Test
Push to
registry
Triggers
We have different triggers that can cause this flow to start:
SCM change
–Change in Dockerfile – PostgreSQL upgrade version
–Added new Container to build - PPO container
–Change of vagrant flow
Other build:
–SAW build
–Docker base image build
Triggers Build Integration
Test
Push to
registry
Build
Docker build scripts written in gradle using Docker API
The build lifecycle
- Build Docker images from Docker files
- Create and run container
- Run unit test for the container
(E.G. test connection to tomcat port on tomcat container)
- Push container to repository (to dev in this stage)
Triggers Build Integration
Test
Push to
registry
Integration test
Running integration test
- Call vagrant up on virtual box - Validation for developer
- Pull Docker images from registry
- Run all farm on that VM
- Run test
Call vagrant up on Manage host – Validation for SND
- Pull Docker images from registry
- Run all farm on that VM
- Run test
Triggers Build Integration
Test
Push to
registry
Push
Push Images to registry
- Call gradle build to push images
- HP prod registry
- AWS registry
- Storage in S3
Triggers Build Integration
Test
Push to
registry
Docker CI Pipeline – Summery
22
Infra Build
and Push
Maas Build
and Push
Dev
Registry
Prod
Registry
AWS
Registry
Triggered
Integration test
Vagrant provision
Infra Push
Maas Push
Triggers Build
Integration
Test
Push to
registry
Public Cloud:
AWS Deployment
23
AWS Deployment for SAW
- As we said, we have 16 images, deployed as 32 container instances (HA)
- Provising infrastructure of a farm takes ~15 min.
- We provision new farm as VPC by using terraform.
- Deploying SAW on this farm takes ~1h and keep improving by ansible
- Auto registration of farms in public DNS
Deployment process in AWS Flow
25
Provision
container
Jenkins run
Terraform create
VPC and all AWS
resources
Manage host
Ansible
playbook
Orchestrate
containers
(pull and run)
Registrator
Use S3
Storage
End Point
Copy Ansible
resources
Instance with
Docker service
For Infra and Saw
Run ansible
playbooks
Paas ,Infra ,Nfs
,Maas
VPC
Terraform
Deploy AWS farm resources
- VPC
- Subnets
- Route tables
- Instances
- Security Group
- Route 53 DNS
- Registry S3 storage end point
Jenkins
run
Terraform
Copy Ansible
Run ansible
VPC
Ansible playbooks
Deployment and Orchestrate of:
Maas Dockers using 4 playbooks…
–PAAS - deploy all PAAS containers on all Docker servers
–Consul , registrator , logstash-agent , monitor-agent
–INFRA – Deploy infra containers on relevant TAGs instance
–Dataebases , ….
–NFS – Create NFS cluster and create mount to the relevant instance
–MAAS – Deploy MAAS containers
– create initialized data , test Tenants.
Jenkins
run
Terraform
Copy Ansible
Run ansible
VPC
Deployment process in AWS Flow – Finaly we have a VPC ready
28
Provision
container
Jenkins run
Terraform create
VPC and all AWS
resources
Manage host
Ansible
playbook
Orchestrate
containers
(pull and run)
Registrator
Use S3
Storage
End Point
Copy Ansible
resources
Instance with
Docker service
For Infra and Saw
Run ansible
playbooks
Paas ,Infra ,Nfs
,Maas
VPC
Docker in SNB (Single Node Build)
29
CI Build Facts
- We have 30 build servers (32 CPU, 128GB RAM, 500GB storage)
- Our CI build takes 1 hour
- We’re running over 100 builds a day
Motivation for Single Node Build
- Provide isolated environment for each build
- Reduce build time
- Improve build stability
- Simplify troubleshooting and reduce maintenance effort
Docker based Build CI Flow:
Compilation
Start
Server
Git Push
Vagrant up
Upload to
Nexus
Integration
Tests
SNB: Build Server Configuration
Vertica
Platform GatewayNginx
IDOL
MongoDB
PostgreSQL
Openfire
Redis
RabbitMQ
SMTPServer
HAProxy
Kibana
ElasticSearch
Logstash
Consul
Registrator
Cadvisor
Integration
Test
Build Server - Build servers is dedicated to single
build.
- Build server is running all
compilation and runtime processes.
- Infrastructure processes are
running in Docker containers at the
same server
- Server load is regulated by number
of running threads.
Build Farm Configuration
Selenium
HUB
Selenium
Node
Selenium
Node
Selenium
Node
Selenium
Node
Selenium
Node
Selenium
Node
Selenium Grid
Sur
efir
e
test
Build Server
Sur
efir
e
test
Build Server
Sur
efir
e
test
Build Server
- Selenium Grid is shared across
the builds
- Selenium nodes are running in
Docker containers & on physical
servers
- Each server hosts 2 Docker
containers
- Each container running 16
browsers
Roadmap (What’s next):
- Align all our Docker deployment to work with same
ansible roles (Developers, SND, AWS, SNB)
- Cluster management / Scheduler
(Mesos/Marathon, Nomad)
Demo
36
Summery:
- Docker Builds CI
- Local Developer Docker Deployment
- SND: Single Node Docker Deployment internal farms
- Public Cloud: AWS Docker Deployment
- SNB: Docker Based Single node Build
Summery:
- Docker Builds CI
- Local Developer Docker Deployment
- SND: Single Node Docker Deployment internal farms
- Public Cloud: AWS Docker Deployment
- SNB: Docker Based Single node Build
Thank you
39

More Related Content

What's hot

Docker Platform 1.9
Docker Platform 1.9Docker Platform 1.9
Docker Platform 1.9
Docker, Inc.
 

What's hot (20)

Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOS
 
Taking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and DecideTaking Docker to Production: What You Need to Know and Decide
Taking Docker to Production: What You Need to Know and Decide
 
Compare Docker deployment options in the public cloud
Compare Docker deployment options in the public cloudCompare Docker deployment options in the public cloud
Compare Docker deployment options in the public cloud
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 
Bitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by KubernetesBitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by Kubernetes
 
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStackOrchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStack
 
Container Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in productionContainer Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in production
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018
 
DockerCon EU 2015: From Local Development to Production Deployments using Ama...
DockerCon EU 2015: From Local Development to Production Deployments using Ama...DockerCon EU 2015: From Local Development to Production Deployments using Ama...
DockerCon EU 2015: From Local Development to Production Deployments using Ama...
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and Docker
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWS
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Docker for Multi-Cloud Apps
Docker for Multi-Cloud AppsDocker for Multi-Cloud Apps
Docker for Multi-Cloud Apps
 
Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating SystemKubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating System
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker ee
 
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...
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2
 
Docker Platform 1.9
Docker Platform 1.9Docker Platform 1.9
Docker Platform 1.9
 

Similar to dockerSAW

Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and docker
sflynn073
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
Suresh Balla
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 

Similar to dockerSAW (20)

Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and docker
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
 
DevOps.docx
DevOps.docxDevOps.docx
DevOps.docx
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of Technology
 
DockerCon SF 2015: Docker at Lyft
DockerCon SF 2015: Docker at LyftDockerCon SF 2015: Docker at Lyft
DockerCon SF 2015: Docker at Lyft
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Container on azure
Container on azureContainer on azure
Container on azure
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Individual Serverless Development Environments for AWS
Individual Serverless Development Environments for AWSIndividual Serverless Development Environments for AWS
Individual Serverless Development Environments for AWS
 
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersWSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on Containers
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and Helm
 

dockerSAW

  • 1. SAW DevOps Docker usages 1 Anat Kisel SAW DevOps July 2016
  • 2. Agenda - SAW Product and our DevOps Challenges - Docker as solutions to our challenges - Docker CI Pipeline - Local Dev Docker Deployment - SND: Single Docker Node Deployment - AWS & Public Cloud - SNB: Single Node Docker Based Build
  • 3. SAW-ESS Product & Our DevOps Challenges 3
  • 7. SAW Architecture Platform Cluster Rabbit Cluster IDOL Cluster Redis Cluster ESS Cluster Postgress DB Cluster Mongo DB Cluster Portal XMPP Ngnix Cluster Logger ClusterGateway Cluster SMTP Vertica Elastic Search Notification Service Central Logs Live Chat EMS: Entity Management System Analytics RMS Resources Management FRS File System Search Cache Message System
  • 8. SAW DevOps challenges given our architecture - Our Architecture is very advanced & complex (many components) - In the past (Before Docker and our automatic deployment done today by ansible) we did a lot of manual steps - Dev Env – challenge is to encapsulate the infra complexity from developer, allowing him independency from shared infra - CI Build has big challenges in its scale
  • 10. We began to use Docker ~2.5 years ago Today we are using Docker as solution in 4 areas: - Local Developer Docker Deployment - Single Node Docker Deployment internal farms - AWS Docker Deployment - CI: Docker Based Build
  • 11. Docker Solution #1 (of 4): Local Developer Docker Deployment -First we used it for Docker Deployment locally for our developers to avoid “infra noise” for them when they work -This made huge difference in our RnD Efficiency
  • 12. Docker Solution #2 (of 4): Single Node Docker Deployment internal farms -Second we created farm of Single Node Docker Farm we use for many e2e use cases: -Deployment on feature branches -Deployment for Bug hunts and Regressions -Deployment for PMs, Discover etc
  • 13. -Third we began to use Docker deployment for Public Clouds -Started with AWS -Used today for internal users only Docker Solution #3 (of 4): AWS Docker Deployment
  • 14. Docker Solution #4 (of 4): CI: Docker Based Build - We’ve implemented Docker for CI builds. -We provision dedicated Docker infrastructure services for each build -We maintain unified infrastructure across development, build & deployment environment.
  • 15. Docker CI Pipeline (to be used in deployment after) 15
  • 16. Our Docker Images… - We have 16 Infra & App images, deployed as 32 container instances: - Infra Images such as: redis, idol, elastic search, mongo, postgress etc - App Images such as: tomcat, gateway, lcm, platform, saw, ui etc - In addition as have Base images such as JDK, Consul-template etc - And last we have, Utilities images such as Provision, selenium etc.
  • 17. Pipeline to create Docker images – our flow Triggers Build Integration Test Push to registry
  • 18. Triggers We have different triggers that can cause this flow to start: SCM change –Change in Dockerfile – PostgreSQL upgrade version –Added new Container to build - PPO container –Change of vagrant flow Other build: –SAW build –Docker base image build Triggers Build Integration Test Push to registry
  • 19. Build Docker build scripts written in gradle using Docker API The build lifecycle - Build Docker images from Docker files - Create and run container - Run unit test for the container (E.G. test connection to tomcat port on tomcat container) - Push container to repository (to dev in this stage) Triggers Build Integration Test Push to registry
  • 20. Integration test Running integration test - Call vagrant up on virtual box - Validation for developer - Pull Docker images from registry - Run all farm on that VM - Run test Call vagrant up on Manage host – Validation for SND - Pull Docker images from registry - Run all farm on that VM - Run test Triggers Build Integration Test Push to registry
  • 21. Push Push Images to registry - Call gradle build to push images - HP prod registry - AWS registry - Storage in S3 Triggers Build Integration Test Push to registry
  • 22. Docker CI Pipeline – Summery 22 Infra Build and Push Maas Build and Push Dev Registry Prod Registry AWS Registry Triggered Integration test Vagrant provision Infra Push Maas Push Triggers Build Integration Test Push to registry
  • 24. AWS Deployment for SAW - As we said, we have 16 images, deployed as 32 container instances (HA) - Provising infrastructure of a farm takes ~15 min. - We provision new farm as VPC by using terraform. - Deploying SAW on this farm takes ~1h and keep improving by ansible - Auto registration of farms in public DNS
  • 25. Deployment process in AWS Flow 25 Provision container Jenkins run Terraform create VPC and all AWS resources Manage host Ansible playbook Orchestrate containers (pull and run) Registrator Use S3 Storage End Point Copy Ansible resources Instance with Docker service For Infra and Saw Run ansible playbooks Paas ,Infra ,Nfs ,Maas VPC
  • 26. Terraform Deploy AWS farm resources - VPC - Subnets - Route tables - Instances - Security Group - Route 53 DNS - Registry S3 storage end point Jenkins run Terraform Copy Ansible Run ansible VPC
  • 27. Ansible playbooks Deployment and Orchestrate of: Maas Dockers using 4 playbooks… –PAAS - deploy all PAAS containers on all Docker servers –Consul , registrator , logstash-agent , monitor-agent –INFRA – Deploy infra containers on relevant TAGs instance –Dataebases , …. –NFS – Create NFS cluster and create mount to the relevant instance –MAAS – Deploy MAAS containers – create initialized data , test Tenants. Jenkins run Terraform Copy Ansible Run ansible VPC
  • 28. Deployment process in AWS Flow – Finaly we have a VPC ready 28 Provision container Jenkins run Terraform create VPC and all AWS resources Manage host Ansible playbook Orchestrate containers (pull and run) Registrator Use S3 Storage End Point Copy Ansible resources Instance with Docker service For Infra and Saw Run ansible playbooks Paas ,Infra ,Nfs ,Maas VPC
  • 29. Docker in SNB (Single Node Build) 29
  • 30. CI Build Facts - We have 30 build servers (32 CPU, 128GB RAM, 500GB storage) - Our CI build takes 1 hour - We’re running over 100 builds a day
  • 31. Motivation for Single Node Build - Provide isolated environment for each build - Reduce build time - Improve build stability - Simplify troubleshooting and reduce maintenance effort
  • 32. Docker based Build CI Flow: Compilation Start Server Git Push Vagrant up Upload to Nexus Integration Tests
  • 33. SNB: Build Server Configuration Vertica Platform GatewayNginx IDOL MongoDB PostgreSQL Openfire Redis RabbitMQ SMTPServer HAProxy Kibana ElasticSearch Logstash Consul Registrator Cadvisor Integration Test Build Server - Build servers is dedicated to single build. - Build server is running all compilation and runtime processes. - Infrastructure processes are running in Docker containers at the same server - Server load is regulated by number of running threads.
  • 34. Build Farm Configuration Selenium HUB Selenium Node Selenium Node Selenium Node Selenium Node Selenium Node Selenium Node Selenium Grid Sur efir e test Build Server Sur efir e test Build Server Sur efir e test Build Server - Selenium Grid is shared across the builds - Selenium nodes are running in Docker containers & on physical servers - Each server hosts 2 Docker containers - Each container running 16 browsers
  • 35. Roadmap (What’s next): - Align all our Docker deployment to work with same ansible roles (Developers, SND, AWS, SNB) - Cluster management / Scheduler (Mesos/Marathon, Nomad)
  • 37. Summery: - Docker Builds CI - Local Developer Docker Deployment - SND: Single Node Docker Deployment internal farms - Public Cloud: AWS Docker Deployment - SNB: Docker Based Single node Build
  • 38. Summery: - Docker Builds CI - Local Developer Docker Deployment - SND: Single Node Docker Deployment internal farms - Public Cloud: AWS Docker Deployment - SNB: Docker Based Single node Build