Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Latest commit

 

History

History
98 lines (70 loc) · 7.66 KB

File metadata and controls

98 lines (70 loc) · 7.66 KB

Instructions for running SAP Discovery Center Mission in btp-setup-automator

The setup of this mission can be executed by the btp-setup-automator.

The btp-setup-automator is an open source project to help developers setting-up their SAP BTP accounts quickly via various command line interfaces. The current script was designed to setup the account and spin up the application which is used by the Discovery Center Mission, Extend a Kyma based multitenant application with day 2 operations.

The script will create a subaccount with the necessary entitlements and deploy the Easy Franchise application in the SAP BTP Kyma Environment. Furthermore a consumer subaccount will be created and the EasyFranchise Application will be subscribed. The following services and subscriptions are created:

  • Subaccount EasyFranchise
  • Subaccount EasyFranchise-Customer
  • Authorization and Trust Management Service with broker plan
  • Destination Service with lite plan
  • SAP HANA Cloud with hana-free plan
  • Kyma Runtime with free plan
  • Continuous Integration and Delivery with free plan

The code and the container images of the application are taken from the GitHub repository SAP-samples/btp-kyma-day2-operations.

Pre-Requisites

To use the tooling you first need to finish the following tasks:

⚠ NOTE: Be aware of the terms of Docker for usage in enterprises. For details see this link.

Changes the configuration

Currently the use case is designed to use the free tier service plans and requires a productive SAP BTP account. Also the name and the name of the subaccount is preconfigured to "EasyFranchise" and US10 as region. In case you need to adapt some of the parameters you can parse them via commandline parameters when you call the script, for example to change the region it would look like this:

./btpsa -parameterfile 'usecases/released/discoverycenter/3999-kyma-day2-operations/parameters.json' -globalaccount '<your global account subdomain as shown in the SAP BTP cockpit>' -myemail '<your email address>' -region 'region for your subaccount'

If you want to make changes to the actual usecase.json you can either attach Visual Studio Code directly to your running container. Then you can perform the changes (it works as well with the parameters.json) and run the script as described above. You should be aware that the changes are not persisted if you terminate the docker container. In case you need to perform permanent changes to either the usecase.json or the parameter json you need to create your own docker image containing the changes as described in the documentation for more details.

Region Change

Be aware in case you change the region for the use case you need to have a look at the Available Regions here. In order to make sure the the use case is executable you need to check if the SAP BTP Kyma Runtime availability and the SAP HANA Cloud availability is given.

Instructions

Open a command line terminal on your machine.

📝 Tip - In case you don't know how to do it, here are the instructions for MS Windows, Mac OS and Ubuntu Linux.

Enter the following command into the terminal and press the ENTER key:

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

⚠ NOTE: If you are running on an ARM based platform like a Mac M1 or M2 and are facing issues with the image, add the --platform linux/amd64 option to the docker container run command. The image we provide is built for linux/amd64 and due to some implicit dependencies we cannot perform a built for linux/arm64 with the alpine linux as base image.

You'll notice that the prompt in your terminal has changed, because you are now working inside the docker container, that you just started.

Before we run the main script you should modify the parameter.json inside the container and add your email address in the member section:

  1. Navigate to the parameter file
cd usecases/released/discoverycenter/3999-kyma-day2-operations
  1. Open the parameter.json in vi
vi parameter.json
  1. Search for "myusergroups" and enter your email address in the free line below the members tag:
"myusergroups": [                                                                                                     
    {                                                                                                                   
      "name": "admins",                                                                                                 
      "members": [                                                                                                      
          "your-email@something.com"                                                                                    
      ]                                                                                                                 
    }                                                                                                     
  ]                                                                                                                  
  1. Save your changes
:wq 

Now run the main script btpsa with the following command:

There are two variants available, the first one is setting up the account so that you can get started with the mission and perform the necessary actions to complete the mission on your own. The other one will set up the final result of the mission so that you do not need to perform any changes. For best experience the first variant is recommended.

For setting up the account to get started with the mission use:

./btpsa -parameterfile 'usecases/released/discoverycenter/3999-kyma-day2-operations/parameters.json' -globalaccount '<your global account subdomain as shown in the SAP BTP cockpit>' -myemail '<your email address>'

For setting up the account with all changes performed throughout the mission use:

./btpsa -parameterfile 'usecases/released/discoverycenter/3999-kyma-day2-operations/parameters.json' -usecasefile 'usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-final.json' -globalaccount '<your global account subdomain as shown in the SAP BTP cockpit>' -myemail '<your email address>'

The btp-setup-automator script will now prepare your SAP BTP account to cover the discovery center mission. You can have a look at the usecase.json/usecase-final.json and parameters.json for more details about the used services and configuration parameters (e.g. DB Password for SAP HANA Cloud).