SlideShare une entreprise Scribd logo
1  sur  103
Télécharger pour lire hors ligne
Introduction to Docker
$whoami
Principal Development Engineer at DellEMC
1st half of my career was in CGI & VMware
2nd half of my career has been in System Integration Testing
Docker Captain (since 2016)
Docker Bangalore Meetup Organizer ( 7600+ Registered Users)
Founder of DockerLabs
Ajeet Singh Raina
Twitter: @ajeetsraina
GitHub: ajeetraina
- My Personal Blog website
- Built on WordPress, Hosted on One.com
- Recently Completed 4th Year
- 175+ blogs on Docker | Kubernetes | Cloud
- Monthly close to 1 million visitors per month
$curl www.collabnix.com
- A Shift from Monolithic to Microservices Architecture
- Traditional Software Development Workflow(with/without Docker)
- What is Docker? What problem does it solve for us?
- Docker Vs Linux Containers
- Docker Vs Virtual Machine
- Docker Underlying Technology
- Running Your First Docker Container - Demo
- Using Docker: Build, Ship and Run Workflow - Demo
- Building Your Docker Image using Dockerfile - Demo
Agenda – Morning Session
- Introduction to Docker Networking
- Introduction to Docker Swarm
- How Docker Swarm Mode works?
- Running Web Application using Docker Swarm Mode - Demo
- Test Drive Docker & Docker Swarm on Raspberry Pi – Let’s make it happen !
- How to contribute towards Docker Community?
Agenda – Afternoon Session
A Shift from Monolithic to
Microservice Architecture
A Close Look at Monolithic
Browser
Client
App
Storefront UI
Module
Catalog
Module
Reviews
Module
Orders
Module
HTML
REST/JSON
Database
A Close Look at Monolithic
Browser
Client
App
Storefront UI
Module
Catalog
Module
Reviews
Module
Orders
Module
WAR
Tomcat
HTML
REST/JSON
Database
Simple to Develop, Test, Deploy & Scale
- Simple to develop because of all the tools and IDEs support to that kind
of application by default.
- Easy to deploy because all components are packed into one bundle.
- Easy to scale the whole application.
Benefits of Monolith
Successful Application keep growing..
- Very difficult to maintain
- One component failure will cause the whole system to fail.
- Very difficult to understand and create the patches for monolithic applications.
- Adapting to new technology is very challengeable.
- Take a long time to startup because all the components need to get started.
Disadvantages of Monolith
Today
- Apps are constantly developed
- Built from loosely coupled components
- Newer version are deployed often
- Deployed to a multitude of servers
Customer/
Clients/
Users
Data
Storage
Data
Storage
Data
Storage
Microservice Architecture
Catalog
Service
Reviews
Service
Order
Service
…
Service
Catalog
Database
Reviews
Database
Order
Database
…
Database
API
Gateway
Storefront UI
Browser
Mobile
Device
REST
REST
HTML
REST
- Can scale independent microservices separately. No need to scale
the whole the system
- Can use the latest technologies to develop the microservices.
- One component failure will not cause entire system downtimes.
- When developing an overall solution we can parallel the
microservices development task with the small teams. So it helps to
decrease the development time.
Benefits of Microservices
Once upon a time…a Software Stack
Now much more distributed & complex…
Let’s start with simple analogy..
You are a shipping company
Let’s start with simple analogy..
The customer asked you to ship potatoes
Let’s start with simple analogy..
Hence, you said “BIG YES” and you fitted it
with pianos
Let’s start with simple analogy..
Another customer asked to ship bottles of
liquor
Let’s start with simple analogy..
Things goes really mess up when liquor spill
over your pianos
Let’s start with simple analogy..
Your employed crew is worried how to
handle all these differences
Problem Statements..
- Size of goods
- Forms of goods
Requirement is to keep it safe and stable during the transport
What shall we do?
An Effort to solve the problem Complexity
Every possible good to ship X Every Possible way to Ship
Enter….Internodal Container
That’s what Docker is all about..
What is Docker and what
problem does it solve?
Docker is an open software development
platform which help you to Build, Ship and
Run your applications along with all its
dependencies allowing portability among
any system ranging from small IoT device
like Raspberry Pi, Desktop, Workstation,
Server to the Cloud.
• Standardized packaging for
software and dependencies
• Isolate apps from each other
• Share the same OS kernel
• Works for all major Linux
distributions
• Containers native to Windows
Server 2016 & 1809
What is Docker?
What is Docker?
Refers to several things in 2019
 Docker as a “Company”
 Docker as a “Product”
 Docker as a “Platform”
 Docker as a “CLI Tool”
 Docker as a “Computer Program”
Docker Presence
History of Docker
 A Company as well as Product – 6 Years Old company
Developed by DotCloud Inc. ( Currently Docker Inc.)
A Framework they built their PaaS upon.
Released it as open source 3 and 1/2 years back
Cross-platform nature and friendliness towards System Admin and Developers
Possible to set up in any OS, be it Windows, OSX, Linux, Solaris - It work the same
way
 Guaranteed to run the same way - Your development desktop, a bare-metal server,
virtual machine, data center, or cloud
Today Docker runs on
Docker Vs Linux Container
Docker hold just 5% of whole Container
Code
Docker Vs Linux Container
Docker Linux Containers
Implementation of kernel-sharing applications
isolation technology which is not VM.
Popularly refers to LXC. It delivers containers
that include a complete Linux system, much like
VM, with its own file system, networking and
multiple applications
Encourages applications to be broken down
into their separate processes and provides
tools to do that. Its granular approach
Uses an init system that can manage multiple
processes. Entire app runs as one.
Docker used LXC in the past but replaced it
with Containerd. Containerd is used for single
application containers
LXC is able to run multiple applications inside
system containers
Traditional Software
Development WorkFlow
(without Docker)
Traditional Software
Development WorkFlow
(with Docker)
Docker Vs VM
Docker Containers are NOT VMs
Virtual Machine
Containers
Docker Container Vs VM
Comparing Docker & VM
Virtual Machines Docker
Each VM runs its own OS Container is just a user space of OS
Boot up time is in minutes Containers instantiate in seconds
VMs snapshots are used sparingly Images are built incrementally on top
of another like layers. Lots of
images/snapshots
Not effective diffs. Not version
controlled
Images can be diffed and can be
version controlled. Docker hub is like
GITHUB
Cannot run more than couple of VMs
on an average laptop
Can run many Docker containers in a
laptop.
Only one VM can be started from one
set of VMX and VMDK files
Multiple Docker containers can be
started from one Docker image
Docker Vocabulary
Image Layers
Kernel
Alpine Linux
Install Python and Pip
Upgrade Pip
Copy Requirements
Install Requirements
…
Basic Docker CLIs
Pulling Docker Image
$ docker pull ajeetraina/hellowhale
Listing out Docker Images
$ docker image ls
Running Docker Containers
$ docker run –d –p 5000:5000 –-name hellowhale ajeetraina/hellowhale
Stopping the container
$ docker stop hellowhale (or <container id>)
Using Docker – Build,
Ship & Run WorkFlow
Build. Ship. Run.
- Create DockerHub Account(if not completed)
- Open https://play-with-docker.com
- Hello World Example
- Build Your First Docker Image & Push it to DockerHub
Demo
Building Docker Containers &
Microservices
Introducing Dockerfile
Series of instructions to build Docker Images
Dockerfile – Example
Each Dockerfile creates a Layer
69
Kernel
Alpine Linux
Install Python and Pip
Upgrade Pip
Copy Requirements
Install Requirements
…
- Building Nginx Server using Dockerfile
Demo
Compose is a tool for defining and running multi-container Docker applications
Docker Compose
Reference
 https://github.com/collabnix/dockerlabs
 https://docs.docker.com
 http://www.collabnix.com
- Introduction to Docker Networking
- Introduction to Docker Swarm
- How Docker Swarm Mode works?
- Running Web Application using Docker Swarm Mode - Demo
- From Local Desktop to Cloud in 5 Minutes - Demo
- Test Drive Docker & Docker Swarm on Raspberry Pi – Let’s make it happen !
- Demonstrating Cool Docker Projects - Demo
- 5 Tips to become Docker Captain
- How to contribute towards Docker Community?
Agenda – Afternoon Session
Introduction to Docker
Networking
Why do we need Docker networking?
Getting Started with
Docker Swarm
Let’s start with Single Docker Host
A Docker Host
http://collabnix.com/getting-started-with-docker-swarm/
You start adding more hosts..
http://collabnix.com/getting-started-with-docker-swarm/
But Wait..
Service
Discovery
Scalability
High
Availability
Failure
Management
Scheduling
Rolling Updates
Container Security
Docker Swarm comes for rescue..
http://collabnix.com/new-docker-1-12-comes-with-built-in-distribution-orchestration-system/
What is Swarm Mode?
• A swarm consists of one or more nodes: physical or virtual machines running Docker Engine.
• It was introduced first under Docker 1.12 release.
• It enables the ability to deploy containers across multiple Docker hosts, using overlay networks for
service discovery with a built-in load balancer for scaling the services.
http://collabnix.com/docker-1-12-swarm-mode-under-the-hood/
Building Docker Swarm
Topology
Introduction to Docker
Networking
Building Swarm Cluster on Raspberry Pi
Running Portainer on Raspberry Pi
Demo
Thank You

Contenu connexe

Tendances

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
 
Why Docker
Why DockerWhy Docker
Why Docker
dotCloud
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 
Introduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenIntroduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in between
All Things Open
 

Tendances (20)

Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralove
 
Docker Container Introduction
Docker Container IntroductionDocker Container Introduction
Docker Container Introduction
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
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
 
Why Docker
Why DockerWhy Docker
Why Docker
 
Docker : Container Virtualization
Docker : Container VirtualizationDocker : Container Virtualization
Docker : Container Virtualization
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker 101
Docker 101Docker 101
Docker 101
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machines
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Virtual Container - Docker
Virtual Container - Docker Virtual Container - Docker
Virtual Container - Docker
 
Docker Container-Introduction and Features
Docker Container-Introduction and FeaturesDocker Container-Introduction and Features
Docker Container-Introduction and Features
 
Introduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenIntroduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in between
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Dockercon 2018 EU Updates
Dockercon 2018 EU Updates Dockercon 2018 EU Updates
Dockercon 2018 EU Updates
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker - 15 great Tutorials
Docker - 15 great TutorialsDocker - 15 great Tutorials
Docker - 15 great Tutorials
 
Docker Commands With Examples | Docker Tutorial | DevOps Tutorial | Docker Tr...
Docker Commands With Examples | Docker Tutorial | DevOps Tutorial | Docker Tr...Docker Commands With Examples | Docker Tutorial | DevOps Tutorial | Docker Tr...
Docker Commands With Examples | Docker Tutorial | DevOps Tutorial | Docker Tr...
 

Similaire à A Shift from Monolith to Microservice using Docker

Similaire à A Shift from Monolith to Microservice using Docker (20)

Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
 
Microservices in academic environment
Microservices in academic environmentMicroservices in academic environment
Microservices in academic environment
 
Docker - Frank Maounis
Docker - Frank MaounisDocker - Frank Maounis
Docker - Frank Maounis
 
Docker - A high level introduction to dockers and containers
Docker - A high level introduction to dockers and containersDocker - A high level introduction to dockers and containers
Docker - A high level introduction to dockers and containers
 
Docker Seattle Meetup, May 2017
Docker Seattle Meetup, May 2017Docker Seattle Meetup, May 2017
Docker Seattle Meetup, May 2017
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
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
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & Bluemix
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
What is Docker & Why is it Getting Popular?
What is Docker & Why is it Getting Popular?What is Docker & Why is it Getting Popular?
What is Docker & Why is it Getting Popular?
 
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ....docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
8 good reasons to learn docker
8 good reasons to learn docker8 good reasons to learn docker
8 good reasons to learn docker
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 

Plus de Ajeet Singh Raina

Plus de Ajeet Singh Raina (20)

Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devices
 
Delivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devicesDelivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devices
 
Docker Trends & Statistics - A 20 Minutes Overview
Docker Trends & Statistics -  A 20 Minutes Overview Docker Trends & Statistics -  A 20 Minutes Overview
Docker Trends & Statistics - A 20 Minutes Overview
 
Real time Object Detection and Analytics using RedisEdge and Docker
Real time Object Detection and Analytics using RedisEdge and DockerReal time Object Detection and Analytics using RedisEdge and Docker
Real time Object Detection and Analytics using RedisEdge and Docker
 
OSCONF Jaipur 2020 | Virtual Conference | Oct 10 | Ajeet Singh Raina
OSCONF Jaipur 2020 | Virtual Conference | Oct 10 | Ajeet Singh RainaOSCONF Jaipur 2020 | Virtual Conference | Oct 10 | Ajeet Singh Raina
OSCONF Jaipur 2020 | Virtual Conference | Oct 10 | Ajeet Singh Raina
 
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker  on the Edge | OSCONF 2020 JaipurQuantifying Your World with AI & Docker  on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
 
Keynote Slides | Ajeet Singh Raina | OSCONF 2020 Hyderabad
Keynote Slides | Ajeet Singh Raina | OSCONF 2020 HyderabadKeynote Slides | Ajeet Singh Raina | OSCONF 2020 Hyderabad
Keynote Slides | Ajeet Singh Raina | OSCONF 2020 Hyderabad
 
IoET Conference 2020 | Keynote Slides | Ajeet Singh Raina
IoET Conference 2020 | Keynote Slides | Ajeet Singh RainaIoET Conference 2020 | Keynote Slides | Ajeet Singh Raina
IoET Conference 2020 | Keynote Slides | Ajeet Singh Raina
 
OSCONF 2020 Kochi Conference | KubeZilla | 27 June 2020
OSCONF 2020 Kochi Conference | KubeZilla | 27 June 2020OSCONF 2020 Kochi Conference | KubeZilla | 27 June 2020
OSCONF 2020 Kochi Conference | KubeZilla | 27 June 2020
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
 
OSCONF 2020 Bengaluru | Powered by Collabnix | Keynote Slides
OSCONF 2020 Bengaluru | Powered by Collabnix | Keynote SlidesOSCONF 2020 Bengaluru | Powered by Collabnix | Keynote Slides
OSCONF 2020 Bengaluru | Powered by Collabnix | Keynote Slides
 
Top 5 Helpful Tips to Grow Your Local Docker Community
Top 5 Helpful Tips to Grow Your Local Docker CommunityTop 5 Helpful Tips to Grow Your Local Docker Community
Top 5 Helpful Tips to Grow Your Local Docker Community
 
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar PradhanAwesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
 
Demystifying the Nuts & Bolts of Kubernetes Architecture
Demystifying the Nuts & Bolts of Kubernetes ArchitectureDemystifying the Nuts & Bolts of Kubernetes Architecture
Demystifying the Nuts & Bolts of Kubernetes Architecture
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Kubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best PracticesKubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best Practices
 
Current State of Docker Platform - Nov 2019
Current State of Docker Platform  - Nov 2019Current State of Docker Platform  - Nov 2019
Current State of Docker Platform - Nov 2019
 
Collabnix Online Webinar: Integrated Log Analytics & Monitoring using Docker ...
Collabnix Online Webinar: Integrated Log Analytics & Monitoring using Docker ...Collabnix Online Webinar: Integrated Log Analytics & Monitoring using Docker ...
Collabnix Online Webinar: Integrated Log Analytics & Monitoring using Docker ...
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
 
Simplifying Real Time Data Analytics with Docker, IoT & Cloud
Simplifying Real Time Data Analytics with Docker, IoT & CloudSimplifying Real Time Data Analytics with Docker, IoT & Cloud
Simplifying Real Time Data Analytics with Docker, IoT & Cloud
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

A Shift from Monolith to Microservice using Docker

  • 2. $whoami Principal Development Engineer at DellEMC 1st half of my career was in CGI & VMware 2nd half of my career has been in System Integration Testing Docker Captain (since 2016) Docker Bangalore Meetup Organizer ( 7600+ Registered Users) Founder of DockerLabs Ajeet Singh Raina Twitter: @ajeetsraina GitHub: ajeetraina
  • 3. - My Personal Blog website - Built on WordPress, Hosted on One.com - Recently Completed 4th Year - 175+ blogs on Docker | Kubernetes | Cloud - Monthly close to 1 million visitors per month $curl www.collabnix.com
  • 4. - A Shift from Monolithic to Microservices Architecture - Traditional Software Development Workflow(with/without Docker) - What is Docker? What problem does it solve for us? - Docker Vs Linux Containers - Docker Vs Virtual Machine - Docker Underlying Technology - Running Your First Docker Container - Demo - Using Docker: Build, Ship and Run Workflow - Demo - Building Your Docker Image using Dockerfile - Demo Agenda – Morning Session
  • 5. - Introduction to Docker Networking - Introduction to Docker Swarm - How Docker Swarm Mode works? - Running Web Application using Docker Swarm Mode - Demo - Test Drive Docker & Docker Swarm on Raspberry Pi – Let’s make it happen ! - How to contribute towards Docker Community? Agenda – Afternoon Session
  • 6. A Shift from Monolithic to Microservice Architecture
  • 7.
  • 8. A Close Look at Monolithic Browser Client App Storefront UI Module Catalog Module Reviews Module Orders Module HTML REST/JSON Database
  • 9. A Close Look at Monolithic Browser Client App Storefront UI Module Catalog Module Reviews Module Orders Module WAR Tomcat HTML REST/JSON Database
  • 10. Simple to Develop, Test, Deploy & Scale - Simple to develop because of all the tools and IDEs support to that kind of application by default. - Easy to deploy because all components are packed into one bundle. - Easy to scale the whole application. Benefits of Monolith
  • 11.
  • 12. Successful Application keep growing.. - Very difficult to maintain - One component failure will cause the whole system to fail. - Very difficult to understand and create the patches for monolithic applications. - Adapting to new technology is very challengeable. - Take a long time to startup because all the components need to get started. Disadvantages of Monolith
  • 13. Today - Apps are constantly developed - Built from loosely coupled components - Newer version are deployed often - Deployed to a multitude of servers Customer/ Clients/ Users Data Storage Data Storage Data Storage
  • 15. - Can scale independent microservices separately. No need to scale the whole the system - Can use the latest technologies to develop the microservices. - One component failure will not cause entire system downtimes. - When developing an overall solution we can parallel the microservices development task with the small teams. So it helps to decrease the development time. Benefits of Microservices
  • 16. Once upon a time…a Software Stack
  • 17. Now much more distributed & complex…
  • 18.
  • 19.
  • 20. Let’s start with simple analogy.. You are a shipping company
  • 21. Let’s start with simple analogy.. The customer asked you to ship potatoes
  • 22. Let’s start with simple analogy.. Hence, you said “BIG YES” and you fitted it with pianos
  • 23. Let’s start with simple analogy.. Another customer asked to ship bottles of liquor
  • 24. Let’s start with simple analogy.. Things goes really mess up when liquor spill over your pianos
  • 25. Let’s start with simple analogy.. Your employed crew is worried how to handle all these differences
  • 26. Problem Statements.. - Size of goods - Forms of goods Requirement is to keep it safe and stable during the transport
  • 28. An Effort to solve the problem Complexity
  • 29. Every possible good to ship X Every Possible way to Ship
  • 31. That’s what Docker is all about..
  • 32. What is Docker and what problem does it solve?
  • 33. Docker is an open software development platform which help you to Build, Ship and Run your applications along with all its dependencies allowing portability among any system ranging from small IoT device like Raspberry Pi, Desktop, Workstation, Server to the Cloud.
  • 34. • Standardized packaging for software and dependencies • Isolate apps from each other • Share the same OS kernel • Works for all major Linux distributions • Containers native to Windows Server 2016 & 1809 What is Docker?
  • 35. What is Docker? Refers to several things in 2019  Docker as a “Company”  Docker as a “Product”  Docker as a “Platform”  Docker as a “CLI Tool”  Docker as a “Computer Program”
  • 37. History of Docker  A Company as well as Product – 6 Years Old company Developed by DotCloud Inc. ( Currently Docker Inc.) A Framework they built their PaaS upon. Released it as open source 3 and 1/2 years back Cross-platform nature and friendliness towards System Admin and Developers Possible to set up in any OS, be it Windows, OSX, Linux, Solaris - It work the same way  Guaranteed to run the same way - Your development desktop, a bare-metal server, virtual machine, data center, or cloud
  • 39. Docker Vs Linux Container
  • 40. Docker hold just 5% of whole Container Code
  • 41. Docker Vs Linux Container Docker Linux Containers Implementation of kernel-sharing applications isolation technology which is not VM. Popularly refers to LXC. It delivers containers that include a complete Linux system, much like VM, with its own file system, networking and multiple applications Encourages applications to be broken down into their separate processes and provides tools to do that. Its granular approach Uses an init system that can manage multiple processes. Entire app runs as one. Docker used LXC in the past but replaced it with Containerd. Containerd is used for single application containers LXC is able to run multiple applications inside system containers
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 49.
  • 50.
  • 51.
  • 57. Comparing Docker & VM Virtual Machines Docker Each VM runs its own OS Container is just a user space of OS Boot up time is in minutes Containers instantiate in seconds VMs snapshots are used sparingly Images are built incrementally on top of another like layers. Lots of images/snapshots Not effective diffs. Not version controlled Images can be diffed and can be version controlled. Docker hub is like GITHUB Cannot run more than couple of VMs on an average laptop Can run many Docker containers in a laptop. Only one VM can be started from one set of VMX and VMDK files Multiple Docker containers can be started from one Docker image
  • 59.
  • 60.
  • 61. Image Layers Kernel Alpine Linux Install Python and Pip Upgrade Pip Copy Requirements Install Requirements …
  • 62. Basic Docker CLIs Pulling Docker Image $ docker pull ajeetraina/hellowhale Listing out Docker Images $ docker image ls Running Docker Containers $ docker run –d –p 5000:5000 –-name hellowhale ajeetraina/hellowhale Stopping the container $ docker stop hellowhale (or <container id>)
  • 63. Using Docker – Build, Ship & Run WorkFlow
  • 65. - Create DockerHub Account(if not completed) - Open https://play-with-docker.com - Hello World Example - Build Your First Docker Image & Push it to DockerHub Demo
  • 66. Building Docker Containers & Microservices
  • 67. Introducing Dockerfile Series of instructions to build Docker Images
  • 69. Each Dockerfile creates a Layer 69 Kernel Alpine Linux Install Python and Pip Upgrade Pip Copy Requirements Install Requirements …
  • 70. - Building Nginx Server using Dockerfile Demo
  • 71. Compose is a tool for defining and running multi-container Docker applications Docker Compose
  • 73.
  • 74. - Introduction to Docker Networking - Introduction to Docker Swarm - How Docker Swarm Mode works? - Running Web Application using Docker Swarm Mode - Demo - From Local Desktop to Cloud in 5 Minutes - Demo - Test Drive Docker & Docker Swarm on Raspberry Pi – Let’s make it happen ! - Demonstrating Cool Docker Projects - Demo - 5 Tips to become Docker Captain - How to contribute towards Docker Community? Agenda – Afternoon Session
  • 76. Why do we need Docker networking?
  • 77.
  • 78.
  • 79.
  • 81. Let’s start with Single Docker Host A Docker Host http://collabnix.com/getting-started-with-docker-swarm/
  • 82. You start adding more hosts.. http://collabnix.com/getting-started-with-docker-swarm/
  • 84. Docker Swarm comes for rescue.. http://collabnix.com/new-docker-1-12-comes-with-built-in-distribution-orchestration-system/
  • 85. What is Swarm Mode? • A swarm consists of one or more nodes: physical or virtual machines running Docker Engine. • It was introduced first under Docker 1.12 release. • It enables the ability to deploy containers across multiple Docker hosts, using overlay networks for service discovery with a built-in load balancer for scaling the services. http://collabnix.com/docker-1-12-swarm-mode-under-the-hood/
  • 86.
  • 88.
  • 89.
  • 90.
  • 91.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102. Building Swarm Cluster on Raspberry Pi Running Portainer on Raspberry Pi Demo