Upgraded test env with Kubernetes support
Issue-ID: NONRTRIC-356
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I942b37c05077b3ba753b3327455d6babed8f6061
diff --git a/test/simulator-group/control_panel/app.yaml b/test/simulator-group/control_panel/app.yaml
new file mode 100644
index 0000000..a962f3d
--- /dev/null
+++ b/test/simulator-group/control_panel/app.yaml
@@ -0,0 +1,37 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: $CONTROL_PANEL_APP_NAME
+ namespace: $KUBE_NONRTRIC_NAMESPACE
+ labels:
+ run: $CONTROL_PANEL_APP_NAME
+ autotest: CP
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ run: $CONTROL_PANEL_APP_NAME
+ template:
+ metadata:
+ labels:
+ run: $CONTROL_PANEL_APP_NAME
+ autotest: CP
+ spec:
+ containers:
+ - name: $CONTROL_PANEL_APP_NAME
+ image: $CONTROL_PANEL_IMAGE
+ imagePullPolicy: Never
+ ports:
+ - name: http
+ containerPort: $CONTROL_PANEL_INTERNAL_PORT
+ - name: https
+ containerPort: $CONTROL_PANEL_INTERNAL_SECURE_PORT
+ volumeMounts:
+ - mountPath: $CONTROL_PANEL_CONFIG_MOUNT_PATH/$CONTROL_PANEL_CONFIG_FILE
+ subPath: $CONTROL_PANEL_CONFIG_FILE
+ name: cp-conf-name
+ volumes:
+ - configMap:
+ defaultMode: 420
+ name: $CP_CONFIG_CONFIGMAP_NAME
+ name: cp-conf-name
\ No newline at end of file
diff --git a/test/simulator-group/control_panel/application.properties b/test/simulator-group/control_panel/application.properties
new file mode 100644
index 0000000..2fc7093
--- /dev/null
+++ b/test/simulator-group/control_panel/application.properties
@@ -0,0 +1,37 @@
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+server.port = 8082
+server.ssl.key-store-type = PKCS12
+server.ssl.key-store-password = ericsson_kwdjfhw
+server.ssl.key-store = classpath:keystore.jks
+server.ssl.key-password = ericsson_kwdjfhw
+server.http.port = 8080
+# https api
+policycontroller.url.prefix = https://${POLICY_AGENT_DOMAIN_NAME}:${POLICY_AGENT_EXTERNAL_SECURE_PORT}
+
+userfile = users.json
+portalapi.decryptor = org.oransc.portal.nonrtric.controlpanel.portalapi.PortalSdkDecryptorAes
+portalapi.usercookie = UserId
+portalapi.security = false
+portalapi.appname = Non-RT RIC Control Panel
+portalapi.username = Default
+portalapi.password = password
+
+# URL for enrichment coordinator service
+enrichmentcontroller.url.prefix = https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}/ei-producer/v1
+
+# Mimic slow endpoints by defining sleep period, in milliseconds
+mock.config.delay = 0
diff --git a/test/simulator-group/control_panel/docker-compose.yml b/test/simulator-group/control_panel/docker-compose.yml
index 4e86f3c..0d603a0 100644
--- a/test/simulator-group/control_panel/docker-compose.yml
+++ b/test/simulator-group/control_panel/docker-compose.yml
@@ -18,7 +18,7 @@
networks:
default:
external:
- name: nonrtric-docker-net
+ name: ${DOCKER_SIM_NWNAME}
services:
control-panel:
image: ${CONTROL_PANEL_IMAGE}
@@ -27,6 +27,6 @@
- default
ports:
- ${CONTROL_PANEL_EXTERNAL_PORT}:${CONTROL_PANEL_INTERNAL_PORT}
-
+ - ${CONTROL_PANEL_EXTERNAL_SECURE_PORT}:${CONTROL_PANEL_INTERNAL_SECURE_PORT}
diff --git a/test/simulator-group/control_panel/svc.yaml b/test/simulator-group/control_panel/svc.yaml
new file mode 100644
index 0000000..85a4682
--- /dev/null
+++ b/test/simulator-group/control_panel/svc.yaml
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: $CONTROL_PANEL_APP_NAME
+ namespace: $KUBE_NONRTRIC_NAMESPACE
+ labels:
+ run: $CONTROL_PANEL_APP_NAME
+ autotest: CP
+spec:
+ type: ClusterIP
+ ports:
+ - port: $CONTROL_PANEL_EXTERNAL_PORT
+ targetPort: $CONTROL_PANEL_INTERNAL_PORT
+ protocol: TCP
+ name: http
+ - port: $CONTROL_PANEL_EXTERNAL_SECURE_PORT
+ targetPort: $CONTROL_PANEL_INTERNAL_SECURE_PORT
+ protocol: TCP
+ name: https
+ selector:
+ run: $CONTROL_PANEL_APP_NAME
\ No newline at end of file