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

Commit 7207ecd

Browse files
authored
Improved usecases (#480)
1 parent 3fdd279 commit 7207ecd

File tree

6 files changed

+237
-6
lines changed

6 files changed

+237
-6
lines changed

usecases/released/discoverycenter/3638-kyma-multitenant/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,32 @@ docker container run --rm -it --name "btp-setup-automator" "ghcr.io/sap-samples/
5454
> ⚠ 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.
5555
5656
You'll notice that the prompt in your terminal has changed, because you are now working inside the docker container, that you just started.
57+
58+
Before we run the main script you should modify the parameter.json inside the container and add your email address in the member section:
59+
1. Navigate to the parameter file
60+
```bash
61+
cd usecases/released/discoverycenter/3999-kyma-day2-operations
62+
```
63+
1. Open the parameter.json in vi
64+
```bash
65+
vi parameter.json
66+
```
67+
1. Search for "myusergroups" and enter your email address in the free line below the members tag:
68+
```json
69+
"myusergroups": [
70+
{
71+
"name": "admins",
72+
"members": [
73+
74+
]
75+
}
76+
]
77+
```
78+
1. Save your changes
79+
```bash
80+
:wq
81+
```
82+
5783
Now run the main script `btpsa` with the following command:
5884

5985
```bash

usecases/released/discoverycenter/3999-kyma-day2-operations/README.md

+35-3
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,45 @@ docker container run --rm -it --name "btp-setup-automator" "ghcr.io/sap-samples/
5454

5555
> ⚠ 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.
5656
57-
You'll notice that the prompt in your terminal has changed, because you are now working inside the docker container, that you just started.
57+
You'll notice that the prompt in your terminal has changed, because you are now working inside the docker container, that you just started.
58+
59+
Before we run the main script you should modify the parameter.json inside the container and add your email address in the member section:
60+
1. Navigate to the parameter file
61+
```bash
62+
cd usecases/released/discoverycenter/3999-kyma-day2-operations
63+
```
64+
1. Open the parameter.json in vi
65+
```bash
66+
vi parameter.json
67+
```
68+
1. Search for "myusergroups" and enter your email address in the free line below the members tag:
69+
```json
70+
"myusergroups": [
71+
{
72+
"name": "admins",
73+
"members": [
74+
75+
]
76+
}
77+
]
78+
```
79+
1. Save your changes
80+
```bash
81+
:wq
82+
```
83+
5884
Now run the main script `btpsa` with the following command:
5985

86+
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.
87+
88+
For setting up the account to get started with the mission use:
6089
```bash
6190
./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>'
6291
```
6392

64-
> Note: Before the deployment starts you can choose between two options (Mission-start and Mission-end). The Mission-start option will setup the account and necessary application in order to execute the mission and enhance the existing application with the day2 operation features. The Mission-end option contains all tasks from the mission itself and you don't need to go through the mission steps. For the complete experience it is recommended to choose the Mission-start option.
93+
For setting up the account with all changes performed throughout the mission use:
94+
```bash
95+
./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>'
96+
```
6597

66-
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.json) and [parameters.json](parameters.json) for more details about the used services and configuration parameters (e.g. DB Password for SAP HANA Cloud).
98+
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.json)/[usecase-final.json](usecase-final.json) and [parameters.json](parameters.json) for more details about the used services and configuration parameters (e.g. DB Password for SAP HANA Cloud).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/SAP-samples/btp-setup-automator/main/libs/btpsa-usecase.json",
3+
"aboutThisUseCase": {
4+
"name": "Develop a Multitenant Extension Application in SAP BTP, Kyma Runtime - Consumer Account creation",
5+
"description": "This project contains a reference application, showcasing an end-to-end development scenario for a multitenant extension on SAP BTP Kyma runtime, which has an SAP partner as focus persona.",
6+
"author": "[email protected]",
7+
"testStatus": "tested successfully",
8+
"usageStatus": "READY TO BE USED",
9+
"relatedLinks": [
10+
"https://github.com/SAP-samples/btp-kyma-multitenant-extension"
11+
]
12+
},
13+
"assignrolecollections": [
14+
{
15+
"name": "Easy Franchise Day 2 Operator",
16+
"type": "account",
17+
"level": "sub account",
18+
"assignedUserGroupsFromParameterFile": [
19+
"admins"
20+
]
21+
}
22+
]
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/SAP-samples/btp-setup-automator/main/libs/btpsa-usecase.json",
3+
"aboutThisUseCase": {
4+
"name": "Extend a Kyma based multitenant application with day 2 operations",
5+
"description": "This project contains a reference application, showcasing an end-to-end development scenario for a multitenant extension on SAP BTP Kyma runtime, which has an SAP partner as focus persona.",
6+
"author": "[email protected]",
7+
"testStatus": "tested successfully",
8+
"usageStatus": "READY TO BE USED",
9+
"relatedLinks": [
10+
"https://github.com/SAP-samples/btp-kyma-day2-operations"
11+
]
12+
},
13+
"services": [
14+
{
15+
"category": "ENVIRONMENT",
16+
"name": "kymaruntime",
17+
"plan": "free",
18+
"amount": 1,
19+
"parameters": {
20+
"name": "btp-auto-setup",
21+
"region": "us-east-1"
22+
}
23+
},
24+
{
25+
"name": "destination",
26+
"plan": "lite",
27+
"entitleonly": true,
28+
"targetenvironment": "sapbtp",
29+
"category": "SERVICE"
30+
},
31+
{
32+
"name": "xsuaa",
33+
"plan": "broker",
34+
"entitleonly": true,
35+
"targetenvironment": "sapbtp",
36+
"category": "SERVICE"
37+
},
38+
{
39+
"name": "hana-cloud",
40+
"plan": "hana-free",
41+
"category": "SERVICE",
42+
"targetenvironment": "sapbtp",
43+
"repeatstatusrequest": 60,
44+
"repeatstatustimeout": 3600,
45+
"instancename": "EasyFranchiseHANADB",
46+
"parameters": {
47+
"data": {
48+
"edition": "cloud",
49+
"memory": 30,
50+
"serviceStopped": false,
51+
"storage": 120,
52+
"systempassword": "mySAP123",
53+
"vcpu": 0,
54+
"versionIndicator": "",
55+
"whitelistIPs": [
56+
"0.0.0.0/0"
57+
]
58+
}
59+
}
60+
},
61+
{
62+
"name": "hana-cloud-tools",
63+
"plan": "tools",
64+
"targetenvironment": "sapbtp",
65+
"category": "APPLICATION",
66+
"repeatstatusrequest": 10,
67+
"repeatstatustimeout": 120,
68+
"requiredrolecollections": [
69+
{
70+
"name": "SAP HANA Cloud Administrator",
71+
"assignedUserGroupsFromParameterFile": [
72+
"admins"
73+
]
74+
}
75+
]
76+
},
77+
{
78+
"name": "cicd-app",
79+
"plan": "free",
80+
"targetenvironment": "sapbtp",
81+
"category": "APPLICATION",
82+
"repeatstatusrequest": 10,
83+
"repeatstatustimeout": 120,
84+
"requiredrolecollections": [
85+
{
86+
"name": "CICD Service Administrator",
87+
"assignedUserGroupsFromParameterFile": [
88+
"admins"
89+
]
90+
}
91+
]
92+
}
93+
],
94+
"executeAfterAccountSetup": [
95+
{
96+
"description": "Get the tutorial code",
97+
"command": "rm -rf /home/user/tutorial && git clone https://github.com/SAP-samples/btp-kyma-day2-operations.git /home/user/tutorial"
98+
},
99+
{
100+
"description": "Copy deploymentscript",
101+
"command": "cp /home/user/tutorial/code/setup/btp-setup-automator/btpsa-deployment.sh /home/user/tutorial"
102+
},
103+
{
104+
"description": "Change permission on deployment script",
105+
"command": "chmod 777 /home/user/tutorial/btpsa-deployment.sh"
106+
},
107+
{
108+
"description": "Run deployment script",
109+
"command": "/home/user/tutorial/btpsa-deployment.sh -v=2"
110+
},
111+
{
112+
"description": "Create the customer usecasefile",
113+
"command": "rm /home/user/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer.json -f && SUBDOMAIN=$(jq -r '.\"subdomain\"' /home/user/log/metadata_log.json) && sed \"s~<provider-subdomain>~$SUBDOMAIN~g\" \"/home/user/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer-template.json\" >> \"/home/user/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer.json\""
114+
},
115+
{
116+
"description": "Execute day2 role assignment usecase",
117+
"command": "GLOBALACCOUNT=$(jq -r '.\"globalaccount\"' /home/user/log/metadata_log.json) && ./btpsa -parameterfile 'usecases/released/discoverycenter/3999-kyma-day2-operations/parameters.json' -usecasefile 'usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-day2role.json' -globalaccount $GLOBALACCOUNT -myemail $MYEMAIL"
118+
},
119+
{
120+
"description": "Execute customer usercase",
121+
"command": "GLOBALACCOUNT=$(jq -r '.\"globalaccount\"' /home/user/log/metadata_log.json) && MYEMAIL=$(jq -r '.\"myemail\"' /home/user/log/metadata_log.json) && SUBACCOUNT=$(jq -r '.\"subaccount\"' /home/user/log/metadata_log.json) && SUBACCOUNTID=$(jq -r '.\"subaccountid\"' /home/user/log/metadata_log.json) && ./btpsa -parameterfile 'usecases/released/discoverycenter/3999-kyma-day2-operations/parameters.json' -usecasefile 'usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer.json' -globalaccount $GLOBALACCOUNT -myemail $MYEMAIL -subaccountname CityScooter -customAppProviderSubaccountId $SUBACCOUNTID"
122+
}
123+
]
124+
}

usecases/released/discoverycenter/3999-kyma-day2-operations/usecase.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@
106106
},
107107
{
108108
"description": "Run deployment script",
109-
"command": "/home/user/tutorial/btpsa-deployment.sh"
110-
},
109+
"command": "/home/user/tutorial/btpsa-deployment.sh -v=1"
110+
},
111111
{
112112
"description": "Create the customer usecasefile",
113113
"command": "rm /home/user/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer.json -f && SUBDOMAIN=$(jq -r '.\"subdomain\"' /home/user/log/metadata_log.json) && sed \"s~<provider-subdomain>~$SUBDOMAIN~g\" \"/home/user/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer-template.json\" >> \"/home/user/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer.json\""
114-
},
114+
},
115115
{
116116
"description": "Execute customer usercase",
117117
"command": "GLOBALACCOUNT=$(jq -r '.\"globalaccount\"' /home/user/log/metadata_log.json) && MYEMAIL=$(jq -r '.\"myemail\"' /home/user/log/metadata_log.json) && SUBACCOUNT=$(jq -r '.\"subaccount\"' /home/user/log/metadata_log.json) && SUBACCOUNTID=$(jq -r '.\"subaccountid\"' /home/user/log/metadata_log.json) && ./btpsa -parameterfile 'usecases/released/discoverycenter/3999-kyma-day2-operations/parameters.json' -usecasefile 'usecases/released/discoverycenter/3999-kyma-day2-operations/usecase-customer.json' -globalaccount $GLOBALACCOUNT -myemail $MYEMAIL -subaccountname CityScooter -customAppProviderSubaccountId $SUBACCOUNTID"

usecases/released/discoverycenter/4000-kyma-identity-management/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,32 @@ docker container run --rm -it --name "btp-setup-automator" "ghcr.io/sap-samples/
5656
> ⚠ 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.
5757
5858
You'll notice that the prompt in your terminal has changed, because you are now working inside the docker container, that you just started.
59+
60+
Before we run the main script you should modify the parameter.json inside the container and add your email address in the member section:
61+
1. Navigate to the parameter file
62+
```bash
63+
cd usecases/released/discoverycenter/3999-kyma-day2-operations
64+
```
65+
1. Open the parameter.json in vi
66+
```bash
67+
vi parameter.json
68+
```
69+
1. Search for "myusergroups" and enter your email address in the free line below the members tag:
70+
```json
71+
"myusergroups": [
72+
{
73+
"name": "admins",
74+
"members": [
75+
76+
]
77+
}
78+
]
79+
```
80+
1. Save your changes
81+
```bash
82+
:wq
83+
```
84+
5985
Now run the main script `btpsa` with the following command:
6086

6187
```bash

0 commit comments

Comments
 (0)