You can create an instance by using
the Streams
Console or
the streamtool command-line interface.
Procedure
Use this procedure to create an instance by using the Teracloud®
Streams streamtool command-line interface:
- To configure your local shell environment for Teracloud®
Streams, enter the
following command:
source product-installation-root-directory/7.2.0.0/bin/streamsprofile.sh
- To complete this procedure in the interactive
streamtool
interface,
enter the following command:
Using the interactive streamtool
interface
saves you time. Teracloud®
Streams caches some
command options and information so that you do not have to reenter them. Also, you do
not have to specify streamtool before each command. To exit the
interactive streamtool
interface, enter exit or quit.
- Create one or more instances for running stream applications.
To create an instance,
enter the following command:
mkinstance -i instance-id --property instance.highAvailabilityCount=value --numresources value
For
example:
mkinstance -i StreamsInstance --property instance.highAvailabilityCount=3 --numresources 3
This example requests three resources from the domain. You
can allocate resources to the instance when you create it by using --hfile, --hosts,
or --numresources options. If you do not specify
one of those options, the following resource specification is added
when the instance starts: --numresources 1. You
can add resources later by using the streamtool addhost command.
For more information, see Adding resources to Teracloud Streams instances.
To configure high availability in Teracloud®
Streams instances,
you must specify an instance.highAvailabilityCount instance
property value greater than 1. For more information, see Configuring high availability in Teracloud Streams instances.
- Start the instance by entering the following command:
- To exit the interactive
streamtool
interface,
enter exit or quit.
What to do next
If you have not done so already, configure the security
for your domain and instances. For example, create roles and set permissions
on instance objects by using access control lists.
You can also
start developing and running stream applications in
your instance.