continuous delivery Webinar Series – February 18, 2015
SPEAKER INTRODUCTION 2
Rohit Ghatol 3 Director of Synerzip Technology Evangelist Contact Details Linkedin: HomePage:
DOCKER INTRODUCTION 4
Docker As a Technology – Light Weight Container Technology for Virtualization Fastest Growing Technology (2 Years) First Release March Release in March 2014 Colossal Adoption Rate 18,876 Star on Github 5
Docker As a Company - DotCloud (PAAS Company) Changed to Docker Oct 2013 Privately Held Company $55 Million in 2 Rounds from 6 Investors Sold DotCloud to CloudControl Aug
WHO USES DOCKER? 7
Who uses Docker? Companies using Docker 8 And many more…
Who uses Docker? Docker PAAS Providers 9 And many more…
Who uses Docker? 10 As an Infrastructure Tool along side
CONTINUOUS DELIVERY 11
Continuous Delivery 12
The Components Host Environment 2.1 App config DB
Continuous Delivery 14 App confi g DB 1.0 Env Env Env 2.1 App DB App DB confi g
The Components 15 Jenkins, Bamboo, etc 1.5 Host Environment 2.1 App config DB Vagrant, Puppet, Chef etc.Virtual Machines, Instructions, Commands, Etc.
CONTINUOUS DELIVERY THE NEXT STEP… 16
Containers Env 2.1 App config DB
LANDSCAPE How companies are deploying SAAS today? 18
Landscape 19 Dev Box Test Servers CI Staging Area Production Area Production Area QA Box Dev QA Op s DevOps Tools - Chef, Puppet, Anisble, SaltStack, Vagrant, VirtualBox, VMWare CIT Tools – Jenkins,Bamboo,Travis, etc IAAS/PAAS – AWS, Azure, Google Cloud, Digital Ocean,Heroku etc
DOCKER
What is Docker? Docker provides Docker Daemon to run light weight containers on Linux. Applications: Are dockerized and Run on Docker Containers –from laptops to production servers on cloud Their images are shared on Docker Hub Apps can be linked (node -> mongo) 21
What is a Container? 22 Virtual Machine Container Using namespace, cgroups, apparmour, etc.
What is Docker? 23 Docker Client Docker Daemon Public Repo Private Repo Docker File DSL
Docker File System 24
Dockerfile FROM dockerfile/node Base Image RUN apt-get update –qq Instructions RUN mkdir /my/app while building image ADD. /my/app CMD [“node”,”web”] What Command to run 25
Dockerfile //Build an Image $> docker build –t “rohitghatol/node”. //Run an Image $>docker run –d –p 80:3000 rohitghatol/node //Push to Docker Hub $>docker push rohitghatol/node//developer $>docker pull rohitghatol/node//operations 26
DOCKER USE CASES 27
CONTINUOUS DELIVERY 28
Continuous Delivery 29 Continuous DeliveryOperations DevCIQAStagingProd High Availability Redundancy SLAs Area where Docker shines Kubernetes etc
Continuous Delivery Use case 30 Dev Box Test Servers CIT Staging Area Production Area Production Area QA Box Dev QA Op s SUT Test Server V 2.1V 2.2V 2.3 Continuous delivery Rollbacks
Developer Scenario 31 Dev Box Dev Rails Image Rails Image Docker Hub Docker Hub Web (RoR) Web (RoR) Dev 1. Pull 2. Run 3. Customize 4. Push as Base Image Team 5. Pull
Developer Scenario 32 Dev Box Dev Host Machine (Developer codes here) Host Machine (Developer codes here) Docker Web (RoR) Web (RoR) DB (MySQL) DB (MySQL) ~/app/src./src IDE, Browsers, etc => Docker Hub Docker Hub Sync Folder Code runs here
CI Scenarios 33 Code Push Test Code Test Feature Build App Docker Image Run Docker Container with App Image Publish App Docker Image Numerous combinations… Pull Code
CI Scenarios – Option 1 34 Code Push Pull Code Test Code Publish App Docker Image Build App Docker Image
CI Scenario 35 Github Docker Web (RoR) Web (RoR) DB (MySQL) DB (MySQL) Docker Hub Docker Hub Dev Box Dev 1. Push Code 2. Listen 3. Get Base Image 5. Run Tests 4. Pull Code 6. Build App Image 7. Push App Image CI Server ( Drone, Shippable, Circle CI, CodeShip, Travis CI, Jenkins etc) CI Server ( Drone, Shippable, Circle CI, CodeShip, Travis CI, Jenkins etc)
CI Scenarios – Option 2 36 Code Push Test Feature Build App Docker Image Run Docker Container with App Image Publish App Docker Image Mark Good App Image
CI Scenario 37 Github CI Server (Drone.io, inhouseCI, etc) CI Server (Drone.io, inhouseCI, etc) Docker Web (RoR) Web (RoR) DB (MySQL) DB (MySQL) Docker Hub Docker Hub Dev Box Dev 1. Push Code 3. Listen 2. Create App Docker Image 5. Run Tests 4. Pull Run App Image 6. Accept/Reject Image
Staging/Prod Scenario 38 Host Machine Docker Container Web (RoR) Web (RoR) DB (MySQL) DB (MySQL) Docker Hub Docker Hub 1. Trigger Event 3. Pull App Image 4. Run Image 2. Deploy Docker Container (AWS, Azure, Digital Ocean, etc.) Host Machine
CLOUD PORTABILITY 39
Docker Hub Docker Hub Cloud Portability Use case 40 Amazon AWS Google Cloud Microsoft Azure Digital Ocean Deployment Tool Deployment Tool Docker, Swarm, Drone.io, Flocker, Tutum, etc SAAS Company SAAS Company Github
MEAN STACK 41
MeanStack Use case 42 Open-Source Full-Stack Solution for MEAN Applications
MeanStack Use case Mean.js provides –Code generator to generate Mean App –Mean.js apps typically have Node Js Server Mongo DB database –Provides Dockerfile and fig.yml to run the app in Docker Containers One Docker container for Node Js Server One Docker container for Mongo DB Database 43
MeanStack Use case 44
MeanStack Use case 45 WebDB Port 3000 Port Docker Containers fig.yml
MeanStack Use case 46 dockerfile/nodejs Image grunt-cli bower package.json ….. Dockerfile
MICRO SERVICES 47
Micro Services Use case 48 Micro Service Recomm Engine Node Mong o Solr Recomm Engine Movie Listing Play PSql Movie Listing Profile RoR My SQL My SQL Redis Profile Preference RoR Redis Preference
……… Micro Services Use case 49 Recomm Engine Movie Listing Profile Preference Sprint 1Sprint 2Sprint 7 Sprint 1Sprint 2 Sprint 1Sprint 2Sprint 3 Sprint 1Sprint 2Sprint 3 ……… Deploy
Micro Services Use case 50 Recomm Engine Node Mong o Solr Recomm Engine Docker Container Gateway/Re v Proxy
Micro Services Use case Micro services are hard to run Needs strong DevOps process Docker helps by –Defining container/micro service as unit –Shipping one micro service as one container –More containers = more scale –By improving Dev – Operations relationships 51
Micro Services Use case What else is needed? –Scheduling –High Availability –Service Discovery –Etc. 52 Giant Swarm By Invite
FUTURE OF DOCKER 53
NEW DOCKER PRODUCTS 54
New Docker Products Docker Machine Docker Swarm Docker Compose 55
Docker Machine Machine makes it really easy to create Docker hosts on local hypervisors and cloud providers. It creates servers, installs Docker on them, then configures the Docker client to talk to them. 56
Docker Machine $>docker-machine create -d virtualbox dev $>docker-machine create -d digitalocean -- digitalocean-access-token=... staging 57
Docker Swarm Swarm is a simple tool which controls a cluster of Docker hosts and exposes it as a single "virtual" host. Swarm uses the standard Docker API as its frontend, which means any tool which speaks Docker can control swarm transparently. 58
Docker Swarm # create a cluster $ docker run --rm swarm create # Add Machine to cluster docker run -d swarm join --addr= token:// #Run Docker commands on swarm docker -H tcp:// run –d –P dockerfile/node 59
Docker Compose An orchestration tool for Docker Defines –Which Docker containers are to be run –How they are connected –What ports they expose –All in single file –Initial design based on Fig.sh Current status - limbo 60
IAAS/PAAS ADOPTION 61
IAAS/PAAS Adoption Amazon ECS –Container service –Supports tasks configuration Google Cloud –Based on Kubernetes Microsoft Azure 62
Q & A? 63
Ashish Shanker
Synerzip in a Nutshell Software product development partner for small/mid-sized technology companies –Exclusive focus on small/mid-sized technology companies, typically venture- backed companies in growth phase –By definition, all Synerzip work is the IP of its respective clients –Deep experience in full SDLC – design, dev, QA/testing, deployment Dedicated team of high caliber software professionals for each client –Seamlessly extends client’s local team, offering full transparency –Stable teams with very low turn-over –NOT just “staff augmentation”, but provide full mgmt support Actually reduces risk of development/delivery –Experienced team - uses appropriate level of engineering discipline –Practices Agile development – responsive, yet disciplined Reduces cost – dual-shore team, 50% cost advantage Offers long term flexibility – allows (facilitates) taking offshore team captive – aka “BOT” option 65
Our Clients 66
Next Webinar Life Cycle of a User Story Complimentary Webinar: Tuesday, March 17, noon CST Presented by: Michael Hall, CEO and Founder of Three Beacons. Michael is a software practitioner and team leader, Certified Scrum Master, Certified Scrum Product Owner, and an early adopter of Agile methods since Three Beacons is a leading provider of agile training and consulting services. See for a complete description of Agile training courses available
Ashish Shanker linkedin.com/company/synerzip facebook.com/Synerzip 68