vRealize Automation Google Cloud Platform (GCP) cloud account users can configure load balancers to suport custom solutions, including high availability.
vRealize Automation GCP cloud account users can configure several aspects of load balancer configuration to support specific requirements. These features can support provisioning infrstructure for SAP NetWeaver and SAP Hana, for example.
Setting up a high availability load balancer configuration with a GCP cloud account
vRealize Automation users with a GCP cloud account can configure several aspects of load balancer configuration to support specific requirements, such as high availability. These features can support provisioning infrstructure for SAP NetWeaver and SAP Hana, for example.
This configuration enables you to deploy different load balancer instances in different availability zones. To set this up, you need to configure the following comoponents in GCP:
- Reserve virtual IP addressses
- Provision health checks
- Create a firewall rule to support the health checks
After you set up the GCP side, you must set up the appropriate components in vRealize Automation as described below:
- Create a GCP cloud account if you don't already have one.
- Set up flavor and image mapping as appropriate for your environment.
- Create a default network profile and tag it so that you can invoke it from a cloud template.
- Create Compute availability zones and tag them appropriately. These enable you to tell vRealize Automation to provision instanes and instance groups to specific availability zones in a cloud template.
When you have configured all of these components, you can navigate to the Cloud Assembly Design tab and create a cloud template. This template should model the appropriate load balancer configuration with specifications for health check and instances and instance groups as appropriate. For high availability purposes, you must configure multiple load balancers. The cloud template should also specify the appropriate virtual machines and the availability zones in which they should be deployed.
The following cloud template example demonstrates how one might set up a high availability load balancer configuration for NetWeaver.
formatVersion: 1 inputs: {} resources: Cloud_LoadBalancer_1: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP port: 1000 instancePort: 1000 network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false fallbackInstanceGroupsByInstanceNames: - ${resource.Cloud_GCP_Machine_2.resourceName} Cloud_LoadBalancer_2: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP port: 1000 instancePort: 1000 network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false useInstanceGroupsFrom: ${resource.Cloud_LoadBalancer_1.resourceName} fallbackInstanceGroupsByInstanceNames: - ${resource.Cloud_GCP_Machine_1.resourceName} Cloud_GCP_Machine_2: type: Cloud.GCP.Machine properties: image: image flavor: flavor networks: - network: ${resource.Cloud_Network_1.id} constraints: - tag: zone-b Cloud_Network_1: type: Cloud.Network properties: networkType: existing constraints: - tag: default Cloud_GCP_Machine_1: type: Cloud.GCP.Machine properties: image: image flavor: flavor networks: - network: ${resource.Cloud_Network_1.id} constraints: - tag: zone-a
Additional load balancer configuration options
Using cloud template configurations, vRealize Automation users can configure the following additional aspects of load balancer configuration.
- Share instance groups between load balancers
- Configure failover instance groups
- Configure your load balancers to accept traffic on all ports
Share instance groups
To share instance groups between the load balancers the users must explicitly declare it in the blueprint. Because there isn't direct access to the instance groups in the blueprint, the customers must use the useInstanceGroupsFrom
property. In this way vRealize Automation will provision the first load balancer and will reuse the instance groups in the other load balancers.
The following example illustratess how you can use a cloud template to configure two load balancers where the second one uses the instance groups from the first one:
Cloud_LoadBalancer_1: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false Cloud_LoadBalancer_2: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false useInstanceGroupsFrom: ${resource.Cloud_LoadBalancer_1.resourceName}
Configure failover instance groups
To configure failover instance groups for each GCP load balancer you must explicitly declare it in the cloud template. Because there isn't direct access to the instance groups in the template, you need to use the failoverInstanceGroupsByInstanceNames
property which tells vRealize Automation to find the instance group by a machine that is contained in that instance group.
The following example illustrates configuration of a load balancer which has one primary and one failover instance group:
Cloud_LoadBalancer_1: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false failoverInstanceGroupsByInstanceNames: - ${resource.Cloud_GCP_Machine_2.resourceName}
Configure for traffic on all ports
To configure a load balancer to accept traffic on all ports, you can omit the port property of the route configuration. You can view a sample cloud template that uses the three newly created features and provisions the infrastructure for this setup https://cloud.google.com/solutions/sap/docs/netweaver-ha-config-rhel#configure_the_failover_support
formatVersion: 1 inputs: {} resources: Cloud_LoadBalancer_1: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false failoverInstanceGroupsByInstanceNames: - ${resource.Cloud_GCP_Machine_2.resourceName} address: 10.132.0.72 Cloud_LoadBalancer_2: type: Cloud.LoadBalancer properties: routes: - healthCheckConfiguration: healthyThreshold: 2 unhealthyThreshold: 2 timeoutSeconds: 10 intervalSeconds: 10 port: 65000 protocol: TCP protocol: TCP network: ${resource.Cloud_Network_1.id} instances: - ${resource.Cloud_GCP_Machine_1.id} - ${resource.Cloud_GCP_Machine_2.id} internetFacing: false useInstanceGroupsFrom: ${resource.Cloud_LoadBalancer_1.resourceName} failoverInstanceGroupsByInstanceNames: - ${resource.Cloud_GCP_Machine_1.resourceName} address: 10.132.0.64 Cloud_GCP_Machine_2: type: Cloud.GCP.Machine properties: image: image flavor: flavor networks: - network: ${resource.Cloud_Network_1.id} constraints: - tag: zone-c Cloud_Network_1: type: Cloud.Network properties: networkType: existing constraints: - tag: default Cloud_GCP_Machine_1: type: Cloud.GCP.Machine properties: image: image flavor: flavor networks: - network: ${resource.Cloud_Network_1.id} constraints: - tag: zone-b