SlideShare a Scribd company logo
1 of 16
Download to read offline
Book
●
DevOps 개발관련 HOWTO 를 잘 설명하였고 이문서의 근간이 된 책
●
https://www.amazon.com/DevOps-2-0-Toolkit-Containerized-Microservices/dp/B01FEK2HFQ/ref=sr_1_7?
ie=UTF8&qid=1477957713&sr=8-7&keywords=devops+2.0
Motive
Blue/Green Deployment 는 Service Upgrade 시 Service Downtime 없이 이전 Version(Blue) 에서 새로운
Version(Green) 으로 Seamless 하게 Deploy 하는 방법.
대부분의 Microservice 들은 Proxy(예를들어 nginx) 에 연결되어 Service 를 제공.
Proxy 의 Blue Service 연결을 Green Service 연결로 바로 전환할수 있다면 가능.
그런데 효율적 Resource 사용을 위해 Microservice 들은 Docker Container 안에서 실행,
그리고 Docker Container 들은 Swarm Cluster 위에 실행.
Microservice Docker Container 를 자동 Scale Out 하기 위해 Swarm Cluster 기반으로 Docker Compose
사용.
Configuration Management Tool 은 Ansible 사용.
그외 필요한 Tool 들은 Docker Private Registry, Consul, Consul-Registrator, Consul-Template 등.
Proxy
(nginx)
Blue Service
(Collection Handler v1)
Green Service
(Collection Handler v2)
Architecture
Consul Docker
Consul-Template
Docker
Registry
Blue Service
Collection Handler
Green Service
Collection Handler
Docker-Compose
Consul Docker
Consul-Template
Docker-Compose
Consul Docker
Consul-Template
Docker-Compose
Swarm
Master
Consul
Registrator
Swarm
Node
Consul
Registrator
Blue Service
Collection Handler
Green Service
Collection Handler
Consul Docker
Consul-Template
Docker-Compose
Swarm
Node
Consul
Registrator
Consul-TemplateConsulDocker Docker-Compose
Swarm
Node
Consul
Registrator
Proxy
nginx
Blue Service
Collection Handler
Green Service
Collection Handler
Green Service
Collection Handler
Blue Service
Collection Handler
Swarm Master Swarm Slave Swarm Slave
Swarm Slave
Architecture 2
●
사각형모양중 각이 둥근 사각형은 Docker Container, 각이 진 사각형은 Library 혹은 Process 를 의미.
●
Swarm Cluster 는 크게 Swarm Master 와 여러 Swarm Slave 로 구분.
●
모든 Docker Container 는 Swarm Cluster 위에 Deploy 됨.
●
Serivce 들은 Docker Registry 에 등록됨.
●
Docker Compose 를 통해 Swarm Cluster 에 Service Deploy 시 Docker Registry 를 lookup 하여
Service Image 를 Pull 함.
●
Service Discovery Consul 을 통해 Blue 혹은 Green Service 들의 IP, Port 정보가 등록.
●
이때 Consul-Registrator 가 이 Service 들의 IP, Port 정보를 자동으로 Consul 에 등록 해줌.
●
Consul-Template 을 통해 등록된 Service 들의 IP, Port 정보를 얻어 Proxy nginx configuration 을 변경.
●
Proxy nginx 는 restart 없이 configuration reload 를 하여 downtime 없이 blue 에서 green service 로 자
동 switching 됨.
설치 Pipeline
설치 순서는 다음과 같음:
1. Consul
2. Docker
3. Consul-Registrator
4. Swarm
5. Proxy nginx
6. Service Collection Handler
설치 Pipeline: Consul
- name: Start Consul Servers
shell: "nohup {{ consul_binary }} agent -server -bootstrap-expect=1 
-data-dir={{ consul_data_dir }} 
-config-dir={{ consul_config_dir }} 
-client=0.0.0.0 
-bind={{ private_ip }} 
-node={{ inventory_hostname }} 
-ui -ui-dir={{ consul_ui_dir }} 
-pid-file={{ consul_pid_file }} 
> {{ consul_log_dir }}/consul.log 2>&1 &"
args:
executable: /bin/bash
when: (inventory_hostname == hostvars[groups['consul-server-hosts'][0]]['inventory_hostname'])
- name: Start Consul Agents
shell: "nohup {{ consul_binary }} agent -join={{ hostvars[groups['consul-server-hosts'][0]]['inventory_hostname'] }} 
-data-dir={{ consul_data_dir }} 
-config-dir={{ consul_config_dir }} 
-client=0.0.0.0 
-bind={{ private_ip }} 
-node={{ inventory_hostname }} 
-ui -ui-dir={{ consul_ui_dir }} 
-pid-file={{ consul_pid_file }} 
> {{ consul_log_dir }}/consul.log 2>&1 &"
args:
executable: /bin/bash
when: (inventory_hostname != hostvars[groups['consul-server-hosts'][0]]['inventory_hostname'])
Ansible Script 를 통해 Consul Server 와 Agent 들을 설치.
설치 Pipeline: Docker
- name: Install Docker Engine
yum:
name: docker-engine
state: latest
- name: Set docker configuration for swarm
lineinfile:
dest: /usr/lib/systemd/system/docker.service
state: present
regexp: "^ExecStart"
line: "ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 
-H unix:///var/run/docker.sock 
--insecure-registry {{ registry_url }}"
- name: Reload Daemon
shell: "systemctl daemon-reload"
- name: Restart Docker
service:
name: docker
enabled: yes
state: restarted
- name: Run Docker Registry
docker:
name: registry
image: registry:2
state: started
ports:
- "5000:5000"
volumes:
- "{{ registry_volume }}"
when: (inventory_hostname == hostvars[groups['docker-registry-host'][0]]['inventory_hostname'])
- name: Install Docker Compose
pip:
name: docker-compose
state: present
Docker Engine 설치후 dockerd line 을 변경.
Docker Registry 설치.
Docker-Compose 설치.
설치 Pipeline: Consul-Registrator
- name: Run Consul Registrator Docker Container
shell: "docker run -d --name=registrator --net=host --volume=/var/run/docker.sock:/tmp/docker.sock gliderlabs/registrator:latest
consul://localhost:8500"
args:
executable: /bin/bash
- name: Run Consul KV Registrator Docker Container
shell: "docker run -d --name=registrator-consul-kv --net=host --volume=/var/run/docker.sock:/tmp/docker.sock
gliderlabs/registrator:latest consulkv://localhost:8500/services"
args:
executable: /bin/bash
Docker Container 로 감싼 Service 의 IP, Port 를 자동 인식하여 Consul 에 등록할수 있도록 Consul-Registrator 설치.
설치 Pipeline: Swarm
- name: Run swarm node
docker:
name: swarm-node
image: swarm
command: "join --advertise={{ private_ip }}:2375 consul://{{ private_ip }}:8500"
env:
SERVICE_NAME: swarm-node
when: inventory_hostname in groups['swarm-node-hosts']
- name: Run swarm master
shell: "docker run -d -p 4000:4000 --name swarm-master 
--env SERVICE_NAME=swarm-master 
swarm manage -H :4000 --advertise {{ private_ip }}:4000 consul://{{ private_ip }}:8500"
when: inventory_hostname in groups['swarm-master-host']
Swarm Master, Slave 설치.
전체 Swarm Cluster 의 정보를 얻으려면:
sudo docker -H <swarm-master>:4000 info;
설치 Pipeline: Proxy nginx
- name: Run nginx container
docker:
image: nginx:alpine
name: nginx
state: running
ports: "{{ ports }}"
volumes: "{{ volumes }}"
- name: Copy conf file
copy:
src: "{{ item }}"
dest: "{{ nginx_conf_dir }}"
with_items:
- "{{ playbook_dir }}/roles/{{ role_name }}/files/{{ services_conf_file }}"
register: result
- name: Reload nginx container
shell: docker kill -s HUP nginx
when: result|changed
Proxy nginx 설치.
Configuration copy 후 restart 없이 nginx reload 함.
설치 Pipeline: Service Collection Handler
Service Collection Handler Dockerfile:
FROM java:8-jre
ENV COLLECTION_HANDLER_HOME "{{ collection_handler_home }}"
RUN mkdir -p "$COLLECTION_HANDLER_HOME"
WORKDIR $COLLECTION_HANDLER_HOME
ENV VERSION "{{ collection_handler_version }}"
ENV REPOSITORY "{{ maven_repo_type }}"
ENV NEXUS_CONTEXT "{{ nexus_context }}"
ENV ZIP_URL http://$NEXUS_CONTEXT/service/local/artifact/maven/redirect?r=$REPOSITORY&g=crochet&a=crochet-collection-collection-
handler&v=$VERSION&c=stand-alone&e=zip
RUN set -x 
&& curl -fSL "$ZIP_URL" -o crochet-collection-collection-handler-$VERSION-stand-alone.zip 
&& unzip -oq *.zip 
&& chmod a+x -R bin 
&& rm -rf crochet-collection-collection-handler-$VERSION-stand-alone.zip
EXPOSE "{{ collection_handler_port }}"
Docker Container Build 후 Docker Registry 에 image 등록:
- name: Build Collection Handler Docker Image
shell: "docker build --tag {{ docker_name }}:{{ docker_version }} {{ docker_file_path }}"
args:
executable: /bin/bash
when: (inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname'])
- name: Tag and Push Collection Handler Docker Image to Registry
shell: "{{ item }}"
args:
executable: /bin/bash
with_items:
- "docker tag {{ docker_name }}:{{ docker_version }} {{ registry_tag }}"
- "docker push {{ registry_tag }}"
when: (inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname'])
설치 Pipeline: Service Collection Handler 2
- name: Run and scale Collection Handler with Compose
shell: "{{ item }}"
with_items:
- "docker-compose -f {{ docker_file_path }}/docker-compose.yml 
-p collection-handler-project 
pull {{ container_name }}"
- "docker-compose -f {{ docker_file_path }}/docker-compose.yml 
-p collection-handler-project 
up -d {{ container_name }}"
- "export DOCKER_HOST=tcp://{{ swarm_master_host }}:4000 && 
docker-compose -f {{ docker_file_path }}/docker-compose.yml 
-p collection-handler-project 
scale {{ container_name }}=3"
when:
- run_compose == "true"
- inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname']
register: output
- debug: var=output
Service Collection Handler 는 Docker Compose 를 통해 pull, up 된후 swarm cluster 에 3개의 container
가 deploy 됨.
Blue/Green Deployment: Blue
Nginx includes configuration:
location /event/v1 {
proxy_pass http://collection-handler/event/v1;
proxy_next_upstream error timeout invalid_header http_500;
}
Nginx includes configuration file 을 nginx 설정 directory 에 copy.
Nginx upstreams configuration consul template:
upstream collection-handler {
{{range service "collection-handler-blue" "any"}}
server {{.Address}}:{{.Port}};
{{end}}
}
Service Collection Handler blue 에 대한 Consul Template 으로 다음과 같은 실행을 통해 Consul 에서 Service
collection-handler-blue 의 IP, Port 정보를 얻어 Template file 을 치환한후 nginx 설정 directory 로 copy:
- name: Run Consul Template for Collection Handler Service and move it to nginx upstreams directory
shell: "{{ item }}"
args:
executable: /bin/bash
with_items:
- "{{ consul_template_binary }} 
-consul localhost:8500 
-template {{ consul_template_temp_dir }}/{{ upstreams_file }}.ctmpl:{{ consul_template_temp_dir }}/
{{ nginx_collection_handler_upstreams_base }}.conf 
-once"
- "cp {{ consul_template_temp_dir }}/{{ nginx_collection_handler_upstreams_base }}.conf {{ nginx_upstreams_dir }}/
{{ nginx_collection_handler_upstreams_base }}.conf"
register: result
그리고 nginx restart 없이 configuration reload 실행:
- name: Reload nginx container
shell: docker kill -s HUP nginx
when:
- result|changed
Blue/Green Deployment: Green
Service Collection Handler blue Deployment 와 유사하게 Green Service Deployment 역시 nginx upstreams
configuration consul template 은 아래와 같음:
upstream collection-handler {
{{range service "collection-handler-green" "any"}}
server {{.Address}}:{{.Port}};
{{end}}
}
Service Collection Handler green 역시 마찬가지로 Consul 로 부터 IP, Port 정보를 얻어 Template file 을 치환한후
nginx 설정 upstreams configuration file 을 덮어쓰기함.
그리고 nginx restart 없이 configuration reload 실행함:
- name: Reload nginx container
shell: docker kill -s HUP nginx
when:
- result|changed
이로서 blue service 에서 downtime 없이 seamless 하게 green service 로 자동 switching 되었음.
Green service 가 원활히 돌아가는것을 확인한후 blue service docker container 를 stop 시키고 삭제함:
- name: Remove Collection Handler with Compose
shell: "{{ item }}"
with_items:
- "export DOCKER_HOST=tcp://{{ swarm_master_host }}:4000 && 
docker-compose -f {{ docker_file_path }}/docker-compose.yml 
-p collection-handler-project 
stop {{ container_name }}"
- "export DOCKER_HOST=tcp://{{ swarm_master_host }}:4000 && 
docker-compose -f {{ docker_file_path }}/docker-compose.yml 
-p collection-handler-project 
rm -f {{ container_name }}"
when:
- run_compose == "true"
- inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname']
register: output
ignore_errors: true
- debug: var=output
맺음말
●
Containerization, 예를들어 Docker 는 Microservice 에 있어서 필요요소.
●
복잡한 Microservices Deployment 에는 Service Discovery(예를들어 Consul), Resource Management(예를들어
Swarm), Configuration Management(예를들어 Ansible) 등이 필요함.
●
이러한 Tool 들은 이문서의 예와 같은 DevOps Practice 를 통해 잘 활용됨으로서 가치가 드러남. 결과적으로
CI/CD 를 적용할수 있음.

More Related Content

What's hot

So I Wrote a Manifest
So I Wrote a ManifestSo I Wrote a Manifest
So I Wrote a ManifestPuppet
 
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...Puppet
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법Open Source Consulting
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayLaurent Bernaille
 
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor BrownDockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor BrownDocker, Inc.
 
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017Amazon Web Services Korea
 
Terraform 0.9 + good practices
Terraform 0.9 + good practicesTerraform 0.9 + good practices
Terraform 0.9 + good practicesRadek Simko
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Hyun-Mook Choi
 
From Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneyFrom Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneySK Telecom
 
Setup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands OnSetup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands Onhkbhadraa
 
GCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionGCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionSimon Su
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02Jinho Shin
 
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with PrometheusOpenStack Korea Community
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performanceSteven Shim
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupSadayuki Furuhashi
 

What's hot (20)

So I Wrote a Manifest
So I Wrote a ManifestSo I Wrote a Manifest
So I Wrote a Manifest
 
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 
Kubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard wayKubernetes at Datadog the very hard way
Kubernetes at Datadog the very hard way
 
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor BrownDockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
 
Scripting Embulk Plugins
Scripting Embulk PluginsScripting Embulk Plugins
Scripting Embulk Plugins
 
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
 
Terraform 0.9 + good practices
Terraform 0.9 + good practicesTerraform 0.9 + good practices
Terraform 0.9 + good practices
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부
 
Final terraform
Final terraformFinal terraform
Final terraform
 
From Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneyFrom Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in Sydney
 
Setup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands OnSetup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands On
 
GCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionGCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow Introduction
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02
 
TIAD : Automating the aplication lifecycle
TIAD : Automating the aplication lifecycleTIAD : Automating the aplication lifecycle
TIAD : Automating the aplication lifecycle
 
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performance
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Beyond static configuration
Beyond static configurationBeyond static configuration
Beyond static configuration
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes Meetup
 

Viewers also liked

Lesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoLesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoKan Ouivirach, Ph.D.
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWSAmazon Web Services
 
Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014
Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014
Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014Rafael Biriba
 
High Volume Monitoring with Graphite
High Volume Monitoring with GraphiteHigh Volume Monitoring with Graphite
High Volume Monitoring with Graphitezeridon
 
PRACTICA DE CONTROL DE MEDICAMENTOS
PRACTICA DE CONTROL DE MEDICAMENTOSPRACTICA DE CONTROL DE MEDICAMENTOS
PRACTICA DE CONTROL DE MEDICAMENTOSSarita
 
Continuous deployment of polyglot microservices: A practical approach
Continuous deployment of polyglot microservices: A practical approachContinuous deployment of polyglot microservices: A practical approach
Continuous deployment of polyglot microservices: A practical approachJuan Larriba
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangEvan Lin
 
Golang 入門初體驗
Golang 入門初體驗Golang 入門初體驗
Golang 入門初體驗政斌 楊
 
CloudStack - Apache's best kept secret
CloudStack - Apache's best kept secretCloudStack - Apache's best kept secret
CloudStack - Apache's best kept secretShapeBlue
 
CloudStack Container Service
CloudStack Container ServiceCloudStack Container Service
CloudStack Container ServiceShapeBlue
 
CloudStack EU user group - CloudStack news
CloudStack EU user group - CloudStack newsCloudStack EU user group - CloudStack news
CloudStack EU user group - CloudStack newsShapeBlue
 
CloudStack EU user group - Trillian
CloudStack EU user group - TrillianCloudStack EU user group - Trillian
CloudStack EU user group - TrillianShapeBlue
 
Publishing RDF SKOS with microservices
Publishing RDF SKOS with microservicesPublishing RDF SKOS with microservices
Publishing RDF SKOS with microservicesBart Hanssens
 
Jenkins vs gogs
Jenkins vs gogsJenkins vs gogs
Jenkins vs gogsAaron King
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard IntroductionAnthony Chen
 
What's New in NGINX Plus R10?
What's New in NGINX Plus R10?What's New in NGINX Plus R10?
What's New in NGINX Plus R10?NGINX, Inc.
 

Viewers also liked (20)

Lesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoLesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at Pronto
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014
Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014
Blue Green Deploy: Entrega continua e rollback imediato - QCon Rio / 2014
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
High Volume Monitoring with Graphite
High Volume Monitoring with GraphiteHigh Volume Monitoring with Graphite
High Volume Monitoring with Graphite
 
Spring boot
Spring bootSpring boot
Spring boot
 
PRACTICA DE CONTROL DE MEDICAMENTOS
PRACTICA DE CONTROL DE MEDICAMENTOSPRACTICA DE CONTROL DE MEDICAMENTOS
PRACTICA DE CONTROL DE MEDICAMENTOS
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Continuous deployment of polyglot microservices: A practical approach
Continuous deployment of polyglot microservices: A practical approachContinuous deployment of polyglot microservices: A practical approach
Continuous deployment of polyglot microservices: A practical approach
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
 
CF WebUI - CloudFoundry User Group DACH
CF WebUI - CloudFoundry User Group DACHCF WebUI - CloudFoundry User Group DACH
CF WebUI - CloudFoundry User Group DACH
 
Golang 入門初體驗
Golang 入門初體驗Golang 入門初體驗
Golang 入門初體驗
 
CloudStack - Apache's best kept secret
CloudStack - Apache's best kept secretCloudStack - Apache's best kept secret
CloudStack - Apache's best kept secret
 
CloudStack Container Service
CloudStack Container ServiceCloudStack Container Service
CloudStack Container Service
 
CloudStack EU user group - CloudStack news
CloudStack EU user group - CloudStack newsCloudStack EU user group - CloudStack news
CloudStack EU user group - CloudStack news
 
CloudStack EU user group - Trillian
CloudStack EU user group - TrillianCloudStack EU user group - Trillian
CloudStack EU user group - Trillian
 
Publishing RDF SKOS with microservices
Publishing RDF SKOS with microservicesPublishing RDF SKOS with microservices
Publishing RDF SKOS with microservices
 
Jenkins vs gogs
Jenkins vs gogsJenkins vs gogs
Jenkins vs gogs
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
 
What's New in NGINX Plus R10?
What's New in NGINX Plus R10?What's New in NGINX Plus R10?
What's New in NGINX Plus R10?
 

Similar to Microservices blue-green-deployment-with-docker

Deploying and Scaling a Rails Application with Docker and Friends
Deploying and Scaling a Rails Application with Docker and FriendsDeploying and Scaling a Rails Application with Docker and Friends
Deploying and Scaling a Rails Application with Docker and FriendsInvisiblelines
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consulNguyen Sy Thanh Son
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 
Easy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp NomadEasy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp NomadBram Vogelaar
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endEzequiel Maraschio
 
Software Defined Datacenter
Software Defined DatacenterSoftware Defined Datacenter
Software Defined DatacenterNETWAYS
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker SupportSujay Pillai
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSYevgeniy Brikman
 
Cloud-native applications with Java and Kubernetes - Yehor Volkov
 Cloud-native applications with Java and Kubernetes - Yehor Volkov Cloud-native applications with Java and Kubernetes - Yehor Volkov
Cloud-native applications with Java and Kubernetes - Yehor VolkovKuberton
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachPROIDEA
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionPaolo latella
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on DockerDaniel Ku
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year laterChristian Ortner
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby DevelopersAptible
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configurationlutter
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 

Similar to Microservices blue-green-deployment-with-docker (20)

Deploying and Scaling a Rails Application with Docker and Friends
Deploying and Scaling a Rails Application with Docker and FriendsDeploying and Scaling a Rails Application with Docker and Friends
Deploying and Scaling a Rails Application with Docker and Friends
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
Simple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE LabSimple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE Lab
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consul
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Easy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp NomadEasy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp Nomad
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-end
 
Software Defined Datacenter
Software Defined DatacenterSoftware Defined Datacenter
Software Defined Datacenter
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker Support
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
 
Cloud-native applications with Java and Kubernetes - Yehor Volkov
 Cloud-native applications with Java and Kubernetes - Yehor Volkov Cloud-native applications with Java and Kubernetes - Yehor Volkov
Cloud-native applications with Java and Kubernetes - Yehor Volkov
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to production
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby Developers
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Microservices blue-green-deployment-with-docker

  • 1.
  • 2. Book ● DevOps 개발관련 HOWTO 를 잘 설명하였고 이문서의 근간이 된 책 ● https://www.amazon.com/DevOps-2-0-Toolkit-Containerized-Microservices/dp/B01FEK2HFQ/ref=sr_1_7? ie=UTF8&qid=1477957713&sr=8-7&keywords=devops+2.0
  • 3. Motive Blue/Green Deployment 는 Service Upgrade 시 Service Downtime 없이 이전 Version(Blue) 에서 새로운 Version(Green) 으로 Seamless 하게 Deploy 하는 방법. 대부분의 Microservice 들은 Proxy(예를들어 nginx) 에 연결되어 Service 를 제공. Proxy 의 Blue Service 연결을 Green Service 연결로 바로 전환할수 있다면 가능. 그런데 효율적 Resource 사용을 위해 Microservice 들은 Docker Container 안에서 실행, 그리고 Docker Container 들은 Swarm Cluster 위에 실행. Microservice Docker Container 를 자동 Scale Out 하기 위해 Swarm Cluster 기반으로 Docker Compose 사용. Configuration Management Tool 은 Ansible 사용. 그외 필요한 Tool 들은 Docker Private Registry, Consul, Consul-Registrator, Consul-Template 등. Proxy (nginx) Blue Service (Collection Handler v1) Green Service (Collection Handler v2)
  • 4. Architecture Consul Docker Consul-Template Docker Registry Blue Service Collection Handler Green Service Collection Handler Docker-Compose Consul Docker Consul-Template Docker-Compose Consul Docker Consul-Template Docker-Compose Swarm Master Consul Registrator Swarm Node Consul Registrator Blue Service Collection Handler Green Service Collection Handler Consul Docker Consul-Template Docker-Compose Swarm Node Consul Registrator Consul-TemplateConsulDocker Docker-Compose Swarm Node Consul Registrator Proxy nginx Blue Service Collection Handler Green Service Collection Handler Green Service Collection Handler Blue Service Collection Handler Swarm Master Swarm Slave Swarm Slave Swarm Slave
  • 5. Architecture 2 ● 사각형모양중 각이 둥근 사각형은 Docker Container, 각이 진 사각형은 Library 혹은 Process 를 의미. ● Swarm Cluster 는 크게 Swarm Master 와 여러 Swarm Slave 로 구분. ● 모든 Docker Container 는 Swarm Cluster 위에 Deploy 됨. ● Serivce 들은 Docker Registry 에 등록됨. ● Docker Compose 를 통해 Swarm Cluster 에 Service Deploy 시 Docker Registry 를 lookup 하여 Service Image 를 Pull 함. ● Service Discovery Consul 을 통해 Blue 혹은 Green Service 들의 IP, Port 정보가 등록. ● 이때 Consul-Registrator 가 이 Service 들의 IP, Port 정보를 자동으로 Consul 에 등록 해줌. ● Consul-Template 을 통해 등록된 Service 들의 IP, Port 정보를 얻어 Proxy nginx configuration 을 변경. ● Proxy nginx 는 restart 없이 configuration reload 를 하여 downtime 없이 blue 에서 green service 로 자 동 switching 됨.
  • 6. 설치 Pipeline 설치 순서는 다음과 같음: 1. Consul 2. Docker 3. Consul-Registrator 4. Swarm 5. Proxy nginx 6. Service Collection Handler
  • 7. 설치 Pipeline: Consul - name: Start Consul Servers shell: "nohup {{ consul_binary }} agent -server -bootstrap-expect=1 -data-dir={{ consul_data_dir }} -config-dir={{ consul_config_dir }} -client=0.0.0.0 -bind={{ private_ip }} -node={{ inventory_hostname }} -ui -ui-dir={{ consul_ui_dir }} -pid-file={{ consul_pid_file }} > {{ consul_log_dir }}/consul.log 2>&1 &" args: executable: /bin/bash when: (inventory_hostname == hostvars[groups['consul-server-hosts'][0]]['inventory_hostname']) - name: Start Consul Agents shell: "nohup {{ consul_binary }} agent -join={{ hostvars[groups['consul-server-hosts'][0]]['inventory_hostname'] }} -data-dir={{ consul_data_dir }} -config-dir={{ consul_config_dir }} -client=0.0.0.0 -bind={{ private_ip }} -node={{ inventory_hostname }} -ui -ui-dir={{ consul_ui_dir }} -pid-file={{ consul_pid_file }} > {{ consul_log_dir }}/consul.log 2>&1 &" args: executable: /bin/bash when: (inventory_hostname != hostvars[groups['consul-server-hosts'][0]]['inventory_hostname']) Ansible Script 를 통해 Consul Server 와 Agent 들을 설치.
  • 8. 설치 Pipeline: Docker - name: Install Docker Engine yum: name: docker-engine state: latest - name: Set docker configuration for swarm lineinfile: dest: /usr/lib/systemd/system/docker.service state: present regexp: "^ExecStart" line: "ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --insecure-registry {{ registry_url }}" - name: Reload Daemon shell: "systemctl daemon-reload" - name: Restart Docker service: name: docker enabled: yes state: restarted - name: Run Docker Registry docker: name: registry image: registry:2 state: started ports: - "5000:5000" volumes: - "{{ registry_volume }}" when: (inventory_hostname == hostvars[groups['docker-registry-host'][0]]['inventory_hostname']) - name: Install Docker Compose pip: name: docker-compose state: present Docker Engine 설치후 dockerd line 을 변경. Docker Registry 설치. Docker-Compose 설치.
  • 9. 설치 Pipeline: Consul-Registrator - name: Run Consul Registrator Docker Container shell: "docker run -d --name=registrator --net=host --volume=/var/run/docker.sock:/tmp/docker.sock gliderlabs/registrator:latest consul://localhost:8500" args: executable: /bin/bash - name: Run Consul KV Registrator Docker Container shell: "docker run -d --name=registrator-consul-kv --net=host --volume=/var/run/docker.sock:/tmp/docker.sock gliderlabs/registrator:latest consulkv://localhost:8500/services" args: executable: /bin/bash Docker Container 로 감싼 Service 의 IP, Port 를 자동 인식하여 Consul 에 등록할수 있도록 Consul-Registrator 설치.
  • 10. 설치 Pipeline: Swarm - name: Run swarm node docker: name: swarm-node image: swarm command: "join --advertise={{ private_ip }}:2375 consul://{{ private_ip }}:8500" env: SERVICE_NAME: swarm-node when: inventory_hostname in groups['swarm-node-hosts'] - name: Run swarm master shell: "docker run -d -p 4000:4000 --name swarm-master --env SERVICE_NAME=swarm-master swarm manage -H :4000 --advertise {{ private_ip }}:4000 consul://{{ private_ip }}:8500" when: inventory_hostname in groups['swarm-master-host'] Swarm Master, Slave 설치. 전체 Swarm Cluster 의 정보를 얻으려면: sudo docker -H <swarm-master>:4000 info;
  • 11. 설치 Pipeline: Proxy nginx - name: Run nginx container docker: image: nginx:alpine name: nginx state: running ports: "{{ ports }}" volumes: "{{ volumes }}" - name: Copy conf file copy: src: "{{ item }}" dest: "{{ nginx_conf_dir }}" with_items: - "{{ playbook_dir }}/roles/{{ role_name }}/files/{{ services_conf_file }}" register: result - name: Reload nginx container shell: docker kill -s HUP nginx when: result|changed Proxy nginx 설치. Configuration copy 후 restart 없이 nginx reload 함.
  • 12. 설치 Pipeline: Service Collection Handler Service Collection Handler Dockerfile: FROM java:8-jre ENV COLLECTION_HANDLER_HOME "{{ collection_handler_home }}" RUN mkdir -p "$COLLECTION_HANDLER_HOME" WORKDIR $COLLECTION_HANDLER_HOME ENV VERSION "{{ collection_handler_version }}" ENV REPOSITORY "{{ maven_repo_type }}" ENV NEXUS_CONTEXT "{{ nexus_context }}" ENV ZIP_URL http://$NEXUS_CONTEXT/service/local/artifact/maven/redirect?r=$REPOSITORY&g=crochet&a=crochet-collection-collection- handler&v=$VERSION&c=stand-alone&e=zip RUN set -x && curl -fSL "$ZIP_URL" -o crochet-collection-collection-handler-$VERSION-stand-alone.zip && unzip -oq *.zip && chmod a+x -R bin && rm -rf crochet-collection-collection-handler-$VERSION-stand-alone.zip EXPOSE "{{ collection_handler_port }}" Docker Container Build 후 Docker Registry 에 image 등록: - name: Build Collection Handler Docker Image shell: "docker build --tag {{ docker_name }}:{{ docker_version }} {{ docker_file_path }}" args: executable: /bin/bash when: (inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname']) - name: Tag and Push Collection Handler Docker Image to Registry shell: "{{ item }}" args: executable: /bin/bash with_items: - "docker tag {{ docker_name }}:{{ docker_version }} {{ registry_tag }}" - "docker push {{ registry_tag }}" when: (inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname'])
  • 13. 설치 Pipeline: Service Collection Handler 2 - name: Run and scale Collection Handler with Compose shell: "{{ item }}" with_items: - "docker-compose -f {{ docker_file_path }}/docker-compose.yml -p collection-handler-project pull {{ container_name }}" - "docker-compose -f {{ docker_file_path }}/docker-compose.yml -p collection-handler-project up -d {{ container_name }}" - "export DOCKER_HOST=tcp://{{ swarm_master_host }}:4000 && docker-compose -f {{ docker_file_path }}/docker-compose.yml -p collection-handler-project scale {{ container_name }}=3" when: - run_compose == "true" - inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname'] register: output - debug: var=output Service Collection Handler 는 Docker Compose 를 통해 pull, up 된후 swarm cluster 에 3개의 container 가 deploy 됨.
  • 14. Blue/Green Deployment: Blue Nginx includes configuration: location /event/v1 { proxy_pass http://collection-handler/event/v1; proxy_next_upstream error timeout invalid_header http_500; } Nginx includes configuration file 을 nginx 설정 directory 에 copy. Nginx upstreams configuration consul template: upstream collection-handler { {{range service "collection-handler-blue" "any"}} server {{.Address}}:{{.Port}}; {{end}} } Service Collection Handler blue 에 대한 Consul Template 으로 다음과 같은 실행을 통해 Consul 에서 Service collection-handler-blue 의 IP, Port 정보를 얻어 Template file 을 치환한후 nginx 설정 directory 로 copy: - name: Run Consul Template for Collection Handler Service and move it to nginx upstreams directory shell: "{{ item }}" args: executable: /bin/bash with_items: - "{{ consul_template_binary }} -consul localhost:8500 -template {{ consul_template_temp_dir }}/{{ upstreams_file }}.ctmpl:{{ consul_template_temp_dir }}/ {{ nginx_collection_handler_upstreams_base }}.conf -once" - "cp {{ consul_template_temp_dir }}/{{ nginx_collection_handler_upstreams_base }}.conf {{ nginx_upstreams_dir }}/ {{ nginx_collection_handler_upstreams_base }}.conf" register: result 그리고 nginx restart 없이 configuration reload 실행: - name: Reload nginx container shell: docker kill -s HUP nginx when: - result|changed
  • 15. Blue/Green Deployment: Green Service Collection Handler blue Deployment 와 유사하게 Green Service Deployment 역시 nginx upstreams configuration consul template 은 아래와 같음: upstream collection-handler { {{range service "collection-handler-green" "any"}} server {{.Address}}:{{.Port}}; {{end}} } Service Collection Handler green 역시 마찬가지로 Consul 로 부터 IP, Port 정보를 얻어 Template file 을 치환한후 nginx 설정 upstreams configuration file 을 덮어쓰기함. 그리고 nginx restart 없이 configuration reload 실행함: - name: Reload nginx container shell: docker kill -s HUP nginx when: - result|changed 이로서 blue service 에서 downtime 없이 seamless 하게 green service 로 자동 switching 되었음. Green service 가 원활히 돌아가는것을 확인한후 blue service docker container 를 stop 시키고 삭제함: - name: Remove Collection Handler with Compose shell: "{{ item }}" with_items: - "export DOCKER_HOST=tcp://{{ swarm_master_host }}:4000 && docker-compose -f {{ docker_file_path }}/docker-compose.yml -p collection-handler-project stop {{ container_name }}" - "export DOCKER_HOST=tcp://{{ swarm_master_host }}:4000 && docker-compose -f {{ docker_file_path }}/docker-compose.yml -p collection-handler-project rm -f {{ container_name }}" when: - run_compose == "true" - inventory_hostname == hostvars[groups['collection-handler-hosts'][0]]['inventory_hostname'] register: output ignore_errors: true - debug: var=output
  • 16. 맺음말 ● Containerization, 예를들어 Docker 는 Microservice 에 있어서 필요요소. ● 복잡한 Microservices Deployment 에는 Service Discovery(예를들어 Consul), Resource Management(예를들어 Swarm), Configuration Management(예를들어 Ansible) 등이 필요함. ● 이러한 Tool 들은 이문서의 예와 같은 DevOps Practice 를 통해 잘 활용됨으로서 가치가 드러남. 결과적으로 CI/CD 를 적용할수 있음.