Nomoporator is a GitOps operator for Hashicorp Nomad.
It's also possible configure Nomoporator via environment variables by setting them like this:
NOMAD_ADDR - Required to overide the default of http://127.0.0.1:4646.
NOMAD_TOKEN - Required with ACLs enabled.
NOMAD_CACERT - Required with TLS enabled.
NOMAD_CLIENT_CERT - Required with TLS enabled.
NOMAD_CLIENT_KEY - Required with TLS enabled.
Get help with
./nomoporator bootstrap git -h
Bootstrap Nomad using a git repository
Usage:
nomad-gitops-operator bootstrap git [git repo] [flags]
Flags:
--branch string git branch (default "main")
-h, --help help for git
--path string path relative to the repository root (default "/")
--url string git repository URL
Global Flags:
-a, --address string Address of the Nomad server
Use it like this:
./nomad-gitops-operator bootstrap git --url https://github.com/jonasvinther/nomad-state.git --path /jobs --branch main
job "nomad-gitops-operator" {
datacenters = ["dc1"]
group "nomad-gitops-operator" {
count = 1
task "nomad-gitops-operator" {
driver = "exec"
config {
command = "nomad-gitops-operator"
args = ["bootstrap", "git", "--url", "https://github.com/jonasvinther/nomad-state.git", "--branch", "main", "--path", "/prod-env"]
}
artifact {
source = "https://github.com/jonasvinther/nomad-gitops-operator/releases/download/v0.0.1/nomad-gitops-operator_0.0.1_linux_amd64.tar.gz"
destination = "local"
mode = "any"
}
}
}
}