You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2024. It is now read-only.
*[Docker Machine Driver for Grid5000](https://github.com/Spirals-Team/docker-machine-driver-g5k)
9
-
*[Go tools](https://golang.org/doc/install)
9
+
*[Docker Machine Driver for Grid5000 (v1.4.1+)](https://github.com/Spirals-Team/docker-machine-driver-g5k)
10
+
*[Go tools (Only for installation from sources)](https://golang.org/doc/install)
10
11
11
12
You need a Grid5000 account to use this tool. See [this page](https://www.grid5000.fr/mediawiki/index.php/Grid5000:Get_an_account) to create an account.
12
13
13
14
## Installation
14
15
16
+
## Installation from GitHub releases
17
+
Binary releases for Linux, MacOS and Windows using x86/x86_64 CPU architectures are available in the [releases page](https://github.com/Spirals-Team/docker-g5k/releases).
18
+
You can use the following commands to install or upgrade the tool:
19
+
```bash
20
+
# download the binary for your OS and CPU architecture :
21
+
sudo curl -L -o /usr/local/bin/docker-g5k "<link to release>"
22
+
23
+
# grant execution rigths for everyone :
24
+
sudo chmod 755 /usr/local/bin/docker-g5k
25
+
```
26
+
15
27
## Installation from sources
16
28
*This procedure was only tested on Ubuntu 16.04.*
17
29
18
-
To use the Go tools, you need to set your [GOPATH](https://golang.org/doc/code.html#GOPATH) variable environment.
19
-
30
+
To use the Go tools, you need to set your [GOPATH](https://golang.org/doc/code.html#GOPATH) variable environment.
20
31
To get the code and compile the binary, run:
21
32
```bash
22
33
go get -u github.com/Spirals-Team/docker-g5k
@@ -35,66 +46,140 @@ Do not forget to configure your DNS or use OpenVPN DNS auto-configuration.
35
46
Please follow the instructions from the [Grid5000 Wiki](https://www.grid5000.fr/mediawiki/index.php/VPN).
36
47
37
48
### Command line flags
38
-
39
-
#### Cluster creation flags
40
-
41
-
| Option | Description | Default value | Required |
|`--g5k-walltime`|`G5K_WALLTIME`| "1:00:00" | No | No |
82
+
|`--g5k-image`|`G5K_IMAGE`| "jessie-x64-min" | No | No |
83
+
|`--g5k-resource-properties`|`G5K_RESOURCE_PROPERTIES`|| No | No |
84
+
|`--engine-opt`|`ENGINE_OPT`|| Yes | Yes |
85
+
|`--engine-label`|`ENGINE_LABEL`|| Yes | Yes |
86
+
|`--swarm-master`|`SWARM_MASTER`|| Yes | Yes |
87
+
|`--swarm-mode-enable`|`SWARM_MODE_ENABME`|| No | No |
88
+
|`--swarm-standalone-enable`|`SWARM_STANDALONE_ENABLE`|| No | No |
89
+
|`--swarm-standalone-discovery`|`SWARM_STANDALONE_DISCOVERY`| New token | No | No |
90
+
|`--swarm-standalone-image`|`SWARM_STANDALONE_IMAGE`| "swarm:latest" | No | No |
91
+
|`--swarm-standalone-strategy`|`SWARM_STANDALONE_STRATEGY`| "spread" | No | No |
92
+
|`--swarm-standalone-opt`|`SWARM_STANDALONE_OPT`|| No | Yes |
93
+
|`--swarm-standalone-join-opt`|`SWARM_STANDALONE_JOIN_OPT`|| No | Yes |
94
+
|`--weave-networking`|`WEAVE_NETWORKING`|| No | No |
95
+
96
+
Flag `--g5k-reserve-nodes` format is `site:numberOfNodes` and brace expansion are supported.
97
+
For example, `lille-16`, `{lille,nantes}-16`.
98
+
99
+
Engine flags `--engine-*` format is `node-name:key=val` and brace expansion are supported.
100
+
For example, `lille-0:mykey=myval`, `lille-{0..5}:mykey=myval`, `lille-{0,2,4}:mykey=myval`.
101
+
102
+
For `--engine-opt` flag, please refer to [Docker documentation](https://docs.docker.com/engine/reference/commandline/dockerd/) for supported parameters.
103
+
**Test your parameters on a single node before deploying a cluster ! If your flags are incorrect, Docker wont start and you should redeploy the entire cluster !**
104
+
105
+
#### For `remove-cluster` command
106
+
107
+
##### Flags description
108
+
*`--g5k-job-id` : Only remove nodes related to the provided job ID
An example of a 16 nodes Docker Swarm cluster creation with resource properties (nodes in cluster `chimint` with more thant 8GB of RAM and at least 4 CPU cores):
174
+
An example of a 16 nodes Docker Swarm standalone cluster creation using the first node as Swarm Master and Weave Networking:
90
175
```bash
91
176
docker-g5k create-cluster \
92
-
--g5k-username user \
93
-
--g5k-password ******** \
94
-
--g5k-site lille \
95
-
--g5k-ssh-private-key ~/.ssh/g5k-key \
96
-
--g5k-nb-nodes 16 \
97
-
--g5k-resource-properties "cluster = 'chimint' and memnode > 8192 and cpucore >= 4"
177
+
--g5k-username "user" \
178
+
--g5k-password "********" \
179
+
--g5k-reserve-nodes "lille:16" \
180
+
--swarm-standalone-enable \
181
+
--swarm-master "lille-0" \
182
+
--weave-networking
98
183
```
99
184
100
185
#### Cluster deletion
@@ -119,7 +204,7 @@ docker-machine ls
119
204
120
205
**If you remove a node with Docker Machine 'rm' command, the job will be deleted and ALL nodes related to this job will become unavailable**
121
206
122
-
### Use with Weave networking
207
+
### Use with Weave networking (Only with Swarm standalone)
123
208
124
209
First, you need to configure your Docker client to use the Swarm mode (You can get the Swarm master hostname with 'docker-machine ls'):
0 commit comments