Merge "Refactored the docker compose This enables the one click deployment of all...
[nonrtric.git] / test / common / test_env-oran-cherry.sh
1 #!/bin/bash
2
3 #  ============LICENSE_START===============================================
4 #  Copyright (C) 2020 Nordix Foundation. All rights reserved.
5 #  ========================================================================
6 #  Licensed under the Apache License, Version 2.0 (the "License");
7 #  you may not use this file except in compliance with the License.
8 #  You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #  Unless required by applicable law or agreed to in writing, software
13 #  distributed under the License is distributed on an "AS IS" BASIS,
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #  See the License for the specific language governing permissions and
16 #  limitations under the License.
17 #  ============LICENSE_END=================================================
18 #
19 #Profile for ORAN Cherry
20 TEST_ENV_PROFILE="ORAN-CHERRY"
21
22 ########################################
23 ## Nexus repo settings
24 ########################################
25
26 # Nexus repos for developed images
27 NEXUS_PROXY_REPO="nexus3.o-ran-sc.org:10001/"
28 NEXUS_RELEASE_REPO="nexus3.o-ran-sc.org:10002/"
29 NEXUS_SNAPSHOT_REPO="nexus3.o-ran-sc.org:10003/"
30 NEXUS_STAGING_REPO="nexus3.o-ran-sc.org:10004/"
31
32 # Nexus repos for images used by test (not developed by the project)
33 NEXUS_RELEASE_REPO_ONAP="nexus3.onap.org:10002/"  # Only for released ONAP images
34 NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO
35
36 ########################################
37 # Set up of image and tags for the test.
38 ########################################
39
40 # NOTE: One environment variable containing the image name and tag is create by the test script
41 # for each image from the env variables below.
42 # The variable is created by removing the suffix "_BASE" from the base image variable name.
43 # Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE
44 # This var will point to the local or remote image depending on cmd line arguments.
45 # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment.
46 # For images built by the script, only tag #1 shall be specified
47 # For project images, only tag #1, #2, #3 and #4 shall be specified
48 # For ORAN images (non project), only tag #5 shall be specified
49 # For ONAP images (non project), only tag #6 shall be specified
50 # For all other images, only tag #7 shall be specified
51 # 1 XXX_LOCAL: local images: <image-name>:<local-tag>
52 # 2 XXX_REMOTE_SNAPSHOT: snapshot images: <snapshot-nexus-repo><image-name>:<snapshot-tag>
53 # 3 XXX_REMOTE: staging images: <staging-nexus-repo><image-name>:<staging-tag>
54 # 4 XXX_REMOTE_RELEASE: release images: <release-nexus-repo><image-name>:<release-tag>
55 # 5 XXX_REMOTE_RELEASE_ORAN: ORAN release images: <oran-release-nexus-repo><image-name>:<release-tag>
56 # 6 XXX_REMOTE_RELEASE_ONAP: ONAP release images: <onap-release-nexus-repo><image-name>:<release-tag>
57 # 7 XXX_PROXY: other images, not produced by the project: <proxy-nexus-repo><mage-name>:<proxy-tag>
58
59
60 # Policy Agent base image and tags
61 POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent"
62 POLICY_AGENT_IMAGE_TAG_LOCAL="2.1.0-SNAPSHOT"
63 POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
64 POLICY_AGENT_IMAGE_TAG_REMOTE="2.1.0"
65 POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
66
67 # ECS image and tags
68 ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
69 ECS_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
70 ECS_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
71 ECS_IMAGE_TAG_REMOTE="1.0.0"
72 ECS_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
73
74
75 # Control Panel image and tags
76 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
77 CONTROL_PANEL_IMAGE_TAG_LOCAL="2.1.0-SNAPSHOT"
78 CONTROL_PANEL_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
79 CONTROL_PANEL_IMAGE_TAG_REMOTE="2.1.0"
80 CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
81
82
83 # SDNC A1 Controller image and tags
84 SDNC_A1_CONTROLLER_IMAGE_BASE="o-ran-sc/nonrtric-a1-controller"
85 SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.0.1-SNAPSHOT"
86 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.0.1-SNAPSHOT"
87 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.0.1"
88 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.0.1"
89
90
91 #SDNC DB remote image and tag
92 SDNC_DB_IMAGE_BASE="mysql/mysql-server"
93 SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
94 #No local image for SSDNC DB, remote image always used
95
96
97 # RAPP Catalogue image and tags
98 RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
99 RAPP_CAT_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
100 RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
101 RAPP_CAT_IMAGE_TAG_REMOTE="1.0.0"
102 RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
103
104
105 # Near RT RIC Simulator image and tags
106 RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
107 RIC_SIM_IMAGE_TAG_LOCAL="latest"
108 RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.0-SNAPSHOT"
109 RIC_SIM_IMAGE_TAG_REMOTE="2.1.0"
110 RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.1.0"
111
112
113 #Consul remote image and tag
114 CONSUL_IMAGE_BASE="consul"
115 CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
116 #No local image for Consul, remote image always used
117
118
119 #CBS remote image and tag
120 CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
121 CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
122 #No local image for CBS, remote image always used
123
124
125 #MR stub image and tag
126 MRSTUB_IMAGE_BASE="mrstub"
127 MRSTUB_IMAGE_TAG_LOCAL="latest"
128 #No remote image for MR stub, local image always used
129
130
131 #Callback receiver image and tag
132 CR_IMAGE_BASE="callback-receiver"
133 CR_IMAGE_TAG_LOCAL="latest"
134 #No remote image for CR, local image always used
135
136
137 #Producer stub image and tag
138 PROD_STUB_IMAGE_BASE="producer-stub"
139 PROD_STUB_IMAGE_TAG_LOCAL="latest"
140 #No remote image for producer stub, local image always used
141
142
143 # List of app short names produced by the project
144 PROJECT_IMAGES_APP_NAMES="PA ECS CP SDNC RC RICSIM"
145
146 # List of app short names which images pulled from ORAN
147 ORAN_IMAGES_APP_NAMES=""  # Not used
148
149 # List of app short names which images pulled from ONAP
150 ONAP_IMAGES_APP_NAMES="CBS"
151
152
153 ########################################
154 # Detailed settings per app
155 ########################################
156
157 # Vars used by docker-compose need to be exported
158
159 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
160
161 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
162 export POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
163 export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
164 export POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
165 export POLICY_AGENT_APIS="V1 V2"                                # Supported northbound api versions
166 export PMS_VERSION="V2"                                         # Tested version of northbound API
167
168 export POLICY_AGENT_APP_NAME="policy-agent"                     # Name for Policy Agent container
169 POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log"    # Path the application log in the Policy Agent container
170 export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
171
172 export ECS_EXTERNAL_PORT=8083                                   # ECS container external port (host -> container)
173 export ECS_INTERNAL_PORT=8083                                   # ECS container internal port (container -> container)
174 export ECS_EXTERNAL_SECURE_PORT=8434                            # ECS container external secure port (host -> container)
175 export ECS_INTERNAL_SECURE_PORT=8434                            # ECS container internal secure port (container -> container)
176
177 export ECS_APP_NAME="ecs"                                       # Name for ECS container
178 ECS_LOGPATH="/var/log/enrichment-coordinator-service/application.log" # Path the application log in the ECS container
179 export ECS_APP_NAME_ALIAS="enrichment-service-container"        # Alias name, name used by the control panel
180 export ECS_HOST_MNT_DIR="./mnt"                                 # Mounted dir, relative to compose file, on the host
181 export ECS_CONTAINER_MNT_DIR="/var/enrichment-coordinator-service" # Mounted dir in the container
182
183 export MR_EXTERNAL_PORT=3905                                    # MR stub container external port (host -> container)
184 export MR_INTERNAL_PORT=3905                                    # MR stub container internal port (container -> container)
185 export MR_EXTERNAL_SECURE_PORT=3906                             # MR stub container external secure port (host -> container)
186 export MR_INTERNAL_SECURE_PORT=3906                             # MR stub container internal secure port (container -> container)
187 export MR_APP_NAME="message-router"                             # Name for the MR
188 export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
189 export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE"             # Path write messages to MR
190
191 export CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
192 export CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
193 export CR_EXTERNAL_SECURE_PORT=8091                             # Callback receiver container external secure port (host -> container)
194 export CR_INTERNAL_SECURE_PORT=8091                             # Callback receiver container internal secure port (container -> container)
195 export CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
196 export CR_APP_CALLBACK="/callbacks"                             # Url for callbacks
197
198 export PROD_STUB_EXTERNAL_PORT=8092                             # Producer stub container external port (host -> container)
199 export PROD_STUB_INTERNAL_PORT=8092                             # Producer stub container internal port (container -> container)
200 export PROD_STUB_EXTERNAL_SECURE_PORT=8093                      # Producer stub container external secure port (host -> container)
201 export PROD_STUB_INTERNAL_SECURE_PORT=8093                      # Producer stub container internal secure port (container -> container)
202 export PROD_STUB_APP_NAME="producer-stub"                       # Name for the Producer stub
203
204 export CONSUL_HOST="consul-server"                              # Host name of consul
205 export CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
206 export CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
207 export CONSUL_APP_NAME="polman-consul"                          # Name for consul container
208
209 export CBS_APP_NAME="polman-cbs"                                # Name for CBS container
210 export CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
211 export CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
212 export CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
213
214 export RIC_SIM_BASE="g"                                         # Base name of the RIC Simulator container, shall be the group code
215                                                                 # Note, a prefix is added to each container name by the .env file in the 'ric' dir
216 RIC_SIM_PREFIX="ricsim"                                         # Prefix added to ric container name, added in the .env file in the 'ric' dir
217                                                                 # This prefix can be changed from the command line
218 export RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
219                                                                 # (external ports allocated by docker)
220 export RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
221                                                                 # (external ports allocated by docker)
222
223 export SDNC_APP_NAME="a1-controller"                            # Name of the SNDC A1 Controller container
224 export SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
225 export SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
226 export SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
227 export SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
228 export SDNC_DB_APP_NAME="sdnc-db"                               # Name of the SDNC DB container
229 export SDNC_A1_TRUSTSTORE_PASSWORD=""                           # SDNC truststore password
230 SDNC_USER="admin"                                               # SDNC username
231 SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"          # SNDC PWD
232 SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path for SNDC API
233 SDNC_ALIVE_URL="/apidoc/explorer/"                              # Base url path for SNDC API docs (for alive check)
234 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
235
236 export RAPP_CAT_APP_NAME="rapp-catalogue"                      # Name for the RAPP Catalogue
237 export RAPP_CAT_EXTERNAL_PORT=8680                             # RAPP Catalogue container external port (host -> container)
238 export RAPP_CAT_INTERNAL_PORT=8080                             # RAPP Catalogue container internal port (container -> container)
239 export RAPP_CAT_EXTERNAL_SECURE_PORT=8633                      # RAPP Catalogue container external secure port (host -> container)
240 export RAPP_CAT_INTERNAL_SECURE_PORT=8433                      # RAPP Catalogue container internal secure port (container -> container)
241
242
243 export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
244 export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
245 export CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
246 CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log"         # Path the application log in the Control Panel container
247
248
249 ########################################
250 # Setting for common curl-base function
251 ########################################
252
253 UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
254                                                                 # Testscript need to set the UUID otherwise this empty prefix is used
255
256 RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT         # Base url to the Agent NB REST interface
257 RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
258 DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT                  # Base url to the Dmaap adapter, http
259 DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
260 ADAPTER=$RESTBASE                                               # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
261                                                                 # The values of this var is swiched between the four base url when needed
262
263 ECS_RESTBASE="http://localhost:"$ECS_EXTERNAL_PORT              # Base url to the ECS NB REST interface
264 ECS_RESTBASE_SECURE="https://localhost:"$ECS_EXTERNAL_SECURE_PORT # Base url to the secure ECS NB REST interface
265 ECS_DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT              # Base url to the Dmaap adapter, http
266 ECS_DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
267 ECS_ADAPTER=$ECS_RESTBASE                                       # Adapter holds the address the ECS R-APP interface (REST OR DMAAP)
268                                                                 # The values of this var is swiched between the four base url when needed
269
270 CR_RESTBASE="http://localhost:"$CR_EXTERNAL_PORT                # Base url to the Callback receiver REST interface
271 CR_RESTBASE_SECURE="https://localhost:"$CR_EXTERNAL_SECURE_PORT # Base url to the secure Callback receiver REST interface
272 CR_ADAPTER=$CR_RESTBASE                                         # Adapter holds the address the CR admin interface (REST only)
273                                                                 # The values of this var is swiched between the two base url when needed
274
275 RC_RESTBASE="http://localhost:"$RAPP_CAT_EXTERNAL_PORT          # Base url to the RAPP Catalogue REST interface
276 RC_RESTBASE_SECURE="https://localhost:"$RAPP_CAT_EXTERNAL_SECURE_PORT # Base url to the secure RAPP Catalogue REST interface
277 RC_ADAPTER=$RC_RESTBASE                                         # Adapter holds the address the RAPP Catalogue interface