Skip to content
This repository was archived by the owner on Feb 21, 2024. It is now read-only.

Commit d115375

Browse files
committed
updates
1 parent 10939f4 commit d115375

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

docs/tutorials.md

+36-35
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title = "Tutorials"
33
weight = 4
44
nav = [
55
"Setting Up a Secure Cluster",
6+
"Setting Up a Docker Cluster",
67
"Using Integer Field Values",
78
"Storing Row and Column Attributes",
89
]
@@ -287,31 +288,31 @@ The corresponding [Docker Compose](https://docs.docker.com/compose/) file is bel
287288
```yaml
288289
version: '2'
289290
services:
290-
pilosa1:
291-
image: pilosa/pilosa:latest
292-
ports:
293-
- "10101:10101"
294-
environment:
295-
- PILOSA_CLUSTER_COORDINATOR=true
296-
- PILOSA_GOSSIP_SEEDS=pilosa1:14000
297-
networks:
298-
- pilosanet
299-
entrypoint:
300-
- /pilosa
301-
- server
302-
- --bind
303-
- "pilosa1:10101"
304-
pilosa2:
305-
image: pilosa/pilosa:latest
306-
environment:
307-
- PILOSA_GOSSIP_SEEDS=pilosa1:14000
308-
networks:
309-
- pilosanet
310-
entrypoint:
311-
- /pilosa
312-
- server
313-
- --bind
314-
- "pilosa2:10101"
291+
pilosa1:
292+
image: pilosa/pilosa:latest
293+
ports:
294+
- "10101:10101"
295+
environment:
296+
- PILOSA_CLUSTER_COORDINATOR=true
297+
- PILOSA_GOSSIP_SEEDS=pilosa1:14000
298+
networks:
299+
- pilosanet
300+
entrypoint:
301+
- /pilosa
302+
- server
303+
- --bind
304+
- "pilosa1:10101"
305+
pilosa2:
306+
image: pilosa/pilosa:latest
307+
environment:
308+
- PILOSA_GOSSIP_SEEDS=pilosa1:14000
309+
networks:
310+
- pilosanet
311+
entrypoint:
312+
- /pilosa
313+
- server
314+
- --bind
315+
- "pilosa2:10101"
315316
networks:
316317
pilosanet:
317318
```
@@ -322,11 +323,11 @@ It is very easy to run a Pilosa Cluster on different servers using [Docker Swarm
322323
323324
The instructions in this section require Docker 17.06 and better. Although it is possible to run a Docker swarm on MacOS or Windows, it is easiest to run it on Linux. So we assume you are trying these instructions on Linux, probably on the cloud.
324325
325-
We are going to use two servers: the master node runs in the first server and a slave node in the second server.
326+
We are going to use two servers: the manager node runs in the first server and a worker node in the second server.
326327
327328
Docker nodes require some ports to be accesible from outside. Before carrying on, make sure the following ports are open on all nodes: TCP/2377, TCP/7946, UDP/7946, UDP/4789.
328329
329-
Let's initialize the swarm first. Run the following on the master:
330+
Let's initialize the swarm first. Run the following on the manager:
330331
```
331332
docker swarm init --advertise-addr=IP-ADDRESS
332333
```
@@ -337,15 +338,15 @@ The output of the command above should be similar to:
337338
```
338339
To add a manager to this swarm, run the following command:
339340
340-
docker swarm join --token SOME-TOKEN MASTER-IP-ADDRESS:2377
341+
docker swarm join --token SOME-TOKEN MANAGER-IP-ADDRESS:2377
341342
```
342343

343-
Let's make the slave node join the master. Copy/paste the command above in a shell on the slave, replacing the token and IP address with the correct values. You may neeed to add `--advertise-addr=SLAVE-EXTERNAL-IP-ADDRESS` parameter if the slave has more than one network interface:
344+
Let's make the worker node join the manager. Copy/paste the command above in a shell on the worker, replacing the token and IP address with the correct values. You may neeed to add `--advertise-addr=WORKER-EXTERNAL-IP-ADDRESS` parameter if the worker has more than one network interface:
344345
```
345-
docker swarm join --token SOME-TOKEN MASTER-IP-ADDRESS:2377
346+
docker swarm join --token SOME-TOKEN MANAGER-IP-ADDRESS:2377
346347
```
347348

348-
Run the following on the master to check that the slave joined to the swarm:
349+
Run the following on the manager to check that the worker joined to the swarm:
349350
```
350351
docker node ls
351352
```
@@ -354,15 +355,15 @@ Which should output:
354355

355356
ID|HOSTNAME|STATUS|AVAILABILITY|MANAGER STATUS|ENGINE VERSION
356357
---|--------|------|------------|--------------|-------------
357-
MASTER-ID *|swarm1|Ready|Active|Leader|18.05.0-ce|
358-
SLAVE-ID|swarm2|Ready|Active||18.05.0-ce|
358+
MANAGER-ID *|swarm1|Ready|Active|Leader|18.05.0-ce|
359+
WORKER-ID|swarm2|Ready|Active||18.05.0-ce|
359360

360361
If you have created the `pilosanet` network before, delete it before carrying on, otherwise skip to the next step:
361362
```
362363
docker network rm pilosanet
363364
```
364365

365-
Let's create the `pilosanet` network, but with `overlay` type this time. We should also make this network attachable in order to be able to attach containers to it. Run the following on the master:
366+
Let's create the `pilosanet` network, but with `overlay` type this time. We should also make this network attachable in order to be able to attach containers to it. Run the following on the manager:
366367
```
367368
docker network create -d overlay pilosanet --attachable
368369
```
@@ -385,7 +386,7 @@ docker run -it --rm --network=pilosanet --name shell alpine wget -q -O- pilosa1:
385386
{"state":"NORMAL","nodes":[{"id":"3e3b0abd-1945-441a-a01f-5a28272972f5","uri":{"scheme":"http","host":"pilosa1","port":10101},"isCoordinator":true},{"id":"71ed27cc-9443-4f41-88fb-1c22f92bf695","uri":{"scheme":"http","host":"pilosa2","port":10101},"isCoordinator":false}]}
386387
```
387388

388-
You can add as many as slave nodes to both the swarm and the Pilosa cluster using the steps above.
389+
You can add as many as worker nodes to both the swarm and the Pilosa cluster using the steps above.
389390

390391
#### What's Next?
391392

0 commit comments

Comments
 (0)