/etc/default/serviced

Control Center (serviced) is a single binary that behaves differently based on the environment variables defined in its startup script.

  • On Ubuntu systems, the startup script is /etc/init/serviced.conf.
  • On RHEL/CentOS systems the startup script is /etc/systemd/system/multi-user.target.wants/serviced.service.

The startup script reads the serviced defaults file, /etc/default/serviced. The startup script includes a few environment variables, but the values defined in the defaults file take precedence over the values defined in the script.

The following list describes the contents of /etc/default/serviced and their effects on the serviced daemon.

HOME
Default: /root
The path docker uses to locate the .dockercfg authentication file. Docker Hub credentials are stored in the file.
GOMAXPROCS
Default: 2
The maximum number of CPU cores serviced uses.
SERVICED_AGENT
Default: 0 (false)
Determines whether a serviced instance performs agent tasks. Agents run application services scheduled for the resource pool to which they belong. The serviced instance configured as the master runs the scheduler. A serviced instance may be configured as agent and master, or just agent, or just master.
SERVICED_MASTER
Default: 0 (false)
Determines whether a serviced instance performs master tasks. The master runs the application services scheduler and other internal services, including the server for the Control Center web interface. A serviced instance may be configured as agent and master, or just agent, or just master. Only one serviced instance in a Control Center cluster may be the master.
SERVICED_MASTER_POOLID
Default: default
The name of the resource pool to which the serviced instance configured as master belongs.
SERVICED_ZK
Default: {{SERVICED_MASTER_IP}}:2181
The list of endpoints in serviced's ZooKeeper ensemble, separated by the comma character (,). Currently, the serviced instance configured as master is the only host in the ZooKeeper ensemble. Replace {{SERVICED_MASTER_IP}} with the IP address of the host on which the serviced instance configured as master is installed.
SERVICED_DOCKER_REGISTRY
Default: {{SERVICED_MASTER_IP}}:5000
The IP address and port number of the serviced registry host. Replace {{SERVICED_MASTER_IP}} with the IP address of the host on which the serviced instance configured as master is installed, or an alternate host.
SERVICED_OUTBOUND_IP
Default: 10.0.0.29
The outbound IP address to set when Control Center is used in a private network.
SERVICED_STATIC_IPS
Default: (none)
One or more static IP addresses reserved for serviced to use when it advertises external IP addresses on behalf of services it manages, separated by the comma character (,).
SERVICED_ENDPOINT
Default: {{SERVICED_MASTER_IP}}:4979
The IP address and port number of the serviced RPC endpoint on the master host. Replace {{SERVICED_MASTER_IP}} with the IP address of the host on which the serviced instance configured as master is installed.
SERVICED_MAX_RPC_CLIENTS
Default: 3
The maximum number of clients the serviced RPC endpoint supports. The value is used to create a pool of sockets, which are reused as needed. Increasing the value increases the number of open sockets, and the use of socket-related operating system resources.
SERVICED_RPC_PORT
Default: 4979
The port on which serviced listens for RPC requests. NOTE: For release 1.0, only port 4979 is supported.
SERVICED_UI_PORT
Default: 443
The port on which the master serviced instance listens for HTTPS requests. (The web interface port.)
SERVICED_MUX_PORT
Default: 22250
The port serviced uses for multiplexing on its private subnet.
SERVICED_VARPATH
Default: /opt/serviced/var
The location in which serviced stores application data.
SERVICED_KEY_FILE
Default: $TMPDIR/zenoss_key.[0-9]+
The path of a TLS key file. The default, insecure key file is created when the serviced web server first starts, from a public key that is compiled into serviced.
SERVICED_CERT_FILE
Default: $TMPDIR/zenoss_cert.[0-9]+
The path of a TLS certificate file. The default, insecure certificate file is created when the serviced web server first starts, from a public certificate that is compiled into serviced.
SERVICED_FS_TYPE
Default: rsync
The driver for the distributed file system where application data is stored on the master host (by default, /opt/serviced/var/volumes). The supported types are rsync, btrfs, and devicemapper.
SERVICED_VHOST_ALIASES
Default: foobar.com,example.com
The list of virtual host aliases to use in virtual host multiplexing, separated by the comma character (,).
SERVICED_MAX_CONTAINER_AGE
Default: 86400 (24 hours)
The number of seconds serviced waits before removing a stopped container.
SERVICED_VIRTUAL_ADDRESS_SUBNET
Default: 10.3
The 16-bit private subnet to use for serviced's virtual IPv4 addresses. RFC 1918 restricts private networks to the 10.0/24, 172.16/20, and 192.168/16 address spaces. However, serviced accepts any valid, 16-bit, IPv4 address space for its private network.
SERVICED_LOG_LEVEL
Default: 0
The relative amount of INFO messages serviced writes to the system log. The values may be 0 (minimum) to 5 (maximum). On Ubuntu systems, the log file is /var/log/upstart/serviced.log. On RHEL/CentOS systems, the log file is /var/log/journal/serviced.log, if persistent storage for log files is enabled. Otherwise, log data is stored only temporarily by the systemd journal.
SERVICED_LOG_ADDRESS
Default: {{SERVICED_MASTER_IP}}:5042
The logstash endpoint to which log data are sent. Replace {{SERVICED_MASTER_IP}} with the IP address of the host on which the serviced instance configured as master is installed.
SERVICED_LOGSTASH_ES
Default: {{SERVICED_MASTER_IP}}:9100
The endpoint of the logstash service. Replace {{SERVICED_MASTER_IP}} with the IP address of the host on which the serviced instance configured as master is installed.
SERVICED_LOGSTASH_MAX_DAYS
Default: 1
The maximum number of days to keep data in the logstash server before purging it. When both this variable and SERVICED_LOGSTASH_MAX_SIZE are set, both conditions are evaluated and enforced.
SERVICED_STATS_PORT
Default: {{SERVICED_MASTER_IP}}:8443
The endpoint of the OpenTSDB reader daemon, for serviced statistics. Replace {{SERVICED_MASTER_IP}} with the IP address of the host on which the serviced instance configured as master is installed.
SERVICED_STATS_PERIOD
Default: 10
The number of seconds to wait between polls (health checks) of hosts in resource pools.
SERVICED_DEBUG_PORT
Default: 6006
The port on which serviced listens for HTTP requests for the Go profiler. To stop listening for requests, set the value to -1.
SERVICED_ISVCS_ENV_[0-9]+
Default: (empty)

Arguments to pass to internal services. You may define multiple arguments, each for a different internal service. The variables themselves, and their arguments, use the following syntax:

SERVICED_ISVCS_ENV_%d
Each variable name ends with a unique integer in place of %d.
Service-Name:Key=Value

The value of each variable includes the following elements, in order:

  1. Service-Name, the internal service name. The following command returns the internal service names that may be used for Service-Name:
    sudo docker ps | awk '/isvcs:/{print substr($NF, \
      1, match($NF, /(-[0-9a-f]*){5}/) - 1 )}'
  2. The colon character (:).
  3. Key, a variable to pass to the internal service.
  4. The equals sign character (=).
  5. Value, the definition of the variable to pass to the internal service.

The following example variable passes ES_JAVA_OPTS=-Xmx4g to the Elasticsearch internal service.

SERVICED_ISVCS_ENV_0=elasticsearch-logstash:ES_JAVA_OPTS=-Xmx4g
SERVICED_ADMIN_GROUP
Default: sudo (Ubuntu) wheel (RHEL/CentOS)
The name of the Linux group on the Control Center master host whose members are authorized to use the Control Center web interface. You may replace the default group with a group that does not have superuser privileges.
SERVICED_ALLOW_ROOT_LOGIN
Default: 1 (true)
Determines whether root, or members of the sudo or wheel groups, may log in to the Control Center web interface.
SERVICED_LOGSTASH_MAX_SIZE
Default: 10
The maximum amount of logstash data to keep, in gigabytes. When both this variable and SERVICED_LOGSTASH_MAX_DAYS are set, both conditions are evaluated and enforced.
SERVICED_IPTABLES_MAX_CONNECTIONS
Default: 655360
The default value of this variable ensures that a serviced instance that is configured as an agent will not run out of connections if the serviced instance that is configured as master goes down. In testing this scenario, the connection count on remote hosts that are running a nominal number of collectors does not exceed 10,000 closed connections. The connections are austomatically cleaned up by the kernel soon after the master host is back up.
SERVICED_MONITOR_DFS_REMOTE_UPDATE_INTERVAL
Default: 60 (1 minute)
The interval at which a serviced instance configured as agent modifies its /opt/serviced/var/monitor/IP-Address file.
SERVICED_MONITOR_DFS_MASTER_INTERVAL
Default: 180 (3 minutes)
The interval at which a serviced instance configured as master checks the modification times of the /opt/serviced/var/monitor/IP-Address files of active serviced instances configured as agents. The value of this variable must be a minimum of twice the value of the SERVICED_MONITOR_DFS_REMOTE_UPDATE_INTERVAL variable.
SERVICED_MONITOR_DFS_MASTER_RESTART
Default: 1 (true)
Determines whether the serviced master restarts NFS when it detects active agents that are out of synchronization.
SERVICED_SERVICE_MIGRATION_TAG
Default: 1.0.2
Overrides the default value for the service migration image.
SERVICED_SNAPSHOT_TTL
Default: 12
The number of hours a snapshot is retained before removal. To disable snapshot removal, set the value to 0.
SERVICED_OPTS
Default: (empty)
Arbitrary options for the serviced startup command.