Options for setting up the domain controller service on Teracloud® Streams resources

A domain controller service runs on every resource in a Teracloud® Streams domain and manages all of the other services on that resource. You can set up the domain controller service as a registered Linux system service or an unregistered service.

A Teracloud® Streams domain can include resources that run the domain controller service as a registered Linux system service and an unregistered service. Both options can be used together in a domain. However, you cannot use both options on a resource in the domain. You must run the controller on each resource as either a system service or an unregistered service.

Options

Teracloud® Streams provides the following options for setting up the domain controller service:
  • For high availability with automatic recovery from failures, a root user must set up the domain controller service as a registered Linux system service on the resource. If a system crash or failure occurs, the controller is automatically restarted on the resource when the system is restarted.
    Notes:
    • If the domain is stopped, the controller continues to run.
    • Running the domain controller service as a system service is required if you plan to use the security.runAsRoot domain property.

  • For high availability with limited automatic recovery from failures, a root or non-root user can set up the domain controller service as an unregistered service on the resource. If a system crash or failure occurs, the controller must be manually restarted on the resource after the system is restarted.
    Notes:
    • If the domain is stopped and the controller is running as user root, the controller continues to run.
    • If the domain is stopped and the controller is running as non-root, the controller shuts down. The user who restarts the domain must manually restart the controller on the resource.

Commands

The following table lists the streamtool commands that you use to set up the domain controller service on Teracloud® Streams resources.

Command Description
streamtool mkhostpkg This command generates a domain host installation package that you can use to add Teracloud® Streams resources to a domain.

If you do not want the controller to run as a registered Linux system service, specify the --unregistered option on the command. If a non-root user runs the command with this option, the domain must exist and be started.

The streamsdomainhostsetup.sh script file is in the domain host installation package. This script installs Teracloud® Streams on the resource, registers the resource in the domain, and starts the domain controller service on the resource.

If you specify the --unregistered option on the streamtool mkhostpkg command, the controller starts as an unregistered service. Otherwise, the controller starts as a registered Linux system service.

streamtool registerdomainhost This command registers the Teracloud® Streams resource in the domain, sets up the domain controller service as a registered Linux system service, and starts the controller on the resource.

You can run the streamtool registerdomainhost command before or after you create a Teracloud® Streams enterprise domain.

Example:
streamtool registerdomainhost -d domain-id --zkconnect host:port
Notes:
  • You must have root authority to run this command.
  • You must specify a domain name and the --zkconnect option on this command. The domain name that you specify does not need to exist before running the command. The --zkconnect option specifies the name of one or more host and port pairs for the configured external ZooKeeper ensemble. If you specify multiple host and port pairs, separate each pair with a comma. This value is the external ZooKeeper connection string. To obtain this value, you can use the streamtool getzk command.
streamtool startdomainhost This command starts the domain controller service on a Teracloud® Streams resource.
  • If you set up the domain controller service to run as a registered Linux system service by running the streamtool registerdomainhost command, the controller starts as a registered system service.

  • To start the domain controller service as an unregistered service, specify the --unregistered option on the command. If a non-root user runs the command with this option, the domain must exist and be started.