Starting and registering the master host (multi-host deployment)

Use this procedure to start the master host in a multi-host deployment after upgrading Control Center to version 1.5.0. This procedure also includes steps to create and register the authentication credentials the master needs for its role as a delegate.
  1. Log in to the master host as root, or as a user with superuser privileges.
  2. Determine whether serviced is configured to start when the system starts.
    systemctl is-enabled serviced
    • If the result is enabled, proceed to the next step.
    • If the result is disabled, enter the following command:
      systemctl enable serviced
  3. Verify the settings in the serviced configuration file.
    grep -E '^\b*[A-Z_]+' /etc/default/serviced
  4. Configure the master host to start independent of the ZooKeeper ensemble.
    This step simplifies the process of registering the master host and its effect is temporary—a subsequent step restores the configuration file.
    1. Create a backup of the serviced configuration file.
      cp -p /etc/default/serviced /etc/default/serviced.tmp
    2. Append a new declaration for the SERVICED_ZK variable.
      echo "SERVICED_ZK=$(hostname -i):2181" >> /etc/default/serviced
  5. Start serviced, and then monitor the startup.
    During this startup, serviced invokes docker pull to retrieve its updated images.
    systemctl start serviced && journalctl -u serviced -f -o cat
    Do not proceed to the next step until the following message is displayed:
    Host Master successfully started
  6. Obtain the host ID of the master host.
    1. Display the host IDs of all Control Center hosts.
      serviced host list | cut -c-85
    2. Record the host ID of the master host.
  7. Create authentication credentials for the master host, and register the credentials.
    Replace Host-ID with the host ID of the master host:
    serviced key reset --register Host-ID
  8. Restore the serviced configuration file, and then restart the service.
    1. Restore the serviced configuration file.
      mv /etc/default/serviced.tmp /etc/default/serviced
    2. Restart the service.
      systemctl daemon-reload && systemctl start serviced \
        && journalctl -u serviced -f -o cat
  9. Identify the hosts in the ZooKeeper ensemble.
    grep -E '^\b*SERVICED_ZK=' /etc/default/serviced
    The result is a list of 3 or 5 hosts, separated by the comma character (,). The master host is always a node in the ZooKeeper ensemble.