Further updates to the auto-test environment
[nonrtric.git] / test / common / test_env.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
20 # Set up the image and tags for the test. Do not add the image tag to the image names.
21
22 # NOTE: A env var for each container is created by the test script.
23 # This var will point to the local or remote var depending on how
24 # the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
25
26 # Local Policy Agent image and tag
27 POLICY_AGENT_LOCAL_IMAGE="o-ran-sc/nonrtric-policy-agent"
28 POLICY_AGENT_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
29 # Remote Policy Agent image and tag
30 POLICY_AGENT_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent"
31 POLICY_AGENT_REMOTE_IMAGE_TAG="1.0.0"
32
33
34 # Control Panel local image and tag
35 CONTROL_PANEL_LOCAL_IMAGE="o-ran-sc/nonrtric-controlpanel"
36 CONTROL_PANEL_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
37 # Control Panel remote image and tag
38 CONTROL_PANEL_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel"
39 CONTROL_PANEL_REMOTE_IMAGE_TAG="1.0.0"
40
41
42 # SDNC A1 Controller local image and tag
43 SDNC_A1_CONTROLLER_LOCAL_IMAGE="o-ran-sc/nonrtric-a1-controller"
44 SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG="1.0.0-SNAPSHOT"
45 # SDNC A1 Controller remote image and tag
46 SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-a1-controller"
47 SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="1.7.4"
48
49
50 #SDNC DB remote image and tag
51 SDNC_DB_REMOTE_IMAGE="mysql/mysql-server"
52 SDNC_DB_REMOTE_IMAGE_TAG="5.6"
53 #No local image for DB, remote image always used
54
55
56 # SDNC ONAP A1 Adapte remote image and tag
57 SDNC_ONAP_A1_ADAPTER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
58 SDNC_ONAP_A1_ADAPTER_REMOTE_IMAGE_TAG="1.8-STAGING-latest"
59 #No local image for the A1 adapter, remote image always used
60
61 #ONAP A1 Adatper remote image and tag
62 SDNC_ONAP_DB_REMOTE_IMAGE="mysql/mysql-server"
63 SDNC_ONAP_DB_REMOTE_IMAGE_TAG="5.6"
64 #No local image for DB, remote image always used
65
66
67 # Near RT RIC Simulator local image and tag
68 RIC_SIM_LOCAL_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
69 RIC_SIM_LOCAL_IMAGE_TAG="latest"
70 # Near RT RIC Simulator remote image and tag
71 RIC_SIM_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
72 RIC_SIM_REMOTE_IMAGE_TAG="1.0.1"
73
74 RIC_SIM_REMOTE_IMAGE="a1test"
75 RIC_SIM_REMOTE_IMAGE_TAG="latest"
76
77
78 #Consul remote image and tag
79 CONSUL_REMOTE_IMAGE="consul"
80 CONSUL_REMOTE_IMAGE_TAG="1.7.2"
81 #No local image for Consul, remote image always used
82
83
84 #CBS remote image and tag
85 CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
86 CBS_REMOTE_IMAGE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
87 CBS_REMOTE_IMAGE_TAG="2.3.0"
88 #No local image for CBS, remote image always used
89
90
91 #MR stub image and tag
92 MRSTUB_LOCAL_IMAGE="mrstub"
93 MRSTUB_LOCAL_IMAGE_TAG="latest"
94 #No remote image for MR stub, local image always used
95
96 #Callback receiver image and tag
97 CR_LOCAL_IMAGE="callback-receiver"
98 CR_LOCAL_IMAGE_TAG="latest"
99 #No remote image for CR, local image always used
100
101 # Common env var for auto-test. Vars used by docker-compose need to be exported
102 export DOCKER_SIM_NWNAME="nonrtric-docker-net"                  # Name of docker private network
103
104 export POLICY_AGENT_EXTERNAL_PORT=8081                          # Policy Agent container external port (host -> container)
105 export POLICY_AGENT_INTERNAL_PORT=8081                          # Policy Agent container internal port (container -> container)
106 export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433                   # Policy Agent container external secure port (host -> container)
107 export POLICY_AGENT_INTERNAL_SECURE_PORT=8433                   # Policy Agent container internal secure port (container -> container)
108
109 export POLICY_AGENT_APP_NAME="policy-agent"                     # Name for Policy Agent container
110 POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log"    # Path the application log in the Policy Agent container
111 export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container"     # Alias name, name used by the control panel
112
113 export MR_EXTERNAL_PORT=3905                                    # MR stub container external port (host -> container)
114 export MR_INTERNAL_PORT=3905                                    # MR stub container internal port (container -> container)
115 export MR_EXTERNAL_SECURE_PORT=3906                             # MR stub container external secure port (host -> container)
116 export MR_INTERNAL_SECURE_PORT=3906                             # MR stub container internal secure port (container -> container)
117 export MR_APP_NAME="message-router"                             # Name for the MR
118
119 export CR_EXTERNAL_PORT=8090                                    # Callback receiver container external port (host -> container)
120 export CR_INTERNAL_PORT=8090                                    # Callback receiver container internal port (container -> container)
121 export CR_APP_NAME="callback-receiver"                          # Name for the Callback receiver
122
123 export CONSUL_HOST="consul-server"                              # Host name of consul
124 export CONSUL_EXTERNAL_PORT=8500                                # Consul container external port (host -> container)
125 export CONSUL_INTERNAL_PORT=8500                                # Consul container internal port (container -> container)
126 export CONSUL_APP_NAME="polman-consul"                          # Name for consul container
127
128 export CBS_APP_NAME="polman-cbs"                                # Name for CBS container
129 export CBS_EXTERNAL_PORT=10000                                  # CBS container external port (host -> container)
130 export CBS_INTERNAL_PORT=10000                                  # CBS container internal port (container -> container)
131 export CONFIG_BINDING_SERVICE="config-binding-service"          # Host name of CBS
132
133 export RIC_SIM_BASE="g"                                         # Base name of the RIC Simulator container, shall be the group code
134                                                                 # Note, a prefix is added to each container name by the .env file in the 'ric' dir
135 RIC_SIM_PREFIX="ricsim"                                         # Prefix added to ric container name, added in the .env file in the 'ric' dir
136 export RIC_SIM_INTERNAL_PORT=8085                               # RIC Simulator container internal port (container -> container).
137                                                                 # (external ports allocated by docker)
138 export RIC_SIM_INTERNAL_SECURE_PORT=8185                        # RIC Simulator container internal secure port (container -> container).
139                                                                 # (external ports allocated by docker)
140
141 export SDNC_APP_NAME="a1-controller"                            # Name of the SNDC A1 Controller container
142 export SDNC_EXTERNAL_PORT=8282                                  # SNDC A1 Controller container external port (host -> container)
143 export SDNC_INTERNAL_PORT=8181                                  # SNDC A1 Controller container internal port (container -> container)
144 export SDNC_DB_APP_NAME="sdnc-db"                               # Name of the SDNC DB container
145 SDNC_USER="admin"                                               # SDNC username
146 SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"          # SNDC PWD
147 SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:"             # Base url path for SNDC API
148 SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"           # Path to karaf log
149
150 export SDNC_ONAP_APP_NAME="a1-adapter"                          # Name of the ONAP A1 Adapter container
151 export SDNC_ONAP_EXTERNAL_PORT=8282                             # ONAP A1 Adapter container external port (host -> container)
152 export SDNC_ONAP_INTERNAL_PORT=8181                             # ONAP A1 Adapter container internal port (container -> container)
153 export SDNC_ONAP_DB_APP_NAME="sdnc-onap-db"                     # Name of the ONAP A1 Adapter DB container
154 SDNC_ONAP_USER="admin"                                          # ONAP A1 Adapter username
155 SDNC_ONAP_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"     # ONAP A1 Adapter PWD
156 SDNC_ONAP_API_URL="/restconf/operations/A1-ADAPTER-API:"        # Base url path for ONAP A1 Adapter API
157 SDNC_ONAP_PROPERTIES_FILE="/opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties"
158 SDNC_ONAP_KARAF_LOG="/opt/opendaylight/data/log/karaf.log"      # Path to karaf log
159
160 export CONTROL_PANEL_APP_NAME="control-panel"                   # Name of the Control Panel container
161 export CONTROL_PANEL_EXTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
162 export CONTROL_PANEL_INTERNAL_PORT=8080                         # Control Panel container external port (host -> container)
163 CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log"         # Path the application log in the Control Panel container
164
165 RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT         # Base url to the Agent NB REST interface
166 RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
167 DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT                  # Base url to the Dmaap adapter
168 ADAPTER=$RESTBASE                                               # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
169                                                                 # The values of this var is swiched between the two base url when needed