{"id":23362400,"url":"https://github.com/jonasvinther/nomad-gitops-operator","last_synced_at":"2025-08-24T22:25:41.799Z","repository":{"id":45600143,"uuid":"417602433","full_name":"jonasvinther/nomad-gitops-operator","owner":"jonasvinther","description":"A GitOps operator for Hashicorp Nomad","archived":false,"fork":false,"pushed_at":"2024-07-10T11:23:12.000Z","size":128,"stargazers_count":86,"open_issues_count":3,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-23T19:35:13.889Z","etag":null,"topics":["gitops","go","golang","hashicorp","hashicorp-nomad"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonasvinther.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"jonasvinther","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-10-15T18:44:37.000Z","updated_at":"2025-06-19T21:48:46.000Z","dependencies_parsed_at":"2024-07-10T13:13:00.560Z","dependency_job_id":"d956f776-1b36-4c86-94fc-d1600e9a0ba0","html_url":"https://github.com/jonasvinther/nomad-gitops-operator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jonasvinther/nomad-gitops-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasvinther%2Fnomad-gitops-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasvinther%2Fnomad-gitops-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasvinther%2Fnomad-gitops-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasvinther%2Fnomad-gitops-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasvinther","download_url":"https://codeload.github.com/jonasvinther/nomad-gitops-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasvinther%2Fnomad-gitops-operator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271778235,"owners_count":24819265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitops","go","golang","hashicorp","hashicorp-nomad"],"created_at":"2024-12-21T12:00:57.757Z","updated_at":"2025-08-24T22:25:41.745Z","avatar_url":"https://github.com/jonasvinther.png","language":"Go","funding_links":["https://github.com/sponsors/jonasvinther"],"categories":["Infrastructure setup"],"sub_categories":["Automation and Infrastructure Management"],"readme":"# Nomoporator\nNomoporator is a GitOps operator for Hashicorp Nomad.\n\n## How to use\n\n### Setting up Nomoporator\n\n#### Environment variables\nIt's also possible configure Nomoporator via environment variables by setting them like this:\n```\nNOMAD_ADDR - Required to overide the default of http://127.0.0.1:4646.\nNOMAD_TOKEN - Required with ACLs enabled.\nNOMAD_CACERT - Required with TLS enabled.\nNOMAD_CLIENT_CERT - Required with TLS enabled.\nNOMAD_CLIENT_KEY - Required with TLS enabled.\n```\n\n### Bootstrapping using a local path\n\n\u003e Get help with `./nomoporator bootstrap fs -h`\n\n```\nBootstrap Nomad using a local path\n\nUsage:\n  nomoperator bootstrap fs [path] [flags]\n\nFlags:\n      --base-dir string   Path to the base directory (default \"./\")\n      --delete            Enable delete missing jobs\n  -h, --help              help for fs\n      --path string       glob pattern relative to the base-dir (default \"**/*.nomad\")\n      --var-path string   var glob pattern relative to the base-dir (default \"**/*.vars.yml\")\n      --watch             Enable watch mode\n\nGlobal Flags:\n  -a, --address string   Address of the Nomad server\n```\n\nUse it like this:\n```\n./nomoperator bootstrap fs --base-dir /path/to/base/dir --path jobs/*.nomad\n```\n\n### Bootstrapping using a git repository\n\n\u003e Get help with `./nomoporator bootstrap git -h`\n\n```\nBootstrap Nomad using a git repository\n\nUsage:\n  nomoperator bootstrap git [git repo] [flags]\n\nFlags:\n      --branch string                  git branch (default \"main\")\n      --delete                         Enable delete missing jobs (default true)\n  -h, --help                           help for git\n      --password string                SSH private key password\n      --path string                    glob pattern relative to the repository root (default \"**/*.nomad\")\n      --ssh-insecure-ignore-host-key   Ignore insecure SSH host key\n      --ssh-key string                 SSH private key\n      --url string                     git repository URL\n      --username string                SSH username (default \"git\")\n      --var-path string                var glob pattern relative to the repository root (default \"**/*.vars.yml\")\n      --watch                          Enable watch mode (default true)\n\nGlobal Flags:\n  -a, --address string   Address of the Nomad server\n```\n\nUse it like this:\n```\n./nomoperator bootstrap git --url https://github.com/jonasvinther/nomad-state.git --path jobs/*.nomad --branch main\n```\n\n## Run as Nomad job\n```yaml\njob \"nomoperator\" {\n  datacenters = [\"dc1\"]\n  group \"nomoperator\" {\n    count = 1\n    task \"nomoperator\" {\n      driver = \"exec\"\n      config {\n        command = \"nomoperator\"\n        args    = [\"bootstrap\", \"git\", \"--url\", \"https://github.com/jonasvinther/nomad-state.git\", \"--branch\", \"main\", \"--path\", \"jobs/*.nomad\"]\n      }\n      artifact {\n        source      = \"https://github.com/jonasvinther/nomad-gitops-operator/releases/download/v0.0.2/nomad-gitops-operator_0.0.2_linux_amd64.tar.gz\"\n        destination = \"local\"\n        mode        = \"any\"\n      }\n    }\n  }\n}\n```\n\n## SSH\n\nYou can use SSH keys to connect to a private git repository.\n\n* Generate a public and private key\n\n```bash\nssh-keygen -t ed25519 -C \"nomoperator\" -f \"nomoperatordeploykey\" -N \"\"\n```\n\nIf you would like to set password remove `-N \"\"` and enter the password. Make sure to set `--username sshusername ` and `--pasword sshpassword` when running nomoperator.\n\n* Configure the server git repository with public key\n\n* Generate `known_hosts` for the git server in `/path_to/known_hosts` which is accessible via nomoperator.\n\n```bash\nssh-keyscan -t ed25519 github.com\n```\n\nIf your git server uses non started port use the `-p` flag.\n\n```bash\nssh-keyscan -t ed25519 -p 2222 mygitserver.com\n```\n\nIf you would like to avoid using hosts files you can set `--ssh-insecure-ignore-host-key=true`. This is highly discouraged due to security risks.\n\n* Run as nomad job\n\n```yaml\njob \"nomoperator\" {\n  datacenters = [\"dc1\"]\n  group \"nomoperator\" {\n    count = 1\n    task \"nomoperator\" {\n      driver = \"exec\"\n      env {\n        SSH_KNOWN_HOSTS = \"/path_to/known_hosts\"\n        SSH_KEY = \u003c\u003cEOF\n-----BEGIN OPENSSH PRIVATE KEY-----\n......\n-----END OPENSSH PRIVATE KEY-----\nEOF\n\n      }\n      config {\n        command = \"nomoperator\"\n        args    = [\"bootstrap\", \"git\", \"--url\", \"git@github.com:jonasvinther/nomad-state.git\", \"--branch\", \"main\", \"--path\", \"/prod-env\", \"--username\", \"git\", \"--password\", \"\", \"--ssh-key\", \"$SSH_KEY\"]\n      }\n      artifact {\n        source      = \"https://github.com/jonasvinther/nomad-gitops-operator/releases/download/v0.0.2/nomad-gitops-operator_0.0.2_linux_amd64.tar.gz\"\n        destination = \"local\"\n        mode        = \"any\"\n      }\n    }\n  }\n}\n```\n\n## Variables\n\nVariables are yml files. All keys and values in items should be of type string.\n\n```yaml\npath: nomad/jobs/jobname\nitems:\n  key1: \"value1\"\n  key2: \"value2\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasvinther%2Fnomad-gitops-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasvinther%2Fnomad-gitops-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasvinther%2Fnomad-gitops-operator/lists"}