Merge "Improved specification of images and tags"
[nonrtric.git] / test / common / test_env-onap-guilin.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 guilin release
20 TEST_ENV_PROFILE="ONAP-GUILIN"
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
60 # Policy Agent image and tags
61 POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice"
62 POLICY_AGENT_IMAGE_TAG_LOCAL="1.0.2-SNAPSHOT"
63 POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.2-SNAPSHOT"
64 POLICY_AGENT_IMAGE_TAG_REMOTE="1.0.2-SNAPSHOT" #Will use snapshot repo
65 POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
66
67
68 # Tag for guilin branch
69 # SDNC A1 Controller remote image and tag
70 SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
71 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.0.5-STAGING-latest"
72 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.0.5-STAGING-latest"
73 SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.0.4"   #Will use snapshot repo
74
75
76 #SDNC DB remote image and tag
77 #The DB is part of SDNC so handled in the same way as SDNC
78 SDNC_DB_IMAGE_BASE="mysql/mysql-server"
79 SDNC_DB_IMAGE_TAG_REMOTE_PROXY="5.6"
80
81
82 # Control Panel image and tag - uses bronze release
83 CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
84 CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.0.0"
85
86
87 # Near RT RIC Simulator image and tags - uses bronze release
88 RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
89 RIC_SIM_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.0.0"
90
91
92 #Consul remote image and tag
93 CONSUL_IMAGE_BASE="consul"
94 CONSUL_IMAGE_TAG_REMOTE_PROXY="1.7.2"
95 #No local image for Consul, remote image always used
96
97
98 #CBS remote image and tag
99 CBS_IMAGE_BASE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
100 CBS_IMAGE_TAG_REMOTE_RELEASE_ONAP="2.3.0"
101 #No local image for CBS, remote image always used
102
103
104 #MR stub image and tag
105 MRSTUB_IMAGE_BASE="mrstub"
106 MRSTUB_IMAGE_TAG_LOCAL="latest"
107 #No remote image for MR stub, local image always used
108
109
110 #Callback receiver image and tag
111 CR_IMAGE_BASE="callback-receiver"
112 CR_IMAGE_TAG_LOCAL="latest"
113 #No remote image for CR, local image always used
114
115
116 #Producer stub image and tag
117 PROD_STUB_IMAGE_BASE="producer-stub"
118 PROD_STUB_IMAGE_TAG_LOCAL="latest"
119 #No remote image for producer stub, local image always used
120
121
122 # List of app short names produced by the project
123 PROJECT_IMAGES_APP_NAMES="PA SDNC"
124
125 # List of app short names which images pulled from ORAN
126 ORAN_IMAGES_APP_NAMES="CP RICSIM"
127
128 # List of app short names which images pulled from ONAP
129 ONAP_IMAGES_APP_NAMES=""   # Not used
130
131 ########################################
132 # Detailed settings per app
133 ########################################
134
135 # Vars used by docker-compose need to be exported
136
137
138 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
139
140 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
141 export POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
142 export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
143 export POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
144 export POLICY_AGENT_APIS="V1"                                   # Supported northbound api versions
145
146 export POLICY_AGENT_APP_NAME="policy-agent"                     # Name for Policy Agent container
147 POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log"    # Path the application log in the Policy Agent container
148 export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
149
150 export MR_EXTERNAL_PORT=3905                                    # MR stub container external port (host -> container)
151 export MR_INTERNAL_PORT=3905                                    # MR stub container internal port (container -> container)
152 export MR_EXTERNAL_SECURE_PORT=3906                             # MR stub container external secure port (host -> container)
153 export MR_INTERNAL_SECURE_PORT=3906                             # MR stub container internal secure port (container -> container)
154 export MR_APP_NAME="message-router"                             # Name for the MR
155 export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
156 export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE"             # Path write messages to MR
157
158 export CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
159 export CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
160 export CR_EXTERNAL_SECURE_PORT=8091                             # Callback receiver container external secure port (host -> container)
161 export CR_INTERNAL_SECURE_PORT=8091                             # Callback receiver container internal secure port (container -> container)
162 export CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
163
164 export CONSUL_HOST="consul-server"                              # Host name of consul
165 export CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
166 export CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
167 export CONSUL_APP_NAME="polman-consul"                          # Name for consul container
168
169 export CBS_APP_NAME="polman-cbs"                                # Name for CBS container
170 export CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
171 export CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
172 export CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
173
174 export RIC_SIM_BASE="g"                                         # Base name of the RIC Simulator container, shall be the group code
175                                                                 # Note, a prefix is added to each container name by the .env file in the 'ric' dir
176 RIC_SIM_PREFIX="ricsim"                                         # Prefix added to ric container name, added in the .env file in the 'ric' dir
177                                                                 # This prefix can be changed from the command line
178 export RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
179                                                                 # (external ports allocated by docker)
180 export RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
181                                                                 # (external ports allocated by docker)
182
183 export SDNC_APP_NAME="a1-controller"                            # Name of the SNDC A1 Controller container
184 export SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
185 export SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
186 export SDNC_EXTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container external securee port (host -> container)
187 export SDNC_INTERNAL_SECURE_PORT=8443                           # SNDC A1 Controller container internal secure port (container -> container)
188 export SDNC_DB_APP_NAME="sdnc-db"                               # Name of the SDNC DB container
189 export SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter"                  # SDNC truststore password
190 SDNC_USER="admin"                                               # SDNC username
191 SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"          # SNDC PWD
192 SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path for SNDC API
193 SDNC_ALIVE_URL="/apidoc/explorer/"                              # Base url path for SNDC API docs (for alive check)
194 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
195
196
197 export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
198 export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
199 export CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
200 CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log"         # Path the application log in the Control Panel container
201
202
203 ########################################
204 # Setting for common curl-base function
205 ########################################
206
207
208 UUID=""                                                         # UUID used as prefix to the policy id to simulate a real UUID
209                                                                 # Testscript need to set the UUID to use other this empty prefix is used
210
211 RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT         # Base url to the Agent NB REST interface
212 RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
213 DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT                  # Base url to the Dmaap adapter, http
214 DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT   # Base url to the Dmaap adapter, https
215 ADAPTER=$RESTBASE                                               # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
216                                                                 # The values of this var is swiched between the two base url when needed