Skip to content

Commit e29ca9c

Browse files
committed
Updated documentation
1 parent 8215f40 commit e29ca9c

File tree

11 files changed

+27
-114
lines changed

11 files changed

+27
-114
lines changed

Diff for: Code/AWS/README.md

-102
Original file line numberDiff line numberDiff line change
@@ -14,105 +14,3 @@ Before generating data, please complete the following steps
1414
[Kinesis data generator](https://awslabs.github.io/amazon-kinesis-data-generator/web/producer.html) can help simulate an output from Monitron. The template uses faker.js for variables. A [template file](./kinesisdatatemplate.json)
1515
to generate the output is available in the github repo. Please make further modifications as necessary.
1616
![Data Generator](/kinesisdatagen.png)
17-
18-
## SAP BTP integration pattern
19-
If the SAP ECC or S/4 HANA system is an API provider to BTP, please use the below architecture. The architecture uses an APIKey for authentication. The preflow policy contains snippets from here to pass the provider credentials and xcsrf token to the consumer.
20-
![architecture](/monitronarch.png)
21-
22-
The API proxy and policy steps are taken from the [SAP documentation](https://blogs.sap.com/2020/08/10/consuming-sap-on-premise-data-through-sap-api-management/) to pass the APIKey and XCSRF token.
23-
![API product](/APIproduct.png)
24-
![API](/API.png)
25-
![API](/APIPolicy.png)
26-
27-
28-
This project is intended to be sample code only. Not for use in production.
29-
30-
This project will create the following in your AWS cloud environment specified:
31-
* Lambda Layers
32-
* Lambda for detecting Anomalies and creating notifications in SAP
33-
* Roles
34-
* DynamoDB
35-
* S3 Notifications
36-
37-
## Deploying the CDK Project
38-
39-
This project is set up like a standard Python project. For an integrated development environment (IDE), use `AWS Cloud9 environment` to create python virtual environment for the project with required dependencies.
40-
41-
1. Launch your AWS Cloud9 environment.
42-
43-
2. Clone the github repository and navigate to the directory.
44-
45-
```
46-
$ git clone https://github.com/aws-samples/aws-monitron-sap-integration.git
47-
48-
$ cd aws-monitron-sap-integration
49-
```
50-
51-
To manually create a virtualenv
52-
53-
```
54-
$ python3 -m venv .env
55-
```
56-
57-
After the init process completes and the virtualenv is created, you can use the following
58-
step to activate your virtualenv.
59-
60-
```
61-
$ source .env/bin/activate
62-
```
63-
64-
Once the virtualenv is activated, you can install the required dependencies.
65-
66-
```
67-
$ pip install -r requirements.txt
68-
```
69-
70-
The `appConfig.json` file takes the input paramters for the stack. Maintain the following parameters in the `appConfig.json` before deploying the stack
71-
72-
## AWS environment details
73-
* `account` Enter AWS account id of your AWS cloud environment
74-
* `region` Enter Region information where the stack resources needs to be created
75-
* `vpcId` Enter the VPC for Lambda execution from where Lambda can access SAP resources and look out for vision
76-
* `subnet` Enter the subnet for Lambda exection
77-
## Resource Identifiers
78-
* `stackname` Enter an Identifier/Name for the CDK stack
79-
* `ddbtablename` Enter a name for Dynamo DB Table that would be created as part of the stack which would hold the metadata for creating Service notification in SAP
80-
## Bucket Structure
81-
* `bucketname` Enter the name of the bucketwhere the inferences are sent.
82-
* `inferencefolder` Enter the name of the folder(prefix)where the inferences are sent. Leave blank if no folder
83-
## SAP Environnment details
84-
* `SAP_AUTH_SECRET` Provide the arn where the credentials with keys `user` and `password` or `APIkey` if using SAP BTP for accessing SAP services.
85-
* `SAP_HOST_NAME` Host name of the instance for accessing the SAP OData service e.g. hostname of load balancer/Web Dispatcher/SAP Gateway. If using BTP, please pass host alias
86-
* `SAP_PORT` provide the port on which the SAP service can be accesed e.g 443/50001
87-
* `SAP_PROTOCOL` Enter protocol ushing which the service will be accessed HTTPS/HTTP
88-
89-
90-
Bootstrap your AWS account for CDK. Please check [here](https://docs.aws.amazon.com/cdk/latest/guide/tools.html) for more details on bootstraping for CDK. Bootstraping deploys a CDK toolkit stack to your account and creates a S3 bucket for storing various artifacts. You incur any charges for what the AWS CDK stores in the bucket. Because the AWS CDK does not remove any objects from the bucket, the bucket can accumulate objects as you use the AWS CDK. You can get rid of the bucket by deleting the CDKToolkit stack from your account.
91-
92-
```
93-
$ cdk bootstrap aws://<YOUR ACCOUNT ID>/<YOUR AWS REGION>
94-
```
95-
96-
Deploy the stack to your account. Make sure your CLI is setup for account ID and region provided in the appConfig.json file.
97-
98-
```
99-
$ cdk deploy
100-
```
101-
102-
## Cleanup
103-
104-
In order to delete all resources created by this CDK app, run the following command
105-
106-
```
107-
cdk destroy
108-
```
109-
110-
## Useful commands
111-
112-
* `cdk ls` list all stacks in the app
113-
* `cdk synth` emits the synthesized CloudFormation template
114-
* `cdk deploy` deploy this stack to your default AWS account/region
115-
* `cdk diff` compare deployed stack with current state
116-
* `cdk docs` open CDK documentation
117-
118-
Enjoy!

Diff for: Code/AWS/appConfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"SAP_AEM_CREDENTIALS":"arn:aws:secretsmanager:eu-west-1:782110148236:secret:sapaem-credentials-iNmFXa",
1111
"SAP_AEM_REST_URL": "https://mr-connection-giuyy7qx0z1.messaging.solace.cloud:9443/monitron/messages"
1212
},
13-
"ddbtablename": "configm4s",
1413
"s3":{
15-
"bucketname": "sapkendrapdfsearch"
14+
"bucketname": "sapkendrapdfsearch",
15+
"inferencefolder":"monitron"
1616
},
1717
"lambdaTimeout": 900
1818
}

Diff for: documentation/Step1-Setup-SAPBTP-Subaccount/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,7 @@ If you already have an existing HANA Instance, you can map it to this SAP BTP su
7171

7272
### 4. Set Up SAP Business Application Studio
7373

74-
Refer [Manage Authorizations and Roles](https://help.sap.com/docs/SAP%20Business%20Application%20Studio/9d1db9835307451daa8c930fbd9ab264/01e69c53003c4b0a8a64310a3f08867d.html) to assign permissions to users.
74+
1. Refer [Subscribe to SAP Business Application Studio](https://help.sap.com/docs/bas/sap-business-application-studio/subscribe-to-sap-business-application-studio) and subscribe to SAP Business Application Studio.
75+
76+
2. Refer [Manage Authorizations and Roles](https://help.sap.com/docs/SAP%20Business%20Application%20Studio/9d1db9835307451daa8c930fbd9ab264/01e69c53003c4b0a8a64310a3f08867d.html) to assign permissions to users for accessing SAP Business Application Studio.
7577

Diff for: documentation/Step2-SAPS4HANA-Readiness/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Check SAP S/4HANA Readiness
22
In this section, you will activate the APIs related to plant maintenance notification for this scenario.
3+
API_MAINTNOTIFICATION API is supported from SAP S/4HANA 2022 onwards.
34

45
### Activate the API_MAINTNOTIFICATION Service
56

Diff for: documentation/Step4b-Advanced-Event-Mesh-Configuration/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
![plot](./images/aem-create-queue.png)
4646

47-
Enable both incoming and outgoing configuration
47+
Enable both incoming and outgoing configuration and then click on **Apply** button.
4848

4949
![plot](./images/aem-queue2.png)
5050

Loading

Diff for: documentation/Step5-Setup-AWS/README.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project is set up like a standard Python project. For an integrated development environment (IDE), use `SAP Business Application Studio` to create python virtual environment for the project with required dependencies.
44

5-
1.To access the SAP Business Application Studio, go to your subaccount, navigate to **Services** > and choose **Instances and Subscriptions**.
5+
1. To access the SAP Business Application Studio, go to your subaccount, navigate to **Services** > and choose **Instances and Subscriptions**.
66
Choose the row for the SAP Business Application Studio subscription and choose **Go to Application**
77

88
![plot](./images/access-BAS.png)
@@ -20,7 +20,9 @@ This project is set up like a standard Python project. For an integrated develo
2020

2121
```
2222
git clone https://github.com/SAP-samples/btp-aws-monitron
23+
```
2324

25+
```
2426
cd Code/AWS
2527
```
2628

@@ -81,11 +83,13 @@ The following are the two SAP Environment variables:
8183
* `SAP_AEM_CREDENTIALS` (example: arn:aws:secretsmanager://region/account/secret:sapemauth-pnyaRN)
8284
* `SAP_AEM_REST_URL` (example: https://mr-connection-giuyy7qx0z1.messaging.solace.cloud:9443/topic)
8385

86+
### For SAP_AEM_CREDENTIALS, follow the steps below.
87+
8488
1. The values for these variables needs to be stored in the **AWS Secrets Manager**. Go to your **AWS account** and search for **secret**, choose **Secrets Manager**
8589

8690
![plot](./images/aws-secret.png)
8791

88-
2. For Storing **SAP_AEM_CREDENTIALS** we need the Advanced Event Mesh UserName and Password. Open the Advanced Event Mesh Application from the BTP Cockpit.
92+
2. For Storing **SAP_AEM_CREDENTIALS** we need the Advanced Event Mesh Username and Password. Open the Advanced Event Mesh Application from the BTP Cockpit.
8993

9094
![plot](./images/access-aem.png)
9195

@@ -101,18 +105,29 @@ The following are the two SAP Environment variables:
101105

102106
![plot](./images/create-secret-1.png)
103107

104-
6. Choose **Other type of secret** option under **Secret type**. Add two key-value pairs as **UserName and Password** and Paste the values copied from **Advanced Event Mesh Application**. Click on **Next**
108+
6. Choose **Other type of secret** option under **Secret type**. Add two key-value pairs as **username and password** and Paste the values copied from **Advanced Event Mesh Application**. Click on **Next**
105109

106110
![plot](./images/secret-keys.png)
107111

108112
7. Fill the **Secret name** as **sapaem-credentials** and Click on **Next**, Click on **Next** and then click on **Store** to store the secret.
109113

110114
![plot](./images/secret-store.png)
111115

112-
8. Click on the created secret and copy the Secret ARN value.
116+
8. Click on the created secret and copy the Secret ARN value and use it in appConfig.json for **SAP_AEM_CREDENTIALS**.
113117

114118
![plot](./images/secret-arn.png)
115119

120+
### For SAP_AEM_REST_URL, follow the steps below.
121+
122+
1. Go to your Advanced Event Mesh Application, and from the **Connect** Tab, copy the **Secured REST Host**
123+
124+
![plot](./images/aem-rest-url-1.png)
125+
126+
2. You have previously created a topic subscription named `monitron/messages`
127+
128+
![plot](./images/aem-rest-url-2.png)
129+
130+
So, the **SAP_AEM_REST_URL** is `Secured_REST_Host`/monitron/messages
116131

117132
So your `appConfig.json` file looks as shown below: Fill all the details by following the steps mentioned above.
118133

@@ -129,9 +144,8 @@ So your `appConfig.json` file looks as shown below: Fill all the details by foll
129144
"SAP_AEM_CREDENTIALS":"<your_secret_arn>",
130145
"SAP_AEM_REST_URL": "<your_aem_rest_url>"
131146
},
132-
"ddbtablename": "myddb",
133147
"s3":{
134-
"bucketname": "mybucket",
148+
"bucketname": "<your_s3_bucket>",
135149
"inferencefolder":"monitron"
136150
},
137151
"lambdaTimeout": 900

Diff for: documentation/Step5-Setup-AWS/appConfig.json

-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
"SAP_EM_OAUTH_CLIENT_ID": "sb-default-85d8f3d8-255c-4122-b170-17f93ee9db4e-clone!b156115|xbem-service-broker-!b2436",
1313
"SAP_EM_REST_URL": "https://enterprise-messaging-pubsub.cfapps.eu10.hana.ondemand.com/messagingrest/v1/topics/com%2Fsap%2Fpaa%2Findustry%2Fevent%2Fraised/messages"
1414
},
15-
"ddbtablename": "configm4s",
1615
"s3":{
1716
"bucketname": "awspihe2ab",
18-
"equipment": "CAM-01",
1917
"inferencefolder":"monitron"
2018
},
2119
"lambdaTimeout": 900
168 KB
Loading
77.2 KB
Loading

Diff for: documentation/Step5-Setup-AWS/images/secret-keys.png

-13.1 KB
Loading

0 commit comments

Comments
 (0)