SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
β€’ Open full site

Deploy and Run the Incident Management Application in the SAP BTP, Kyma Runtime with a Mock Server

Learn how to deploy the Incident Management application in the SAP BTP, Kyma runtime and test it with the mock server that you've installed.

Overview

🎓 intermediate 30 min. SAP Cloud Application Programming ModelIntermediateNode JsSAP Business Technology Platform

You will learn

  • βœ”How to deploy and the Incident Management application in the SAP BTP, Kyma runtime.
  • βœ”How to test the application with the mock server that you’ve installed.
Grzegorz Karaluch G Grzegorz Karaluch July 27, 2026
Created by December 5, 2024
Contributors

Prerequisites

Prerequisites

OUT OF MAINTENANCE

This tutorial is no longer maintained. For an up-to-date version and support with any issues, refer to the Develop a Side-by-Side CAP-Based Extension Application Following the SAP BTP Developer’s Guide mission in the SAP Discovery Center.

Steps

Step 1 Build images
β€”

  • Make sure you’re logged in to your Kyma cluster. See Login to your Kyma cluster for detailed steps how to log in.

  • Make sure you’re logged in to your container registry.

  • If you’re using any device with a non-x86 processor (for example, MacBook M1/M2), you need to instruct Docker to use x86 images by setting the DOCKER_DEFAULT_PLATFORM environment variable using the command export DOCKER_DEFAULT_PLATFORM=linux/amd64. Check Environment variables for more info.

  1. In VS Code, open the package.json file and add the [production] profile credentials (destination and path) to the settings for API_BUSINESS_PARTNER:

    JSON
      "API_BUSINESS_PARTNER": {
        "kind": "odata", 
        "model": "srv/external/API_BUSINESS_PARTNER", 
        "[production]": { 
          "credentials": { 
            "destination": "<destination_name>",
            "path": "odata/v2/api-business-partner"
          }
        }
      }

    Replace <destination_name> with the name of the destination that you created at Step 5: Create a destination to the mock server of Install a Mock Server in the SAP BTP, Kyma Runtime.

  2. Create the productive CAP build for your application:

    Shell
    cds build --production

    The CAP build writes to the gen/srv folder.

  3. Build a new version of the CAP Node.js image:

    Shell
    pack build <your-container-registry>/incident-management-srv:<new-image-version> \
        --path gen/srv \
        --builder paketobuildpacks/builder-jammy-base \
        --publish
    • Make sure to replace &lt;your-container-registry&gt; with your docker server URL.

    • Keep in mind that &lt;new-image-version&gt; is a string that’s different from the string defined in Deploy in SAP BTP, Kyma Runtime to reflect the changes in the Incident Management app.

    Looking for your docker server URL?

    The docker server URL is the same as the path used for docker login, so you can quickly check it by running the following command in your terminal:

    JSON
    cat ~/.docker/config.json

    In case you’re using Docker Hub as your container registry, replace the placeholder &lt;your-container-registry&gt; with your Docker Hub user ID.

    The pack CLI builds the image that contains the build result in the gen/srv folder and the required npm packages by using the Cloud Native Buildpack for Node.JS provided by Paketo.

  4. In the VS Code terminal, navigate to the ui-resources folder and run the following command:

    Shell
    npm install && npm run package

    This command builds and copies the archive nsincidents.zip inside the ui-resources/resources folder.

  5. In the VS Code terminal, navigate back to the root folder of your project:

    Shell
    cd ..
  6. Build the UI deployer image:

    Shell
    pack build <your-container-registry>/incident-management-html5-deployer:<image-version> \
        --path ui-resources \
        --builder paketobuildpacks/builder-jammy-base \
        --publish
    • Make sure to replace &lt;your-container-registry&gt; with the link to your container registry and keep in mind that &lt;image-version&gt; is a string.
    • Keep in mind that &lt;new-image-version&gt; is a string that’s different from the string defined in Deploy in SAP BTP, Kyma Runtime to reflect the changes in the Incident Management app.

    Looking for your docker server URL?

    The docker server URL is the same as the path used for docker login, so you can quickly check it by running the following command in your terminal:

    JSON
    cat ~/.docker/config.json

    In case you’re using Docker Hub as your container registry, replace the placeholder &lt;your-container-registry&gt; with your Docker Hub user ID.

Since the database image is unchanged, you don’t need to build it again.

Step 2 Deploy the Incident Management application
+
Step 3 Test the Incident Management application
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Build images 2. Deploy the Incident Management application 3. Test the Incident Management application

Learn more →