SlideShare a Scribd company logo
Docker based architecture
About Me
7+ years as backend Software Engineer.
● Java/Scala
● SQL/NoSQL databases
● distributed caches, queuing
● Hadoop/Spark
● AWS,DevOps
● REST, microservices
An approach to developing a single application as
a suite of small services, each running in its
own process and communicating with
lightweight mechanisms
http://martinfowler.com/
Microservice architecture style
• Component decomposition
• Independant development lifecycle and
technology freedom
• Better extensibility
• Fault isolation
Microservice benefits
• Deployment of much greater number of
services and components
• Monitoring of many services for performance
or issues
• Looking into log files from many micro-services
• Versioning between services and environment
consistency
Microservice drawbacks
1. Multiple Service instances per host
● conflicting resource requirements(CPU, memory, IO, etc.)
● conflicting dependency versions
1. Single Service instance per host
● potentially less efficient resource utilization
● hosts provisioning and maintenance
1. Service Instance per VM
● building a VM image is slow and time consuming
1. Service instance per container
● The infrastructure for deploying containers is not as rich as
the infrastructure for deploying virtual machines
Microservice deployment patterns
Containerization vs Virtualization
Containerization providers
Implementations:
● by vendors(Open Source,HP, IBM, Microsoft)
● by OS (Linux, FreeBSD, Solaris, Windows)
http://en.wikipedia.org/wiki/Operating-system-level_virtualization#Implementations.
Docker has become the most popular nowadays.
Docker Ecosystem
How it works
http://en.wikipedia.org/wiki/Docker_(software)
Docker registry
Docker container overhead
Docker container network overhead
Basic docker usage scenario
1. create Dockerfile
2. build image with specific name in format
[registry_url/]repository:imageTag , e.g
myhost:5000/mycompany/myservice:version1
1. push image into registry (private or Docker Hub)
2. pull image by repository and tag (Optional)
3. run container from image
Dockerfile
• inherit existing images
• add/copy files to container
• set environment vars
• run shell command
• expose ports
• set working dir
• share host FS with container
• --no-cache option
• CMD and bootstrapping
• CMD vs ENTRYPOINT
FROM mycompany/app-base:latest
RUN mkdir -p /opt/app
ADD core.jar /opt/app/core.jar
RUN curl http://3rd-paty.repo.org/download/component.zip && 
unzip component.zip -d /opt/app/ && rm -f component.zip
COPY lib/ /opt/app/lib
ADD bootstrap.sh /etc/mysevice/
RUN chmod +x /etc/mysevice/bootstrap.sh
ADD workspace-manager-core.jar
ADD logback.xml /opt/app/logback.xml
ENV MODE="PRODUCTION"
VOLUME /log
WORKDIR /opt/app/
EXPOSE 80
CMD /etc/myservice/bootstrap.sh && /usr/lib/jvm/latest/bin/java
-cp /opt/app/core.jar:/opt/app/lib 
-Xms256m 
-Xmx2048m 
-XX:+UseCompressedOops 
-XX:+UseG1GC 
-Dspark.kryoserializer.buffer.max.mb=128  -
Dlogback.configurationFile=/opt/app/logback.xml 
org.mycompany.app.Runner
Ready, set,go
• docker build -t mycompany/app:1.0
• docker tag -t mycompany/app:1.0
registry.mycompany.com:5000/mycompany/app:1.0
• docker push
registry.mycompany.com:5000/mycompany/app:1.0
Container entrypoint
• Container must have long leaving process -
entrypoint
• Container will become stopped when process is
ended/crashed
• Two strategies: process per container vs
supervisord
Supervisord configuration
[supervisord]
nodaemon = true
logfile = /var/log/supervisord.log
[program:hadoop-hdfs-namenode]
command = /etc/init.d/hadoop-hdfs-namenode start
[program:mesos-master]
command = /usr/local/sbin/mesos-master --work_dir=/mnt/mesos-work --
hostname={{ MESOS_HOSTNAME }} --log_dir=/var/log/mesos
[program:vw-spanning-tree]
command = /usr/local/bin/spanning_tree
FROM mycompany/mesos-general
MAINTAINER mycompany
#Configure namenode
RUN apt-get install -y hadoop-hdfs-namenode=2.5.0+cdh5.3.3*
#Add config templates
ADD hadoop-conf/core-site.xml /etc/hadoop/conf/core-site.xml.tpl
ADD hadoop-conf/hadoop-env.sh /etc/hadoop/conf/hadoop-env.sh
ADD hadoop-conf/hdfs-site.xml /etc/hadoop/conf/hdfs-site.xml.tpl
ADD bootstrap.sh /bootstrap.sh
RUN chmod +x /bootstrap.sh
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf.tpl
CMD /bootstrap.sh && /usr/bin/supervisord
Master Dockerfile
#!/bin/bash
set -e
mkdir -p /mnt/mesos-work
mkdir -p /var/log/mesos
source /resolve_ec2_hostname.sh
envtpl < /etc/hadoop/conf/core-site.xml.tpl > /etc/hadoop/conf/core-site.xml
envtpl < /etc/hadoop/conf/hdfs-site.xml.tpl > /etc/hadoop/conf/hdfs-site.xml
envtpl < /etc/supervisor/conf.d/supervisord.conf.tpl > /etc/supervisor/conf.d/supervisord.conf
Bootstrap.sh example
• Container identification (--name)
• Network settings
o --net = [none, bridge (default), host, container:<name|id>]
o -P vs -p
o --link
• Useful options for debug/testing
o --rm=true, -it
o docker exec -it running_container_name bash
• Env variables
• Runtime constraints on CPU and memory
Run options
Environment example
Thank You!
References
● http://martinfowler.com/articles/microservices.html
● https://docs.docker.com/introduction/understanding-docker/
● http://domino.research.ibm.com/library/cyberdig.nsf/papers/092905219
5DD819C85257D2300681E7B/$File/rc25482.pdf
Ad

More Related Content

What's hot (20)

Mesos on coreOS
Mesos on coreOSMesos on coreOS
Mesos on coreOS
충섭 김
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
Vincent De Smet
 
Osgi based cloud system architecture - Open Cloud Engine
Osgi based cloud system architecture - Open Cloud EngineOsgi based cloud system architecture - Open Cloud Engine
Osgi based cloud system architecture - Open Cloud Engine
uEngine Solutions
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
w_akram
 
Vmth project
Vmth projectVmth project
Vmth project
Ricardo Sanchez
 
ContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with MesosContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with Mesos
Docker-Hanoi
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Max Andersen
 
Amazon SWF and Gordon
Amazon SWF and GordonAmazon SWF and Gordon
Amazon SWF and Gordon
Jonathan Weiss
 
Build your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollectiveBuild your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollective
Jonathan Weiss
 
Introducción a contenedores Docker
Introducción a contenedores DockerIntroducción a contenedores Docker
Introducción a contenedores Docker
Software Guru
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
Sumit Chhetri
 
Windows Azure Web Sites – things they don’t teach kids in school - AzureConf
Windows Azure Web Sites – things they don’t teach kids in school - AzureConfWindows Azure Web Sites – things they don’t teach kids in school - AzureConf
Windows Azure Web Sites – things they don’t teach kids in school - AzureConf
Maarten Balliauw
 
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan UlfertsOSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
NETWAYS
 
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Maxim Guenis
 
Selenium meetup docker
Selenium meetup   docker Selenium meetup   docker
Selenium meetup docker
Maxim Guenis
 
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
London Microservices
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing Vagrant
Mitchell Hashimoto
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
Windows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourWindows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The Tour
Eran Stiller
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for Eclipse
Max Andersen
 
Mesos on coreOS
Mesos on coreOSMesos on coreOS
Mesos on coreOS
충섭 김
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
Vincent De Smet
 
Osgi based cloud system architecture - Open Cloud Engine
Osgi based cloud system architecture - Open Cloud EngineOsgi based cloud system architecture - Open Cloud Engine
Osgi based cloud system architecture - Open Cloud Engine
uEngine Solutions
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
w_akram
 
ContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with MesosContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with Mesos
Docker-Hanoi
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Max Andersen
 
Build your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollectiveBuild your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollective
Jonathan Weiss
 
Introducción a contenedores Docker
Introducción a contenedores DockerIntroducción a contenedores Docker
Introducción a contenedores Docker
Software Guru
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
Sumit Chhetri
 
Windows Azure Web Sites – things they don’t teach kids in school - AzureConf
Windows Azure Web Sites – things they don’t teach kids in school - AzureConfWindows Azure Web Sites – things they don’t teach kids in school - AzureConf
Windows Azure Web Sites – things they don’t teach kids in school - AzureConf
Maarten Balliauw
 
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan UlfertsOSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
OSDC 2016 - Kaiten Zushi - Chef at Goodgame Studios by Jan Ulferts
NETWAYS
 
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Unified Infra for Dev/Test and Jenkins Integration Testing (Docker/Vagrant)
Maxim Guenis
 
Selenium meetup docker
Selenium meetup   docker Selenium meetup   docker
Selenium meetup docker
Maxim Guenis
 
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
London Microservices
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing Vagrant
Mitchell Hashimoto
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
Carlos Sanchez
 
Windows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourWindows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The Tour
Eran Stiller
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for Eclipse
Max Andersen
 

Similar to Docker based Architecture by Denys Serdiuk (20)

Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
MariaDB plc
 
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
Simon Storm
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
Azure Riyadh User Group
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
Hojoong Kim
 
Cloud APIs Overview Tucker
Cloud APIs Overview   TuckerCloud APIs Overview   Tucker
Cloud APIs Overview Tucker
Infrastructure 2.0
 
Bring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdfBring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdf
Liang Yan
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
Nicolas De Loof
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
Pavel Chunyayev
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
Chris Tankersley
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
harendra_pathak
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
Ram Vennam
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
David Currie
 
Liberty Deep Dive
Liberty Deep DiveLiberty Deep Dive
Liberty Deep Dive
WASdev Community
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
WASdev Community
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
MariaDB plc
 
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
Simon Storm
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
Hojoong Kim
 
Bring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdfBring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdf
Liang Yan
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS
 
Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
Pavel Chunyayev
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
Chris Tankersley
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
harendra_pathak
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
Ram Vennam
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
David Currie
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
WASdev Community
 
Ad

More from Lohika_Odessa_TechTalks (20)

OAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodOAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the Hood
Lohika_Odessa_TechTalks
 
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Lohika_Odessa_TechTalks
 
Design and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice ArchitectureDesign and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice Architecture
Lohika_Odessa_TechTalks
 
Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?
Lohika_Odessa_TechTalks
 
Multithreading in go
Multithreading in goMultithreading in go
Multithreading in go
Lohika_Odessa_TechTalks
 
Druid - Interactive Analytics At Scale
Druid - Interactive Analytics At ScaleDruid - Interactive Analytics At Scale
Druid - Interactive Analytics At Scale
Lohika_Odessa_TechTalks
 
DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020
Lohika_Odessa_TechTalks
 
Jenkins' shared libraries in action
Jenkins' shared libraries in actionJenkins' shared libraries in action
Jenkins' shared libraries in action
Lohika_Odessa_TechTalks
 
Prometheus: infrastructure and application monitoring in kubernetes cluster
Prometheus: infrastructure and application monitoring in kubernetes clusterPrometheus: infrastructure and application monitoring in kubernetes cluster
Prometheus: infrastructure and application monitoring in kubernetes cluster
Lohika_Odessa_TechTalks
 
Architectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym ZhiltsovArchitectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym Zhiltsov
Lohika_Odessa_TechTalks
 
React native by example by Vadim Ruban
React native by example by Vadim RubanReact native by example by Vadim Ruban
React native by example by Vadim Ruban
Lohika_Odessa_TechTalks
 
Aws lambda by Leonid Amigud
Aws lambda by Leonid AmigudAws lambda by Leonid Amigud
Aws lambda by Leonid Amigud
Lohika_Odessa_TechTalks
 
Congratulations, you have been promoted to a manager role. You`ve got new pro...
Congratulations, you have been promoted to a manager role. You`ve got new pro...Congratulations, you have been promoted to a manager role. You`ve got new pro...
Congratulations, you have been promoted to a manager role. You`ve got new pro...
Lohika_Odessa_TechTalks
 
"Don't touch me and give me my money" or how motivate people who can but don...
"Don't touch me and give me my money" or  how motivate people who can but don..."Don't touch me and give me my money" or  how motivate people who can but don...
"Don't touch me and give me my money" or how motivate people who can but don...
Lohika_Odessa_TechTalks
 
SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy  SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy
Lohika_Odessa_TechTalks
 
Burnout and how to avoid it in your team. Responsible person's issue by Andre...
Burnout and how to avoid it in your team. Responsible person's issue by Andre...Burnout and how to avoid it in your team. Responsible person's issue by Andre...
Burnout and how to avoid it in your team. Responsible person's issue by Andre...
Lohika_Odessa_TechTalks
 
Performance evaluation process as a way to empower your employees and help th...
Performance evaluation process as a way to empower your employees and help th...Performance evaluation process as a way to empower your employees and help th...
Performance evaluation process as a way to empower your employees and help th...
Lohika_Odessa_TechTalks
 
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalksSelenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Lohika_Odessa_TechTalks
 
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f..." Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
Lohika_Odessa_TechTalks
 
"WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te...
"WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te..."WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te...
"WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te...
Lohika_Odessa_TechTalks
 
OAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodOAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the Hood
Lohika_Odessa_TechTalks
 
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Lohika_Odessa_TechTalks
 
Design and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice ArchitectureDesign and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice Architecture
Lohika_Odessa_TechTalks
 
Prometheus: infrastructure and application monitoring in kubernetes cluster
Prometheus: infrastructure and application monitoring in kubernetes clusterPrometheus: infrastructure and application monitoring in kubernetes cluster
Prometheus: infrastructure and application monitoring in kubernetes cluster
Lohika_Odessa_TechTalks
 
Architectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym ZhiltsovArchitectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym Zhiltsov
Lohika_Odessa_TechTalks
 
Congratulations, you have been promoted to a manager role. You`ve got new pro...
Congratulations, you have been promoted to a manager role. You`ve got new pro...Congratulations, you have been promoted to a manager role. You`ve got new pro...
Congratulations, you have been promoted to a manager role. You`ve got new pro...
Lohika_Odessa_TechTalks
 
"Don't touch me and give me my money" or how motivate people who can but don...
"Don't touch me and give me my money" or  how motivate people who can but don..."Don't touch me and give me my money" or  how motivate people who can but don...
"Don't touch me and give me my money" or how motivate people who can but don...
Lohika_Odessa_TechTalks
 
SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy  SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy
Lohika_Odessa_TechTalks
 
Burnout and how to avoid it in your team. Responsible person's issue by Andre...
Burnout and how to avoid it in your team. Responsible person's issue by Andre...Burnout and how to avoid it in your team. Responsible person's issue by Andre...
Burnout and how to avoid it in your team. Responsible person's issue by Andre...
Lohika_Odessa_TechTalks
 
Performance evaluation process as a way to empower your employees and help th...
Performance evaluation process as a way to empower your employees and help th...Performance evaluation process as a way to empower your employees and help th...
Performance evaluation process as a way to empower your employees and help th...
Lohika_Odessa_TechTalks
 
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalksSelenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Lohika_Odessa_TechTalks
 
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f..." Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
" Performance testing for Automation QA - why and how " by Andrey Kovalenko f...
Lohika_Odessa_TechTalks
 
"WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te...
"WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te..."WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te...
"WEB applications security testing" by Kirill Semenov for Lohika Odessa QA Te...
Lohika_Odessa_TechTalks
 
Ad

Recently uploaded (20)

fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 

Docker based Architecture by Denys Serdiuk

  • 2. About Me 7+ years as backend Software Engineer. ● Java/Scala ● SQL/NoSQL databases ● distributed caches, queuing ● Hadoop/Spark ● AWS,DevOps ● REST, microservices
  • 3. An approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms http://martinfowler.com/ Microservice architecture style
  • 4. • Component decomposition • Independant development lifecycle and technology freedom • Better extensibility • Fault isolation Microservice benefits
  • 5. • Deployment of much greater number of services and components • Monitoring of many services for performance or issues • Looking into log files from many micro-services • Versioning between services and environment consistency Microservice drawbacks
  • 6. 1. Multiple Service instances per host ● conflicting resource requirements(CPU, memory, IO, etc.) ● conflicting dependency versions 1. Single Service instance per host ● potentially less efficient resource utilization ● hosts provisioning and maintenance 1. Service Instance per VM ● building a VM image is slow and time consuming 1. Service instance per container ● The infrastructure for deploying containers is not as rich as the infrastructure for deploying virtual machines Microservice deployment patterns
  • 8. Containerization providers Implementations: ● by vendors(Open Source,HP, IBM, Microsoft) ● by OS (Linux, FreeBSD, Solaris, Windows) http://en.wikipedia.org/wiki/Operating-system-level_virtualization#Implementations. Docker has become the most popular nowadays.
  • 14. Basic docker usage scenario 1. create Dockerfile 2. build image with specific name in format [registry_url/]repository:imageTag , e.g myhost:5000/mycompany/myservice:version1 1. push image into registry (private or Docker Hub) 2. pull image by repository and tag (Optional) 3. run container from image
  • 15. Dockerfile • inherit existing images • add/copy files to container • set environment vars • run shell command • expose ports • set working dir • share host FS with container • --no-cache option • CMD and bootstrapping • CMD vs ENTRYPOINT FROM mycompany/app-base:latest RUN mkdir -p /opt/app ADD core.jar /opt/app/core.jar RUN curl http://3rd-paty.repo.org/download/component.zip && unzip component.zip -d /opt/app/ && rm -f component.zip COPY lib/ /opt/app/lib ADD bootstrap.sh /etc/mysevice/ RUN chmod +x /etc/mysevice/bootstrap.sh ADD workspace-manager-core.jar ADD logback.xml /opt/app/logback.xml ENV MODE="PRODUCTION" VOLUME /log WORKDIR /opt/app/ EXPOSE 80 CMD /etc/myservice/bootstrap.sh && /usr/lib/jvm/latest/bin/java -cp /opt/app/core.jar:/opt/app/lib -Xms256m -Xmx2048m -XX:+UseCompressedOops -XX:+UseG1GC -Dspark.kryoserializer.buffer.max.mb=128 - Dlogback.configurationFile=/opt/app/logback.xml org.mycompany.app.Runner
  • 16. Ready, set,go • docker build -t mycompany/app:1.0 • docker tag -t mycompany/app:1.0 registry.mycompany.com:5000/mycompany/app:1.0 • docker push registry.mycompany.com:5000/mycompany/app:1.0
  • 17. Container entrypoint • Container must have long leaving process - entrypoint • Container will become stopped when process is ended/crashed • Two strategies: process per container vs supervisord
  • 18. Supervisord configuration [supervisord] nodaemon = true logfile = /var/log/supervisord.log [program:hadoop-hdfs-namenode] command = /etc/init.d/hadoop-hdfs-namenode start [program:mesos-master] command = /usr/local/sbin/mesos-master --work_dir=/mnt/mesos-work -- hostname={{ MESOS_HOSTNAME }} --log_dir=/var/log/mesos [program:vw-spanning-tree] command = /usr/local/bin/spanning_tree
  • 19. FROM mycompany/mesos-general MAINTAINER mycompany #Configure namenode RUN apt-get install -y hadoop-hdfs-namenode=2.5.0+cdh5.3.3* #Add config templates ADD hadoop-conf/core-site.xml /etc/hadoop/conf/core-site.xml.tpl ADD hadoop-conf/hadoop-env.sh /etc/hadoop/conf/hadoop-env.sh ADD hadoop-conf/hdfs-site.xml /etc/hadoop/conf/hdfs-site.xml.tpl ADD bootstrap.sh /bootstrap.sh RUN chmod +x /bootstrap.sh COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf.tpl CMD /bootstrap.sh && /usr/bin/supervisord Master Dockerfile
  • 20. #!/bin/bash set -e mkdir -p /mnt/mesos-work mkdir -p /var/log/mesos source /resolve_ec2_hostname.sh envtpl < /etc/hadoop/conf/core-site.xml.tpl > /etc/hadoop/conf/core-site.xml envtpl < /etc/hadoop/conf/hdfs-site.xml.tpl > /etc/hadoop/conf/hdfs-site.xml envtpl < /etc/supervisor/conf.d/supervisord.conf.tpl > /etc/supervisor/conf.d/supervisord.conf Bootstrap.sh example
  • 21. • Container identification (--name) • Network settings o --net = [none, bridge (default), host, container:<name|id>] o -P vs -p o --link • Useful options for debug/testing o --rm=true, -it o docker exec -it running_container_name bash • Env variables • Runtime constraints on CPU and memory Run options
  • 24. References ● http://martinfowler.com/articles/microservices.html ● https://docs.docker.com/introduction/understanding-docker/ ● http://domino.research.ibm.com/library/cyberdig.nsf/papers/092905219 5DD819C85257D2300681E7B/$File/rc25482.pdf