Submit Search
Upload
Multi container apps swarm + consul + compose
•
1 like
•
429 views
Eueung Mulyana
Follow
DevOps CodeLabs Multi-Container Apps http://eueung.github.io/docker-stuff/multicont
Read less
Read more
Technology
Report
Share
Report
Share
1 of 30
Download now
Download to read offline
Recommended
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
Eueung Mulyana
Learning kubernetes
Learning kubernetes
Eueung Mulyana
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリング
Yuji ODA
An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux Containers
Kento Aoyama
Web scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
purpleocean
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Michelle Antebi
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
HungWei Chiu
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
Zhichao Liang
Recommended
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
Eueung Mulyana
Learning kubernetes
Learning kubernetes
Eueung Mulyana
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリング
Yuji ODA
An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux Containers
Kento Aoyama
Web scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
purpleocean
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Michelle Antebi
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
HungWei Chiu
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
Zhichao Liang
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
Sim Janghoon
Rtl sdr software defined radio
Rtl sdr software defined radio
Eueung Mulyana
Introction to docker swarm
Introction to docker swarm
Hsi-Kai Wang
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
upaa
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Michelle Antebi
Small, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the Microscope
Docker, Inc.
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
Laurent Bernaille
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
PROIDEA
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
DongHyeon Kim
Docker Container: isolation and security
Docker Container: isolation and security
宇 傅
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking
Hervé Leclerc
Kubernetes Networking
Kubernetes Networking
CJ Cullen
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015
Van Phuc
CoreOS @Codetalks Hamburg
CoreOS @Codetalks Hamburg
Timo Derstappen
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
Richard Lister
Docker network
Docker network
Mohammadreza Amini
CoreOS: Control Your Fleet
CoreOS: Control Your Fleet
Matthew Jones
Discovering OpenBSD on AWS
Discovering OpenBSD on AWS
Laurent Bernaille
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Etsuji Nakai
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
inwin stack
Introducing Docker
Introducing Docker
Francesco Pantano
More Related Content
What's hot
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
Sim Janghoon
Rtl sdr software defined radio
Rtl sdr software defined radio
Eueung Mulyana
Introction to docker swarm
Introction to docker swarm
Hsi-Kai Wang
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
upaa
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Michelle Antebi
Small, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the Microscope
Docker, Inc.
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
Laurent Bernaille
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
PROIDEA
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
DongHyeon Kim
Docker Container: isolation and security
Docker Container: isolation and security
宇 傅
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking
Hervé Leclerc
Kubernetes Networking
Kubernetes Networking
CJ Cullen
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015
Van Phuc
CoreOS @Codetalks Hamburg
CoreOS @Codetalks Hamburg
Timo Derstappen
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
Richard Lister
Docker network
Docker network
Mohammadreza Amini
CoreOS: Control Your Fleet
CoreOS: Control Your Fleet
Matthew Jones
Discovering OpenBSD on AWS
Discovering OpenBSD on AWS
Laurent Bernaille
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Etsuji Nakai
What's hot
(20)
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
Rtl sdr software defined radio
Rtl sdr software defined radio
Introction to docker swarm
Introction to docker swarm
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Small, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the Microscope
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
Docker Container: isolation and security
Docker Container: isolation and security
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking
Kubernetes Networking
Kubernetes Networking
Docker network Present in VietNam DockerDay 2015
Docker network Present in VietNam DockerDay 2015
CoreOS @Codetalks Hamburg
CoreOS @Codetalks Hamburg
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
Docker network
Docker network
CoreOS: Control Your Fleet
CoreOS: Control Your Fleet
Discovering OpenBSD on AWS
Discovering OpenBSD on AWS
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Red Hat Enterprise Linux OpenStack Platform 7 - VM Instance HA Architecture
Similar to Multi container apps swarm + consul + compose
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
inwin stack
Introducing Docker
Introducing Docker
Francesco Pantano
Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64
Jean-Frederic Clere
k8s practice 2023.pptx
k8s practice 2023.pptx
wonyong hwang
DeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to Docker
Steve Smith
Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspective
Robert Munteanu
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3
Binary Studio
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...
Agile Testing Alliance
Component pack 6006 install guide
Component pack 6006 install guide
Roberto Boccadoro
Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri
How to manage Azure with open source
How to manage Azure with open source
Ubuntu Korea Community
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
Taehee Jang
JomaSoft VDCF - Solaris Private Cloud
JomaSoft VDCF - Solaris Private Cloud
JomaSoft
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013
Trevor Roberts Jr.
Multicloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRP
Bob Melander
Check the version with fixes. Link in description
Check the version with fixes. Link in description
Przemyslaw Koltermann
Tungsten Fabric Overview
Tungsten Fabric Overview
Michelle Holley
ONOS SDN Controller - Introduction
ONOS SDN Controller - Introduction
Eueung Mulyana
Docker
Docker
The Software House
Time Series Database and Tick Stack
Time Series Database and Tick Stack
Gianluca Arbezzano
Similar to Multi container apps swarm + consul + compose
(20)
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
Introducing Docker
Introducing Docker
Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64
k8s practice 2023.pptx
k8s practice 2023.pptx
DeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to Docker
Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspective
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...
Component pack 6006 install guide
Component pack 6006 install guide
Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
How to manage Azure with open source
How to manage Azure with open source
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
JomaSoft VDCF - Solaris Private Cloud
JomaSoft VDCF - Solaris Private Cloud
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013
Multicloud connectivity using OpenNHRP
Multicloud connectivity using OpenNHRP
Check the version with fixes. Link in description
Check the version with fixes. Link in description
Tungsten Fabric Overview
Tungsten Fabric Overview
ONOS SDN Controller - Introduction
ONOS SDN Controller - Introduction
Docker
Docker
Time Series Database and Tick Stack
Time Series Database and Tick Stack
More from Eueung Mulyana
FGD Big Data
FGD Big Data
Eueung Mulyana
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Eueung Mulyana
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Eueung Mulyana
Blockchain Introduction
Blockchain Introduction
Eueung Mulyana
Bringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based Approach
Eueung Mulyana
FinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency Introduction
Eueung Mulyana
Open Source Networking Overview
Open Source Networking Overview
Eueung Mulyana
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
Eueung Mulyana
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
Eueung Mulyana
Basic onos-tutorial
Basic onos-tutorial
Eueung Mulyana
OpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - Introduction
Eueung Mulyana
Mininet Basics
Mininet Basics
Eueung Mulyana
Android Programming Basics
Android Programming Basics
Eueung Mulyana
Cloud Computing: Overview and Examples
Cloud Computing: Overview and Examples
Eueung Mulyana
selected input/output - sensors and actuators
selected input/output - sensors and actuators
Eueung Mulyana
Connected Things, IoT and 5G
Connected Things, IoT and 5G
Eueung Mulyana
Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+
Eueung Mulyana
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and Firebase
Eueung Mulyana
Trends and Enablers - Connected Services and Cloud Computing
Trends and Enablers - Connected Services and Cloud Computing
Eueung Mulyana
Digital Ecosystems - Connected Services and Cloud Computing
Digital Ecosystems - Connected Services and Cloud Computing
Eueung Mulyana
More from Eueung Mulyana
(20)
FGD Big Data
FGD Big Data
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Blockchain Introduction
Blockchain Introduction
Bringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based Approach
FinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency Introduction
Open Source Networking Overview
Open Source Networking Overview
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
Basic onos-tutorial
Basic onos-tutorial
OpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - Introduction
Mininet Basics
Mininet Basics
Android Programming Basics
Android Programming Basics
Cloud Computing: Overview and Examples
Cloud Computing: Overview and Examples
selected input/output - sensors and actuators
selected input/output - sensors and actuators
Connected Things, IoT and 5G
Connected Things, IoT and 5G
Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and Firebase
Trends and Enablers - Connected Services and Cloud Computing
Trends and Enablers - Connected Services and Cloud Computing
Digital Ecosystems - Connected Services and Cloud Computing
Digital Ecosystems - Connected Services and Cloud Computing
Recently uploaded
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boston Institute of Analytics
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Recently uploaded
(20)
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Multi container apps swarm + consul + compose
1.
Swarm + Consul
+ Compose Multi-Container Apps Eueung Mulyana http://eueung.github.io/docker-stuff/multicont CodeLabs | Attribution-ShareAlike CC BY-SA 1 / 30
2.
Outline Infrastructure & Cluster
Con g - Short Recap Another Swarm Arch RPI Voting App 2 / 30
3.
Infrastructure and Cluster
Config Short Recap 3 / 30
4.
4 / 30 Physical
Look node1 192.168.1.102 node2 192.168.1.101 node3 192.168.1.100
5.
5 / 30 Cluster
Discovery via a KV (Consul)
6.
6 / 30 Swarm
Manager Accesses Remote Daemons / Engines via Exposed Port
7.
Infrastructure and Cluster
Config Another Swarm Arch 7 / 30
8.
8 / 30 Using
Legacy (now Optional) Swarm Join
9.
9 / 30 It's
now acctually like this
10.
$source~/.dvm/dvm.sh $dvmuse1.10.2 NowusingDocker1.10.2 $./start-consul.shnode1.local 192.168.1.102 8b54ab3104b18f75814e5c03f89f3778acaad263f731695163cf52c95b1a4f4f #./start-consul.sh #--- #!/bin/bash functiongetip(){(traceroute$12>&1|head-n1|cut-d(-f2|cut IP_ADDRESS=$(getip$1) echo$IP_ADDRESS docker-H$IP_ADDRESS:2375run -d--net=host--name=consul -v/data-p8500:8500 hypriot/rpi-consul:0.6.4agent-server-data-dir/data-bootstrap-expect -ui-dir=/ui -advertise=$IP_ADDRESS-bind=$IP_ADDRESS-client=$IP_ADDRESS 10 / 30 Start
Consul @ node1
11.
Consul UI 11 /
30
12.
$./start-swarm.sh RunningSwarmAgentat192.168.1.100 b879a04323c817432e95a970bbf71a6e03fd6ae895fa643a7fe75fd12c78d06d RunningSwarmAgentat192.168.1.101 f47f6c6b258f8f03e1ad441049e2c4320b0a138e6d8eac52bdaa5f70ca80e72d RunningSwarmAgentat192.168.1.102 47346d30d35d8174b41995fa34efaa69cc6d2de6c2091e29750d7e264c6d4816 de5ee57f8e20ef3ef15cd68f873620319202486510e88c1d22bfdbd8e4ec935a #./start-swarm.sh #--- #!/bin/bash arr=("192.168.1.100""192.168.1.101""192.168.1.102") IP_CONSUL="192.168.1.102" IP_SWARMMASTER=$IP_CONSUL forIPin"${arr[@]}";do echo"RunningSwarmAgentat$IP" docker-H$IP:2375run -d--name=swarm-agent hypriot/rpi-swarm:1.2.1 join-advertise$IP:2375 consul://$IP_CONSUL:8500 done docker-H$IP_SWARMMASTER:2375run -d-p10000:6000--name=swarm-master hypriot/rpi-swarm:1.2.1manage-H0.0.0.0:6000 consul://$IP_CONSUL:8500 12 / 30 Start
Swarm agent @ all nodes manager @ node1
13.
Consul UI 13 /
30
14.
Consul UI 14 /
30
15.
$exportDOCKER_HOST=tcp://192.168.1.102:10000 $dockerinfo ... $dockerps CONTAINERID IMAGE COMMAND
CREATED de5ee57f8e20 hypriot/rpi-swarm:1.2.1 "/swarmmanage-H0.0" 3minutesago 47346d30d35d hypriot/rpi-swarm:1.2.1 "/swarmjoin-adverti" 3minutesago f47f6c6b258f hypriot/rpi-swarm:1.2.1 "/swarmjoin-adverti" 3minutesago b879a04323c8 hypriot/rpi-swarm:1.2.1 "/swarmjoin-adverti" 3minutesago 8b54ab3104b1 hypriot/rpi-consul:0.6.4 "/consulagent-serve" 5minutesago 15 / 30 Check
16.
RPI Voting App Credit:
@jmMeessen , @dduportal 16 / 30
17.
5 Containers, 2
Networks 17 / 30
18.
#./tag-images.sh #!/bin/bash dockertagthecaptainsshack/rpi-workerthecaptainsshack/rpi-worker:v1 dockertagthecaptainsshack/rpi-voting-appthecaptainsshack/rpi-voting-app:v1 dockertagthecaptainsshack/rpi-result-appthecaptainsshack/rpi-result-app:v1 dockertagthecaptainsshack/postgres-armthecaptainsshack/postgres-arm:v1 ./save-images.sh #!/bin/bash dockersave-orpi-worker.tarthecaptainsshack/rpi-worker dockersave-orpi-voting-app.tarthecaptainsshack/rpi-voting-app dockersave-orpi-result-app.tarthecaptainsshack/rpi-result-app dockersave-opostgres-arm.tarthecaptainsshack/postgres-arm #./load-images.sh #!/bin/bash dockerload-irpi-worker.tar dockerload-irpi-voting-app.tar dockerload-irpi-result-app.tar dockerload-ipostgres-arm.tar sftp>mkdirvoting sftp>put-rvoting $rm-fvoting/*&&rmdirvoting 18 / 30 Optional Preparation tag,
save, load
19.
db: image:thecaptainsshack/postgres-arm:v1 volumes: -db-data:/var/lib/postgresql/data networks: -back-tier result-app: image:thecaptainsshack/rpi-result-app:v1 ports: -"5001:80" links: -db networks: -front-tier -back-tier volumes: db-data:{} networks: front-tier: driver:overlay back-tier: driver:overlay 19 / 30 docker-compose.yml version:'2' services: voting-app: image:thecaptainsshack/rpi-voting-app:v1 ports: -"5000:80" links: -redis networks: -front-tier -back-tier redis: image:hypriot/rpi-redis:3.0.4 expose:["6379"] networks: -back-tier worker: image:thecaptainsshack/rpi-worker:v1 depends_on: -db -redis networks: -back-tier
20.
$docker-composeup-d Creatingnetwork"voteapps_front-tier"withdriver"overlay" Creatingnetwork"voteapps_back-tier"withdriver"overlay" Creatingvolume"voteapps_db-data"withdefaultdriver Creatingvoteapps_redis_1 Creatingvoteapps_db_1 Creatingvoteapps_voting-app_1 Creatingvoteapps_worker_1 Creatingvoteapps_result-app_1 $dockerps CONTAINERID IMAGE COMMAND
CREATE 13390ae07634 thecaptainsshack/rpi-result-app:v1 "nodeserver.js" 14sec fb7788e21dcf thecaptainsshack/rpi-worker:v1 "java-jar/worker-ja" 14sec 02da4fd6d395 thecaptainsshack/postgres-arm:v1 "/docker-entrypoint.s" 19sec 9271161cffd0 hypriot/rpi-swarm:1.2.1 "/swarmmanage-H0.0" 2minu 5094d356a141 hypriot/rpi-swarm:1.2.1 "/swarmjoin-adverti" 2minu 43c6c9914167 hypriot/rpi-swarm:1.2.1 "/swarmjoin-adverti" 2minu 38dc46794c30 hypriot/rpi-consul:0.6.4 "/consulagent-serve" 2minu 4952e24ce452 thecaptainsshack/rpi-voting-app:v1 "pythonapp.py" 10hou ac998b65792c hypriot/rpi-redis:3.0.4 "/entrypoint.shredis" 10hou 94e83aa038b1 hypriot/rpi-swarm:1.2.1 "/swarmjoin-adverti" 10hou #restartifnecessary $docker-composestop&&docker-composerm-f 20 / 30 Ready for Show
21.
$docker-composeps Name Command State
Ports ---------------------------------------------------------------------------------------- voteapps_db_1 /docker-entrypoint.shpostgres Up 5432/tcp voteapps_redis_1 /entrypoint.shredis-server Up 6379/tcp voteapps_result-app_1 nodeserver.js Up 192.168.1.100:5001-> voteapps_voting-app_1 pythonapp.py Up 192.168.1.101:5000-> voteapps_worker_1 java-jar/worker-jar-with... Up root@node3in~ $dockernetworkls NETWORKID NAME DRIVER 8add79af5bf7 voteapps_front-tier overlay c9c8503da2d8 voteapps_back-tier overlay f0dce7240349 docker_gwbridge bridge 8cbe7e085fad none null ec272b59cfd7 host host 4592696ebf19 bridge bridge 21 / 30 Ready for Show
22.
voting-app 22 / 30
23.
$dockerlogs-f2de6 Connectedtoredis Watchingvotequeue Processingvotefor'a'by'84a51f315b69e04a' 23 / 30 redis
log
24.
result-app 24 / 30
25.
voting-app 25 / 30
26.
$dockerlogs-f2de6 Connectedtoredis Watchingvotequeue Processingvotefor'a'by'84a51f315b69e04a' Processingvotefor'a'by'84a51f315b69e04a' Processingvotefor'b'by'8f3ee350c2aec3f5' 26 / 30 redis
log
27.
result-app 27 / 30
28.
Refs 28 / 30
29.
Refs 1. jmMeessen/rpi-voting-app: A
dockerized voting application demo, adapted for Raspberry PI 2. @dduportal - Swarm on Raspberry Pis 3. docker/example-voting-app: Example Docker Compose app 29 / 30
30.
END Eueung Mulyana http://eueung.github.io/docker-stuff/multicont CodeLabs |
Attribution-ShareAlike CC BY-SA 30 / 30
Download now