SlideShare uma empresa Scribd logo
1 de 24
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

Mais conteúdo relacionado

Mais procurados

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 augVincent 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 EngineuEngine Solutions
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introductionw_akram
 
ContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with MesosContainerDayVietnam2016: Docker at scale with Mesos
ContainerDayVietnam2016: Docker at scale with MesosDocker-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 MCollectiveJonathan Weiss
 
Introducción a contenedores Docker
Introducción a contenedores DockerIntroducción a contenedores Docker
Introducción a contenedores DockerSoftware Guru
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with CapistranoSumit 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 - AzureConfMaarten 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 UlfertsNETWAYS
 
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 MesosCarlos Sanchez
 
Windows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourWindows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourEran Stiller
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for EclipseMax Andersen
 

Mais procurados (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
 

Semelhante a 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 azureColin Mackay
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with DockerMariaDB 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-14Simon 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 2017Patrick Chanezon
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014Hojoong 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.pdfLiang 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-2015Pavel Chunyayev
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for DevelopmentChris 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 BluemixRam 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 DockerDavid Currie
 
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 ProfileWASdev Community
 
Highly available nodejs
Highly available nodejsHighly available nodejs
Highly available nodejspfremm
 

Semelhante a 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
 

Mais de 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 HoodLohika_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 ArchitectureLohika_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 clusterLohika_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 ZhiltsovLohika_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 TechTalksLohika_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
 

Mais de 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...
 

Último

The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 

Último (20)

The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 

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