Create Elastic Compute Nodes Using SAP HANA Cloud Central
The setup process to create elastic compute nodes (ECNs) involves multiple steps. An ECN instance needs to be added to the existing SAP HANA Cloud instance, at least one workload classes is needed, and table distribution to the ECN needs to be configured.
Before you set up an ECN, you'll need to know the ECN resources you expect to need. You can use the SAP HANA Cloud Capacity Unit Estimator to determine this: enter compute, storage, and memory requirements, and the number of hours you expect to use the ECN to calculate your capacity unit (CU) requirements.
Prerequisites
To set up ECNs, you need the following roles and privileges:
To add, edit, or remove ECNs, you need the SAP HANA Cloud Instance Administrator role.
To configure ECNs, you need the Space Developer role for the subaccount in which you will create the node, for example, SAP Business Technology Platform (BTP) or Cloud Foundry space.
To view the ECN configuration, you need the SAP HANA Cloud Viewer role.
To route workload to an ECN using workload classes, you need the WORKLOAD ADMIN and the INIFILE ADMIN role.
To replicate tables to an ECN, you need the TABLE ADMIN system privilege.
To monitor workload classes, you need the CATALOG READ system privilege.
Procedure
- Add an ECN
- In the instance Overview page, select Manage Configuration.
- In the Additional Nodes section, select Add ECN.
- Provision the ECN
- Enter a name for the ECN.
We recommend you use the acronym "ecn" in the name, for easy identification in location lists.
- Define performance class, memory, and storage for the ECN.
In the Add Elastic Compute Node window, select a Performance Class for the ECN. Use the plus (+) and minus (-) symbols to modify the values for Memory and Storage for the ECN.
The range of available values is based on your landscape configuration. You can modify memory capacity later and increase ECN storage but you can’t reduce the ECN storage after provisioning. If you modify the memory after provisioning, SAP HANA Cloud Central checks if the storage value is still within range; if not, the system corrects the value.
- Enter a name for the ECN.
- Set up workload classes to route to ECN
- If the workload class already exists, in the Workload Classes Management page, in the row for the workload class, check that an ECN is selected in the Routing Location column.
- If the workload class doesn’t yet exist, in the Workload Classes Management page, select Create and define the workload class properties. As Routing Location, select the ECN you want to route workload to.
- Set up table replication (optional)
- Define table placement and table redistribution (optional)
The following demonstration shows how to add an ECN to SAP HANA Cloud from the SAP HANA Cloud Central.
Create ECNs Using the SAP BTP Command-Line Interface
Use the SAP BTP command-line interface to create and manage SAP HANA Cloud ECNs.
Prerequisites
You must have created an SAP HANA database instance using SAP HANA Cloud Central (multi-environment).
Note
Instances provisioned in Cloud Foundry cannot be updated with the SAP BTP command-line interface.You must have installed the SAP BTP command-line interface.
The SAP BTP command-line interface processes commands in sequence and the system is blocked for other operations until the command completes.
Syntax
The data parameters are typically submitted as an appended json file - see the example code snippets below.
123456789101112{
"data": {
"computeNodes": [
{
"name": <ECN name>,
"vcpu": <Number of vCPUs>,
"memory": <ECN memory in GB>,
"storage: <Size of the storage in GB>
}
]
},
}
Procedure
- Use the list command to see the available instances:Code Snippet1btp.exe list services/instance
- Use update services/instance to add an ECN to an existing instance. The parameters for the computeNodes option can be submitted on the command line or attached in a json file.
In the following example, an ECN named ecn1 is provisioned for the instance with two vCPUs, 32 GB memory, and 120 GB storage:
Code Snippet1btp.exe update services/instance --id <myInstanceGUID> --parameters add_ecn.jsonParameters in file 'add_ecn.json':
JSON1{"data":{"computeNodes":[{"name":"ecn1","vcpu":2,"memory":32,"storage":120}]}} - Once a request has been submitted you can use the following commands to track the status of the last operation. Check for status value 'update succeeded'.Code Snippet1btp.exe get services/instance <myInstanceGUID> --subaccount <mySubaccountGUID>
Or include the --name parameter to get detailed information about the service.
Code Snippet1btp.exe get services/instance --name <myInstanceGUID> --subaccount <mySubaccountGUID> --show-parameters - Use the monitoring view M_LANDSCAPE_HOST_CONFIGURATION to check the status of the newly created ECNs in the landscape.SQL1SELECT * FROM M_LANDSCAPE_HOST_CONFIGURATION;
Create ECNs Using Cloud Foundry Command-Line Interface
Use the Cloud Foundry command-line interface to create and manage SAP HANA Cloud ECNs.
Prerequisites
You must have an SAP HANA database instance created in the Cloud Foundry runtime environment.
You must have installed the Cloud Foundry command-line interface.
You must have space developer authorizations in the Cloud Foundry space where you want to create the service.
The Cloud Foundry command-line interface supports an additional parameter, resource_version, which can be used to prevent concurrent updates.
- resource_version
- This optional parameter can be used to guarantee the integrity of the instance and prevent concurrent updates (see following example). If you provide the resource-version value then the service broker validates it against the resource version of the SAP HANA service. The request is rejected if its resource-version value does not match the current resource version. If the resource version is not provided no check of the current resource version is made.
You can find the resource-version value by getting the GUID value of the service and then using this in a curl command to retrieve the value.
- Get the service ID value of the my_hana instance:Code Snippet12cf service my_hana --guid <myGUID_Value>
- Use curl to retrieve the resource version (for example 10842):Code Snippet12cf curl /v2/service_instances/<myGUID_Value>/parameters | grep resource_version "resource_version": "10842"
Syntax
12345678910111213{
"data": {
"computeNodes": [
{
"name": <ECN name>,
"vcpu": <Number of vCPUs>,
"memory": <ECN memory in GB>,
"storage: <Size of the storage in GB>
}
]
},
"resource_version": <resourceVersion of HANAService>
}
Adding Two ECNs
This example uses update-service with the computeNodes parameter to add two ECNs with different sizes to an existing instance named my_hana.
- The resource-version value (10842) is included to avoid the possibility of a concurrent modification.Code Snippet12345678910111213141516171819cf update-service my_hana -c '{ \ "data":{ \ "computeNodes":[ \ { \ "memory":120, \ "name":"ecn1", \ "storage":360, \ "vcpu":4 \ }, \ { \ "memory":30, \ "name":"ecn2", \ "storage":120, \ "vcpu":2 \ } \ ] \ }, \ "resource_version": "10842" \ }'
- Once a request has been submitted you can use the following commands to track the status of the last operation. Check for status value 'update succeeded'.Code Snippet1cf get services
Get detailed info about the service.
Code Snippet1cf service <instance name> - Use the monitoring view M_LANDSCAPE_HOST_CONFIGURATION to check the status of the newly created ECNs in the landscape.SQL1SELECT * FROM M_LANDSCAPE_HOST_CONFIGURATION;
Summary
Adding ECNs to an SAP HANA Cloud database instance can be performed using the SAP HANA Cloud Central, the SAP BTP command-line interface, and the Cloud Foundry command-line interface.
Related Information
For more information about the SAP BTP command-line interface and Cloud Foundry command-line interface, see:
- Download and Start Using the SAP BTP Command-Line Interface Client | SAP Help Portal
- How to Work with the SAP BTP Command-Line Interface | SAP Help Portal
- Command Syntax of the SAP BTP Command-Line Interface | SAP Help Portal
- SAP BTP Command-Line Interface Command Reference
- Download and Install the Cloud Foundry Command-Line Interface
- Log On to the Cloud Foundry Environment Using the Cloud Foundry Command-Line Interface
- Getting started with the Cloud Foundry Command-Line Interface | Cloud Foundry Docs