2017-08-02 20:20:06 +00:00
|
|
|
This package provides a convenient way to create a local Nomad cluster for
|
|
|
|
testing and development.
|
|
|
|
|
2017-08-02 20:30:42 +00:00
|
|
|
# Server
|
|
|
|
|
2017-08-02 20:20:06 +00:00
|
|
|
In order to create the cluster, first start the Nomad agent as follows from this
|
|
|
|
directory:
|
|
|
|
|
2017-08-02 20:30:42 +00:00
|
|
|
## Non-persistent server
|
|
|
|
|
2017-08-02 20:20:06 +00:00
|
|
|
```
|
2017-08-02 20:33:46 +00:00
|
|
|
nomad agent -dev -config docker-privileged.hcl
|
2017-08-02 20:20:06 +00:00
|
|
|
```
|
|
|
|
|
2017-08-02 20:30:42 +00:00
|
|
|
The configuration allows the Docker driver to start containers with
|
2017-08-02 20:20:06 +00:00
|
|
|
`Privileged` parameter.
|
|
|
|
|
2017-08-02 20:30:42 +00:00
|
|
|
## Persistent Server
|
|
|
|
|
|
|
|
To start a server that can be shutdown and restarted run the following:
|
|
|
|
|
|
|
|
```
|
2017-08-02 20:33:46 +00:00
|
|
|
nomad agent -config persistent.hcl
|
2017-08-02 20:30:42 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# Clients
|
|
|
|
|
2017-08-02 20:20:06 +00:00
|
|
|
Next, modify the count of client.nomad to run the desired number of Nomad
|
|
|
|
clients and then run the job.
|
|
|
|
|
|
|
|
```
|
|
|
|
nomad run client.nomad
|
|
|
|
```
|
|
|
|
|
|
|
|
After a few seconds, you will be able to run:
|
|
|
|
|
|
|
|
```
|
|
|
|
nomad node-status
|
|
|
|
```
|
|
|
|
|
|
|
|
And see the clients have started up.
|