Zoe can be configured by files, environment variables or commandline options. The configuration directives listed in this file can be specified by any of the three methods. Use the ``--help`` command-line option to have more details on the format of environment variables and precedence rules.
Zoe can be configured by files, environment variables or commandline options. Most of the configuration directives listed in this file can be specified by any of the three methods, with some exception outlined below. Use the ``--help`` command-line option to have more details on the format of environment variables and precedence rules.
The directive ``--write-config <filename>`` is also available: it will generate a configuration file with all options set to the default values.
Command-line options
--------------------
The Zoe config file have a simple format of ``<option name> = <value>``. Dash characters can be use for comments.
All Zoe processes use one single configuration file, called zoe.conf. It is searched in the current working directory and in ``/etc/zoe/``.
These options can be specified only on the command-line:
* ``--write-config <filename>`` : generate a configuration file with all options set to the default values
* ``--log-file <filename>`` : write the log output to the specified file instead of ``stderr``
zoe.conf
--------
The Zoe config file have a simple format of ``<option name> = <value>``. Dash characters can be use for comments.
All Zoe processes use one single configuration file, called zoe.conf. It is searched in the current working directory and in ``/etc/zoe/``.
* ``api-listen-uri = tcp://*:4850`` : ZeroMQ server connection string, used for the master listening endpoint
* ``deployment-name = devel`` : name of this Zoe deployment. Can be used to have multiple Zoe deployments using the same back-end (devel and prod, for example)
Workspaces:
* ``workspace-deployment-path`` : path appended to the ``workspace-base-path`` to distinguish this deployment. If left unspecified it is equal to the deployment name
* ``workspace-base-path = /mnt/zoe-workspaces`` : Base directory where user workspaces will be created. This directory should reside on a shared filesystem visible by all Docker hosts.
* ``workspace-base-path = /mnt/zoe-workspaces`` : Base directory where user workspaces will be created. This directory should reside on a shared filesystem visible by all hosts where containers will be run.
Metrics:
...
...
@@ -30,11 +35,11 @@ Metrics:
* ``influxdb-url = http://localhost:8086`` : URL of the InfluxDB service (ex. )
argparser.add_argument('--workspace-base-path',help='Path where user workspaces will be created by Zoe. Must be visible at this path on all Swarm hosts.',default='/mnt/zoe-workspaces')
argparser.add_argument('--workspace-base-path',help='Base directory where user workspaces will be created. Must be visible at this path on all hosts.',default='/mnt/zoe-workspaces')
argparser.add_argument('--workspace-deployment-path',help='Path appended to the workspace path to distinguish this deployment. If unspecified is equal to the deployment name.',default='--default--')
argparser.add_argument('--overlay-network-name',help='Name of the Swarm overlay network Zoe should use',default='zoe')
# Service logs
argparser.add_argument('--gelf-address',help='Enable Docker GELF log output to this destination (ex. udp://1.2.3.4:7896)',default='')
argparser.add_argument('--gelf-listener',type=int,help='Enable the internal GELF log listener on this port, set to 0 to disable',default='7896')
argparser.add_argument('--service-logs-base-path',help='Path where service logs coming from the GELF listern will be stored',default='/var/lib/zoe/service-logs')
argparser.add_argument('--service-logs-base-path',help='Path where service logs coming from the GELF listener will be stored',default='/var/lib/zoe/service-logs')
# API options
argparser.add_argument('--listen-address',type=str,help='Address to listen to for incoming connections',default="0.0.0.0")
argparser.add_argument('--listen-port',type=int,help='Port to listen to for incoming connections',default=5001)
argparser.add_argument('--master-url',help='URL of the Zoe master process',default='tcp://127.0.0.1:4850')
argparser.add_argument('--cookie-secret',help='secret used to encrypt cookies',default='changeme')
# API auth options
argparser.add_argument('--auth-type',help='Authentication type (text or ldap)',default='text')
argparser.add_argument('--ldap-user-gid',type=int,help='LDAP group ID for users',default=5001)
argparser.add_argument('--ldap-guest-gid',type=int,help='LDAP group ID for guests',default=5002)
argparser.add_argument('--service-log-path',help='Save service logs in this directory',default='/tmp')
# Proxy options
argparser.add_argument('--proxy-path',help='Proxy base path',default='127.0.0.1')
# Scheduler
argparser.add_argument('--scheduler-class',help='Scheduler class to use for scheduling ZApps',choices=['ZoeSimpleScheduler','ZoeElasticScheduler'],default='ZoeSimpleScheduler')
argparser.add_argument('--scheduler-policy',help='Scheduler policy to use for scheduling ZApps',choices=['FIFO','SIZE'],default='FIFO')