Starting a local cluster

Genvid Services depend on a few set of external services to run properly mainly Consul, Vault and Nomad Consul is used for storing configuration inside its key-value store, as well as registering, monitoring discovering the different services available. Vault is used to secure, store and tightly control access to tokens, passwords, certificates, API keys, and other secrets. Nomad is a scheduler. It helps to install, start and monitor different applications, on Linux and on Windows. We also install a small web interface to help you monitor and check on your cluster. Other services will likely be added in the future.

Although our default configuration depends on those services, Consul, Vault and Nomad were chosen for their very low dependencies on their infrastructure. Our application tries to keep our dependencies on them as minimal as possible so that they could easily be replaced to accommodate existing infrastructures.

Commands

To start a local cluster, you simply need to run the following command:

py local.py setup

Once the cluster is started, you can open the web interface by running:

py local.py monitor

To stop the cluster, simply run:

py local.py clean

Ports used

A single cluster can be shared among multiple projects, but only one game can be run on it at a time. You cannot run more than one local cluster per machine, since their ports would conflict. The ports used by the local cluster are the following:

Application TCP Ports UDP Ports
Consul [1] 8300, 8301, 8302, 8400, 8500, 8600 8301, 8302, 8600
Vault [2] 8200  
Nomad [3] 4646, 4647, 4648 4648
Other 20000 - 60000  
[1]Consul ports used
[2]Vault Configuration
[3]Nomad Agent configuration

The other applications ports are dynamically allocated by Nomad when scheduling an application to run on the cluster.

Local IP

By default local.py will bind the IP addresses to 127.0.0.1. In order to use a specific machine IP, you must set the environment GENVID_DEFAULT_IP to the visible IP of your machine and reinstall the cluster:

export GENVID_DEFAULT_IP=123.123.123.123  # with bash
set GENVID_DEFAULT_IP=123.123.123.123     # with Windows command prompt
py local.py reinstall