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

More Related Content

What's hot

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
 
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 VagrantMitchell 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
 

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
 
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
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Vmth project
Vmth projectVmth project
Vmth project
 
ContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with MesosContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with Mesos
 
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...
 
Amazon SWF and Gordon
Amazon SWF and GordonAmazon SWF and Gordon
Amazon SWF and Gordon
 
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
 
Introducción a contenedores Docker
Introducción a contenedores DockerIntroducción a contenedores Docker
Introducción a contenedores Docker
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
 
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
 
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
 
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)
 
Selenium meetup docker
Selenium meetup   docker Selenium meetup   docker
Selenium meetup docker
 
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...
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing Vagrant
 
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
 
Windows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourWindows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The Tour
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for Eclipse
 

Similar to Docker based Architecture by Denys Serdiuk

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
 
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 Infrastructureharendra_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
 
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
 
Highly available nodejs
Highly available nodejsHighly available nodejs
Highly available nodejs
pfremm
 

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
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with 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
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
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
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 
Cloud APIs Overview Tucker
Cloud APIs Overview   TuckerCloud APIs Overview   Tucker
Cloud APIs Overview Tucker
 
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
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
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
 
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...
 
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
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
 
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)
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
 
Liberty Deep Dive
Liberty Deep DiveLiberty Deep Dive
Liberty Deep Dive
 
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
 
Highly available nodejs
Highly available nodejsHighly available nodejs
Highly available nodejs
 

More from 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
 
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
 

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
 
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...
 
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
 
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?
 
Multithreading in go
Multithreading in goMultithreading in go
Multithreading in go
 
Druid - Interactive Analytics At Scale
Druid - Interactive Analytics At ScaleDruid - Interactive Analytics At Scale
Druid - Interactive Analytics At Scale
 
DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020
 
Jenkins' shared libraries in action
Jenkins' shared libraries in actionJenkins' shared libraries in action
Jenkins' shared libraries in action
 
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
 
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
 
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
 
Aws lambda by Leonid Amigud
Aws lambda by Leonid AmigudAws lambda by Leonid Amigud
Aws lambda by Leonid Amigud
 
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...
 
"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...
 
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
 
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...
 
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...
 
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
 
" 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...
 
"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...
 

Recently uploaded

The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 

Recently uploaded (20)

The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 

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