Preparing the IBM Cloud environment for a Red Hat Enterprise Linux High Availability Add-On cluster
Prepare your IBM Cloud and Power Virtual Server environment for a Red Hat Enterprise Linux High Availability Add-On cluster by configuring the workspaces, IAM access, and collecting required cluster parameters.
Before you begin
Review the general requirements, product documentation, support articles, and SAP notes for your operating system. See Implementing high availability for SAP applications on IBM Power Virtual Server RHEL References.
Configuring the Power Virtual Server workspace
Complete the following tasks to configure the workspace for the cluster nodes.
-
Create a workspace.
To create a workspace, follow the instructions in Deploying a Power Virtual Server workspace. After you create the workspace, it appears under Workspaces in the left navigation panel of the Power Virtual Server user interface.
-
Create network subnets in the workspace.
Later, you attach the virtual server instances to the subnet, and they receive an IP address from the configured subnet range. For cluster deployments, use a private subnet rather than a public subnet for all nodes. Follow the steps in Creating network subnets.
-
Create an SSH key.
For details, see Creating an SSH key.
-
Select a boot image.
You can choose from multiple operating system images for the cluster nodes. Images are available in the IBM Provided Subscription and Client Provided Subscription sections of the Power Virtual Server provisioning page. For more information, see Full Linux® subscription for IBM Power Virtual Server (Off-premises).
If you want to import a custom Linux image, first upload the image to IBM Cloud® Object Storage in OVA format. For more information, see the following topics:
Provide the OVA image in the IBM Cloud® Object Storage bucket before you start provisioning virtual server instances.
Configuring IBM Cloud® Identity and Access Management for cluster agents on Power Virtual Server
In a high availability cluster, resource agents manage the start, stop, and monitoring of cluster resources. Fencing agents run node-level power actions, such as stopping or restarting a node, to maintain cluster integrity and prevent data corruption.
When the cluster runs on Power Virtual Server instances, the agents use the IBM Power Cloud API to retrieve status information and trigger required actions. Configure Cloud Identity and Access Management (IAM) to authenticate and authorize these API calls.
Create a custom role that restricts agent actions to the minimum required set.
A service ID in IBM Cloud is a unique identifier that enables applications and services to authenticate with IBM Cloud services. Create a service ID for the agents so that they can access IBM Power Cloud actions such as monitoring or controlling virtual server instances.
Verifying access to Cloud Identity and Access Management
Verify that you have administrative access to manage IAM roles and policies for the Power Virtual Server workspace.
- Log in to IBM Cloud.
- Select Manage > Access (IAM) > Users from the menu bar, and then click your username.
- Open the Access tab.
- Verify that the necessary policies are granted either through an access group or through an access policy.
- Search for the service access policy All Identity and Access enabled service, and confirm that you are assigned to the roles Administrator and Manager.
- Search for the policy All Account Management Services, and confirm that you are assigned to the Administrator role.
Creating custom roles in IAM
Create custom roles in IAM that include all permissions that are required for running the resource and fencing agents. These permissions must cover all operational actions of the agents within the Power Virtual Server workspace.
The action set of a custom role must be unique within the account. Multiple custom roles cannot share one common action set.
Creating a custom role for the fencing agent
Create a custom role in IAM and assign the actions that are required for fencing operations.
Grant access for the following actions:
- Read objects in the cloud_instance or workspace.
- List virtual server instances.
- Get information about a virtual server instance.
- Perform an action on a virtual server instance.
Create a custom role in IAM.
-
Click Roles > Create.
-
Enter the Role Name, Role ID, and Role description for the custom role.
-
Select Workspace for Power Virtual Server from the Service list.
-
Set View to Manager and Type to Service, and then search for
power-iaas.pvm-instance.to simplify the list. -
In the Actions list, select the following actions.
- power-iaas.pvm-instance.action
- power-iaas.pvm-instance.list
- power-iaas.pvm-instance.read
-
Click Create to save the role.
Creating a custom role for the powervs-subnet resource agent
This step is only required if you are implementing a cluster in a multizone region environment with the powervs-subnet resource agent.
Create a custom role in IAM and assign the actions that are required for subnet move operations.
Grant access for the following actions:
- Read objects in the cloud_instance or workspace.
- List and get information for subnets in the workspace.
- Create and delete subnets in the workspace.
- Attach and detach subnets to or from a virtual server instance.
- Delete network ports.
Create a custom role in IAM.
- Click Roles > Create.
- Enter the Role Name, Role ID, and Role description for the custom role.
- Select Workspace for Power Virtual Server from the Service list.
- Set View to Manager and Type to Service to simplify the list.
- Select the following actions in the Actions list.
- power-iaas.cloud-instance.read
- power-iaas.pvm-instance-network.list
- power-iaas.pvm-instance-network.read
- power-iaas.network.list
- power-iaas.network.create
- power-iaas.network.delete
- power-iaas.network-port.delete
- power-iaas.pvm-instance-network.create
- power-iaas.pvm-instance-network.delete
- Click Create to save the role.
Creating a custom role for the powervs-move-ip resource agent
This step is only required if you are implementing a cluster in a multizone region environment with the powervs-move-ip resource agent.
Create a custom role in IAM and assign the actions that are required for static route operations.
Grant access for the following actions:
- Read objects in the cloud_instance or workspace.
- Modify objects in the cloud_instance or workspace.
Create a custom role in IAM.
- Click Roles > Create.
- Enter the Role Name, Role ID, and Role description for the custom role.
- Select Workspace for Power Virtual Server from the Service list.
- Set View to Manager and Type to Service, and then search for
routeto simplify the list. - Select the following actions in the Actions list.
- power-iaas.cloud-instance.read
- power-iaas.cloud-instance.modify
- Click Create to save the role.
Creating a Service ID and an API key
Create a Service ID and an API key for the agents.
Creating a Service ID
Create a Service ID for the agent and assign one or more custom roles to it.
If you configure the fence_ibm_powervs fence agent and either the powervs-move-ip or powervs-subnet resource agent in the cluster, you can create separate Service IDs for each agent or use
a single shared Service ID. If you are using a common Service ID, assign both the custom role for fencing and the custom role for the powervs-move-ip or powervs-subnet resource agent.
Create a Service ID in IAM.
- Click Service IDs > Create.
- Enter a Name and Description for the service ID.
- Click Create.
- In the Access policies section, click Assign access.
- In the Service section, select Workspace for Power Virtual Server and click Next.
- In the Resource section, select Specific Resources > Service Instance > string equals > name of the first workspace that you created earlier. Click Next.
- In the Roles and actions section, select one or more of the custom roles that you created earlier in Custom access and click Next.
- You can skip the Conditions (Optional) section.
- Click Add and then Assign to create the Service ID.
If you create a Service ID for the powervs-move-ip or powervs-subnet resource agent in a multizone region implementation, you must grant access to both workspace resources. In the Access policies section, click Assign access and repeat the steps to assign access also for the second workspace.
Creating an API key for the Service ID
When you configure an agent in a high availability cluster as a fencing device or cluster resource, you must specify an API key. The API key authorizes the fencing or resource agent to use the IBM Power Cloud API to perform the actions that are defined in the Service ID.
Create the API Key for the Service ID in the IAM.
- Click Service IDs and select the Service ID that you created earlier.
- Click API Keys to switch to the Create and manage API keys for this service ID tab.
- Click Create.
- Enter a Name and a Description for the key.
- Click Create.
Click Download to save the API key to a JSON file. Keep the downloaded file in a safe place.
The key is available for 300 seconds. After 300 seconds, you won't be able to view or retrieve the key.
Collecting parameters for configuring a high availability cluster
Configuring a high availability environment requires a defined set of parameters. Collect the following parameters before you proceed. Uppercase variable names in the following section indicate parameters that are used as environment variables to simplify cluster setup. These values are required later in the setup instructions for a specific high availability scenario.
The following parameters are required for all scenarios. - CLOUD_REGION - APIKEY
If you use the fence_ibm_powervs fence agent or the powervs-subnet resource agent, also collect the following information:
IBMCLOUD_CRN_1,IBMCLOUD_CRN_2. The Cloud Resource Name (CRN) of the Power Virtual Server workspace or workspaces.POWERVSI_1andPOWERVSI_2. The virtual server instance IDs.GUID_1,GUID_2. The GUID values that are derived from the corresponding CRNs (required byfence_ibm_powervsonly).
If you use the powervs-move-ip resource agent, also collect the CRN for each route.
ROUTE_CRN_1,ROUTE_CRN_2
Gathering parameters for cluster configuration
Gather the parameters, and note them for the cluster configuration.
-
CLOUD_REGIONspecifies the deployment region of the virtual server instances and is used to identify the appropriate Power Cloud API endpoint.CLOUD_REGIONif you are using public endpoints- Public endpoint URLs match the pattern
https://<CLOUD_REGION>.power-iaas.cloud.ibm.com. ForCLOUD_REGION, note the first word in the hostname in the public endpoint URL of the specific location. For example, sites syd04 and syd05 map to syd. CLOUD_REGIONif you are using private endpoints- Private endpoint URLs match the pattern
https://private.<CLOUD_REGION>.power-iaas.cloud.ibm.com. ForCLOUD_REGION, note the second word in the hostname in the private endpoint URL of the specific location. For example, sites syd04 and syd05 map to au-syd.
See IBM Cloud® regions for the zone mapping.
-
IBMCLOUD_CRNandGUID. The Cloud Resource Name (CRN) is a globally unique identifier for the workspace. The Globally Unique Identifier (GUID) is part of it, and is specific for your account or organization.Log in to Workspaces. The list contains the name and CRN of the workspaces.
Locate your Workspace, or both workspaces for a multizone region deployment.
Click Copy next to the CRN and paste it into a temporary document.
A CRN has multiple sections that are divided by a colon. The base format of a CRN is:
crn:version:cname:ctype:service-name:location:scope:service-instance:resource-type:resource- service-name
- The fifth field of the CRN of the workspace is always power-iaas, the service-name.
- location
- The sixth field is the location that needs to be mapped to a region.
- scope
- The seventh field is the Tenant ID.
- service-instance
- The eighth field is the Cloud Instance ID or GUID.
IBMCLOUD_CRN_1contains the full CRN.GUID_1refers to the contents of the service-instance field in the CRN. In a multizone region deployment, use the CRN of the second workspace and note the contents forIBMCLOUD_CRN_2andGUID_2. -
POWERVSI, the IDs of the virtual server instancesLog in to Workspaces. The list contains the name and CRN of the workspaces.
Click the workspace name and then View virtual servers.
Click the virtual server instance names and find their ID.
Note these IDs for
POWERVSI_1andPOWERVSI_2. In a multizone deployment, use the second workspace to find the ID of the second instance. -
ROUTE_CRN, the CRNs of the static routes (powervs-move-ipresource agent only).Log in to Workspaces. The list contains the name and CRN of the workspaces.
Click the workspace name and then View virtual servers.
Click Routes in the workspace menu. Select the static route that matches the destination of the virtual IP address. Click View CRN and record the CRN as
ROUTE_CRN_1orROUTE_CRN_2. In a multizone deployment, use the second workspace to obtain the CRN for the second route. -
APIKEY, the API key for the fencing agent. Use the value of theapikeyentry from the JSON file that was downloaded in the Creating an API key for the Service ID section.For deployments in a multizone region, an API key is also required for the
powervs-move-iporpowervs-subnetcluster resource agents. As with the fencing agent, you can use the value of theapikeyentry for theAPIKEYparameter. However, the recommended approach is to store a copy of the downloaded JSON key file on both nodes and configureAPIKEYto reference the file by using an@prefix followed by the absolute path to the key file.
Creating virtual server instances
After you prepare the workspace, subnets, SSH key, and boot image, create the virtual server instances that will serve as nodes in the high-availability cluster. For provisioning steps, refer to either Deploying an Power Virtual Server instance for the SAP HANA system or Deploying an Power Virtual Server instance for SAP NetWeaver.
Reserving virtual IP addresses
A high availability cluster requires virtual IP addresses that can migrate between nodes during a failover event. The procedure for reserving these addresses depends on whether the cluster is deployed in a single workspace or across multiple workspaces.
-
Single workspace deployment
For clusters that are deployed within a single workspace, reserve the required virtual IP addresses by following the instructions in Reserving IP addresses. This prevents Power Virtual Server from assigning those addresses to other virtual server instances.
The reserved IP address must fall within the subnet’s CIDR range and the previously restricted IP range.
-
Multizone deployment across two workspaces
Clusters that span two workspaces require extra IP address planning:
- Virtual IP addresses must be allocated outside the CIDR ranges of all subnets in both workspaces.
- If the
powervs-move-ipresource agent is used, reserve a single IP address outside all subnet CIDR ranges with a/32netmask. - If the
powervs-move-subnetresource agent is used, reserve a subnet outside all subnet CIDR ranges with a/30netmask.
Power Virtual Server does not manage these addresses. You are responsible for maintaining accurate records of the reserved allocations.