A simple operator for nomad which reconciles the running jobs in comparison to git repos
Still work in progress, but it should do what it is supposed to :)
See https://nomad-ops.github.io/nomad-ops/ for more information
You need nomad and docker installed on your system
- Clone the repo
- Start 2 terminal sessions at the root of this repo
Run the following in the first terminal:
Make sure that docker volumes are available
You can use the provided.deployment/nomad/agent.hclas a reference
Remember to set theNOMAD_ADDRenvironment variable to the address of your nomad cluster
nomad agent -dev -bind 0.0.0.0 -log-level INFO -config .deployment/nomad/agent.hcl
This will bring up a nomad environment with docker volumes enabled. See nomad docs for more info.
Run the following in the second terminal:
nomad namespace apply nomad-ops
This makes sure that the namespace nomad-ops exists.
Deploy Nomad-Ops to nomad by running:
nomad job run .deployment/nomad/docker.hcl
Go to http://localhost:8080/_/.
This will bring you to the login screen of pocketbase.
Login using [email protected] and simple-nomad-ops.
You only need to access this UI to create additional users. The main UI is available at http://localhost:8080/
You can access the UI of Nomad-Ops at http://localhost:8080/ and use your newly created credentials to login.
By default the following user is created:
- email:
[email protected] - password:
simple-nomad-ops
You can change the default user by setting the environment variables
DEFAULT_USER_EMAILandDEFAULT_USER_PASSWORD.
The Admin User
[email protected]is only capable to access the pocketbase ui athttp://{your-nomad-ops-host}/_/. To access the Nomad-Ops UI you need to use a normal user.
Workload identity is NOT supported.
Some APIs of nomad do not support the JWT token authentication. Until this is fixed you have to use the NOMAD_TOKEN environment variable to authenticate with the nomad api.
Thanks to https://github.com/pocketbase/pocketbase for providing a solid base : ) !
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs -v ~/.ssh:/root/.ssh --entrypoint /bin/sh --platform linux/amd64 squidfunk/mkdocs-materialapk add -U git opensshgit config --global url."[email protected]:".insteadOf "https://github.com/"mkdocs gh-deploy