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
Copy file name to clipboardExpand all lines: README.md
+56-9Lines changed: 56 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,62 @@ You need to install CNI plugins on Nomad client nodes under `/opt/cni/bin` befor
151
151
$ sudo mkdir -p /opt/cni/bin
152
152
$ sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz
153
153
```
154
+
Also, ensure your Linux operating system distribution has been configured to allow container traffic through the bridge network to be routed via iptables. These tunables can be set as follows:
To preserve these settings on startup of a nomad client node, add a file including the following to `/etc/sysctl.d/` or remove the file your Linux distribution puts in that directory.
162
+
163
+
```
164
+
net.bridge.bridge-nf-call-arptables = 1
165
+
net.bridge.bridge-nf-call-ip6tables = 1
166
+
net.bridge.bridge-nf-call-iptables = 1
167
+
```
168
+
169
+
## Port forwarding
170
+
171
+
nomad supports both **static** and **dynamic** port mapping.
172
+
173
+
1.**Static ports**
174
+
175
+
Static port mapping can be added in the `network` stanza.
176
+
```
177
+
network {
178
+
mode = "bridge"
179
+
port "lb" {
180
+
static = 8889
181
+
to = 8889
182
+
}
183
+
}
184
+
```
185
+
Here, `host` port `8889` is mapped to `container` port `8889`.<br/>
186
+
**NOTE**: static ports are usually not recommended, except for `system` or specialized jobs like load balancers.
187
+
188
+
2.**Dynamic ports**
189
+
190
+
Dynamic port mapping is also enabled in the `network` stanza.
191
+
```
192
+
network {
193
+
mode = "bridge"
194
+
port "http" {
195
+
to = 8080
196
+
}
197
+
}
198
+
```
199
+
Here, nomad will allocate a dynamic port on the `host` and that port will be mapped to `8080` in the container.
200
+
201
+
You can also read more about `network stanza` in the [`nomad official documentation`](https://www.nomadproject.io/docs/job-specification/network)
202
+
203
+
## Service discovery
204
+
205
+
Nomad schedules workloads of various types across a cluster of generic hosts. Because of this, placement is not known in advance and you will need to use service discovery to connect tasks to other services deployed across your cluster. Nomad integrates with Consul to provide service discovery and monitoring.
206
+
207
+
A [`service`](https://www.nomadproject.io/docs/job-specification/service) stanza can be added to your job spec, to enable service discovery.
208
+
209
+
The service stanza instructs Nomad to register a service with Consul.
154
210
155
211
## Tests
156
212
```
@@ -174,15 +230,6 @@ This will destroy your vagrant VM.
174
230
## Currently supported environments
175
231
Ubuntu (>= 16.04)
176
232
177
-
## Limitations
178
-
179
-
`nomad-driver-containerd`[`v0.1`](https://github.com/Roblox/nomad-driver-containerd/releases/tag/v0.1) is **not** production ready.
180
-
There are some open items which are currently being worked on.
181
-
182
-
1)**Port forwarding**: The ability to map a host port to a container port. This is currently not supported, but could be supported in future.
183
-
184
-
2)**Consul connect**: When a user launches a job in `nomad`, s/he can add a [`service stanza`](https://www.nomadproject.io/docs/job-specification/service) which will instruct `nomad` to register the service with `consul` for service discovery. This is currently not supported.
0 commit comments