---
title: Prepare for Deployment in the SAP BTP, Kyma Runtime
description: Learn how to set up the SAP BTP, Kyma runtime for deploying CAP applications.
parser: v2
auto_validation: true
time: 30
tags: [ tutorial>beginner, software-product-function>sap-cloud-application-programming-model, programming-tool>node-js, software-product>sap-business-technology-platform, software-product>sap-fiori, software-product>sap-btp--kyma-runtime]
primary_tag: software-product-function>sap-cloud-application-programming-model
author_name: Grzegorz Karaluch
author_profile: https://github.com/grego952
slug: prepare-btp-kyma
canonical_url: https://developers.sap.com/tutorials/prepare-btp-kyma
---

## You will learn

- How to configure entitlements.
- How to enable the SAP BTP Kyma runtime in your subaccount in SAP BTP.
- How to create an SAP HANA Cloud service instance in the SAP BTP cockpit.

## Prerequisites

- You've set up the Incident Management sample application. You can choose from two alternative options:
    - Follow the [Develop a Full-Stack CAP Application Following the SAP BTP Developer’s Guide](https://discovery-center.cloud.sap/missiondetail/4327/4608/) mission in the SAP Discovery Center to develop the application from the start. 
    - Go to the Incident Management application GitHub repository directly and clone the application without going through the application development steps. See [Incident Management](https://github.com/cap-js/incidents-app/tree/beginner-tutorials).
- You have an [enterprise global account](https://help.sap.com/docs/btp/sap-business-technology-platform/getting-global-account#loiod61c2819034b48e68145c45c36acba6e) in SAP BTP. To use services for free, you can sign up for an SAP BTPEA (SAP BTP Enterprise Agreement) or a Pay-As-You-Go for SAP BTP global account and use the free tier services only. See [Using Free Service Plans](https://help.sap.com/docs/btp/sap-business-technology-platform/using-free-service-plans?version=Cloud).
- You have a platform user. See [User and Member Management](https://help.sap.com/docs/btp/sap-business-technology-platform/user-and-member-management).
- You're an administrator of the global account in SAP BTP.
- You have a subaccount in SAP BTP to deploy the services and applications.
- You have a tenant of SAP Cloud Identity Services. See [Get Your Tenant](https://help.sap.com/docs/cloud-identity-services/cloud-identity-services/get-your-tenant) for details how to get a tenant of SAP Cloud Identity Services if you don't have one yet.
- You've established trust between your tenant of SAP Cloud Identity Services and your SAP BTP account. This established trust allows you to use your SAP Cloud Identity Services tenant as an identity provider or a proxy to your own identity provider hosting your business users. See [Establish Trust and Federation Between SAP Authorization and Trust Management Service and SAP Cloud Identity Services](https://help.sap.com/docs/btp/sap-business-technology-platform/establish-trust-and-federation-between-uaa-and-identity-authentication).
- You have one of the following browsers that are supported for working in SAP Business Application Studio:
    - Mozilla Firefox
    - Google Chrome
    - Microsoft Edge

> This tutorial follows the guidance provided in the [SAP BTP Developer's Guide](https://help.sap.com/docs/btp/btp-developers-guide/what-is-btp-developers-guide).

### Configure the entitlements

In this section, you set up the SAP BTP Kyma runtime for deploying CAP applications.

To deploy the Incident Management application, you need the following entitlements:

| Service     |      Plan      |  Quota required |
| ------------- | :-----------: | ----: |
| Kyma runtime | free (Environment) |   1 |
| SAP Build Work Zone, standard edition    |  free (Application)    |   1 |
| SAP HANA Cloud |   hana-free    |   1 |
| SAP HANA Cloud |   tools (Application)   |   1 |
| SAP HANA Schemas & HDI Containers |   hdi-shared   |   1 |
| SAP Continuous Integration and Delivery | free (Application) |   1 |

Do the following steps to add the entitlements.

1. Log in to the SAP BTP cockpit.

2. Navigate to your subaccount and choose **Entitlements** &rarr; **Edit**.

      ![Configure entitlements](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlements0.png)

3. Choose **Add Service Plans**.

      ![Add service plans](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlements1.png)

2. Search for **Kyma Runtime** and select the **free (Environment)** plan.

      ![Add the Kyma runtime entitlements](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlements2.png)

2. Search for **SAP Build Work Zone, standard edition** and select the **free (Application)** plan.

      ![Add Work Zone](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlements3.png)

3. Search for **SAP HANA Cloud** and select the **tools (Application)** service plan and **hana-free** service plan.

      ![Add HANA](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlements4.png)

4. Search for **SAP HANA Schemas & HDI containers** and select the **hdi-shared** service plan.

      ![Add HANA HDI](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlement5.png)

5. Search for **Continuous Integration & Delivery**, select the **free (Application)** plan, and choose **Add 6 Service Plans**.

      ![Add CI/CD](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/entitlement6.png)

6. Choose **Save**.

### Enable SAP BTP, Kyma runtime

Let's enable your subaccount to use the SAP BTP, Kyma runtime.

1. Navigate to your subaccount and choose **Enable Kyma** under the **Kyma Environment** tab.

      ![Enable Kyma](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/enable-kyma.png)

2. In the **Enable Kyma** popup, change the values for **Instance Name** and **Cluster Name** as needed and choose **Create**.

      ![Enable Kyma popup](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/enable-kyma-popup.png)


    > Make sure that the instance name is CLI-friendly. CLI-friendly names make it easier to manage your instances with the SAP BTP command-line interface as well.
    >
    > A CLI-friendly name is a short string (up to 32 characters) that contains only alphanumeric characters (A-Z, a-z, 0-9), periods, underscores, and hyphens. It can't contain white spaces.
    >
    > When enabling the runtime, you notice that the instance name is generated automatically for you. You can use that name or replace it with the name of your choice.



<!-- New Set Up HANA Cloud start -->

### Subscribe to SAP HANA Cloud Administration Tools

1. Navigate to your subaccount and choose **Services** &rarr; **Service Marketplace** on the left.

2. Type **SAP HANA Cloud** in the search box and choose **Create**.

      ![Create an SAP HANA Cloud tools instance](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/create-hana-tools.png)

2. In the **New Instance or Subscription** popup, select **tools** from the dropdown in the **Plan** field and choose **Create**.

      ![SAP HANA Cloud tools instance creation popup](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/create-hana-tools-popup.png)

7. Choose **View Subscription** and wait until the status changes to **Subscribed**.

    ![View subscription](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/view-subscription.png)

    ![Status subscribed](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hanatools-status-subscribed.png)

8. In your SAP BTP subaccount, choose **Security** &rarr; **Role Collections** in the left-hand pane.

9. Choose role collection **SAP HANA Cloud Administrator**.

10. Choose **Edit**.

    ![Edit role](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-edit-role.png)

11. In the **Users** section, enter your user and select the icon to add the user.

    ![Add user](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-add-user.png)

    > Keep the setting `Default Identity Provider` unless you have a custom identity provider configured.

13. Choose **Save**.

      You've assigned the **SAP HANA Cloud Administrator** role collection to your user.

> Log out and log back in to make sure your new role collection is considered.

### Create an SAP HANA Cloud service instance

SAP HANA Cloud is used as a persistence layer.

Follow these steps to create an SAP HANA Cloud service instance in the SAP BTP cockpit:

1. In your SAP BTP subaccount, navigate to **Services** &rarr; **Instances and Subscriptions** in the left-hand pane.

2. Choose **SAP HANA Cloud**. You're redirected to SAP HANA Cloud multi-environment administration tools. Sign in with your SAP BTP cockpit username/e-mail if necessary.

    ![SAP HANA Cloud Go to application](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-goto-app.png)

3. In SAP HANA Cloud Central, choose **Create Instance**.

      ![SAP HANA Cloud create instance](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-create-instance.png)

7. Choose **SAP HANA Cloud**, **SAP HANA Database**, and then choose **Next Step**.

      ![Create SAP HANA DB Step 1](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/create-hana-db1.png)

8. In the **Instance Name** field, enter **incident-management**.

9. In the **Administrator Password** and **Confirm Administrator Password** fields, enter a password for DBADMIN. Choose **Next Step**.

      ![Create SAP HANA DB Step 2](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/create-hana-db2.png)

10. The default settings are sufficient for the Incident Management application. Choose **Next Step**.

11. At **SAP HANA Database Availability Zone and Replicas**, choose again **Next Step**.

12. Select the **Allow all IP addresses** radio button, and choose **Review and Create** to review your SAP HANA Cloud instance configuration.

      ![Create SAP HANA DB Step 3](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/create-hana-db3.png)

13. Choose **Create Instance**.

The creation of the database instance can take some minutes to complete.

> Your SAP HANA Cloud service instance is automatically stopped overnight, according to the time zone of the region where the server is located. That means you need to restart your instance every day before you start working with it.


### Add the SAP BTP Operator module for your Kyma cluster

You need the SAP BTP Operator module to map your SAP HANA Cloud service instance to the Kyma cluster. The module is added by default when you enable the SAP BTP, Kyma runtime. Follow these steps to make sure it's enabled:

1. Navigate to your subaccount and choose **Dashboard URL** under the **Kyma Environment** tab.

      ![Open Kyma dashboard](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/kyma-console.png)

2. Choose **Modify Modules**.

3. Make sure that **btp-operator** is on the list. If not, choose **Add**. In the new window, check **btp-operator**, and choose **Add**.

> You can find more info in [Add and Delete a Kyma Module](https://help.sap.com/docs/btp/sap-business-technology-platform/enable-and-disable-kyma-module).

### Map your SAP HANA Cloud service instance to your Kyma cluster

1. Go to SAP HANA Cloud Central. If you've closed it, open it again by following these steps: 

      - In your SAP BTP subaccount, navigate to **Services** &rarr; **Instances and Subscriptions**.
      - Choose **SAP HANA Cloud**. You're redirected to SAP HANA Cloud multi-environment administration tools. Sign in with your SAP BTP cockpit username/e-mail if necessary.

2. For the **incident-management** instance, choose **Manage Configuration**.

      ![Manage instance configuration](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-config.png)

3. Select the **Instance Mapping** tab and choose **Add Mapping**.

      ![Add instance mapping](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-add-mapping.png)

4. Choose **Kyma** from the dropdown under **Environment Type**.

5. Under **Environment Instance ID**, paste the GUID of your Kyma cluster. Here's how to find it:

      - Open your Kyma dashboard.
      - Choose **Namespaces** on the left and choose **kyma-system**. 
      - Navigate to **Configuration** &rarr; **Config Maps** and choose **sap-btp-operator-config**.
      - You can see the GUID of your Kyma cluster in the **CLUSTER_ID** section.

      ![Add environment instance ID](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/kyma-cluster-id.png)
    
    > If no namespace is provided, the instance is mapped to all namespaces in the cluster.

6. Choose **Review and Save**. In the popup, mark **Apply changes with a restart**, and choose **Save Changes**. 

      ![Save changes](https://raw.githubusercontent.com/sap-tutorials/btp-dev-guidance/main/tutorials/prepare-btp-kyma/hana-save-mapping.png)

      You've mapped your SAP HANA Cloud service instance to your Kyma cluster.

    > For more information, see [Map an SAP HANA Database to another Environment Context](https://help.sap.com/docs/HANA_CLOUD/9ae9104a46f74a6583ce5182e7fb20cb/1683421d02474567a54a81615e8e2c48.html) to add a new Cloud foundry or Kyma mapping.

<!-- Set Up HANA Cloud end -->
