Merge "Improved specification of images and tags"
[nonrtric.git] / test / common / test_env-onap-honolulu.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 ONAP honolulu release
20 TEST_ENV_PROFILE="ONAP-HONOLULU"
21
22 ########################################
23 ## Nexus repo settings
24 ########################################
25
26 # Nexus repos for developed images
27 NEXUS_PROXY_REPO="nexus3.onap.org:10001/"
28 NEXUS_RELEASE_REPO="nexus3.onap.org:10002/"
29 NEXUS_SNAPSHOT_REPO="nexus3.onap.org:10003/"
30 NEXUS_STAGING_REPO=$NEXUS_SNAPSHOT_REPO  #staging repo not used in ONAP, using snapshot
31
32 # Nexus repos for images used by test (not developed by the project)
33 NEXUS_RELEASE_REPO_ORAN="nexus3.o-ran-sc.org:10002/" # Only for released ORAN images
34 NEXUS_RELEASE_REPO_ONAP=$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 # Policy Agent image and tags
60 POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
61 POLICY_AGENT_IMAGE_TAG_LOCAL="1.1.1-SNAPSHOT"
62 POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.1-SNAPSHOT"
63 POLICY_AGENT_IMAGE_TAG_REMOTE="1.1.1-SNAPSHOT" #Will use snapshot repo
64 POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.1.1"
65
66
67 # SDNC A1 Controller remote image and tag
68 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
69 SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.1.1-SNAPSHOT" ###CHECK THIS
70 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.1-STAGING-latest"
71 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.1.1-STAGING-latest"  #Will use snapshot repo
72 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.1.1"
73
74 #SDNC DB remote image and tag
75 #The DB is part of SDNC so handled in the same way as SDNC
76 SDNC_DB_IMAGE_BASE="mysql/mysql-server"
77 SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
78
79
80 # ECS image and tag - uses cherry release
81 ECS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service"
82 ECS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.0"
83
84
85 # Control Panel image and tag - uses cherry release
86 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
87 CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.1.0"
88
89
90 # RAPP Catalogue image and tags - uses cherry release
91 RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
92 RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.0"
93
94
95 # Near RT RIC Simulator image and tags - uses cherry release
96 RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
97 RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.1.0"
98
99
100 #Consul remote image and tag
101 CONSUL_IMAGE_BASE="consul"
102 CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
103 #No local image for Consul, remote image always used
104
105
106 #CBS remote image and tag
107 CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
108 CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
109 #No local image for CBS, remote image always used
110
111
112 #MR stub image and tag
113 MRSTUB_IMAGE_BASE="mrstub"
114 MRSTUB_IMAGE_TAG_LOCAL="latest"
115 #No remote image for MR stub, local image always used
116
117
118 #Callback receiver image and tag
119 CR_IMAGE_BASE="callback-receiver"
120 CR_IMAGE_TAG_LOCAL="latest"
121 #No remote image for CR, local image always used
122
123
124 #Producer stub image and tag
125 PROD_STUB_IMAGE_BASE="producer-stub"
126 PROD_STUB_IMAGE_TAG_LOCAL="latest"
127 #No remote image for producer stub, local image always used
128
129
130 # List of app short names produced by the project
131 PROJECT_IMAGES_APP_NAMES="PA SDNC"
132
133 # List of app short names which images pulled from ORAN
134 ORAN_IMAGES_APP_NAMES="CP ECS RICSIM RC"
135
136 # List of app short names which images pulled from ONAP
137 ONAP_IMAGES_APP_NAMES=""   # Not used
138
139
140 ########################################
141 # Detailed settings per app
142 ########################################
143
144 # Vars used by docker-compose need to be exported
145
146
147 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
148
149 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
150 export POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
151 export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
152 export POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
153 export POLICY_AGENT_APIS="V1 V2"                                # Supported northbound api versions
154 export PMS_VERSION="V2"                                         # Tested version of northbound API
155
156 export POLICY_AGENT_APP_NAME="policy-agent"                     # Name for Policy Agent container
157 POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log"    # Path the application log in the Policy Agent container
158 export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
159
160 export ECS_EXTERNAL_PORT=8083                                   # ECS container external port (host -> container)
161 export ECS_INTERNAL_PORT=8083                                   # ECS container internal port (container -> container)
162 export ECS_EXTERNAL_SECURE_PORT=8434                            # ECS container external secure port (host -> container)
163 export ECS_INTERNAL_SECURE_PORT=8434                            # ECS container internal secure port (container -> container)
164
165 export ECS_APP_NAME="ecs"                                       # Name for ECS container
166 ECS_LOGPATH="/var/log/enrichment-coordinator-service/application.log" # Path the application log in the ECS container
167 export ECS_APP_NAME_ALIAS="enrichment-service-container"        # Alias name, name used by the control panel
168 export ECS_HOST_MNT_DIR="./mnt"                                 # Mounted dir, relative to compose file, on the host
169 export ECS_CONTAINER_MNT_DIR="/var/enrichment-coordinator-service" # Mounted dir in the container
170
171 export MR_EXTERNAL_PORT=3905                                    # MR stub container external port (host -> container)
172 export MR_INTERNAL_PORT=3905                                    # MR stub container internal port (container -> container)
173 export MR_EXTERNAL_SECURE_PORT=3906                             # MR stub container external secure port (host -> container)
174 export MR_INTERNAL_SECURE_PORT=3906                             # MR stub container internal secure port (container -> container)
175 export MR_APP_NAME="message-router"                             # Name for the MR
176 export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
177 export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE"             # Path write messages to MR
178
179 export CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
180 export CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
181 export CR_EXTERNAL_SECURE_PORT=8091                             # Callback receiver container external secure port (host -> container)
182 export CR_INTERNAL_SECURE_PORT=8091                             # Callback receiver container internal secure port (container -> container)
183 export CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
184 export CR_APP_CALLBACK="/callbacks"                             # Url for callbacks
185
186 export PROD_STUB_EXTERNAL_PORT=8092                             # Producer stub container external port (host -> container)
187 export PROD_STUB_INTERNAL_PORT=8092                             # Producer stub container internal port (container -> container)
188 export PROD_STUB_EXTERNAL_SECURE_PORT=8093                      # Producer stub container external secure port (host -> container)
189 export PROD_STUB_INTERNAL_SECURE_PORT=8093                      # Producer stub container internal secure port (container -> container)
190 export PROD_STUB_APP_NAME="producer-stub"                       # Name for the Producer stub
191
192 export CONSUL_HOST="consul-server"                              # Host name of consul
193 export CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
194 export CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
195 export CONSUL_APP_NAME="polman-consul"                          # Name for consul container
196
197 export CBS_APP_NAME="polman-cbs"                                # Name for CBS container
198 export CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
199 export CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
200 export CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
201
202 export RIC_SIM_BASE="g"                                         # Base name of the RIC Simulator container, shall be the group code
203                                                                 # Note, a prefix is added to each container name by the .env file in the 'ric' dir
204 RIC_SIM_PREFIX="ricsim"                                         # Prefix added to ric container name, added in the .env file in the 'ric' dir
205                                                                 # This prefix can be changed from the command line
206 export RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
207                                                                 # (external ports allocated by docker)
208 export RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
209                                                                 # (external ports allocated by docker)
210
211 export SDNC_APP_NAME="a1-controller"                            # Name of the SNDC A1 Controller container
212 export SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
213 export SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
214 export SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
215 export SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
216 export SDNC_DB_APP_NAME="sdnc-db"                               # Name of the SDNC DB container
217 export SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter"                  # SDNC truststore password
218 SDNC_USER="admin"                                               # SDNC username
219 SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"          # SNDC PWD
220 SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path for SNDC API
221 SDNC_ALIVE_URL="/apidoc/explorer/"                              # Base url path for SNDC API docs (for alive check)
222 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
223
224 export RAPP_CAT_APP_NAME="rapp-catalogue"                      # Name for the RAPP Catalogue
225 export RAPP_CAT_EXTERNAL_PORT=8680                             # RAPP Catalogue container external port (host -> container)
226 export RAPP_CAT_INTERNAL_PORT=8080                             # RAPP Catalogue container internal port (container -> container)
227 export RAPP_CAT_EXTERNAL_SECURE_PORT=8633                      # RAPP Catalogue container external secure port (host -> container)
228 export RAPP_CAT_INTERNAL_SECURE_PORT=8433                      # RAPP Catalogue container internal secure port (container -> container)
229
230 export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
231 export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
232 export CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
233 CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log"         # Path the application log in the Control Panel container
234
235
236 ########################################
237 # Setting for common curl-base function
238 ########################################
239
240 UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
241                                                                 # Testscript need to set the UUID to use other this empty prefix is used
242
243 RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT         # Base url to the Agent NB REST interface
244 RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
245 DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT                  # Base url to the Dmaap adapter, http
246 DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
247 ADAPTER=$RESTBASE                                               # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
248                                                                 # The values of this var is swiched between the two base url when needed
249                                                                 # The values of this var is swiched between the four base url when needed
250
251 ECS_RESTBASE="http://localhost:"$ECS_EXTERNAL_PORT              # Base url to the ECS NB REST interface
252 ECS_RESTBASE_SECURE="https://localhost:"$ECS_EXTERNAL_SECURE_PORT # Base url to the secure ECS NB REST interface
253 ECS_DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT              # Base url to the Dmaap adapter, http
254 ECS_DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
255 ECS_ADAPTER=$ECS_RESTBASE                                       # Adapter holds the address the ECS R-APP interface (REST OR DMAAP)
256                                                                 # The values of this var is swiched between the four base url when needed
257
258 CR_RESTBASE="http://localhost:"$CR_EXTERNAL_PORT                # Base url to the Callback receiver REST interface
259 CR_RESTBASE_SECURE="https://localhost:"$CR_EXTERNAL_SECURE_PORT # Base url to the secure Callback receiver REST interface
260 CR_ADAPTER=$CR_RESTBASE                                         # Adapter holds the address the CR admin interface (REST only)
261                                                                 # The values of this var is swiched between the two base url when needed
262
263 RC_RESTBASE="http://localhost:"$RAPP_CAT_EXTERNAL_PORT          # Base url to the RAPP Catalogue REST interface
264 RC_RESTBASE_SECURE="https://localhost:"$RAPP_CAT_EXTERNAL_SECURE_PORT # Base url to the secure RAPP Catalogue REST interface
265 RC_ADAPTER=$RC_RESTBASE                                         # Adapter holds the address the RAPP Catalogue interface