{"id":28546675,"url":"https://github.com/pires/nomad-vagrant-coreos-cluster","last_synced_at":"2025-08-29T05:12:24.018Z","repository":{"id":146510533,"uuid":"47016938","full_name":"pires/nomad-vagrant-coreos-cluster","owner":"pires","description":"Nomad cluster (for testing purposes) made easy with Vagrant and CoreOS.","archived":false,"fork":false,"pushed_at":"2017-01-02T13:57:39.000Z","size":44,"stargazers_count":34,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-07T07:44:05.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pires.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2015-11-28T08:57:49.000Z","updated_at":"2025-05-30T23:49:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c73f03c-b461-4375-80c6-fe90435191ee","html_url":"https://github.com/pires/nomad-vagrant-coreos-cluster","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/pires/nomad-vagrant-coreos-cluster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pires%2Fnomad-vagrant-coreos-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pires%2Fnomad-vagrant-coreos-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pires%2Fnomad-vagrant-coreos-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pires%2Fnomad-vagrant-coreos-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pires","download_url":"https://codeload.github.com/pires/nomad-vagrant-coreos-cluster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pires%2Fnomad-vagrant-coreos-cluster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272632416,"owners_count":24967248,"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-29T02:00:10.610Z","response_time":87,"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":[],"created_at":"2025-06-10T00:04:17.572Z","updated_at":"2025-08-29T05:12:23.953Z","avatar_url":"https://github.com/pires.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nomad-vagrant-coreos-cluster\nTurnkey **[Nomad](https://github.com/hashicorp/nomad)**\ncluster with **[Consul](https://github.com/hashicorp/consul)** integration\non top of **[Vagrant](https://www.vagrantup.com)** (1.8.6 or newer) and\n**[CoreOS](https://coreos.com)**.\n\n## Pre-requisites\n\n * **[Vagrant](https://www.vagrantup.com)**\n * a supported Vagrant hypervisor\n \t* **[Virtualbox](https://www.virtualbox.org)** (the default)\n \t* **[Parallels Desktop](http://www.parallels.com/eu/products/desktop/)**\n \t* **[VMware Fusion](http://www.vmware.com/products/fusion)** or **[VMware Workstation](http://www.vmware.com/products/workstation)**\n\n### MacOS X\n\nOn **MacOS X** (and assuming you have [homebrew](http://brew.sh) already installed) run\n\n```\nbrew update\nbrew install wget\n```\n\n## Deploy Nomad\n\nCurrent `Vagrantfile` will bootstrap one VM with everything needed to become a Nomad _server_ and, by default, a couple VMs with everything needed to become Nomad clients.\nYou can change the number of minions and/or the Nomad version by setting environment variables **NODES** and **NOMAD_VERSION**, respectively. [You can find more details below](#customization).\n\n```\nvagrant up\n```\n\n### Linux or MacOS host\n\nNomad cluster is ready. but you need to set-up some environment variables that we have already provisioned for you. In the current terminal window, run:\n\n```\nsource ~/.bash_profile\n```\n\nNew terminal windows will have this set for you.\n\n## Run example\n\nJust for the sake of curiosity, the cluster status should be something like:\n```\n$ nomad server-members\nName           Address       Port  Status  Leader  Protocol  Build  Datacenter  Region\nserver.global  172.17.9.100  4648  alive   true    2         0.5.2  dc1         global\n\n$ nomad node-status\nID        DC   Name       Class   Drain  Status\n8ce1a08c  dc1  client-02  \u003cnone\u003e  false  ready\n8e2fac6e  dc1  client-01  \u003cnone\u003e  false  ready\n```\n\nNow, let's deploy Nginx example:\n\n```\n$ nomad run web.hcl\n==\u003e Monitoring evaluation \"ce0bb997\"\n    Evaluation triggered by job \"web\"\n    Allocation \"6fab11af\" created: node \"8ce1a08c\", group \"servers\"\n    Evaluation status changed: \"pending\" -\u003e \"complete\"\n==\u003e Evaluation \"ce0bb997\" finished with status \"complete\"\n```\n\nCheck its status:\n\n```\n$ nomad status web\nID          = web\nName        = web\nType        = service\nPriority    = 50\nDatacenters = dc1\nStatus      = running\nPeriodic    = false\n\nSummary\nTask Group  Queued  Starting  Running  Failed  Complete  Lost\nservers     0       0         1        0       0         0\n\nAllocations\nID        Eval ID   Node ID   Task Group  Desired  Status   Created At\n6fab11af  ce0bb997  8ce1a08c  servers     run      running  01/02/17 13:53:23 WET\n```\n\nand its registration on Consul:\n\n```\n$ curl \"${NOMAD_ADDR%:*}:8500/v1/catalog/service/web\"\n[\n   {\n      \"Node\":\"client-02\",\n      \"Address\":\"172.17.9.102\",\n      \"TaggedAddresses\":{\n         \"lan\":\"172.17.9.102\",\n         \"wan\":\"172.17.9.102\"\n      },\n      \"ServiceID\":\"_nomad-executor-6fab11af-dc45-932c-d14c-fdfbc6fd5476-nginx-web-lb-external\",\n      \"ServiceName\":\"web\",\n      \"ServiceTags\":[\n         \"lb-external\"\n      ],\n      \"ServiceAddress\":\"172.17.9.102\",\n      \"ServicePort\":11080,\n      \"ServiceEnableTagOverride\":false,\n      \"CreateIndex\":37,\n      \"ModifyIndex\":39\n   }\n]\n```\n\n## Clean-up\n\n```\nvagrant destroy -f\n```\n\nIf you've set `NODES` or any other variable when deploying, please make sure you set it in `vagrant destroy` call above, like:\n\n```\nNODES=3 vagrant destroy -f\n```\n\n## Notes about hypervisors\n\n### Virtualbox\n\n**VirtualBox** is the default hypervisor, and you'll probably need to disable its DHCP server\n```\nVBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0\n```\n\n### Parallels\n\nIf you are using **Parallels Desktop**, you need to install **[vagrant-parallels](http://parallels.github.io/vagrant-parallels/docs/)** provider \n```\nvagrant plugin install vagrant-parallels\n```\nThen just add `--provider parallels` to the `vagrant up` invocations above.\n\n### VMware\nIf you are using one of the **VMware** hypervisors you must **[buy](http://www.vagrantup.com/vmware)** the matching  provider and, depending on your case, just add either `--provider vmware-fusion` or `--provider vmware-workstation` to the `vagrant up` invocations above.\n\n## Private Docker Repositories\n\nIf you want to use Docker private repositories look for **DOCKERCFG** bellow.\n\n## Customization\n### Environment variables\nMost aspects of your cluster setup can be customized with environment variables. Right now the available ones are:\n\n - **NODES** sets the number of nodes (minions).\n\n   Defaults to **2**.\n - **CHANNEL** sets the default CoreOS channel to be used in the VMs.\n\n   Defaults to **alpha**.\n\n   While by convenience, we allow an user to optionally consume CoreOS' *beta* or *stable* channels please do note that as both Nomad and CoreOS are quickly evolving platforms we only expect our setup to behave reliably on top of CoreOS _alpha_ channel.\n   So, **before submitting a bug**, either in [this](https://github.com/pires/nomad-vagrant-coreos-cluster/issues) project, or in ([Nomad](https://github.com/hashicorp/nomad/issues) or [CoreOS](https://github.com/coreos/bugs/issues)) **make sure it** (also) **happens in the** (default) **_alpha_ channel** :smile:\n - **COREOS_VERSION** will set the specific CoreOS release (from the given channel) to be used.\n\n   Default is to use whatever is the **latest** one from the given channel.\n - **SERIAL_LOGGING** if set to *true* will allow logging from the VMs serial console.\n\n   Defaults to **false**. Only use this if you *really* know what you are doing.\n - **SERVER_MEM** sets the server VM memory.\n\n   Defaults to **512** (in MB)\n - **SERVER_CPUS** sets the number of vCPUs to be used by the server VM.\n\n   Defaults to **1**.\n - **CLIENT_MEM** sets the client VMs memory.\n\n   Defaults to **2048** (in MB)\n - **CLIENT_CPUS** sets the number os vCPUs to be used by the client VMs.\n\n   Defaults to **1**.\n - **DOCKERCFG** sets the location of your private docker repositories (and keys) configuration. However, this is only usable if you set **USE_DOCKERCFG=true**.\n\n   Defaults to \"**~/.dockercfg**\".\n\n   You can create/update a *~/.dockercfg* file at any time\n   by running `docker login \u003cregistry\u003e.\u003cdomain\u003e`. All nodes will get it automatically,\n   at `vagrant up`, given any modification or update to that file.\n\n - **DOCKER_OPTIONS** sets the additional `DOCKER_OPTS` for docker service on both master and the nodes. Useful for adding params such as `--insecure-registry`.\n\n - **NOMAD_VERSION** defines the specific Nomad version being used.\n\n   Defaults to `0.4.1`.\n\nSo, in order to start, say, a Nomad cluster with 3 client nodes, 4GB of RAM and 2 vCPUs per client, one would run:\n\n```\nCLIENT_MEM=4096 CLIENT_CPUS=2 NODES=3 vagrant up\n```\n\n**Please do note** that if you were using non default settings to startup your\ncluster you *must* also use those exact settings when invoking\n`vagrant {up,ssh,status,destroy}` to communicate with any of the nodes in the cluster as otherwise\nthings may not behave as you'd expect.\n\n### Synced Folders\nYou can automatically mount in your *guest* VMs, at startup, an arbitrary\nnumber of local folders in your host machine by populating accordingly the\n`synced_folders.yaml` file in your `Vagrantfile` directory. For each folder\nyou which to mount the allowed syntax is...\n\n```yaml\n# the 'id' of this mount point. needs to be unique.\n- name: foobar\n# the host source directory to share with the guest(s).\n  source: /foo\n# the path to mount ${source} above on guest(s)\n  destination: /bar\n# the mount type. only NFS makes sense as, presently, we are not shipping\n# hypervisor specific guest tools. defaults to `true`.\n  nfs: true\n# additional options to pass to the mount command on the guest(s)\n# if not set the Vagrant NFS defaults will be used.\n  mount_options: 'nolock,vers=3,udp,noatime'\n# if the mount is enabled or disabled by default. default is `true`.\n  disabled: false\n```\n\n## Licensing\n\nThis work is [open-source](http://opensource.org/osd), and is licensed under the [Apache License, Version 2.0](http://opensource.org/licenses/Apache-2.0).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpires%2Fnomad-vagrant-coreos-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpires%2Fnomad-vagrant-coreos-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpires%2Fnomad-vagrant-coreos-cluster/lists"}