Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kompot/nomadev
Nomad/Consul driven Vagrant cluster of 4+ nodes.
https://github.com/kompot/nomadev
Last synced: about 1 month ago
JSON representation
Nomad/Consul driven Vagrant cluster of 4+ nodes.
- Host: GitHub
- URL: https://github.com/kompot/nomadev
- Owner: kompot
- Created: 2015-12-13T06:57:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T00:49:36.000Z (almost 9 years ago)
- Last Synced: 2023-03-12T10:45:45.736Z (almost 2 years ago)
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Some experiments with setting up [Nomad](https://nomadproject.io/) and
[Consul](https://consul.io) using Ansible in [Vagrant](https://www.vagrantup.com/) (1.8+ required
as it uses `ansible_local` provisioning).Create 4 machines with
```vagrant up```
and head to [localhost:8080](http://localhost:8080)
to see Consul's web UI with all the nodes.It's time to throw some tasks into the cluster. Download [Nomad](https://nomadproject.io/downloads.html)
to have `nomad` command available in terminal and run the following```
nomad node-status
```output should be like this
```
ID DC Name Class Drain Status
90c877a8-b52c-1867-7b8e-8f83543ea782 dc1 client2 false ready
ac53e70d-8a3b-bd96-8b35-111629e2bb0e dc1 client1 false ready
```This means Nomad server is visible from your host.
Now you can run nomad jobs and have nomad schedule them
```
nomad run example.nomad
```This should allocate 1 nginx and 1 redis docker container.
Type `nomad status` to check job's status and `nomad status example` to
take a closer look at the `example` nomad task. Consul (at [localhost:8080](http://localhost:8080))
should show its availability status and monitor each container's health (try
to kill the container on `client1` or `client2` with `docker kill [containerId]`).Feel free to adjust `count` parameter in `example.job`, run `nomad run example.nomad`
and watch nomad do the resize.