Skip to content

Plan & Set Up

Best Practices with SAP BTP Guide

To plan your projects around SAP BTP, the Best Practices with SAP BTP guide explains basic platform concepts and provides guidance, such as for account structuring, development and delivery.

SAP Discovery Center

Another good entry point to get further information about the cloud platform offering and to gain first hands-on experience is the SAP Discovery Center, where SAP also offers many missions, for example to implement a business-specific scenario with ease or to set up and onboard some of our DevOps services on the platform.

Setup Automator for SAP BTP

With the GitHub repository for the btp-setup-automator SAP is providing a script to automate the setup of an SAP Business Technology Platform (SAP BTP).

Blog: Automating the setup of your SAP BTP account with btp-setup-automator

Example Automation Script

UDINA uses the following scripts to create sub accounts for UDINA Commerce customers.

The parameters.json file controls the sub account and cf org naming, space quota and available user groups, while the usecase.json file defines nessessary entitlements and role collections assignments to user groups.

All services and apps are rolled out afterwards using regular MTA deployment and GitLab pipelines.

bash
# start docker container
docker container run --rm -it --name "btp-setup-automator" 
  "ghcr.io/sap-samples/btp-setup-automator:latest"

# use accountname var to avoid typos on multiple usage
accountname=udina-newcustx-test

# run automation script
./btpsa \
    -parameterfile 'https://gitlab/api/v4/projects/<ProjectId>/repository/files/parameters.json/raw?ref=main' \
    -myemail 'user@udina.de' \
    -subaccountname $accountname \
    -subdomain $accountname \
    -org $accountname \
    -externalConfigAuthMethod 'token' \
    -externalConfigToken '<your-gitlab-token>'
json
{
    "$schema": "https://raw.githubusercontent.com/...",
    "usecasefile": "usecases/released/default.json",
    "region": "eu10",
    "globalaccount": "<udina_global_account>",
    "myemail": "user@udina.de",
    "loginmethod": "sso",
    "subaccountname": "udina-<customer>-test",
    "subdomain": "udina-<customer>-test",
    "org": "udina-<customer>-test",
    "cfspacename": "services",
    "cfspacequota": {
        "createQuotaPlan": true,
        "spaceQuotaName": "udina",
        "spaceQuotaTotalMemory": "2048M",
        "spaceQuotaInstanceMemory": "2048M",
        "spaceQuotaRoutes": 8,
        "spaceQuotaServiceInstances": 30,
        "spaceQuotaAppInstances": 10,
        "spaceQuotaReservedRoutePorts": 0,
        "spaceQuotaAllowPaidServicePlans": true
    },
    "myusergroups": [
        {
            "name": "admins",
            "members": [
                "admin@udina.de"
            ]
        },
        {
            "name": "developers",
            "members": [
                "developer@udina.de"
                "devops@udina.de"
            ]
        },
        {
            "name": "auditors",
            "members": [
                "auditor@udina.de"
            ]
        },
        {
            "name": "testers",
            "members": [
                "tester@udina.de"
            ]
        }
    ]
}
json
{
    "$schema": "https://raw.githubusercontent.com/...",
    "aboutThisUseCase": {
        "name": "Setup UDINA Commerce customer sub account"
    },
    "services": [
        {
            "entitleonly": true,
            "name": "alert-notification",
            "plan": "standard"
        },
        {
            "entitleonly": true,
            "name": "connectivity",
            "plan": "lite"
        },
        {
            "entitleonly": true,
            "name": "destination",
            "plan": "lite"
        },
        {
            "entitleonly": true,
            "name": "enterprise-messaging",
            "plan": "default"
        },
        {
            "entitleonly": true,
            "name": "feature-flag",
            "plan": "lite"
        },
        {
            "entitleonly": true,
            "name": "feature-flags-dashboard",
            "plan": "dashboard"
        },
        {
            "entitleonly": true,
            "name": "html5-apps-repo",
            "plan": "app-host"
        },
        {
            "entitleonly": true,
            "name": "html5-apps-repo",
            "plan": "app-runtime"
        },
        {
            "entitleonly": true,
            "name": "jobscheduler",
            "plan": "standard"
        },
        {
            "entitleonly": true,
            "name": "objectstore",
            "plan": "s3-standard"
        },
        {
            "entitleonly": true,
            "name": "theming",
            "plan": "standard"
        },
        {
            "entitleonly": true,
            "name": "xsuaa",
            "plan": "application"
        }
    ],
    "assignrolecollections": [
        {
            "name": "Global Account Administrator",
            "type": "account",
            "level": "global account",
            "idp": "sap.default",
            "assignedUserGroupsFromParameterFile": [
                "admins"
            ]
        },
        {
            "name": "Subaccount Administrator",
            "type": "account",
            "level": "sub account",
            "idp": "sap.default",
            "assignedUserGroupsFromParameterFile": [
                "admins"
            ]
        },
        {
            "name": "Subaccount Service Administrator",
            "type": "account",
            "level": "sub account",
            "idp": "sap.default",
            "assignedUserGroupsFromParameterFile": [
                "admins"
            ]
        },
        {
            "name": "SpaceManager",
            "type": "cloudfoundry",
            "level": "space",
            "idp": "sap.ids",
            "assignedUserGroupsFromParameterFile": [
                "admins"
            ]
        },
        {
            "name": "SpaceDeveloper",
            "type": "cloudfoundry",
            "level": "space",
            "idp": "sap.ids",
            "assignedUserGroupsFromParameterFile": [
                "developers"
            ]
        },
        {
            "name": "SpaceAuditor",
            "type": "cloudfoundry",
            "level": "space",
            "idp": "sap.ids",
            "assignedUserGroupsFromParameterFile": [
                "auditors"
            ]
        },
        {
            "name": "OrgManager",
            "type": "cloudfoundry",
            "level": "org",
            "idp": "sap.ids",
            "assignedUserGroupsFromParameterFile": [
                "admins"
            ]
        },
        {
            "name": "OrgAuditor",
            "type": "cloudfoundry",
            "level": "org",
            "idp": "sap.ids",
            "assignedUserGroupsFromParameterFile": [
                "auditors"
            ]
        }
    ]
}

Terraform provider for SAP BTP

SAP has released a Terraform provider for SAP BTP now available for non-productive use.

Terraform provider for SAP BTP now available for non-productive useAutomating SAP BTP setup with the new Terraform provider for SAP BTP

What is Terraform?

TerraformTerraform is an open-source infrastructure as code tool that enables you to safely and predictably provision and manage infrastructure in any cloud.

Continous Integration and Delivery (CI/CD)

A corner stone for development and test and increased agility and quality in a DevOps environment is Continuous Integration (CI) and Continuous Delivery (CD), the practice of integrating frequently into a common source code repository and then validating and testing implemented changes automatically – by using a CI/CD pipeline.

To adopt CI/CD around development projects in SAP environments easily, there are several offerings:

OfferingDescription
SAP Continuous Integration and Delivery serviceConfigure and run predefined pipelines for continuous integration and delivery.
Project "Piper"SAP implements tooling for continuous delivery in project "Piper". The goal of project "Piper" is to substantially ease setting up continuous delivery in your project using SAP technologies.
Continuous Integration and Delivery Best Practices GuideThe Continuous Integration and Delivery Best Practices Guide provides simple procedures to implement continuous delivery (CD) pipelines on any CI/CD stack

Project "Piper"

To get you started quickly, project "Piper" offers you the following artifacts:

  • A set of ready-made Continuous Delivery pipelines for direct use in your project
  • ABAP Environment Pipeline ABAP Environment Pipeline
  • General Purpose Pipeline
  • A shared library that contains reusable step implementations, which enable you to customize our preconfigured pipelines, or to even build your own customized ones
  • A standalone command line utility for Linux and a GitHub Action
  • Jenkins library Jenkins Note: This version is still in early development. Feel free to use it and provide feedback, but don't expect all the features of the
  • A set of Docker images to setup a CI/CD environment in minutes using sophisticated life-cycle management