Adding Teracloud® Streams resources that already have the product installed
If Teracloud®
Streams is already installed on the resource or the main installation package is installed on a shared
file system that is accessible by the resource, you can use this procedure to add the resource to a Teracloud®
Streams enterprise domain.
Procedure
Register the resource with the domain, set up the Teracloud®
Streams domain controller service as a registered Linux™ system service
or an unregistered service, and start the controller on the resource. Ensure
that Java™ SDK 17 or later is installed.
For instructions on setting up Java™, see
Java requirements, options, and settings for Teracloud Streams.
The command that you use determines how the domain controller service is set up. For
more information, see Options for setting up the domain controller service.
- To set up the domain controller service as a
registered Linux™ system service, use the
streamtool registerdomainhost command.
This command registers the resource with the domain, sets up the controller as a registered Linux™ system service, and starts the controller on the resource.
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.
- To set up the domain controller service as an
unregistered service, use the streamtool startdomainhost
command.
This command registers the resource with the domain, sets up the controller as an unregistered service, and starts the controller on the resource.
Example:streamtool startdomainhost -d domain-id --unregistered --zkconnect host:port
Notes:- You must specify a domain name on this command.
- If a root user runs the command, the domain does not need to exist before running the command.
- If a non-root user runs the command, the domain must exist and be started before running the command.
- You must specify the --zkconnect option on this 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.
- You must specify a domain name on this command.
What to do next
Teracloud®
Streams provides
several commands that you can use to manage the domain controller service on a resource. Before using these commands, you must configure the Teracloud®
Streams environment
variables by running the following
command:
source domain-host-installation-directory/bin/streamsprofile.sh
where
domain-host-installation-directory
is the root
product installation directory and the product version directory. For example, if you
installed Teracloud®
Streams in the default location for user root, enter the following
command:source /opt/teracloud/streams/7.2.0.0/bin/streamsprofile.sh
You can use the following commands to manage the domain controller service on a resource.
For more information about command syntax and options, enter the following
command:
Command | Description |
---|---|
streamtool getdomainhoststatus | Displays the status of the domain controller service on the resource. You must have root authority to run this command. |
streamtool startdomainhost | Starts the domain controller service on the resource.
|
streamtool stopdomainhost | Stops the domain controller service on the resource. You must have root authority to run this command. |
To use the following commands, the domain controller service must be running as a Linux™ system service. You must have root authority to run these commands. | |
streamtool getdomainhostconfig | Displays the configuration properties for the domain controller service. |
streamtool chdomainhostconfig | Changes the specified domain controller service properties. |
streamtool rmdomainhostconfig | Removes the specified domain controller service properties. |
streamtool man command-name
Note: If
you use the sudo program, the PATH environment variable might not
be preserved on some platforms. For example, if you run the following commands, you
might see a message indicating that the streamtool command is not
found:
source /opt/teracloud/streams/7.2.0.0/bin/streamsprofile.sh
sudo streamtool getdomainhoststatus -d mydomain
sudo: streamtool: command not found
To work around this problem, enter the following
commands: source domain-host-installation-directory/bin/streamsprofile.sh
sudo -E $STREAMS_INSTALL/bin/streamtool getdomainhoststatus -d mydomain