• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Typical Deployment Scenarios
  5. Single-Node Scenario Where HA is Not Required
  6. Creating a HANA ECS

Creating a HANA ECS

  1. Obtain the image ID according to the image name.

    GET /v2/images?name=suse11sp4forsapHANA//Image name

  2. Create a system volume.
    The image ID used for creating the system volume is obtained in step 1.
    POST /v2/${tenant_id_1}/volumes
    {
        "volume": {
        "name": "hana02OS",
        "imageRef": "c54492a3-e836-4316-a8c0-ff04e9164cda",//Image ID
        "availability_zone": "aaa",//aaa is used as an example of the AZ.
        "description": "create for hana",
        "volume_type": "uh-l1",
        "multiattach":false,
        "size": 100//Configured based on system planning
        }
    }
  3. Create data volumes.
    A total of four data volumes are required in single-node deployment where HA is not required. The volumes are created one by one. For parameter configurations, see section SAP HANA Nodes.
    POST /v2/${tenant_id_1}/volumes
    {
        "volume": {
        "name": "volumename",
        "availability_zone": "aaa",//aaa is used as an example of the AZ.
        "description": "create for hana",
        "volume_type": "uh-l1",
        "multiattach":true,
        "size":64,
        "metadata":{"hw:passthrough":"true"}
    
        }
    }
  4. Add NICs (ports).

    The HANA ECS requires only one NIC in single-node deployment where HA is not required.

    In single-node scenario, only the network plane is available. Set network_id to the ID of the prepared network.
    POST /v2.0/ports
    {
        "port": {
        "admin_state_up": true,
        "fixed_ips": [
               {
                   "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5"
               }
             ],
        "security_groups": [
        "7a35b108-f048-41b9-a1f8-ed09f090506c"//Security group ID configured for the HANA ECS
    ],
        "name": "Port103",
        "network_id": "afa29b9f-97b2-4221-a1be-d10293ac6b79",
        "tenant_id": "${tenant_id_1}"
    }
    }
  5. Create an ECS. Determine the ECS flavor based on the application scenario.
    POST /v2/${tenant_id_1}/servers
    {
        "server": {
            "flavorRef": "e1.xlarge",
            "name": "hanastudioAPI",
            "block_device_mapping_v2": [{
                "source_type": "volume" ,
                "device_name": "/dev/sda",
                "destination_type": "volume",
                "uuid": "772004c7-9ca9-4a1d-8ff1-84256f3e0ff9",//System volume ID
                "delete_on_termination": "True",
                "boot_index": "0"
            }],
           "networks": [{
                "port": "db9d412b-84e8-4d96-9d1a-cf1aaed9b501"//port id
            }],
        "key_name": "fankeypair01",
        "metadata":{
            "__vhostmd":true
        },
        "user_data":"I2Nsb3VkLWNvbmZpZwpkaXNhYmxlX3Jvb3Q6IGZhbHNlCnJ1bmNtZDoKLSBzZWQgLWkgJ3MvXlBlcm1pdFJvb3RMb2dpbi4qJC9QZXJtaXRSb290TG9naW4gd2l0aG91dC1wYXNzd29yZC8nIC9ldGMvc3NoL3NzaGRfY29uZmlnCi0gc2VkIC1pICcvXktleEFsZ29yaXRobXMuKiQvZCcgL2V0Yy9zc2gvc3NoZF9jb25maWcKLSBzZXJ2aWNlIHNzaGQgcmVzdGFydA==",
        "availability_zone": "aaa"//aaa is used as an example of the AZ.
        }
    }
  6. Attach the data volumes created in step 3 to the ECS.

    The data volumes are attached one by one.

    POST /v2/${tenant_id_1}/servers/${serverid}/os-volume_attachments
    {
        "volumeAttachment":{
        "volumeId":"6602cf17-eaa9-4aec-81a5-f0b03af3d0a7",//Data volume ID
        "device":"/dev/sdb"//Different volumes are mounted at different directories (sdb, sdc, sdd, or sde).
        }
    }
  7. Change the root password for logging in to all HANA ECSs.
    Properly keep the root password. In addition, ensure that all HANA ECSs use the same  root password.
    1. Use VNC to log in to the SAP HANA ECS as user linux. The default password of user linux is cloud.1234.
    2. Run the following command to switch to user root:

      sudo su -

    3. Change the password for user root.

      passwd

      Enter the password as prompted for confirmation.