Add simulator helm charts for Network Slicing use case.
Issue-ID: INT-147
Signed-off-by: xuegao <xue.gao@intl.att.com>
Change-Id: I6472ed9aacff942ebfcd4f4b2c914961471ef762
Signed-off-by: xuegao <xue.gao@intl.att.com>
--- /dev/null
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ORAN SMO Package
+# ================================================================================
+# Copyright (C) 2022 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+SCRIPT=$(readlink -f "$0")
+SCRIPT_PATH=$(dirname "$SCRIPT")
+cd $SCRIPT_PATH
+
+FLAVOUR=$1
+if [ -z "$1" ]
+ then
+ echo "No helm override flavour supplied, going to default"
+ FLAVOUR="default"
+fi
+
+timestamp=$(date +%s)
+
+echo "Starting ONAP namespaces ..."
+../sub-scripts/install-onap.sh ../../helm-override/$FLAVOUR/onap-override.yaml $timestamp
+
+kubectl get pods -n onap
+kubectl get namespaces
POLICY_API_URL = "https://"+subprocess.run("kubectl get services policy-api -n onap |grep policy-api | awk '{print $3}'", shell=True, check=True, stdout=subprocess.PIPE).stdout.decode('utf-8').strip()+":6969"
SDNC_URL = "http://"+subprocess.run("kubectl get services sdnc-oam -n onap |grep sdnc-oam | awk '{print $3}'", shell=True, check=True, stdout=subprocess.PIPE).stdout.decode('utf-8').strip()+":8282"
CLAMP_URL = "https://"+subprocess.run("kubectl get services policy-clamp-be -n onap |grep policy-clamp-be | awk '{print $3}'", shell=True, check=True, stdout=subprocess.PIPE).stdout.decode('utf-8').strip()+":8443"
+OOF_URL = "https://"+subprocess.run("kubectl get services oof-has-api -n onap |grep oof-has-api | awk '{print $3}'", shell=True, check=True, stdout=subprocess.PIPE).stdout.decode('utf-8').strip()+":8091"
### Network simulators topology
NETWORK_SIMULATORS_RU_LIST = ["o-ru-11211","o-ru-11221","o-ru-11222","o-ru-11223"]
CLAMP_CHECK_TIMEOUT = 900
NETWORK_SIMULATOR_CHECK_RETRY = 30
NETWORK_SIMULATOR_CHECK_TIMEOUT = 900
+DEFAULT_CHECK_RETRY = 30
+DEFAULT_CHECK_TIMEOUT = 900
--- /dev/null
+#!/usr/bin/env python3
+###
+# ============LICENSE_START=======================================================
+# ORAN SMO PACKAGE - PYTHONSDK TESTS
+# ================================================================================
+# Copyright (C) 2022 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+"""Module called by pytest."""
+import logging
+import logging.config
+from onapsdk.configuration import settings
+from waiting import wait
+from preparation.ns_simulators import NsSimulators
+from oransdk.utils.healthcheck import HealthCheck
+
+logging.config.dictConfig(settings.LOG_CONFIG)
+logger = logging.getLogger("Test Session setup")
+
+ns_sims = NsSimulators()
+
+###### Entry points of PYTEST Session
+def pytest_sessionstart():
+ """Pytest calls it when starting a test session."""
+ logger.info("Check and wait for SMO to be running")
+ wait(lambda: HealthCheck.is_onap_up(18), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="SMO to be ready")
+ logger.info("Check and wait for for Policy to be running")
+ wait(lambda: HealthCheck.policy_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="Policy to be ready")
+ logger.info("Check and wait for for SDNC to be running")
+ wait(lambda: HealthCheck.sdnc_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="SDNC to be ready")
+ logger.info("Check and wait for for SDC to be running")
+ wait(lambda: HealthCheck.sdc_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="SDC to be ready")
+ logger.info("Check and wait for for AAI to be running")
+ wait(lambda: HealthCheck.aai_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="AAI to be ready")
+ logger.info("Check and wait for for SO to be running")
+ wait(lambda: HealthCheck.so_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="SO to be ready")
+ logger.info("Check and wait for for MSB to be running")
+ wait(lambda: HealthCheck.msb_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="MSB to be ready")
+ logger.info("Check and wait for for OOF to be running")
+ wait(lambda: HealthCheck.oof_component_ready(), sleep_seconds=settings.DEFAULT_CHECK_RETRY, timeout_seconds=settings.DEFAULT_CHECK_TIMEOUT, waiting_for="OOF to be ready")
+
+ ## Just kill any simulators that could already be running
+ ns_sims.stop_and_wait_ns_simulators()
+
+ ###### END of FIRST start, now we can start the sims for the real tests.
+ logger.info("Tests session setup is ready")
--- /dev/null
+#!/usr/bin/env python3
+###
+# ============LICENSE_START=======================================================
+# ORAN SMO PACKAGE - PYTHONSDK TESTS
+# ================================================================================
+# Copyright (C) 2022 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+"""Network Slicing Simulators module."""
+import logging
+import logging.config
+from subprocess import check_output, run
+from onapsdk.configuration import settings
+from waiting import wait
+
+logging.config.dictConfig(settings.LOG_CONFIG)
+logger = logging.getLogger("Network Slicing Simulators k8s")
+
+class NsSimulators():
+ """Network Slicing simulators controls the simulators k8s deployment."""
+
+ @staticmethod
+ def start_ns_simulators():
+ """Start all simulators."""
+ logger.info("Start the network slicing simulators")
+ cmd = "kubectl create namespace nssimulators"
+ check_output(cmd, shell=True).decode('utf-8')
+ cmd = f"helm install --debug ns-simulators local/ns-simulators --namespace nssimulators"
+ check_output(cmd, shell=True).decode('utf-8')
+
+ def start_and_wait_ns_simulators(self):
+ """Start and wait for all simulators."""
+ logger.info("Start the network slicing simulators")
+ self.start_ns_simulators()
+ NsSimulators.wait_for_ns_simulators_to_be_running()
+
+ def stop_and_wait_ns_simulators(self):
+ """Stop and wait for all simulators."""
+ logger.info("Stop the network slicing simulators")
+ self.stop_ns_simulators()
+ NsSimulators.wait_for_ns_simulators_to_be_stopped()
+
+ @staticmethod
+ def stop_ns_simulators():
+ """Stop the simulators."""
+ logger.info("Clean up any network slicing simulators")
+ cmd = "kubectl delete namespace nssimulators"
+ run(cmd, shell=True, check=False)
+
+ @staticmethod
+ def is_ns_simulators_up() -> bool:
+ """Check if the network slicing simulators are up."""
+ cmd = "kubectl get pods --field-selector status.phase!=Running -n nssimulators"
+ result = check_output(cmd, shell=True).decode('utf-8')
+ logger.info("Checking if network slicing simulators is UP: %s", result)
+ if result == '':
+ logger.info("Network slicing sims is Up")
+ return True
+ logger.info("Network slicing sims is Down")
+ return False
+
+
+ @staticmethod
+ def wait_for_ns_simulators_to_be_running():
+ """Check and wait for the network slicing sims to be running."""
+ wait(lambda: NsSimulators.is_ns_simulators_up(), sleep_seconds=settings.NETWORK_SIMULATOR_CHECK_RETRY, timeout_seconds=settings.NETWORK_SIMULATOR_CHECK_TIMEOUT, waiting_for="Network slicing simulators to be ready")
+
+ @staticmethod
+ def is_ns_simulators_stopped() -> bool:
+ """Check if the network slicing simulators are stopped."""
+ cmd = "kubectl get ns | grep nssimulators | wc -l"
+ result = check_output(cmd, shell=True).decode('utf-8')
+ logger.info("Checking if network slicing simulators is stopped: %s", result)
+ if int(result) == 0:
+ logger.info("Network slicing sims are Down")
+ return True
+ logger.info("Network slicing sims is still Up")
+ return False
+
+ @staticmethod
+ def wait_for_ns_simulators_to_be_stopped():
+ """Check and wait for the network slicing sims to be stopped."""
+ wait(lambda: NsSimulators.is_ns_simulators_stopped(), sleep_seconds=settings.NETWORK_SIMULATOR_CHECK_RETRY, timeout_seconds=settings.NETWORK_SIMULATOR_CHECK_TIMEOUT, waiting_for="Network slicing simulators to be ready")
import pytest
from onapsdk.configuration import settings
from preparation.aai_preparation import AaiPreparation
+from preparation.ns_simulators import NsSimulators
from preparation.oof_preparation import OofPreparation
from preparation.sdc_preparation import SdcPreparation
from preparation.so_preparation import SoPreparation
oofPreparation = OofPreparation()
msbPreparation = MsbPreparation()
uuiPreparation = UuiPreparation()
+ns_sims = NsSimulators()
@pytest.fixture(scope="module", autouse=True)
def pre_config():
"""Set the onap components before executing the tests."""
logger.info("Test class setup for Network Slicing usecase Option2")
+ logger.info("Start needed simulators")
+ ns_sims.start_and_wait_ns_simulators()
+
logger.info("PreConfig Step1: Create SDC Templates")
res = sdcPreparation.prepare_sdc()
cst_id = res[0]
### Cleanup code
yield
logger.info("Start to cleanup user case specific configurations")
+ ns_sims.stop_and_wait_ns_simulators()
#aaiPreparation.cleanup_aai()
#soPreparation.cleanup_so()
#oofPreparation.cleanup_oof()
import logging
import logging.config
import os
-from requests import RequestException
from onapsdk.configuration import settings
-from onapsdk.exceptions import ConnectionFailed, APIError
from waiting import wait
-from urllib3.exceptions import NewConnectionError
-from oransdk.dmaap.dmaap import OranDmaap
-from oransdk.policy.clamp import ClampToscaTemplate
-from oransdk.policy.policy import OranPolicy
-from oransdk.sdnc.sdnc import OranSdnc
+from oransdk.utils.healthcheck import HealthCheck
from smo.smo import Smo
from smo.network_simulators import NetworkSimulators
+
# Set working dir as python script location
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
network_sims = NetworkSimulators("./resources")
smo = Smo()
-clamp = ClampToscaTemplate(settings.CLAMP_BASICAUTH)
-dmaap = OranDmaap()
-sdnc = OranSdnc()
-policy = OranPolicy()
-
-def policy_component_ready():
- """Check if components are ready."""
- logger.info("Verify policy components are ready")
- try:
- policy_ready = {"api_ready": False, "pap_ready": False, "apex_ready": False}
- except (RequestException, NewConnectionError, ConnectionFailed, APIError) as e:
- logger.error(e)
- return False
- policy_status = policy.get_components_status(settings.POLICY_BASICAUTH)
- if (policy_status["api"]["healthy"] and not policy_ready["api_ready"]):
- logger.info("Policy Api is ready")
- policy_ready["api_ready"] = True
- if (policy_status["pap"]["healthy"] and not policy_ready["pap_ready"]):
- logger.info("Policy Pap is ready")
- policy_ready["pap_ready"] = True
- if (len(policy_status["pdps"]["apex"]) > 0 and policy_status["pdps"]["apex"][0]["healthy"] == "HEALTHY" and not policy_ready["apex_ready"]):
- logger.info("Policy Apex is ready")
- policy_ready["apex_ready"] = True
- return policy_ready["api_ready"] and policy_ready["pap_ready"] and policy_ready["apex_ready"]
-
-def sdnc_component_ready():
- """Check if SDNC component is ready."""
- logger.info("Verify sdnc component is ready")
-
- try:
- response = OranSdnc.get_events(settings.SDNC_BASICAUTH, "test")
- except (RequestException, NewConnectionError, ConnectionFailed, APIError) as e:
- logger.error(e)
- return False
- return response.status_code == 200
-
-def clamp_component_ready():
- """Check if Clamp component is ready."""
- logger.info("Verify Clamp component is ready")
- try:
- response = clamp.get_template_instance()
- except (RequestException, NewConnectionError, ConnectionFailed, APIError) as e:
- logger.error(e)
- return False
- return response["automationCompositionList"] is not None
###### Entry points of PYTEST Session
def pytest_sessionstart():
"""Pytest calls it when starting a test session."""
logger.info("Check and wait for SMO to be running")
smo.wait_for_smo_to_be_running()
- logger.info("Check and for for SDNC to be running")
- wait(lambda: policy_component_ready(), sleep_seconds=settings.POLICY_CHECK_RETRY, timeout_seconds=settings.POLICY_CHECK_TIMEOUT, waiting_for="Policy to be ready")
- wait(lambda: sdnc_component_ready(), sleep_seconds=settings.SDNC_CHECK_RETRY, timeout_seconds=settings.SDNC_CHECK_TIMEOUT, waiting_for="SDNC to be ready")
- # disable for now, until policy/clamp issue has been fixed
- wait(lambda: clamp_component_ready(), sleep_seconds=settings.CLAMP_CHECK_RETRY, timeout_seconds=settings.CLAMP_CHECK_TIMEOUT, waiting_for="Clamp to be ready")
+
+ logger.info("Check and wait for for Policy to be running")
+ wait(lambda: HealthCheck.policy_component_ready(), sleep_seconds=settings.POLICY_CHECK_RETRY, timeout_seconds=settings.POLICY_CHECK_TIMEOUT, waiting_for="Policy to be ready")
+ logger.info("Check and wait for for SDNC to be running")
+ wait(lambda: HealthCheck.sdnc_component_ready(), sleep_seconds=settings.SDNC_CHECK_RETRY, timeout_seconds=settings.SDNC_CHECK_TIMEOUT, waiting_for="SDNC to be ready")
+ logger.info("Check and wait for for Clamp to be running")
+ wait(lambda: HealthCheck.clamp_component_ready(), sleep_seconds=settings.CLAMP_CHECK_RETRY, timeout_seconds=settings.CLAMP_CHECK_TIMEOUT, waiting_for="Clamp to be ready")
## Just kill any simulators that could already be runnin
network_sims.stop_network_simulators()
# See the License for the specific language governing permissions and
# limitations under the License.
-PARENT_CHART := oran-tests-suite ru-du-simulators
+PARENT_CHART := oran-tests-suite ru-du-simulators ns-simulators
COMMON_CHARTS_DIR := nonrtric-common aux-common ric-common
# FIXME OOM-765
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+apiVersion: v1
+appVersion: "1.0.0"
+description: A Helm chart for core nssmf simulator
+name: actn-simulator
+version: 1.0.0
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+{{- range $nodePort := .Values.service.nodePorts }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ labels:
+ sim-name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ sim-name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ template:
+ metadata:
+ labels:
+ sim-name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+ annotations:
+ checksum/config: {{ print "$.Values.config.name-$port" | sha256sum }}
+ spec:
+ hostname: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ containers:
+ - name: {{ $.Chart.Name }}
+ image: "{{ $.Values.image.repository }}/{{ $.Values.image.name}}:{{ $.Values.image.tag }}"
+ imagePullPolicy: {{ $.Values.image.pullPolicy }}
+ tty: true
+ stdin: true
+
+ {{- end }}
\ No newline at end of file
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+{{ range $nodePort := .Values.service.nodePorts }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ labels:
+ sim-name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+spec:
+ type: {{ $.Values.service.type }}
+ ports:
+ - port: {{ $.Values.service.port }}
+ nodePort: {{ $nodePort }}
+ selector:
+ sim-name: "{{ $.Values.config.name }}-{{ $nodePort }}"
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+
+ {{ end }}
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+image:
+ repository: registry.hub.docker.com
+ name: dzhanghuawei/pncsimulator
+ tag: 1.1.0
+ pullPolicy: IfNotPresent
+
+service:
+ port: 8181
+ type: NodePort
+ nodePorts:
+ - 30181
+ - 30182
+
+
+config:
+ name: pncsimu
+
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+appVersion: "1.0.0"
+description: A Helm chart for core nssmf simulator
+name: core-nssmf-simulator
+version: 1.0.0
--- /dev/null
+server.port={{ .Values.service.ports.port }}
+notifyurl=http://192.168.235.25:30472/v1/pm/notification
+ftppath=sftp://root:oom@192.168.235.25:22/home/ubuntu/dcae/PM.tar.gz
+fixeddelay=900000
+filepath=/app/dcae
+amffilepath=/app/dcae/AMF.xml.gz
+upffilepath=/app/dcae/UPF.xml.gz
+
+logging.file=/root/luk/simulator/log
+
+spring.jackson.default-property-inclusion=NON_NULL
+#logging.path=/home/ubuntu/dcae/
+#logging.file=simulator.log
+
+server.ssl.key-store=/home/onap/app/luk.keystore
+server.ssl.key-store-password=tomcat
+server.ssl.keyStoreType=JKS
+server.ssl.keyAlias:luk
\ No newline at end of file
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ $.Values.config.name }}-configmap
+ labels:
+ sim-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+data:
+{{ tpl ($.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ $.Values.config.name }}-keystore
+ labels:
+ sim-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+type: Opaque
+data:
+ {{ tpl ($.Files.Glob "resources/config/luk.keystore").AsSecrets . | indent 2 }}
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ $.Values.config.name }}
+ labels:
+ sim-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+spec:
+ replicas: {{ $.Values.replicaCount }}
+ selector:
+ matchLabels:
+ sim-name: {{ $.Values.config.name }}
+ template:
+ metadata:
+ labels:
+ sim-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+ annotations:
+ checksum/config: {{ print .Values | sha256sum }}
+ spec:
+ hostname: "{{ $.Values.config.name }}"
+ containers:
+ - name: {{ $.Chart.Name }}
+ image: "{{ $.Values.image.repository }}/{{ $.Values.image.name}}:{{ $.Values.image.tag }}"
+ imagePullPolicy: {{ $.Values.image.pullPolicy }}
+ command:
+ - /home/onap/startup.sh
+ ports:
+ - containerPort: {{ $.Values.service.ports.port }}
+ protocol: TCP
+ volumeMounts:
+ - name: {{ $.Values.config.name }}-config-volume
+ subPath: application.properties
+ mountPath: /app/application.properties
+ - name: {{ $.Values.config.name }}-keystore
+ subPath: luk.keystore
+ mountPath: /app/luk.keystore
+ volumes:
+ - name: {{ $.Values.config.name }}-config-volume
+ configMap:
+ name: {{ $.Values.config.name }}-configmap
+ items:
+ - key: application.properties
+ path: application.properties
+ - name: {{ $.Values.config.name }}-keystore
+ secret:
+ secretName: {{ $.Values.config.name }}-keystore
+ items:
+ - key: luk.keystore
+ path: luk.keystore
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: "{{ $.Values.config.name }}"
+ labels:
+ sim-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+spec:
+ type: {{ $.Values.service.type }}
+ ports:
+ - port: {{ $.Values.service.ports.port }}
+ nodePort: {{ $.Values.service.ports.port }}
+ selector:
+ tests-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
\ No newline at end of file
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+image:
+ repository: 'nexus3.onap.org:10001'
+ name: core-nssmf-simulator
+ tag: 1.0.0
+ pullPolicy: IfNotPresent
+
+service:
+ type: NodePort
+ ports:
+ port: 31111
+
+config:
+ name: core-nssmf-simulator
+
--- /dev/null
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+
+apiVersion: v1
+name: ns-simulators
+version: 1.0.0
+appVersion: test
+description: Network Slicing simulators
+home: https://www.onap.org
+sources:
+- https://gerrit.onap.org/r/#/admin/projects/
+icon: https://wiki.onap.org/download/thumbnails/1015829/onap_704x271%20copy.png?version=1&modificationDate=1488326334000&api=v2
+kubeVersion: ">=1.11.5-0"
--- /dev/null
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+
+dependencies:
+ - name: actn-simulator
+ version: ~1.0.0
+ repository: "@local"
+ condition: ns-simulators.actn-simulator
+
+ - name: core-nssmf-simulator
+ version: ~1.0.0
+ repository: "@local"
+ condition: ns-simulators.core-nssmf-simulator
+
+ - name: ran-nssmf-simulator
+ version: ~1.0.0
+ repository: "@local"
+ condition: ns-simulators.ran-nssmf-simulator
--- /dev/null
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+
+ns-simulators:
+ actn-simulator: true
+ core-nssmf-simulator: true
+ ran-nssmf-simulator: true
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+appVersion: "1.0.0"
+description: A Helm chart for ran nssmf simulator
+name: ran-nssmf-simulator
+version: 1.0.0
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: "{{ $.Values.config.name }}"
+ labels:
+ sim-name: "{{ $.Values.config.name }}"
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ sim-name: "{{ $.Values.config.name }}"
+ template:
+ metadata:
+ labels:
+ sim-name: "{{ $.Values.config.name }}"
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+ annotations:
+ checksum/config: {{ print .Values | sha256sum }}
+ spec:
+ hostname: "{{ $.Values.config.name }}"
+ containers:
+ - name: {{ $.Chart.Name }}
+ image: "{{ $.Values.image.repository }}/{{ $.Values.image.name}}:{{ $.Values.image.tag }}"
+ imagePullPolicy: {{ $.Values.image.pullPolicy }}
+ tty: true
+ stdin: true
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+apiVersion: v1
+kind: Service
+metadata:
+ name: "{{ $.Values.config.name }}"
+ labels:
+ sim-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
+spec:
+ type: {{ $.Values.service.type }}
+ ports:
+ - port: 8443
+ nodePort: {{ $.Values.service.nodePorts }}
+ selector:
+ tests-name: {{ $.Values.config.name }}
+ release: {{ $.Release.Name }}
+ chart: {{ $.Chart.Name }}
\ No newline at end of file
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright © 2022 AT&T Intellectual Property
+#
+# 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.
+# Static Defaults
+# ============LICENSE_END=========================================================
+image:
+ repository: 'nexus3.onap.org:10001'
+ name: onap/ran-nssmf-simulator
+ tag: 1.0.0
+ pullPolicy: IfNotPresent
+
+service:
+ type: NodePort
+ nodePort: 18443
+
+config:
+ name: ran-nssmf-simulator
+