mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 09:39:56 +00:00
move visualizer to service and stack (#237)
This commit is contained in:
committed by
Jérôme Petazzoni
parent
290185f16b
commit
c8d73caacd
@@ -439,16 +439,10 @@ class: extra-details
|
||||
|
||||
.exercise[
|
||||
|
||||
- Get the source code of this simple-yet-beautiful visualization app:
|
||||
- Run this simple-yet-beautiful visualization app:
|
||||
```bash
|
||||
cd ~
|
||||
git clone git://github.com/dockersamples/docker-swarm-visualizer
|
||||
```
|
||||
|
||||
- Build and run the Swarm visualizer:
|
||||
```bash
|
||||
cd docker-swarm-visualizer
|
||||
docker-compose up -d
|
||||
cd ~/container.training/stacks
|
||||
docker-compose -f visualizer.yml up -d
|
||||
```
|
||||
|
||||
<!-- ```longwait Creating dockerswarmvisualizer_viz_1``` -->
|
||||
@@ -489,7 +483,7 @@ class: extra-details
|
||||
|
||||
- Instead of viewing your cluster, this could take care of logging, metrics, autoscaling ...
|
||||
|
||||
- We can run it within a service, too! We won't do it, but the command would look like:
|
||||
- We can run it within a service, too! We won't do it yet, but the command would look like:
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
@@ -497,12 +491,16 @@ class: extra-details
|
||||
--name viz --constraint node.role==manager ...
|
||||
```
|
||||
|
||||
.footnote[
|
||||
|
||||
Credits: the visualization code was written by
|
||||
[Francisco Miranda](https://github.com/maroshii).
|
||||
<br/>
|
||||
|
||||
[Mano Marks](https://twitter.com/manomarks) adapted
|
||||
it to Swarm and maintains it.
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
## Terminate our services
|
||||
|
||||
13
stacks/visualizer.yml
Normal file
13
stacks/visualizer.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
viz:
|
||||
image: dockersamples/visualizer
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
deploy:
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
Reference in New Issue
Block a user