Cloud hosts that join the cluster are, by default, added to the
ComputeHosts resource group. To add cloud hosts to different resource groups,
add resource attribute tags to cloud hosts and create resource groups to which they can be
dynamically added. Segregating cloud hosts to different resource groups ensures that the
provisioned cloud hosts are used only by authorized applications.
Procedure
-
Add the cloudprovider resource attribute tag to uniquely identify cloud
hosts with the egoconfig addresourceattr command (see egoconfig):
egoconfig addresourceattr "[resourcemap value*cloudprovider]"
where value is any
string that uniquely identifies your group of hosts (for example, ibmcloud to identify IBM® Cloud hosts).Ensure that you use the egoconfig
addresourceattr command to tag cloud hosts before the cloud host joins a cluster for the
first time, either during image creation or during post-provisioning (recommended). If you are
running the command from a post-provisioning script on Windows, include the -f option to suppress confirmation.
Fast path: The egoconfig addresourceattr configuration is included
in the sample post-provisioning scripts that are bundled with IBM Spectrum Symphony. If you use the sample
scripts corresponding to each cloud provider, you don't need to use this command
separately.
Note: If a cloud host joined
the cluster previously, without this attribute assigned, or to update this attribute, you must
remove it from the
cluster:
egosh resource close -reclaim host_name
egosh resource remove host_name
-
Create a resource group (for example,
SymACloudHosts) based on resource requirement and specify your resource
attribute tag as a select string:
For example, to specify that hosts from the
IBM Cloud, AWS, and Azure cloud must be
dynamically added to the resource group that you are creating, use the following
select
string:
select(cloudprovider == 'ibmcloud' || cloudprovider == 'aws' || cloudprovider == 'azure')
-
Associate your cloud-enabled applications with the
new resource group.
For example, to associate the Symping application with the new
SymACloudHosts resource group, complete these steps:
-
From the cluster management console, go
to .
-
In the consumer tree on the left, locate the application's parent consumer. For example,
navigate to SymTesting, which includes Symping732 as a
leaf consumer.
-
Click the Consumer Properties tab.
-
Scroll down to the resource group section and select SymACloudHosts to
make the resource group available for all leaf consumers.
-
Click Apply.
-
On the Consumers tab, click Symping732.
-
Select SymACloudHosts as a resource group for the application.
-
Click Apply, then Close.
-
Update the requestor configuration for the new resource group.
For example, to update the symA requestor configuration, update the
symAreq_config.json file as follows:
-
Edit the symAreq_config.json file at:
- %HF_TOP%\%HF_VERSION%\requestors\symA\conf\ on Windows.
- $HF_TOP/$HF_VERSION/requestors/symA/conf/ on Linux®.
-
Update the resource_groups parameter. In the case of multidimensional
resource groups, update the resource_plans parameter.
For example, if
Symping must get hosts from both
ComputeHosts (the default resource group defined in the
Symping consumer) and
SymACloudHosts,
enter:
"resource_groups":["ComputeHosts", "SymACloudHosts"],
- Optional:
Rank the resource groups in order of preference; otherwise, slots are
taken from each resource group without any preference. For more information, see Configuring resource group preference.
What to do next
Enable the HostFactory service; then, submit workload for cloud-enabled
applications. See Starting host factory for cloud bursting.