Merge "RANPM PM File converter - i-release - o-ran-sc/nonrtric-plt-ranpm-pm-file...
[nonrtric/plt/ranpm.git] / pm-rapp / README.md
1
2
3 ## Basic rAPP for demo purpose
4
5 ### Manual build, tag and push to image repo
6
7 Build for docker or local kubernetes\
8 `./build.sh no-push [<image-tag>]`
9
10 Build for remote kubernetes - an externally accessible image repo (e.g. docker hub) is needed  \
11 `./build.sh <external-image-repo> [<image-tag>]`
12
13 ## Function
14
15 The rApp starts a job subscription and prints (option) the received data to standard out. The purpose with this app is to simulate a real app subscribing to data.
16
17 The rapp can be configured to used plain text, plain text SSL or plain text SASL towards kafka.
18
19
20 ### Configuration
21
22 The container expects the following environment variables:
23
24 - APPID : Should be a unique name (for example the name of the POD).
25
26 - APPNS : Should be the name of namespace.
27
28 - KAFKA_SERVER : Host and port of the kafka bootstrap server.
29
30 - TOPIC : The kafka topic where data is delivered by the job.
31
32 - ICS : Host and port to the information coordinator server.
33
34 The remaining env vars are optional.
35
36 - JWT_FILE : File path to mounted file where a valid token is stored. If used, the app expects the file to be regularly updated by a sidecar container. Only for SASL plain text towards kafka.
37
38 - SSLPATH : Path to mounted cert and key for secure kafka communication. Only for secure plaintext interface towards kafka.
39
40 - GZIP : If set (any value) the payload from kafka is expected to be in gzip format.
41
42 - LOG_PAYLOAD : If set (any value) the received payload is printed to standard out.
43
44 The following are optional and used only if the app fetches the token instead of a configured sidecar. Only for SASL plain text towards kafka.
45
46 - CREDS_GRANT_TYPE : Grant type (keycloak)
47 - CREDS_CLIENT_SECRET : Client secret (keycloak)
48 - CREDS_CLIENT_ID : Client id (keycloak)
49 - AUTH_SERVICE_URL : Url to keycloak for requesting a token.
50
51
52
53 The subscription json is expected on the path "/config/jobDefinition.json".
54 The rapp set topic and bootstrapserver from the above env vars before subscribing to the data.
55
56
57
58 ## License
59
60 Copyright (C) 2023 Nordix Foundation. All rights reserved.
61 Licensed under the Apache License, Version 2.0 (the "License");
62 you may not use this file except in compliance with the License.
63 You may obtain a copy of the License at
64
65      http://www.apache.org/licenses/LICENSE-2.0
66
67 Unless required by applicable law or agreed to in writing, software
68 distributed under the License is distributed on an "AS IS" BASIS,
69 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
70 See the License for the specific language governing permissions and
71 limitations under the License.