diff --git a/dockercoins/docker-compose.yml-images b/dockercoins/docker-compose.yml-images index 45430660..a32d21b0 100644 --- a/dockercoins/docker-compose.yml-images +++ b/dockercoins/docker-compose.yml-images @@ -3,19 +3,19 @@ version: "2" services: rng: build: rng - image: ${REPOSITORY_SLASH}rng${COLON_TAG} + image: ${REGISTRY_SLASH}rng${COLON_TAG} ports: - "8001:80" hasher: build: hasher - image: ${REPOSITORY_SLASH}hasher${COLON_TAG} + image: ${REGISTRY_SLASH}hasher${COLON_TAG} ports: - "8002:80" webui: build: webui - image: ${REPOSITORY_SLASH}webui${COLON_TAG} + image: ${REGISTRY_SLASH}webui${COLON_TAG} ports: - "8000:80" volumes: @@ -26,5 +26,5 @@ services: worker: build: worker - image: ${REPOSITORY_SLASH}worker${COLON_TAG} + image: ${REGISTRY_SLASH}worker${COLON_TAG} diff --git a/www/htdocs/index.html b/www/htdocs/index.html index 82f814ee..60d6490b 100644 --- a/www/htdocs/index.html +++ b/www/htdocs/index.html @@ -101,11 +101,11 @@ Docker
Orchestration
Workshop ## Logistics - + - Agenda: .small[ -- 08:00-09:00 hello and breakfast -- 09:00:10:25 part 1 -- 10:25-10:35 coffee break -- 10:35-12:00 part 2 -- 12:00-13:00 lunch break -- 13:00-14:25 part 3 -- 14:25-14:35 coffee break -- 14:35-16:00 part 4 +- 09:00-09:15 hello +- 09:15-10:45 part 1 +- 10:45-11:00 coffee break +- 11:00-12:30 part 2 +- 12:30-13:30 lunch break +- 13:30-15:00 part 3 +- 15:00-15:15 coffee break +- 15:15-16:45 part 4 +- 16:45-17:30 Q&A ] ---> - + - All the content is publicly available (slides, code samples, scripts) @@ -197,20 +199,13 @@ grep '^# ' index.html | grep -v ' - --- ## Nice-to-haves - [GitHub](https://github.com/join) account -
(if you want to fork the repo) -
(if you want to fork the repo; also used to join Gitter) - [Gitter](https://gitter.im/) account @@ -296,7 +291,8 @@ wait - When we will use the other nodes, we will do it mostly through the Docker API -- We will use SSH only for the initial setup and a few "out of band" operations (checking internal logs, debugging...) +- We will use SSH only for the initial setup and a few "out of band" operations +
(checking internal logs, debugging...) --- @@ -414,7 +410,7 @@ class: pic ![DockerCoins logo](dockercoins.png) -(DockerCoins 2016 logo courtesy of @XtlCnslt and @ndeloof. Thanks!) +(DockerCoins 2016 logo courtesy of [@XtlCnslt](https://twitter.com/xtlcnslt) and [@ndeloof](https://twitter.com/ndeloof). Thanks!) --- @@ -797,6 +793,28 @@ class: title --- +## Where is the key/value store? + +- All other orchestration systems use a key/value store + + (k8s→etcd, nomad→consul, mesos→zookeeper, etc.) + +- SwarmKit stores information directly in Raft + +- Analogy courtesy of [@aluzzardi](https://twitter.com/aluzzardi): + + *It's like B-Trees and RDBMS. They are different layers, often + associated. But you don't need to bring up a full SQL server when + all you need is to index some data.* + +- As a result, the orchestrator has direct access to the data + + (the main copy of the data is stored in the orchestrator's memory) + +- Simpler, easier to deploy and operate; also faster + +--- + ## SwarmKit concepts (1/2) - A *cluster* will be at least one *node* (preferably more) @@ -904,10 +922,10 @@ You can refer to the [NOMENCLATURE](https://github.com/docker/swarmkit/blob/mast Swarm initialized: current node (8jud...) is now a manager. ``` -- Docker also generated two security tokens (like passphrases or - passwords) for our cluster, and shows us the commands to use - on other nodes to add them to the cluster using those security - tokens: +- Docker generated two security tokens (like passphrases or passwords) for our cluster + +- The CLI shows us the command to use on other nodes to add them to the cluster using the "worker" + security token: ``` To add a worker to this swarm, run the following command: @@ -1698,6 +1716,24 @@ Moreover, it would significantly alter the code path for `docker run`, even in c - We need to connect to the `webui` service, but it is not publishing any port +- Let's re-create the `webui` service, but publish its port 80 this time + +.exercise[ + +- Remove the `webui` service: + ```bash + docker service rm webui + ``` + +- Re-create it: + ```bash + docker service create --network dockercoins --name webui \ + -p 8000:80 $DOCKER_REGISTRY/dockercoins_webui:$TAG + ``` + +] + + --- @@ -1781,6 +1818,8 @@ You should see the performance peaking at 10 hashes/s (like before). ] +Note: if the hash rate goes to zero and doesn't climb back up, try to `rm` and `create` again. + --- ## Checkpoint @@ -2646,15 +2685,15 @@ After ~15 seconds, you should see the log messages in Kibana. - In the left column, move the mouse over the following columns, and click the "Add" button that appears: - + ] @@ -2662,6 +2701,8 @@ After ~15 seconds, you should see the log messages in Kibana. ## .warning[Don't update stateful services!] +- Why didn't we update the Redis service as well? + - When a service changes, SwarmKit replaces existing container with new ones - This is fine for stateless services @@ -2757,8 +2798,8 @@ After ~15 seconds, you should see the log messages in Kibana. - Global volumes exist in a single namespace -- A global volume can be mounted on any node.red[*] -
.small[(bar some restrictions specific to the volume driver in use; e.g. using an EBS-backed volume on a GCE/EC2 mixed cluster.)] +- A global volume can be mounted on any node +
.small[(bar some restrictions specific to the volume driver in use; e.g. using an EBS-backed volume on a GCE/EC2 mixed cluster)] - Attaching a global volume to a container allows to start the container anywhere
(and retain its data wherever you start it!) @@ -3314,7 +3355,9 @@ More resources on this topic: - You can tell Docker to place a given service on a manager node, using constraints: ```bash - docker service create --name autoscaler --constraint node.role==manager ... + docker service create \ + --mount source=/var/run/docker.sock,type=bind,target=/var/run/docker.sock \ + --name autoscaler --constraint node.role==manager ... ``` ---