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.
- Log in to the master host as root, or as a user with superuser privileges.
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
Verify the settings in the serviced configuration file.
grep -E '^\b*[A-Z_]+' /etc/default/serviced
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.
Create a backup of the serviced configuration file.
cp -p /etc/default/serviced /etc/default/serviced.tmp
Append a new declaration for the SERVICED_ZK variable.
echo "SERVICED_ZK=$(hostname -i):2181" >> /etc/default/serviced
- Create a backup of the serviced configuration file.
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 catDo not proceed to the next step until the following message is displayed:
Host Master successfully started
Obtain the host ID of the master host.
Display the host IDs of all Control Center hosts.
serviced host list | cut -c-85
- Record the host ID of the master host.
- Display the host IDs of all Control Center hosts.
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
Restore the serviced configuration
file, and then restart the service.
Restore the serviced configuration file.
mv /etc/default/serviced.tmp /etc/default/serviced
Restart the service.
systemctl daemon-reload && systemctl start serviced \ && journalctl -u serviced -f -o cat
- Restore the serviced configuration file.
Identify the hosts in the ZooKeeper ensemble.
grep -E '^\b*SERVICED_ZK=' /etc/default/servicedThe 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.