-
Docker >= 1.0
Thelxc-dockerpackage in Ubuntu LTS 14.04 works. -
Zookeeper >= 3.4.5
Thezookeeperdpackage in Ubuntu LTS 14.04 works. -
Helios master
Provided by thehelios-masterpackage. The API for the CLI and HTTP endpoints. Communicates with the agent through Zookeeper. -
Helios agent
Provided by thehelios-agentpackage. Runs on each Docker host and communicates with Zookeeper. In charge of starting/stopping containers and reporting state back to Zookeeper. -
Helios command-line tools
Provided by theheliospackage. A CLI client for interacting with the Helios master.
Add the Helios apt repository to get Debian packages:
Debian packages for Helios are hosted at Bintray. To add the repository to your apt sources:
$ echo "deb https://dl.bintray.com/spotify/deb trusty main" | sudo tee -a /etc/apt/sources.list.d/helios.prefYou can then apt-get install helios, helios-agent, and helios-master.
Note that the Helios master and agent services both try to connect to ZooKeeper at localhost:2181
when installed. You will need to configure and enable them as detailed below.
This will install and start the Helios master and Helios agent on a single machine with default configuration:
# install prereqs
$ sudo apt-get install zookeeperd docker.io
# install helios
$ curl -sSL https://spotify.github.io/helios-apt/go | sudo sh -
$ sudo apt-get install helios helios-agent helios-master
# check if it worked and the local agent is registered
$ helios -z http://localhost:5801 hostsThe helios-agent and helios-master packages will install defaults files:
- Agent:
/etc/default/helios-agent - Master:
/etc/default/helios-master
You can set HELIOS_AGENT_OPTS and HELIOS_MASTER_OPTS in these files. See the options below.
Specify these options in the HELIOS_MASTER_OPTS variable in /etc/default/helios-master:
-
--name NAMEhostname to register as (default: system FQDN) -
--zk ZKzookeeper connection string (default: localhost:2181) Can include multiple zookeeper hosts (example:zookeeper1.example.com:2181,zookeeper2.example.com:2181,zookeeper3.example.com:2181). -
--zk-session-timeout ZK_SESSION_TIMEOUTOptional. Zookeeper session timeout (default: 60000) -
--zk-connection-timeout ZK_CONNECTION_TIMEOUTOptional. Zookeeper connection timeout (default: 15000) -
--no-metricsTurn off all collection and reporting of metrics (default: false) -
--domain DOMAINOptional. Service registration domain. Used for the master to register itself with the service registrar. -
--service-registryOptional. Service registry address. Overrides domain. Used for the master to register itself with the service registrar. -
--service-registrar-plugin PATH_TO_PLUGINOptional. Service registration plugin used to register the master with an external service (etcd for example). These are not well documented yet. Used for the master to register itself with the service registrar. -
--statsd-host-port STATSD_HOST_PORTOptional. The host:port of where to send statsd metrics (to be useful, --no-metrics must NOT be specified) -
-v, --verbose(default: 0) -
--syslogLog to syslog. (default: false) -
--logconfig LOGCONFIGLogback configuration file. -
--sentry-dsn SENTRY_DSNOptional. The sentry data source name (For http://getsentry.com) -
--http HTTPhttp endpoint (default: http://0.0.0.0:5801) the master will listen on. -
--admin ADMINadmin http port (default: 5802) the master will listen on.
Specify these options in the HELIOS_AGENT_OPTS variable in /etc/default/helios-agent:
-
--name NAMEhostname to register as (default: system FQDN) -
--zk ZKzookeeper connection string (default: localhost:2181). Can include multiple zookeeper hosts (example:zookeeper1.example.com:2181,zookeeper2.example.com:2181,zookeeper3.example.com:2181). -
--zk-session-timeout ZK_SESSION_TIMEOUTOptional. Zookeeper session timeout (default: 60000) -
--zk-connection-timeout ZK_CONNECTION_TIMEOUTOptional. Zookeeper connection timeout (default: 15000) -
--no-metricsTurn off all collection and reporting of metrics (default: false) -
--domain DOMAINOptional. Service registration domain. Used for the agent to register deployed jobs in the service registrar. -
--service-registry SERVICE_REGISTRYOptional. Service registry address. Used for the agent to register deployed jobs in the service registrar. -
--service-registrar-plugin PATH_TO_PLUGINOptional. Service registration plugin used to register running conatiners with an external service (etcd for example). These are not well documented yet. Used for the agent to register deployed jobs in the service registrar. -
--no-metricsTurn off all collection and reporting of metrics (default: false) -
--statsd-host-port STATSD_HOST_PORTOptional. The host:port of where to send statsd metrics (to be useful, --no-metrics must NOT be specified) -
-v, --verbose(default: 0) -
--syslogLog to syslog. (default: false) -
--logconfig LOGCONFIGLogback configuration file. -
--sentry-dsn SENTRY_DSNOptional. The sentry data source name (For http://getsentry.com) -
--no-httpDisable http server (default: false) -
--http HTTPThe http endpoint (default: http://0.0.0.0:5803) to listen on. -
--admin ADMINThe admin http port (default: 5804) to listen on. -
--id IDAgent unique ID. Generated and persisted on first run if not specified. -
--state-dir STATE_DIRDirectory for persisting agent state locally. (default: .) -
--docker DOCKERDocker endpoint (default: detected fromDOCKER_HOSTenvironment variable) -
--docker-cert-path DOCKER_CERT_PATHDirectory containing client.pem and client.key or connecting to Docker over HTTPS. -
--env ENV [ENV ...]Specify environment variables that will pass down to all containers (default: []) -
--syslog-redirect-to SYSLOG_REDIRECT_TOOptional. Redirect container stdout/stderr to syslog running at host:port. -
--port-range PORT_RANGEPort allocation range, start:end (end exclusive). (default: 20000:32768) -
--bind VOLUMEBind the given volume into all containers. You may specify multiply--bindarguments. Each bind must conform to thedocker run -vsyntax.
Example /etc/default/helios-master:
ENABLED=true
HELIOS_MASTER_OPTS="--syslog \
--zk zookeeper1.example.com:2181,zookeeper2.example.com:2181,zookeeper3.example.com:2181
--sentry-dsn SENRTY_DSN \
--statsd-host-port localhost:8125 \
"
HELIOS_MASTER_JVM_OPTS="-Xms256m"
Example /etc/default/helios-agent:
ENABLED=true
HELIOS_AGENT_OPTS="--syslog \
--zk zookeeper1.example.com:2181,zookeeper2.example.com:2181,zookeeper3.example.com:2181
--sentry-dsn SENRTY_DSN \
--statsd-host-port localhost:8125 \
--state-dir /var/lib/helios-agent \
--env CONTAINER_ENV_01=VALUE_01 \
CONTAINER_ENV_02=VALUE_02 \
"
HELIOS_AGENT_JVM_OPTS="-Xmx256m"
The master and agent processes have a /healthcheck endpoint that can be hit in order to monitor
the process.
Master with default port:
$ curl http://localhost:5802/healthcheck
{"deadlocks":{"healthy":true},"zookeeper":{"healthy":true}}
Agent with default port:
$ curl http://localhost:5804/healthcheck
{"deadlocks":{"healthy":true},"docker":{"healthy":true},"zookeeper":{"healthy":true}}