From a2c2df5014145ee3126146987d9039e397b12407 Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 15 Oct 2021 13:47:31 +0200 Subject: [PATCH] First draft of the SMO package based on the ONAP charts 2 git submodules pointing to Onap oom & MulticloudK8S + scripts to setup K8s node/Build charts/Installation + Helm override for helm config used during the installation + Oran charts reworked so that they can be built like in ONAP OOM + For the verify Job: remove smo-install from dockerfile (another verify job will be added) Signed-off-by: sebdet Signed-off-by: xuegao Issue-ID: NONRTRIC-609 Change-Id: I93425022761bc4e7efce2bd374fb9ef101942fc0 --- .gitmodules | 6 + bin/verify-smo-install | 27 ++ ci/Dockerfile | 2 + ci/Dockerfile-smo-install | 25 ++ smo-install/.gitignore | 24 ++ smo-install/LICENSE | 204 +++++++++++ smo-install/README.md | 192 ++++++++++ .../helm-override/network-simulators-override.yaml | 58 +++ .../network-simulators-topology-override.yaml | 392 ++++++++++++++++++++ smo-install/helm-override/onap-override-cnf.yaml | 381 +++++++++++++++++++ smo-install/helm-override/onap-override.yaml | 404 +++++++++++++++++++++ smo-install/helm-override/oran-override.yaml | 103 ++++++ smo-install/multicloud-k8s | 1 + smo-install/onap_oom | 1 + smo-install/oran_oom/Makefile | 124 +++++++ smo-install/oran_oom/a1controller/.helmignore | 22 ++ smo-install/oran_oom/a1controller/Chart.yaml | 21 ++ .../oran_oom/a1controller/requirements.yaml | 20 + .../a1controller/templates/deployment.yaml | 96 +++++ .../oran_oom/a1controller/templates/service.yaml | 66 ++++ smo-install/oran_oom/a1controller/values.yaml | 40 ++ smo-install/oran_oom/a1simulator/.helmignore | 22 ++ smo-install/oran_oom/a1simulator/Chart.yaml | 21 ++ smo-install/oran_oom/a1simulator/requirements.yaml | 20 + .../oran_oom/a1simulator/templates/service.yaml | 41 +++ .../a1simulator/templates/statefulset.yaml | 172 +++++++++ smo-install/oran_oom/a1simulator/values.yaml | 51 +++ smo-install/oran_oom/aux-common/Chart.yaml | 20 + .../aux-common/templates/_createPassword.tpl | 62 ++++ .../oran_oom/aux-common/templates/_ingress.tpl | 84 +++++ .../oran_oom/aux-common/templates/_mariadb.tpl | 59 +++ .../oran_oom/aux-common/templates/_name.tpl | 41 +++ .../oran_oom/aux-common/templates/_namespace.tpl | 26 ++ .../oran_oom/aux-common/templates/_repository.tpl | 49 +++ .../oran_oom/aux-common/templates/_resources.tpl | 59 +++ .../oran_oom/aux-common/templates/_secret.yaml | 276 ++++++++++++++ .../oran_oom/aux-common/templates/_service.tpl | 31 ++ .../aux-common/templates/_storageClass.tpl | 57 +++ smo-install/oran_oom/aux-common/values.yaml | 20 + smo-install/oran_oom/controlpanel/.helmignore | 22 ++ smo-install/oran_oom/controlpanel/Chart.yaml | 21 ++ .../oran_oom/controlpanel/requirements.yaml | 20 + .../oran_oom/controlpanel/resources/nginx.conf | 28 ++ .../oran_oom/controlpanel/templates/configmap.yaml | 28 ++ .../controlpanel/templates/deployment.yaml | 70 ++++ .../oran_oom/controlpanel/templates/service.yaml | 44 +++ smo-install/oran_oom/controlpanel/values.yaml | 43 +++ .../oran_oom/dmaapadapterservice/Chart.yaml | 21 ++ .../oran_oom/dmaapadapterservice/requirements.yaml | 20 + .../resources/config/application.yaml | 59 +++ .../resources/data/application_configuration.json | 8 + .../dmaapadapterservice/templates/configmap.yaml | 42 +++ .../dmaapadapterservice/templates/service.yaml | 42 +++ .../dmaapadapterservice/templates/statefulset.yaml | 74 ++++ .../oran_oom/dmaapadapterservice/values.yaml | 40 ++ smo-install/oran_oom/du-simulator/Chart.yaml | 5 + .../du-simulator/resources/config/config.json | 74 ++++ .../config/o-ran-sc-du-hello-world-operational.xml | 10 + .../config/o-ran-sc-du-hello-world-running.xml | 10 + .../oran_oom/du-simulator/templates/configmap.yaml | 15 + .../du-simulator/templates/configmapenv.yaml | 41 +++ .../du-simulator/templates/deployment.yaml | 62 ++++ .../oran_oom/du-simulator/templates/service.yaml | 20 + smo-install/oran_oom/du-simulator/values.yaml | 82 +++++ smo-install/oran_oom/enrichmentservice/.helmignore | 22 ++ smo-install/oran_oom/enrichmentservice/Chart.yaml | 21 ++ .../oran_oom/enrichmentservice/requirements.yaml | 20 + .../resources/config/application.yaml | 54 +++ .../enrichmentservice/templates/configmap.yaml | 29 ++ .../enrichmentservice/templates/ingress.yaml | 45 +++ .../enrichmentservice/templates/service.yaml | 42 +++ .../enrichmentservice/templates/statefulset.yaml | 82 +++++ smo-install/oran_oom/enrichmentservice/values.yaml | 45 +++ smo-install/oran_oom/nonrtric-common/Chart.yaml | 20 + .../nonrtric-common/templates/_a1controller.tpl | 24 ++ .../nonrtric-common/templates/_a1simulator.tpl | 30 ++ .../oran_oom/nonrtric-common/templates/_common.tpl | 19 + .../nonrtric-common/templates/_controlpanel.tpl | 24 ++ .../templates/_dmaapadapterservice.tpl | 24 ++ .../templates/_enrichmentservice.tpl | 24 ++ .../nonrtric-common/templates/_nonrtricgateway.tpl | 28 ++ .../templates/_policymanagementservice.tpl | 24 ++ .../templates/_rappcatalogueservice.tpl | 24 ++ smo-install/oran_oom/nonrtric-common/values.yaml | 15 + smo-install/oran_oom/nonrtric/Chart.yaml | 10 + smo-install/oran_oom/nonrtric/requirements.yaml | 75 ++++ smo-install/oran_oom/nonrtric/templates/pv1.yaml | 35 ++ smo-install/oran_oom/nonrtric/templates/pv2.yaml | 36 ++ smo-install/oran_oom/nonrtric/values.yaml | 41 +++ smo-install/oran_oom/nonrtricgateway/.helmignore | 22 ++ smo-install/oran_oom/nonrtricgateway/Chart.yaml | 21 ++ .../oran_oom/nonrtricgateway/requirements.yaml | 20 + .../resources/config/application.yaml | 52 +++ .../nonrtricgateway/templates/configmap.yaml | 29 ++ .../nonrtricgateway/templates/deployment.yaml | 66 ++++ .../nonrtricgateway/templates/service.yaml | 37 ++ smo-install/oran_oom/nonrtricgateway/values.yaml | 38 ++ smo-install/oran_oom/oru-app/Chart.yaml | 5 + .../oru-app/resources/config/o-ru-to-o-du-map.txt | 8 + .../oran_oom/oru-app/templates/configmap.yaml | 10 + .../oran_oom/oru-app/templates/configmapenv.yaml | 15 + .../oran_oom/oru-app/templates/deployment.yaml | 48 +++ .../oran_oom/oru-app/templates/service.yaml | 17 + smo-install/oran_oom/oru-app/values.yaml | 25 ++ .../oran_oom/policymanagementservice/.helmignore | 22 ++ .../oran_oom/policymanagementservice/Chart.yaml | 21 ++ .../policymanagementservice/requirements.yaml | 20 + .../resources/config/application.yaml | 69 ++++ .../resources/data/application_configuration.json | 84 +++++ .../templates/configmap.yaml | 42 +++ .../policymanagementservice/templates/ingress.yaml | 38 ++ .../policymanagementservice/templates/service.yaml | 42 +++ .../templates/statefulset.yaml | 87 +++++ .../oran_oom/policymanagementservice/values.yaml | 48 +++ .../oran_oom/rappcatalogueservice/Chart.yaml | 21 ++ .../rappcatalogueservice/requirements.yaml | 20 + .../rappcatalogueservice/templates/deployment.yaml | 61 ++++ .../rappcatalogueservice/templates/service.yaml | 42 +++ .../oran_oom/rappcatalogueservice/values.yaml | 40 ++ smo-install/oran_oom/ric-common/Chart.yaml | 21 ++ .../oran_oom/ric-common/templates/_a1mediator.tpl | 66 ++++ .../ric-common/templates/_alarmmanager.tpl | 81 +++++ .../oran_oom/ric-common/templates/_appmgr.tpl | 74 ++++ .../oran_oom/ric-common/templates/_chart.tpl | 20 + .../ric-common/templates/_context_locator.tpl | 37 ++ .../oran_oom/ric-common/templates/_dashboard.tpl | 59 +++ .../oran_oom/ric-common/templates/_dbaas.tpl | 58 +++ .../oran_oom/ric-common/templates/_docker.tpl | 63 ++++ .../oran_oom/ric-common/templates/_e2mgr.tpl | 66 ++++ .../oran_oom/ric-common/templates/_e2term.tpl | 89 +++++ .../oran_oom/ric-common/templates/_esreader.tpl | 60 +++ .../oran_oom/ric-common/templates/_influxdb.tpl | 57 +++ .../ric-common/templates/_ingress_controller.tpl | 71 ++++ .../ric-common/templates/_jaegeradapter.tpl | 72 ++++ .../oran_oom/ric-common/templates/_logstash.tpl | 49 +++ .../ric-common/templates/_messagerouter.tpl | 58 +++ .../oran_oom/ric-common/templates/_mrsub.tpl | 48 +++ .../oran_oom/ric-common/templates/_namespace.tpl | 60 +++ .../oran_oom/ric-common/templates/_o1mediator.tpl | 69 ++++ smo-install/oran_oom/ric-common/templates/_rsm.tpl | 66 ++++ .../oran_oom/ric-common/templates/_rtmgr.tpl | 64 ++++ .../oran_oom/ric-common/templates/_submgr.tpl | 55 +++ .../oran_oom/ric-common/templates/_tiller.tpl | 149 ++++++++ smo-install/oran_oom/ric-common/templates/_ves.tpl | 66 ++++ .../oran_oom/ric-common/templates/_vespamgr.tpl | 53 +++ .../ric-common/templates/_xapp_onboarder.tpl | 65 ++++ smo-install/oran_oom/ric-common/values.yaml | 21 ++ smo-install/oran_oom/ru-du-simulators/Chart.yaml | 10 + .../oran_oom/ru-du-simulators/requirements.yaml | 31 ++ smo-install/oran_oom/ru-du-simulators/values.yaml | 20 + smo-install/oran_oom/ru-simulator/Chart.yaml | 5 + .../ru-simulator/resources/config/config.json | 97 +++++ .../config/ietf-hardware-operational.json | 307 ++++++++++++++++ .../resources/config/ietf-hardware-running.json | 276 ++++++++++++++ .../config/ietf-interfaces-operational.xml | 151 ++++++++ .../resources/config/ietf-interfaces-running.xml | 111 ++++++ .../oran_oom/ru-simulator/templates/configmap.yaml | 15 + .../ru-simulator/templates/configmapenv.yaml | 41 +++ .../ru-simulator/templates/deployment.yaml | 73 ++++ .../oran_oom/ru-simulator/templates/service.yaml | 20 + smo-install/oran_oom/ru-simulator/values.yaml | 85 +++++ smo-install/oran_oom/topology-server/Chart.yaml | 5 + .../topology-server/resources/config/config.json | 73 ++++ .../resources/config/tapi-common-operational.xml | 113 ++++++ .../resources/config/tapi-common-running.xml | 7 + .../topology-server/templates/configmap.yaml | 10 + .../topology-server/templates/configmapenv.yaml | 37 ++ .../topology-server/templates/deployment.yaml | 58 +++ .../topology-server/templates/service.yaml | 17 + smo-install/oran_oom/topology-server/values.yaml | 124 +++++++ smo-install/oran_oom/topology/Chart.yaml | 5 + .../oran_oom/topology/templates/configmapenv.yaml | 14 + .../oran_oom/topology/templates/deployment.yaml | 34 ++ .../oran_oom/topology/templates/service.yaml | 17 + smo-install/oran_oom/topology/values.yaml | 19 + .../scripts/layer-0/0-setup-charts-museum.sh | 33 ++ smo-install/scripts/layer-0/0-setup-helm3.sh | 40 ++ smo-install/scripts/layer-0/0-setup-kud-node.sh | 35 ++ smo-install/scripts/layer-0/0-setup-microk8s.sh | 50 +++ smo-install/scripts/layer-1/1-build-all-charts.sh | 31 ++ .../scripts/layer-2/2-install-nonrtric-only.sh | 35 ++ smo-install/scripts/layer-2/2-install-oran-cnf.sh | 37 ++ smo-install/scripts/layer-2/2-install-oran.sh | 36 ++ .../scripts/layer-2/2-install-simulators.sh | 34 ++ .../scripts/layer-2/2-upgrade-simulators.sh | 34 ++ smo-install/scripts/sub-scripts/build-onap.sh | 36 ++ smo-install/scripts/sub-scripts/build-oran.sh | 33 ++ smo-install/scripts/sub-scripts/clean-up.sh | 27 ++ .../scripts/sub-scripts/install-nonrtric.sh | 28 ++ smo-install/scripts/sub-scripts/install-onap.sh | 28 ++ .../scripts/sub-scripts/install-simulators.sh | 28 ++ .../scripts/sub-scripts/uninstall-nonrtric.sh | 28 ++ smo-install/scripts/sub-scripts/uninstall-onap.sh | 26 ++ .../scripts/sub-scripts/uninstall-simulators.sh | 26 ++ .../scripts/sub-scripts/upgrade-simulators.sh | 28 ++ smo-install/scripts/uninstall-all.sh | 33 ++ 196 files changed, 10282 insertions(+) create mode 100755 bin/verify-smo-install create mode 100644 ci/Dockerfile-smo-install create mode 100644 smo-install/.gitignore create mode 100644 smo-install/LICENSE create mode 100644 smo-install/README.md create mode 100644 smo-install/helm-override/network-simulators-override.yaml create mode 100644 smo-install/helm-override/network-simulators-topology-override.yaml create mode 100644 smo-install/helm-override/onap-override-cnf.yaml create mode 100644 smo-install/helm-override/onap-override.yaml create mode 100644 smo-install/helm-override/oran-override.yaml create mode 160000 smo-install/multicloud-k8s create mode 160000 smo-install/onap_oom create mode 100644 smo-install/oran_oom/Makefile create mode 100644 smo-install/oran_oom/a1controller/.helmignore create mode 100644 smo-install/oran_oom/a1controller/Chart.yaml create mode 100644 smo-install/oran_oom/a1controller/requirements.yaml create mode 100644 smo-install/oran_oom/a1controller/templates/deployment.yaml create mode 100644 smo-install/oran_oom/a1controller/templates/service.yaml create mode 100644 smo-install/oran_oom/a1controller/values.yaml create mode 100644 smo-install/oran_oom/a1simulator/.helmignore create mode 100644 smo-install/oran_oom/a1simulator/Chart.yaml create mode 100644 smo-install/oran_oom/a1simulator/requirements.yaml create mode 100644 smo-install/oran_oom/a1simulator/templates/service.yaml create mode 100644 smo-install/oran_oom/a1simulator/templates/statefulset.yaml create mode 100644 smo-install/oran_oom/a1simulator/values.yaml create mode 100644 smo-install/oran_oom/aux-common/Chart.yaml create mode 100644 smo-install/oran_oom/aux-common/templates/_createPassword.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_ingress.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_mariadb.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_name.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_namespace.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_repository.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_resources.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_secret.yaml create mode 100644 smo-install/oran_oom/aux-common/templates/_service.tpl create mode 100644 smo-install/oran_oom/aux-common/templates/_storageClass.tpl create mode 100644 smo-install/oran_oom/aux-common/values.yaml create mode 100644 smo-install/oran_oom/controlpanel/.helmignore create mode 100644 smo-install/oran_oom/controlpanel/Chart.yaml create mode 100644 smo-install/oran_oom/controlpanel/requirements.yaml create mode 100644 smo-install/oran_oom/controlpanel/resources/nginx.conf create mode 100644 smo-install/oran_oom/controlpanel/templates/configmap.yaml create mode 100644 smo-install/oran_oom/controlpanel/templates/deployment.yaml create mode 100644 smo-install/oran_oom/controlpanel/templates/service.yaml create mode 100644 smo-install/oran_oom/controlpanel/values.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/Chart.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/requirements.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/resources/config/application.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/resources/data/application_configuration.json create mode 100644 smo-install/oran_oom/dmaapadapterservice/templates/configmap.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/templates/service.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/templates/statefulset.yaml create mode 100644 smo-install/oran_oom/dmaapadapterservice/values.yaml create mode 100644 smo-install/oran_oom/du-simulator/Chart.yaml create mode 100644 smo-install/oran_oom/du-simulator/resources/config/config.json create mode 100644 smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-operational.xml create mode 100644 smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-running.xml create mode 100644 smo-install/oran_oom/du-simulator/templates/configmap.yaml create mode 100644 smo-install/oran_oom/du-simulator/templates/configmapenv.yaml create mode 100644 smo-install/oran_oom/du-simulator/templates/deployment.yaml create mode 100644 smo-install/oran_oom/du-simulator/templates/service.yaml create mode 100644 smo-install/oran_oom/du-simulator/values.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/.helmignore create mode 100644 smo-install/oran_oom/enrichmentservice/Chart.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/requirements.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/resources/config/application.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/templates/configmap.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/templates/ingress.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/templates/service.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml create mode 100644 smo-install/oran_oom/enrichmentservice/values.yaml create mode 100644 smo-install/oran_oom/nonrtric-common/Chart.yaml create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_a1controller.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_common.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_controlpanel.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_dmaapadapterservice.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_enrichmentservice.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_policymanagementservice.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/templates/_rappcatalogueservice.tpl create mode 100644 smo-install/oran_oom/nonrtric-common/values.yaml create mode 100644 smo-install/oran_oom/nonrtric/Chart.yaml create mode 100644 smo-install/oran_oom/nonrtric/requirements.yaml create mode 100644 smo-install/oran_oom/nonrtric/templates/pv1.yaml create mode 100644 smo-install/oran_oom/nonrtric/templates/pv2.yaml create mode 100644 smo-install/oran_oom/nonrtric/values.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/.helmignore create mode 100644 smo-install/oran_oom/nonrtricgateway/Chart.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/requirements.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/resources/config/application.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/templates/configmap.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/templates/deployment.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/templates/service.yaml create mode 100644 smo-install/oran_oom/nonrtricgateway/values.yaml create mode 100644 smo-install/oran_oom/oru-app/Chart.yaml create mode 100644 smo-install/oran_oom/oru-app/resources/config/o-ru-to-o-du-map.txt create mode 100644 smo-install/oran_oom/oru-app/templates/configmap.yaml create mode 100644 smo-install/oran_oom/oru-app/templates/configmapenv.yaml create mode 100644 smo-install/oran_oom/oru-app/templates/deployment.yaml create mode 100644 smo-install/oran_oom/oru-app/templates/service.yaml create mode 100644 smo-install/oran_oom/oru-app/values.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/.helmignore create mode 100644 smo-install/oran_oom/policymanagementservice/Chart.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/requirements.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/resources/config/application.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/resources/data/application_configuration.json create mode 100644 smo-install/oran_oom/policymanagementservice/templates/configmap.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/templates/ingress.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/templates/service.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/templates/statefulset.yaml create mode 100644 smo-install/oran_oom/policymanagementservice/values.yaml create mode 100644 smo-install/oran_oom/rappcatalogueservice/Chart.yaml create mode 100644 smo-install/oran_oom/rappcatalogueservice/requirements.yaml create mode 100644 smo-install/oran_oom/rappcatalogueservice/templates/deployment.yaml create mode 100644 smo-install/oran_oom/rappcatalogueservice/templates/service.yaml create mode 100644 smo-install/oran_oom/rappcatalogueservice/values.yaml create mode 100644 smo-install/oran_oom/ric-common/Chart.yaml create mode 100644 smo-install/oran_oom/ric-common/templates/_a1mediator.tpl create mode 100755 smo-install/oran_oom/ric-common/templates/_alarmmanager.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_appmgr.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_chart.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_context_locator.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_dashboard.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_dbaas.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_docker.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_e2mgr.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_e2term.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_esreader.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_influxdb.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_ingress_controller.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_jaegeradapter.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_logstash.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_messagerouter.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_mrsub.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_namespace.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_o1mediator.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_rsm.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_rtmgr.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_submgr.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_tiller.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_ves.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_vespamgr.tpl create mode 100644 smo-install/oran_oom/ric-common/templates/_xapp_onboarder.tpl create mode 100644 smo-install/oran_oom/ric-common/values.yaml create mode 100644 smo-install/oran_oom/ru-du-simulators/Chart.yaml create mode 100644 smo-install/oran_oom/ru-du-simulators/requirements.yaml create mode 100644 smo-install/oran_oom/ru-du-simulators/values.yaml create mode 100644 smo-install/oran_oom/ru-simulator/Chart.yaml create mode 100644 smo-install/oran_oom/ru-simulator/resources/config/config.json create mode 100644 smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-operational.json create mode 100644 smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-running.json create mode 100644 smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-operational.xml create mode 100644 smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-running.xml create mode 100644 smo-install/oran_oom/ru-simulator/templates/configmap.yaml create mode 100644 smo-install/oran_oom/ru-simulator/templates/configmapenv.yaml create mode 100644 smo-install/oran_oom/ru-simulator/templates/deployment.yaml create mode 100644 smo-install/oran_oom/ru-simulator/templates/service.yaml create mode 100644 smo-install/oran_oom/ru-simulator/values.yaml create mode 100644 smo-install/oran_oom/topology-server/Chart.yaml create mode 100644 smo-install/oran_oom/topology-server/resources/config/config.json create mode 100644 smo-install/oran_oom/topology-server/resources/config/tapi-common-operational.xml create mode 100644 smo-install/oran_oom/topology-server/resources/config/tapi-common-running.xml create mode 100644 smo-install/oran_oom/topology-server/templates/configmap.yaml create mode 100644 smo-install/oran_oom/topology-server/templates/configmapenv.yaml create mode 100644 smo-install/oran_oom/topology-server/templates/deployment.yaml create mode 100644 smo-install/oran_oom/topology-server/templates/service.yaml create mode 100644 smo-install/oran_oom/topology-server/values.yaml create mode 100644 smo-install/oran_oom/topology/Chart.yaml create mode 100644 smo-install/oran_oom/topology/templates/configmapenv.yaml create mode 100644 smo-install/oran_oom/topology/templates/deployment.yaml create mode 100644 smo-install/oran_oom/topology/templates/service.yaml create mode 100644 smo-install/oran_oom/topology/values.yaml create mode 100755 smo-install/scripts/layer-0/0-setup-charts-museum.sh create mode 100755 smo-install/scripts/layer-0/0-setup-helm3.sh create mode 100755 smo-install/scripts/layer-0/0-setup-kud-node.sh create mode 100755 smo-install/scripts/layer-0/0-setup-microk8s.sh create mode 100755 smo-install/scripts/layer-1/1-build-all-charts.sh create mode 100755 smo-install/scripts/layer-2/2-install-nonrtric-only.sh create mode 100755 smo-install/scripts/layer-2/2-install-oran-cnf.sh create mode 100755 smo-install/scripts/layer-2/2-install-oran.sh create mode 100755 smo-install/scripts/layer-2/2-install-simulators.sh create mode 100755 smo-install/scripts/layer-2/2-upgrade-simulators.sh create mode 100755 smo-install/scripts/sub-scripts/build-onap.sh create mode 100755 smo-install/scripts/sub-scripts/build-oran.sh create mode 100755 smo-install/scripts/sub-scripts/clean-up.sh create mode 100755 smo-install/scripts/sub-scripts/install-nonrtric.sh create mode 100755 smo-install/scripts/sub-scripts/install-onap.sh create mode 100755 smo-install/scripts/sub-scripts/install-simulators.sh create mode 100755 smo-install/scripts/sub-scripts/uninstall-nonrtric.sh create mode 100755 smo-install/scripts/sub-scripts/uninstall-onap.sh create mode 100755 smo-install/scripts/sub-scripts/uninstall-simulators.sh create mode 100755 smo-install/scripts/sub-scripts/upgrade-simulators.sh create mode 100755 smo-install/scripts/uninstall-all.sh diff --git a/.gitmodules b/.gitmodules index 4d686bd5..383f4d05 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "ric-dep"] path = ric-dep url = https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep +[submodule "smo-install/onap_oom"] + path = smo-install/onap_oom + url = https://gerrit.onap.org/r/oom +[submodule "smo-install/multicloud-k8s"] + path = smo-install/multicloud-k8s + url = https://github.com/onap/multicloud-k8s.git diff --git a/bin/verify-smo-install b/bin/verify-smo-install new file mode 100755 index 00000000..b98f2682 --- /dev/null +++ b/bin/verify-smo-install @@ -0,0 +1,27 @@ +#!/bin/bash + +############################################################################## +# +# Copyright (c) 2021 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. +# +############################################################################## +IT_DEP_FOLDER=/tmp/it-dep/smo-install + +set -x + +$IT_DEP_FOLDER/scripts/layer-0/0-setup-charts-museum.sh +$IT_DEP_FOLDER/scripts/layer-0/0-setup-helm3.sh + +$IT_DEP_FOLDER/scripts/sub-scripts/build-oran.sh diff --git a/ci/Dockerfile b/ci/Dockerfile index 235b2671..80e17b26 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -23,4 +23,6 @@ RUN wget https://get.helm.sh/helm-${HELMVERSION}-linux-amd64.tar.gz && tar -xvf RUN helm init -c --skip-repos ARG TGT=/tmp/it-dep COPY . $TGT +# Remove the smo-install as this one will be verified in another verify job +RUN rm -rf $TGT/smo-install RUN $TGT/bin/verify-ric-charts diff --git a/ci/Dockerfile-smo-install b/ci/Dockerfile-smo-install new file mode 100644 index 00000000..148644b9 --- /dev/null +++ b/ci/Dockerfile-smo-install @@ -0,0 +1,25 @@ +############################################################################## +# +# Copyright (c) 2019 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. +# +############################################################################## +FROM ubuntu:18.04 +RUN apt-get update && apt-get -y install curl ca-certificates wget +# often times out during LF jenkins build + +ARG TGT=/tmp/it-dep +COPY . $TGT +# Remove the smo-install as this one will be verified in another verify job +RUN $TGT/bin/verify-smo-install diff --git a/smo-install/.gitignore b/smo-install/.gitignore new file mode 100644 index 00000000..ca733d74 --- /dev/null +++ b/smo-install/.gitignore @@ -0,0 +1,24 @@ +requirements.lock +**/charts/*.tgz +*.orig + +# Eclipse +.classpath +.factorypath +.project +.pydevproject +.settings/ + +# IntelliJ +.idea/* +*.iml + +# Mac OS +*DS_Store* + +# dist +dist + +# chartmuseum +**/chartstorage/ +**/chartmuseum/ diff --git a/smo-install/LICENSE b/smo-install/LICENSE new file mode 100644 index 00000000..8ad15268 --- /dev/null +++ b/smo-install/LICENSE @@ -0,0 +1,204 @@ +================================================================================ + Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. +================================================================================ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/smo-install/README.md b/smo-install/README.md new file mode 100644 index 00000000..391a2550 --- /dev/null +++ b/smo-install/README.md @@ -0,0 +1,192 @@ +# ORAN SMO Package + +This project uses different helm charts from different Linux Foundation projects and integrate them into a unique SMO deployment. +

The ONAP and ORAN project helm charts are built and then configured by using "helm override" so that it represents a valid ORAN SMO installation.

+

It contains also provisioning scripts that can be used to bootstrap the platform and execute test usecases, network simulators, a1 simulators, cnf network simulators, etc ...

+ +Note: +The CNF part is still a "work in progress" so not well documented, it's a DU/RU/topology server deployment done by ONAP SO instantiation. +It has been created out of the ONAP vfirewall usecase. + +## Quick Installation +* Setup a VM with 20GB Memory, 8VCPU, 60GB of diskspace. +* Install an ubuntu live server 20.04 LTS (https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso) +* Execute the following commands being logged as root: + + ```git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"``` + + ```./dep/smo-install/scripts/layer-0/0-setup-microk8s.sh``` + + ```./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh``` + + ```./dep/smo-install/scripts/layer-0/0-setup-helm3.sh``` + + ```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh``` + + ```./dep/smo-install/scripts/layer-2/2-install-oran.sh``` + + Verify pods: + + ```kubectl get pods -n onap && kubectl get pods -n nonrtric``` + + When all pods in "onap" and "nonrtric" namespaces are well up & running: + + ```./dep/smo-install/scripts/layer-2/2-install-simulators.sh``` + +## Structure +The user entry point is located in the scripts folder + +``` +. +├── cnf <-- CNF packages that can be deployed by ONAP (Work In Progress, so not yet well documented) +│   └── du-ru-simulators <--- The CNF package containing DU/RU/Topology server simulators +├── helm-override <-- The Configuration of the different HELM charts used in SMO package +│   ├── network-simulators-override.yaml <--- Standard config for the network simulators +│   ├── network-simulators-topology-override.yaml <--- Network simulator topology example that can be changed +│   ├── onap-override-cnf.yaml <--- A medium ONAP config ready for CNF deployment +│   ├── onap-override.yaml <--- A minimal ONAP config for SMO package +│   └── oran-override.yaml <--- A minimal ORAN config for SMO package +├── LICENSE +├── multicloud-k8s <-- Git SUBMODULE required for KUD installation +├── onap_oom <-- Git SUBMODULE required for ONAP installation +├── oran_oom <-- ORAN Charts +│   ├── a1controller +│   ├── a1simulator +│   ├── aux-common +│   ├── controlpanel +│   ├── dist +│   ├── dmaapadapterservice +│   ├── du-simulator +│   ├── enrichmentservice +│   ├── Makefile <-- ORAN Makefile to build all ORAN Charts +│   ├── nonrtric +│   ├── nonrtric-common +│   ├── nonrtricgateway +│   ├── oru-app +│   ├── policymanagementservice +│   ├── rappcatalogueservice +│   ├── ric-common +│   ├── ru-du-simulators +│   ├── ru-simulator +│   ├── topology +│   └── topology-server +├── README.md +├── scripts <-- All installation scripts (USER ENTRY POINT) +│   ├── layer-0 <--- Scripts to setup Node +│   │   ├── 0-setup-charts-museum.sh <--- Setup ChartMuseum +│   │   └── 0-setup-kud-node.sh <--- Setup K8S node with ONAP Multicloud KUD installation +│   │   └── 0-setup-microk8s.sh <--- Setup K8S node with MicroK8S installation +│   │   └── 0-setup-helm3.sh <--- Setup HELM3 +│   ├── layer-1 <--- Scripts to prepare for the SMO installation +│   │   └── 1-build-all-charts.sh <--- Build all HELM charts and upload them to ChartMuseum +│   ├── layer-2 <--- Scripts to install SMO package +│   │   ├── 2-install-nonrtric-only.sh <--- Install SMO NONRTRIC k8s namespace only +│   │   ├── 2-install-oran-cnf.sh <--- Install SMO full with ONAP CNF features +│   │   ├── 2-install-oran.sh <--- Install SMO minimal +│   │   └── 2-install-simulators.sh <--- Install Network simulator (RU/DU/Topology Server) +│   ├── sub-scripts <--- Sub-Scripts used by the main layer-0, layer-1, layer-2 +│   │   ├── clean-up.sh +│   │   ├── install-nonrtric.sh +│   │   ├── install-onap.sh +│   │   ├── install-simulators.sh +│   │   ├── uninstall-nonrtric.sh +│   │   ├── uninstall-onap.sh +│   │   └── uninstall-simulators.sh +│   └── uninstall-all.sh <--- Uninstall ALL SMO K8S namespaces and cleanup K8S +└── test <-- Scripts to test the SMO installation (Work In Progress, so not yet well documented) + ├── a1-validation <--- Test nonrtric A1 interface (https://wiki.o-ran-sc.org/display/RICNR/Testing+End+to+End+call+in+release+D) + │   ├── data + │   ├── subscripts + │   └── validate-a1.sh + ├── apex-policy-test <--- Test apex policy (https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=35881325, it requires simulators to be up) + │   ├── apex-policy-test.sh + │   └── data + └── enable-sim-fault-report <--- Enable the fault reporting of the network simulators by SDNC + ├── data + └── enable-network-sim-fault-reporting.sh + +``` +## Download: +Use git clone to get it on your server: + +```git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"``` + + +Note: The current repository has multiple sub git submodules, therefore the --recursive flag is absolutely REQUIRED + +## Requirements: +* K8S node setup with Helm 3 and Kubectl properly configured (tested with K8S v1.21.5 and HELM v3.5.4). + FOR K8S installation, multiple options are available: + - MicroK8S standalone deployment: + + ```./dep/smo-install/scripts/layer-0/0-setup-microk8s.sh``` + + OR this wiki can help to setup it (Section 1, 2 and 3): https://wiki.onap.org/display/DW/Deploy+OOM+and+SDC+%28or+ONAP%29+on+a+single+VM+with+microk8s+-+Honolulu+Setup + + - KubeSpray using ONAP multicloud KUD (https://git.onap.org/multicloud/k8s/tree/kud) installation by executing(this is required for ONAP CNF deployments): + + ```./dep/smo-install/scripts/layer-0/0-setup-kud-node.sh``` + + + - Use an existing K8S installation (Cloud, etc ...). + - .... + +* ChartMuseum to store the HELM charts on the server, multiple options are available: + - Execute the install script: + + ```./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh``` + + ```./oran-deployment/scripts/layer-0/0-setup-helm3.sh``` + + - Install chartmuseum manually on port 18080 (https://chartmuseum.com/#Instructions, https://github.com/helm/chartmuseum) + +## Configuration: +In the ./helm-override/ folder the helm config that are used by the SMO installation. +

Different flavors are preconfigured, and should NOT be changed EXCEPT for the simulators (due to current DNS limitations in the simulators) +in ./helm-override/simulators-override.yaml, the "sdnControllerIp" and "vesEndpointIp" must be set to the server external IP

+ +## Installation: +* Build ONAP/ORAN charts + + ```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh``` + +* Choose the installation: + - ONAP + ORAN "nonrtric" (RECOMMENDED ONE): + + ```./dep/smo-install/scripts/layer-2/2-install-oran.sh``` + - ORAN "nonrtric" par only: + + ```./dep/smo-install/scripts/layer-2/2-install-nonrtric-only.sh``` + + - ONAP CNF + ORAN "nonrtric" (This must still be documented properly): + + ```./dep/smo-install/scripts/layer-2/2-install-oran-cnf.sh``` + + + +* Install the network simulators (DU/RU/Topo): + - When all pods in "onap" and "nonrtric" namespaces are well up & running: + + ```kubectl get pods -n onap && kubectl get pods -n nonrtric``` + + - Execute the install script: + + ```./dep/smo-install/scripts/layer-2/2-install-simulators.sh``` + + - Check the simulators status: + + ```kubectl get pods -n network``` + + Note: The simulators topology can be customized in the file ./oran-deployment/helm-override/network-simulators-topology-override.yaml + +## Platform access points: +* SDNR WEB: + https://:30205/odlux/index.html +* NONRTRIC Dashboard: + http://:30091/ + More to come ... + +## Uninstallation: +* Execute + + ```./dep/smo-install/scripts/uninstall-all.sh``` diff --git a/smo-install/helm-override/network-simulators-override.yaml b/smo-install/helm-override/network-simulators-override.yaml new file mode 100644 index 00000000..4749a819 --- /dev/null +++ b/smo-install/helm-override/network-simulators-override.yaml @@ -0,0 +1,58 @@ +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 Simulators ##### + +ru-du-simulators: + topologyServer: true + ruSimulator: true + duSimulator: true + + +x-ntsimNg: &ntsimConfig + sdnControllerUsername: admin + sdnControllerPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + + vesEndpointUsername: sample1 + vesEndpointPassword: sample1 + +ru-simulator: + ntsimNg: + <<: *ntsimConfig + ipV6Enabled: false + sshConnections: 0 + tlsConnections: 1 + +du-simulator: + ntsimNg: + <<: *ntsimConfig + ipV6Enabled: false + sshConnections: 1 + tlsConnections: 0 + +topology-server: + ntsimNg: + <<: *ntsimConfig + ipV6Enabled: false + sshConnections: 0 + tlsConnections: 1 diff --git a/smo-install/helm-override/network-simulators-topology-override.yaml b/smo-install/helm-override/network-simulators-topology-override.yaml new file mode 100644 index 00000000..3738a82e --- /dev/null +++ b/smo-install/helm-override/network-simulators-topology-override.yaml @@ -0,0 +1,392 @@ +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + + +###### Sim Topology Override ######## +ru-simulator: + rus: + - name: o-ru-11211 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12301fc66" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12301fc66" + + - name: o-ru-11221 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc62" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc62" + + - name: o-ru-11222 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc63" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc63" + + - name: o-ru-11223 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc64" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc64" + + - name: o-ru-11224 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc65" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc65" + + - name: o-ru-11225 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc66" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc66" + +du-simulator: + dus: + - name: o-du-1121 + rus: + - name: o-ru-11211 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + + simulatedFaults: + - name: o-ru-11211 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11211 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + + - name: o-du-1122 + rus: + - name: o-ru-11221 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + - name: o-ru-11222 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + - name: o-ru-11223 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + - name: o-ru-11224 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + - name: o-ru-11225 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + + simulatedFaults: + - name: o-ru-11221 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11221 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + + - name: o-ru-11222 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11222 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + + - name: o-ru-11223 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11223 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + + - name: o-ru-11224 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11224 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + + - name: o-ru-11225 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11225 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + +topology-server: + simulatedFaults: + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: MAJOR + object: "Slot-0-Port-A" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: NORMAL + object: "Slot-0-Port-A" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: true + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: MAJOR + object: "Slot-0-Port-C" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: NORMAL + object: "Slot-0-Port-C" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: true + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: MAJOR + object: "Slot-2-Port-B" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: NORMAL + object: "Slot-2-Port-B" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + nodes: + - name: o-du-1121 + uuid: ac089635-7a85-4198-9310-9b14f476b4a9 + nodeEdgePointUuid: 539f24cb-a5e9-454f-b06d-6307be419afe + interfaceName: "O-DU-interface-1" + interfaceDescription: "Simulated interface for O-DU" + - name: o-ru-11211 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6baa2 + nodeEdgePointUuid: bb7e5882-6e4a-46a7-a95b-0bb7310ede22 + interfaceName: "09a95e08-5b53-4834-815f-a9c12300fc62" + interfaceDescription: "Simulated interface for O-RU" + + - name: o-du-1122 + uuid: ac089635-7a85-4197-9310-9b14f476a4a9 + nodeEdgePointUuid: 539f24cb-a5e9-454f-b05d-6307be419afe + interfaceName: "O-DU-interface-1" + interfaceDescription: "Simulated interface for O-DU" + - name: o-ru-11221 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa1 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede22 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc62" + interfaceDescription: "Simulated interface for O-RU" + - name: o-ru-11222 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa2 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede23 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc63" + interfaceDescription: "Simulated interface for O-RU" + - name: o-ru-11223 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa3 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede24 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc64" + interfaceDescription: "Simulated interface for O-RU" + - name: o-ru-11224 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa4 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede25 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc65" + interfaceDescription: "Simulated interface for O-RU" + - name: o-ru-11225 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa5 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede26 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc66" + interfaceDescription: "Simulated interface for O-RU" + + + topologyUuid: 7adfee73-44be-4813-a0dc-89f657f0a436 + links: + - duNode: o-du-1121 + ruNode: o-ru-11211 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abb + + - duNode: o-du-1122 + ruNode: o-ru-11221 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abc + - duNode: o-du-1122 + ruNode: o-ru-11222 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abd + - duNode: o-du-1122 + ruNode: o-ru-11223 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abe + - duNode: o-du-1122 + ruNode: o-ru-11224 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abf + - duNode: o-du-1122 + ruNode: o-ru-11225 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30ace diff --git a/smo-install/helm-override/onap-override-cnf.yaml b/smo-install/helm-override/onap-override-cnf.yaml new file mode 100644 index 00000000..9f2f6e80 --- /dev/null +++ b/smo-install/helm-override/onap-override-cnf.yaml @@ -0,0 +1,381 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Modifications Copyright © 2021 AT&T +# +# 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. + +################################################################# +# Global configuration overrides. +# +# These overrides will affect all helm charts (ie. applications) +# that are listed below and are 'enabled'. +################################################################# +global: + # Change to an unused port prefix range to prevent port conflicts + # with other instances running within the same k8s cluster + repository: nexus3.onap.org:10001 #__docker_proxy__ + nodePortPrefix: 302 + nodePortPrefixExt: 304 + masterPassword: secretpassword + addTestingComponents: true + cmpv2Enabled: true + flavor: unlimited + # ONAP Repository + # Uncomment the following to enable the use of a single docker + # repository but ONLY if your repository mirrors all ONAP + # docker images. This includes all images from dockerhub and + # any other repository that hosts images for ONAP components. + repository: nexus3.onap.org:10001 + + # readiness check - temporary repo until images migrated to nexus3 + readinessRepository: oomk8s + # logging agent - temporary repo until images migrated to nexus3 + loggingRepository: docker.elastic.co + + # image pull policy + pullPolicy: IfNotPresent + + # override default mount path root directory + # referenced by persistent volumes and log files + persistence: + mountPath: /dockerdata-nfs + + # flag to enable debugging - application support required + debugEnabled: false + +################################################################# +# Enable/disable and configure helm charts (ie. applications) +# to customize the ONAP deployment. +################################################################# +aaf: + enabled: true + aaf-service: + readiness: + initialDelaySeconds: 150 +aai: + enabled: true + flavorOverride: unlimited + global: + flavorOverride: unlimited + cassandra: + replicas: 3 + aai-cassandra: + flavorOverride: unlimited + replicaCount: 3 + aai-babel: + flavorOverride: unlimited + aai-data-router: + flavorOverride: unlimited + aai-elasticsearch: + flavorOverride: unlimited + aai-graphadmin: + flavorOverride: unlimited + aai-modelloader: + flavorOverride: unlimited + aai-resources: + flavorOverride: unlimited + aai-schema-service: + flavorOverride: unlimited + aai-search-data: + flavorOverride: unlimited + aai-sparky-be: + flavorOverride: unlimited + readiness: + initialDelaySeconds: 150 + periodSeconds: 20 + timeoutSeconds: 10 + aai-traversal: + flavorOverride: unlimited +appc: + enabled: false +cassandra: + enabled: true + replicaCount: 3 + config: + cluster_domain: cluster.local + heap: + max: 1G + min: 256M + liveness: + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + + readiness: + initialDelaySeconds: 120 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 +cds: + enabled: true +cli: + enabled: false +consul: + enabled: false +contrib: + enabled: true + awx: + enabled: false + netbox: + enabled: true +dcaegen2: + enabled: true + dcae-bootstrap: + enabled: false + dcae-cloudify-manager: + enabled: true + dcae-config-binding-service: + enabled: true + dcae-dashboard: + enabled: false + dcae-deployment-handler: + enabled: false + dcae-healthcheck: + enabled: true + dcae-inventory-api: + enabled: false + dcae-policy-handler: + enabled: false + dcae-servicechange-handler: + enabled: false + dcae-ves-openapi-manager: + enabled: false +dcaegen2-services: + enabled: true + dcae-bbs-eventprocessor-ms: + enabled: false + dcae-datafile-collector: + enabled: false + dcae-datalake-admin-ui: + enabled: false + dcae-datalake-des: + enabled: false + dcae-datalake-feeder: + enabled: false + dcae-heartbeat: + enabled: false + dcae-hv-ves-collector: + enabled: false + dcae-kpi-ms: + enabled: false + dcae-ms-healthcheck: + enabled: false + dcae-pm-mapper: + enabled: false + dcae-pmsh: + enabled: false + dcae-prh: + enabled: false + dcae-restconf-collector: + enabled: false + dcae-slice-analysis-ms: + enabled: false + dcae-snmptrap-collector: + enabled: false + dcae-son-handler: + enabled: false + dcae-tcagen2: + enabled: false + dcae-ves-collector: + enabled: true + dcae-ves-mapper: + enabled: false +dcaemod: + enabled: false +holmes: + enabled: false +dmaap: + enabled: true + message-router: + message-router-zookeeper: + replicaCount: 1 + message-router-kafka: + zookeeper: + replicaCount: 1 + replicaCount: 1 + defaultpartitions: 1 + configurationOverrides: + "offsets.topic.replication.factor": "1" + "log.dirs": "/var/lib/kafka/data" + "log.retention.hours": "168" + "num.partitions": "1" + "offsets.topic.replication.factor": "1" + "transaction.state.log.replication.factor": "1" + "transaction.state.log.min.isr": "1" + "num.recovery.threads.per.data.dir": "5" + "log.retention.hours": "168" + "zookeeper.connection.timeout.ms": "6000" + "default.replication.factor": "1" + "zookeeper.set.acl": "true" +esr: + enabled: false +log: + enabled: false + log-logstash: + replicaCount: 1 +oof: + enabled: false +mariadb-galera: + enabled: true + replicaCount: 1 +modeling: + enabled: false +msb: + enabled: false +multicloud: + enabled: true +nbi: + enabled: false +oof: + enabled: false +platform: + enabled: true +policy: + enabled: true + policy-api: + enabled: true + policy-pap: + enabled: true + policy-xacml-pdp: + enabled: false + policy-apex-pdp: + enabled: true + policy-drools-pdp: + enabled: false + policy-distribution: + enabled: false + policy-clamp-be: + enabled: false + policy-clamp-fe: + enabled: false + policy-clamp-cl-runtime: + enabled: false + policy-clamp-cl-k8s-ppnt: + enabled: false + policy-gui: + enabled: false + policy-nexus: + enabled: false +pomba: + enabled: false +portal: + enabled: true +robot: + enabled: false + flavor: small + appcUsername: "appc@appc.onap.org" + appcPassword: "demo123456!" + openStackKeyStoneUrl: "http://10.12.25.2:5000" + openStackKeystoneAPIVersion: "v3" + openStackPublicNetId: "5771462c-9582-421c-b2dc-ee6a04ec9bde" + openStackTenantId: "c9ef9a6345b440b7a96d906a0f48c6b1" + openStackUserName: "user_name" + openStackUserDomain: "default" + openStackProjectName: "TEST" + ubuntu14Image: "trusty-server-cloudimg-amd64-disk1" + ubuntu16Image: "xenial-server-cloudimg-amd64-disk1" + openStackPrivateNetCidr: "10.0.0.0/16" + openStackPrivateNetId: "fd05c1ab-3f43-4f6f-8a8c-76aee04ef293" + openStackPrivateSubnetId: "fd05c1ab-3f43-4f6f-8a8c-76aee04ef293" + openStackSecurityGroup: "f05e9cbf-d40f-4d1f-9f91-d673ba591a3a" + openStackOamNetworkCidrPrefix: "10.0" + dcaeCollectorIp: "10.12.6.1" + vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh" + demoArtifactsVersion: "1.4.0" + demoArtifactsRepoUrl: "https://nexus.onap.org/content/repositories/releases" + scriptVersion: "1.4.0" + nfsIpAddress: "10.12.6.1" + config: + openStackEncryptedPasswordHere: "e10c86aa13e692020233d18f0ef6d527" + openStackSoEncryptedPassword: "1DD1B3B4477FBAFAFEA617C575639C6F09E95446B5AE1F46C72B8FD960219ABB0DBA997790FCBB12" +sdc: + enabled: true + sdc-be: + config: + javaOptions: "-Xmx1g -Xms512m" + liveness: + periodSeconds: 300 + timeoutSeconds: 180 + readiness: + periodSeconds: 300 + timeoutSeconds: 240 + sdc-fe: + resources: + small: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 100m + memory: 500Mi + +sdnc: + enabled: true + replicaCount: 1 + elasticsearch: + master: + replicaCount: 1 + mysql: + replicaCount: 1 + ueb-listener: + enabled: false + sdnc-ansible-server: + enabled: false + dgbuilder: + enabled: false + cds: + enabled: false + sdnc-web: + config: + topologyserver: + enabled: true + topologyserverUrl: http://topology.nonrtric:3001 + config: + sdnr: + enabled: true + # mode: web - SDNC contains device manager only plus dedicated webserver service for ODLUX (default), + # mode: dm - SDNC contains sdnr device manager + ODLUX components + mode: dm + # sdnronly: true starts sdnc container with odl and sdnrwt features only + sdnronly: false + sdnrdbTrustAllCerts: true + mountpointRegistrarEnabled: true + mountpointStateProviderEnabled: true + netconfCallHome: + enabled: true +sniro-emulator: + enabled: false +so: + enabled: true + so-catalog-db-adapter: + config: + openStackUserName: "the username" + openStackKeyStoneUrl: "http://10.12.25.2:5000/v3" + openStackEncryptedPasswordHere: "1DD1B3B4477FBAFAFEA617C575639C6F09E95446B5AE1F46C72B8FD960219ABB0DBA997790FCBB12" + openStackKeystoneVersion: "KEYSTONE_V3" +uui: + enabled: false +vfc: + enabled: false +vid: + enabled: false +vnfsdk: + enabled: false + + diff --git a/smo-install/helm-override/onap-override.yaml b/smo-install/helm-override/onap-override.yaml new file mode 100644 index 00000000..2a5d9da3 --- /dev/null +++ b/smo-install/helm-override/onap-override.yaml @@ -0,0 +1,404 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Modifications Copyright © 2021 AT&T +# +# 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. + +################################################################# +# Global configuration overrides. +# +# These overrides will affect all helm charts (ie. applications) +# that are listed below and are 'enabled'. +################################################################# +global: + # Change to an unused port prefix range to prevent port conflicts + # with other instances running within the same k8s cluster + repository: nexus3.onap.org:10001 #__docker_proxy__ + nodePortPrefix: 302 + nodePortPrefixExt: 304 + masterPassword: secretpassword + addTestingComponents: true + cmpv2Enabled: false + flavor: unlimited + # ONAP Repository + # Uncomment the following to enable the use of a single docker + # repository but ONLY if your repository mirrors all ONAP + # docker images. This includes all images from dockerhub and + # any other repository that hosts images for ONAP components. + #repository: nexus3.onap.org:10001 + + # readiness check - temporary repo until images migrated to nexus3 + readinessRepository: oomk8s + # logging agent - temporary repo until images migrated to nexus3 + loggingRepository: docker.elastic.co + + # image pull policy + pullPolicy: IfNotPresent + + # override default mount path root directory + # referenced by persistent volumes and log files + persistence: + mountPath: /dockerdata-nfs + + # flag to enable debugging - application support required + debugEnabled: false + +################################################################# +# Enable/disable and configure helm charts (ie. applications) +# to customize the ONAP deployment. +################################################################# +a1policymanagement: + enabled: true + rics: + - name: ric1 + link: http://a1-sim-osc-0.a1-sim.nonrtric:8085 + controller: controller1 + managedElementIds: + - kista_1 + - kista_2 + - name: ric2 + link: http://a1-sim-osc-1.a1-sim.nonrtric:8085 + controller: controller1 + managedElementIds: + - kista_1 + - kista_2 + - name: ric3 + link: http://a1-sim-std-0.a1-sim.nonrtric:8085 + controller: controller1 + managedElementIds: + - kista_1 + - kista_2 + - name: ric4 + link: http://a1-sim-std-1.a1-sim.nonrtric:8085 + controller: controller1 + managedElementIds: + - kista_1 + - kista_2 + - name: ric5 + link: http://a1-sim-std2-0.a1-sim.nonrtric:8085 + controller: controller1 + managedElementIds: + - kista_1 + - kista_2 + - name: ric6 + link: http://a1-sim-std2-1.a1-sim.nonrtric:8085 + controller: controller1 + managedElementIds: + - kista_1 + - kista_2 +aaf: + enabled: true + aaf-service: + readiness: + initialDelaySeconds: 150 +aai: + enabled: false + flavorOverride: unlimited + global: + flavorOverride: unlimited + cassandra: + replicas: 3 + aai-cassandra: + flavorOverride: unlimited + replicaCount: 3 + aai-babel: + flavorOverride: unlimited + aai-data-router: + flavorOverride: unlimited + aai-elasticsearch: + flavorOverride: unlimited + aai-graphadmin: + flavorOverride: unlimited + aai-modelloader: + flavorOverride: unlimited + aai-resources: + flavorOverride: unlimited + aai-schema-service: + flavorOverride: unlimited + aai-search-data: + flavorOverride: unlimited + aai-sparky-be: + flavorOverride: unlimited + readiness: + initialDelaySeconds: 150 + periodSeconds: 20 + timeoutSeconds: 10 + aai-traversal: + flavorOverride: unlimited +appc: + enabled: false +cassandra: + enabled: false + replicaCount: 3 + config: + cluster_domain: cluster.local + heap: + max: 1G + min: 256M + liveness: + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + + readiness: + initialDelaySeconds: 120 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 +cds: + enabled: false +cli: + enabled: false +contrib: + enabled: true + awx: + enabled: false + netbox: + enabled: false +consul: + enabled: true + consul-server: + replicaCount: 1 +cps: + enabled: false +dcaegen2: + enabled: true + dcae-bootstrap: + enabled: false + dcae-cloudify-manager: + enabled: true + dcae-config-binding-service: + enabled: true + dcae-dashboard: + enabled: false + dcae-deployment-handler: + enabled: false + dcae-healthcheck: + enabled: true + dcae-inventory-api: + enabled: false + dcae-policy-handler: + enabled: false + dcae-servicechange-handler: + enabled: false + dcae-ves-openapi-manager: + enabled: false +dcaegen2-services: + enabled: true + dcae-bbs-eventprocessor-ms: + enabled: false + dcae-datafile-collector: + enabled: false + dcae-datalake-admin-ui: + enabled: false + dcae-datalake-des: + enabled: false + dcae-datalake-feeder: + enabled: false + dcae-heartbeat: + enabled: false + dcae-hv-ves-collector: + enabled: false + dcae-kpi-ms: + enabled: false + dcae-ms-healthcheck: + enabled: false + dcae-pm-mapper: + enabled: false + dcae-pmsh: + enabled: false + dcae-prh: + enabled: false + dcae-restconf-collector: + enabled: false + dcae-slice-analysis-ms: + enabled: false + dcae-snmptrap-collector: + enabled: false + dcae-son-handler: + enabled: false + dcae-tcagen2: + enabled: false + dcae-ves-collector: + enabled: true + dcae-ves-mapper: + enabled: false +dcaemod: + enabled: false +holmes: + enabled: false +dmaap: + enabled: true + message-router: + message-router-zookeeper: + replicaCount: 1 + zookeeperServers: 1 + message-router-kafka: + zookeeper: + replicaCount: 1 + replicaCount: 1 + defaultpartitions: 1 + configurationOverrides: + "offsets.topic.replication.factor": "1" + "log.dirs": "/var/lib/kafka/data" + "log.retention.hours": "168" + "num.partitions": "1" + "transaction.state.log.replication.factor": "1" + "transaction.state.log.min.isr": "1" + "num.recovery.threads.per.data.dir": "5" + "zookeeper.connection.timeout.ms": "6000" + "default.replication.factor": "1" + "zookeeper.set.acl": "true" + +esr: + enabled: false +log: + enabled: false + log-logstash: + replicaCount: 1 +mariadb-galera: + enabled: true + replicaCount: 1 +modeling: + enabled: false +msb: + enabled: false +multicloud: + enabled: false +nbi: + enabled: false +oof: + enabled: false +platform: + enabled: true +policy: + enabled: true + policy-api: + enabled: true + policy-pap: + enabled: true + policy-xacml-pdp: + enabled: false + policy-apex-pdp: + enabled: true + policy-drools-pdp: + enabled: false + policy-distribution: + enabled: false + policy-clamp-be: + enabled: false + policy-clamp-fe: + enabled: false + policy-clamp-cl-runtime: + enabled: false + policy-clamp-cl-k8s-ppnt: + enabled: false + policy-gui: + enabled: false + policy-nexus: + enabled: false +pomba: + enabled: false +portal: + enabled: false +robot: + enabled: false +sdc: + enabled: false + sdc-be: + config: + javaOptions: "-Xmx1g -Xms512m" + liveness: + periodSeconds: 300 + timeoutSeconds: 180 + readiness: + periodSeconds: 300 + timeoutSeconds: 240 + sdc-fe: + resources: + small: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 100m + memory: 500Mi + +sdnc: + enabled: true + replicaCount: 1 + elasticsearch: + master: + replicaCount: 1 + mysql: + replicaCount: 1 + ueb-listener: + enabled: false + sdnc-ansible-server: + enabled: true + dgbuilder: + enabled: true + cds: + enabled: false + vesCollector: + enabled: true + tls: + enabled: true + trustAllCertificates: true + username: sample1 + password: sample1 + address: dcae-ves-collector.onap + port: 8443 + sdnc-web: + config: + topologyserver: + enabled: true + topologyserverUrl: http://topology.nonrtric:3001 + config: + sdnr: + enabled: true + # mode: web - SDNC contains device manager only plus dedicated webserver service for ODLUX (default), + # mode: dm - SDNC contains sdnr device manager + ODLUX components + mode: dm + # sdnronly: true starts sdnc container with odl and sdnrwt features only + sdnronly: false + sdnrdbTrustAllCerts: true + mountpointRegistrarEnabled: true + mountpointStateProviderEnabled: true + netconfCallHome: + enabled: true +sniro-emulator: + enabled: false +so: + enabled: false + so-catalog-db-adapter: + config: + openStackUserName: "the username" + openStackKeyStoneUrl: "http://10.12.25.2:5000/v3" + openStackEncryptedPasswordHere: "1DD1B3B4477FBAFAFEA617C575639C6F09E95446B5AE1F46C72B8FD960219ABB0DBA997790FCBB12" + openStackKeystoneVersion: "KEYSTONE_V3" +uui: + enabled: false +vfc: + enabled: false +vid: + enabled: false +vnfsdk: + enabled: false + diff --git a/smo-install/helm-override/oran-override.yaml b/smo-install/helm-override/oran-override.yaml new file mode 100644 index 00000000..189877a2 --- /dev/null +++ b/smo-install/helm-override/oran-override.yaml @@ -0,0 +1,103 @@ +# Copyright © 2017 Amdocs, Bell Canada +# Mofification Copyright © 2021 AT&T +# +# 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. + +################################################################# +# Global configuration overrides. +# +# These overrides will affect all helm charts (ie. applications) +# that are listed below and are 'enabled'. +################################################################# + +##### ORAN ##### + +######### NONRTRIC ######### + +nonrtric: + installPms: false + installA1controller: false + installA1simulator: true + installControlpanel: true + installEnrichmentservice: true + installRappcatalogueservice: true + installNonrtricgateway: true + installKong: true + installORUApp: true + installTopology: true + installDmaapadapterservice: true + # override default mount path root directory + # referenced by persistent volumes and log files + persistence: + mountPath: /dockerdata-nfs + volume1: + # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning) + size: 2Gi + storageClassName: pms-storage + volume2: + # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning) + size: 2Gi + storageClassName: ecs-storage + +common: + releasePrefix: r3-dev-nonrtric + ingressClassName: kong +enrichmentservice: + enrichmentservice: + persistence: + # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same. + # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available) + size: 2Gi + storageClassName: ecs-storage + +# Need to check the external port Availability +policymanagementservice: + policymanagementservice: + persistence: + # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same. + # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available) + size: 2Gi + storageClassName: pms-storage + +kong: + ingressController: + installCRDs: false + admin: + enabled: true + +######### RIC_AUX ######### +dashboard: + cipher: + enc: + key: AGLDdG4D04BKm2IxIWEr8o== + portalapi: + security: false + appname: RIC-Dashboard + username: Default + password: password + ecomp_redirect_url: https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm + ecomp_rest_url: http://portal-app:8989/ONAPPORTAL/auxapi + ueb_app_key: uebkey + # instances are passed as string and reformatted into YAML + ricinstances: | + regions: + - + name: Region PIZ-R4 + instances: + - + key: i1 + name: RIC + appUrlPrefix: http://ric-entry + caasUrlPrefix: http://caas-ingress-is-REC-only + pltUrlPrefix: http://ric-entry + diff --git a/smo-install/multicloud-k8s b/smo-install/multicloud-k8s new file mode 160000 index 00000000..2d9e8566 --- /dev/null +++ b/smo-install/multicloud-k8s @@ -0,0 +1 @@ +Subproject commit 2d9e8566cbd81e6feb7e3068f6ff089fdc3a93d9 diff --git a/smo-install/onap_oom b/smo-install/onap_oom new file mode 160000 index 00000000..a697f8ab --- /dev/null +++ b/smo-install/onap_oom @@ -0,0 +1 @@ +Subproject commit a697f8ab8f2b47100cb73a7f5812f70e242b75a6 diff --git a/smo-install/oran_oom/Makefile b/smo-install/oran_oom/Makefile new file mode 100644 index 00000000..40a4e240 --- /dev/null +++ b/smo-install/oran_oom/Makefile @@ -0,0 +1,124 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +PARENT_CHART := nonrtric ru-du-simulators +COMMON_CHARTS_DIR := nonrtric-common aux-common ric-common +# FIXME OOM-765 +ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +OUTPUT_DIR := $(ROOT_DIR)/dist +PACKAGE_DIR := $(OUTPUT_DIR)/packages +SECRET_DIR := $(OUTPUT_DIR)/secrets +HELM_BIN := helm + +# Helm v2 and helm v3 uses different version format so we first try in helm v3 format +# and if it fails then we fallback to helm v2 one +HELM_VER := $(shell $(HELM_BIN) version --template "{{.Version}}" 2>/dev/null) +ifneq "$(findstring v3,$(HELM_VER))" "v3" + HELM_VER := $(shell $(HELM_BIN) version -c --template "{{.Client.SemVer}}") +endif + +# use this if you would like to push onap charts to repo with other name +# WARNING: Helm v3+ only +# WARNING: Make sure to edit also requirements files +HELM_REPO := local + +ifneq ($(SKIP_LINT),TRUE) + HELM_LINT_CMD := $(HELM_BIN) lint +else + HELM_LINT_CMD := echo "Skipping linting of" +endif + +#SUBMODS := robot +#EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS) +EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) +HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART) + +.PHONY: $(EXCLUDES) $(HELM_CHARTS) check-for-staging-images + +all: print_helm_bin $(COMMON_CHARTS_DIR) $(SUBMODS) $(HELM_CHARTS) helm-repo-update + +$(COMMON_CHARTS): + @echo "\n[$@]" + @make package-$@ + +$(HELM_CHARTS): + @echo "\n[$@]" + @make package-$@ + +$(SUBMODS): + @echo "\n[$@]" + @make submod-$@ + @make package-$@ + +submod-%: + @make $*/requirements.yaml + +%/requirements.yaml: + $(error Submodule $* needs to be retrieved from gerrit. See https://wiki.onap.org/display/DW/OOM+-+Development+workflow+after+code+transfer+to+tech+teams ); fi + +print_helm_bin: + $(info Using Helm binary ${HELM_BIN} which is helm version ${HELM_VER}) + +make-%: + @if [ -f $*/Makefile ]; then make -C $*; fi + +dep-%: make-% + @if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi + +lint-%: dep-% + @if [ -f $*/Chart.yaml ]; then $(HELM_LINT_CMD) $*; fi + +package-%: lint-% + @mkdir -p $(PACKAGE_DIR) +ifeq "$(findstring v3,$(HELM_VER))" "v3" + @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$($(HELM_BIN) package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && $(HELM_BIN) push -f $$PACKAGE_NAME $(HELM_REPO); fi +else + @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi + @$(HELM_BIN) repo index $(PACKAGE_DIR) +endif + +clean: + @rm -f */requirements.lock + @find . -type f -name '*.tgz' -delete + @rm -rf $(PACKAGE_DIR)/* + +# publish helm plugins via distrubtion directory +plugins: + @cp -R helm $(PACKAGE_DIR)/ + +# start up a local helm repo to serve up helm chart packages +# WARNING: Only helm < v3 supported +repo: + @mkdir -p $(PACKAGE_DIR) + @$(HELM_BIN) serve --repo-path $(PACKAGE_DIR) & + @sleep 3 + @$(HELM_BIN) repo index $(PACKAGE_DIR) + @$(HELM_BIN) repo add local http://127.0.0.1:8879 + +# stop local helm repo +# WARNING: Only helm < v3 supported +repo-stop: + @pkill $(HELM_BIN) + @$(HELM_BIN) repo remove local + +check-for-staging-images: + $(ROOT_DIR)/contrib/tools/check-for-staging-images.sh + +helm-repo-update: +ifeq "$(findstring v3,$(HELM_VER))" "v3" + @$(HELM_BIN) repo update +endif + +%: + @: diff --git a/smo-install/oran_oom/a1controller/.helmignore b/smo-install/oran_oom/a1controller/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/a1controller/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/a1controller/Chart.yaml b/smo-install/oran_oom/a1controller/Chart.yaml new file mode 100644 index 00000000..99ced473 --- /dev/null +++ b/smo-install/oran_oom/a1controller/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for nonrtric a1controller +name: a1controller +version: 2.0.0 diff --git a/smo-install/oran_oom/a1controller/requirements.yaml b/smo-install/oran_oom/a1controller/requirements.yaml new file mode 100644 index 00000000..f3b3ecd4 --- /dev/null +++ b/smo-install/oran_oom/a1controller/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/a1controller/templates/deployment.yaml b/smo-install/oran_oom/a1controller/templates/deployment.yaml new file mode 100644 index 00000000..c5eb5964 --- /dev/null +++ b/smo-install/oran_oom/a1controller/templates/deployment.yaml @@ -0,0 +1,96 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.a1controller" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: {{ .Values.a1controller.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.a1controller" . }} + containers: + - name: {{ include "common.containername.a1controller" . }} + image: {{ .Values.a1controller.image.registry }}/{{ .Values.a1controller.image.name }}:{{ .Values.a1controller.image.tag }} + imagePullPolicy: {{ .Values.a1controller.imagePullPolicy }} + env: + - name: MYSQL_ROOT_PASSWORD + value: openECOMP1.0 + - name: SDNC_CONFIG_DIR + value: /opt/onap/sdnc/data/properties + command: + - /opt/onap/sdnc/bin/startODL.sh + ports: + - containerPort: {{ .Values.a1controller.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.a1controller.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.a1controller.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1controller.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1controller.readiness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.a1controller.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1controller.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1controller.liveness.periodSeconds }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: db + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: db +spec: + selector: + matchLabels: + app: db + template: + metadata: + labels: + app: db + spec: + containers: + - name: sdnc-db-container + image: mysql/mysql-server:5.6 + imagePullPolicy: IfNotPresent + env: + - name: MYSQL_ROOT_HOST + value: '%' + - name: MYSQL_ROOT_PASSWORD + value: openECOMP1.0 + ports: + - containerPort: 3306 \ No newline at end of file diff --git a/smo-install/oran_oom/a1controller/templates/service.yaml b/smo-install/oran_oom/a1controller/templates/service.yaml new file mode 100644 index 00000000..5259bb84 --- /dev/null +++ b/smo-install/oran_oom/a1controller/templates/service.yaml @@ -0,0 +1,66 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.a1controller" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + {{if eq .Values.a1controller.service.allowHttp true -}} + - name: {{ index .Values.a1controller.service.httpName }} + port: {{ .Values.a1controller.service.internalPort1 }} + targetPort: {{ .Values.a1controller.service.targetPort1 }} + protocol: TCP + {{- end }} + - name: {{ index .Values.a1controller.service.httpsName }} + port: {{ .Values.a1controller.service.internalPort2 }} + targetPort: {{ .Values.a1controller.service.targetPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }} + release: {{ .Release.Name }} +--- +apiVersion: v1 +kind: Service +metadata: + name: dbhost + namespace: {{ include "common.namespace.nonrtric" . }} +spec: + ports: + - port: 3306 + targetPort: 3306 + selector: + app: db +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnctldb01 + namespace: {{ include "common.namespace.nonrtric" . }} +spec: + ports: + - port: 3306 + targetPort: 3306 + selector: + app: db diff --git a/smo-install/oran_oom/a1controller/values.yaml b/smo-install/oran_oom/a1controller/values.yaml new file mode 100644 index 00000000..491c52d7 --- /dev/null +++ b/smo-install/oran_oom/a1controller/values.yaml @@ -0,0 +1,40 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for a1controller. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +a1controller: + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-a1-controller + tag: 2.0.1 + replicaCount: 1 + service: + allowHttp: true + httpName: http + internalPort1: 8282 + targetPort1: 8181 + httpsName: https + internalPort2: 8383 + targetPort2: 8443 + liveness: + initialDelaySeconds: 300 + periodSeconds: 10 + readiness: + initialDelaySeconds: 60 + periodSeconds: 10 diff --git a/smo-install/oran_oom/a1simulator/.helmignore b/smo-install/oran_oom/a1simulator/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/a1simulator/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/a1simulator/Chart.yaml b/smo-install/oran_oom/a1simulator/Chart.yaml new file mode 100644 index 00000000..60d0cbf9 --- /dev/null +++ b/smo-install/oran_oom/a1simulator/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for A1 simulator +name: a1simulator +version: 2.0.0 diff --git a/smo-install/oran_oom/a1simulator/requirements.yaml b/smo-install/oran_oom/a1simulator/requirements.yaml new file mode 100644 index 00000000..f3b3ecd4 --- /dev/null +++ b/smo-install/oran_oom/a1simulator/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/a1simulator/templates/service.yaml b/smo-install/oran_oom/a1simulator/templates/service.yaml new file mode 100644 index 00000000..d22654c9 --- /dev/null +++ b/smo-install/oran_oom/a1simulator/templates/service.yaml @@ -0,0 +1,41 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ .Values.a1simulator.name }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + - name: {{ index .Values.a1simulator.service.httpName }} + port: {{ .Values.a1simulator.service.internalPort1 }} + targetPort: {{ .Values.a1simulator.service.targetPort1 }} + protocol: TCP + - name: {{ index .Values.a1simulator.service.httpsName }} + port: {{ .Values.a1simulator.service.internalPort2 }} + targetPort: {{ .Values.a1simulator.service.targetPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + type: ClusterIP + clusterIP: None \ No newline at end of file diff --git a/smo-install/oran_oom/a1simulator/templates/statefulset.yaml b/smo-install/oran_oom/a1simulator/templates/statefulset.yaml new file mode 100644 index 00000000..939f3a3c --- /dev/null +++ b/smo-install/oran_oom/a1simulator/templates/statefulset.yaml @@ -0,0 +1,172 @@ +################################################################################ +# 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. # +################################################################################ + +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ .Values.a1simulator.oscVersion.name }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: {{ .Values.a1simulator.oscVersion.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + serviceName: {{ .Values.a1simulator.name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.a1simulator" . }} + containers: + - name: {{ include "common.containername.a1simulator" . }} + image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }} + imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }} + ports: + - containerPort: {{ .Values.a1simulator.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.a1simulator.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1simulator.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1simulator.readiness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1simulator.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1simulator.liveness.periodSeconds }} + env: + - name: A1_VERSION + value: OSC_2.1.0 + - name: ALLOW_HTTP + value: {{ .Values.a1simulator.service.allowHttp | quote}} + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ .Values.a1simulator.stdVersion.name }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: {{ .Values.a1simulator.stdVersion.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + serviceName: {{ .Values.a1simulator.name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.a1simulator" . }} + containers: + - name: {{ include "common.containername.a1simulator" . }} + image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }} + imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }} + ports: + - containerPort: {{ .Values.a1simulator.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.a1simulator.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1simulator.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1simulator.readiness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1simulator.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1simulator.liveness.periodSeconds }} + env: + - name: A1_VERSION + value: STD_1.1.3 + - name: ALLOW_HTTP + value: {{ .Values.a1simulator.service.allowHttp | quote}} +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ .Values.a1simulator.stdVersion2.name }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: {{ .Values.a1simulator.stdVersion2.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + serviceName: {{ .Values.a1simulator.name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.a1simulator" . }} + containers: + - name: {{ include "common.containername.a1simulator" . }} + image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }} + imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }} + ports: + - containerPort: {{ .Values.a1simulator.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.a1simulator.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1simulator.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1simulator.readiness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.targetPort1 }} + initialDelaySeconds: {{ .Values.a1simulator.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.a1simulator.liveness.periodSeconds }} + env: + - name: A1_VERSION + value: STD_2.0.0 + - name: ALLOW_HTTP + value: {{ .Values.a1simulator.service.allowHttp | quote}} diff --git a/smo-install/oran_oom/a1simulator/values.yaml b/smo-install/oran_oom/a1simulator/values.yaml new file mode 100644 index 00000000..9836bf22 --- /dev/null +++ b/smo-install/oran_oom/a1simulator/values.yaml @@ -0,0 +1,51 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for a1-simulator. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +a1simulator: + name: a1-sim + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: a1-simulator + tag: 2.1.0 + service: + allowHttp: true + httpName: http + internalPort1: 8085 + targetPort1: 8085 + httpsName: https + internalPort2: 8185 + targetPort2: 8185 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 + oscVersion: + name: a1-sim-osc + replicaCount: 2 + stdVersion: + name: a1-sim-std + replicaCount: 2 + stdVersion2: + name: a1-sim-std2 + replicaCount: 2 + diff --git a/smo-install/oran_oom/aux-common/Chart.yaml b/smo-install/oran_oom/aux-common/Chart.yaml new file mode 100644 index 00000000..379771c8 --- /dev/null +++ b/smo-install/oran_oom/aux-common/Chart.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 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 +description: Common templates for inclusion in other charts +name: aux-common +version: 3.0.0 diff --git a/smo-install/oran_oom/aux-common/templates/_createPassword.tpl b/smo-install/oran_oom/aux-common/templates/_createPassword.tpl new file mode 100644 index 00000000..938b0ee5 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_createPassword.tpl @@ -0,0 +1,62 @@ +{{/* +# Copyright © 2019 Samsung Electronics +# +# 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. +*/}} + +{{/* + Resolve the master password to be used to derive other passwords. The value of + .Values.masterPassword is used by default, unless either override mechanism is + used: + + - .Values.global.masterPassword : override default master password for all charts + - .Values.masterPasswordOverride : override global and default masterPassword on a per chart basis +*/}} +{{- define "common.masterPassword" -}} + {{ if .Values.masterPasswordOverride }} + {{- printf "%d" .Values.masterPasswordOverride -}} + {{ else if .Values.global.masterPassword }} + {{- printf "%d" .Values.global.masterPassword -}} + {{ else if .Values.masterPassword }} + {{- printf "%d" .Values.masterPassword -}} + {{ else }} + {{ fail "masterPassword not provided" }} + {{ end }} +{{- end -}} + +{{/* + Generate a new password based on masterPassword. The new password is not + random, it is derived from masterPassword, fully qualified chart name and + additional uid provided by the user. This ensures that every time when we + run this function from the same place, with the same password and uid we + get the same results. This allows to avoid password changes while you are + doing upgrade. + + The function can take from one to three arguments (inside a dictionary): + - .dot : environment (.) + - .uid : unique identifier of password to be generated within this particular chart. Use only when you create more than a single password within one chart + - .strength : complexity of derived password. See derivePassword documentation for more details + + Example calls: + + {{ include "common.createPassword" . }} + {{ include "common.createPassword" (dict "dot" . "uid" "mysqlRootPasswd") }} + +*/}} +{{- define "common.createPassword" -}} + {{- $dot := default . .dot -}} + {{- $uid := default "onap" .uid -}} + {{- $strength := default "long" .strength -}} + {{- $mp := include "common.masterPassword" $dot -}} + {{- derivePassword 1 $strength $mp (include "common.fullname" $dot) $uid -}} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_ingress.tpl b/smo-install/oran_oom/aux-common/templates/_ingress.tpl new file mode 100644 index 00000000..b4afe630 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_ingress.tpl @@ -0,0 +1,84 @@ +{{- define "ingress.config.port" -}} +{{- if .Values.ingress -}} +{{- if or (not .Values.global.ingress.virtualhost) (not .Values.global.ingress.virtualhost.enabled) -}} + - http: + paths: +{{- range .Values.ingress.service }} + - path: {{ printf "/%s" (required "baseaddr" .baseaddr) }} + backend: + serviceName: {{ .name }} + servicePort: {{ .port }} +{{- end -}} +{{- else if .Values.ingress.service -}} +{{- $burl := (required "baseurl" .Values.global.ingress.virtualhost.baseurl) -}} +{{ range .Values.ingress.service }} + - host: {{ printf "%s.%s" (required "baseaddr" .baseaddr) $burl }} + http: + paths: + - backend: + serviceName: {{ .name }} + servicePort: {{ .port }} +{{- end -}} +{{- else -}} + - path: {{ printf "/%s" .Chart.Name }} + backend: + serviceName: {{ .Chart.Name }} + servicePort: {{ .Values.service.externalPort }} +{{- end -}} +{{- end -}} +{{- end -}} + + +{{- define "ingress.config.annotations.ssl" -}} +{{- if .Values.ingress.config -}} +{{- if .Values.ingress.config.ssl -}} +{{- if eq .Values.ingress.config.ssl "redirect" -}} +kubernetes.io/ingress.class: nginx +nginx.ingress.kubernetes.io/ssl-passthrough: "true" +nginx.ingress.kubernetes.io/ssl-redirect: "true" +{{- else if eq .Values.ingress.config.ssl "native" -}} +nginx.ingress.kubernetes.io/ssl-redirect: "true" +{{- else if eq .Values.ingress.config.ssl "none" -}} +nginx.ingress.kubernetes.io/ssl-redirect: "false" +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} + + +{{- define "ingress.config.annotations" -}} +{{- if .Values.ingress -}} +{{- if .Values.ingress.annotations -}} +{{ toYaml .Values.ingress.annotations | indent 4 | trim }} +{{- end -}} +{{- end -}} +{{ include "ingress.config.annotations.ssl" . | indent 4 | trim }} +{{- end -}} + + +{{- define "common.ingress" -}} +{{- if .Values.ingress -}} +{{- if .Values.global.ingress -}} +{{- if and .Values.ingress.enabled .Values.global.ingress.enabled -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ include "common.fullname" . }}-ingress + annotations: + {{ include "ingress.config.annotations" . }} + labels: + app: {{ .Chart.Name }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + rules: + {{ include "ingress.config.port" . | trim }} +{{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/smo-install/oran_oom/aux-common/templates/_mariadb.tpl b/smo-install/oran_oom/aux-common/templates/_mariadb.tpl new file mode 100644 index 00000000..15fb5a42 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_mariadb.tpl @@ -0,0 +1,59 @@ +{{/* +# Copyright © 2019 Orange +# +# 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. +*/}} + +{{/* + Choose the name of the mariadb service to use. +*/}} +{{- define "common.mariadbService" -}} + {{- if .Values.global.mariadbGalera.localCluster -}} + {{- index .Values "mariadb-galera" "service" "name" -}} + {{- else -}} + {{- .Values.global.mariadbGalera.service -}} + {{- end -}} +{{- end -}} + +{{/* + Choose the value of mariadb port to use. +*/}} +{{- define "common.mariadbPort" -}} + {{- if .Values.global.mariadbGalera.localCluster -}} + {{- index .Values "mariadb-galera" "service" "internalPort" -}} + {{- else -}} + {{- .Values.global.mariadbGalera.internalPort -}} + {{- end -}} +{{- end -}} + +{{/* + Choose the value of secret to retrieve user value. +*/}} +{{- define "common.mariadbSecret" -}} + {{- if .Values.global.mariadbGalera.localCluster -}} + {{ printf "%s-%s-db-user-credentials" (include "common.fullname" .) (index .Values "mariadb-galera" "nameOverride") -}} + {{- else -}} + {{ printf "%s-%s" (.Release.Name) (index .Values "mariadb-init" "nameOverride") -}} + {{- end -}} +{{- end -}} + +{{/* + Choose the value of secret param to retrieve user value. +*/}} +{{- define "common.mariadbSecretParam" -}} + {{- if .Values.global.mariadbGalera.localCluster -}} + {{ printf "password" -}} + {{- else -}} + {{ printf "db-user-password" -}} + {{- end -}} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_name.tpl b/smo-install/oran_oom/aux-common/templates/_name.tpl new file mode 100644 index 00000000..f84ca21f --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_name.tpl @@ -0,0 +1,41 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. +*/}} + +{{/* + Expand the name of a chart. +*/}} +{{- define "common.name" -}} + {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* + Create a default fully qualified application name. + Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "common.fullname" -}} + {{- $name := default .Chart.Name .Values.nameOverride -}} + {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* + Retrieve the "original" release from the component release: + if ONAP is deploy with "helm deploy --name toto", then cassandra components + will have "toto-cassandra" as release name. + this function would answer back "toto". +*/}} +{{- define "common.release" -}} + {{- regexReplaceAll "-[a-zA-Z0-9]*$" .Release.Name "" }} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_namespace.tpl b/smo-install/oran_oom/aux-common/templates/_namespace.tpl new file mode 100644 index 00000000..94c9ee72 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_namespace.tpl @@ -0,0 +1,26 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. +*/}} + +{{/* + Resolve the namespace to apply to a chart. The default namespace suffix + is the name of the chart. This can be overridden if necessary (eg. for subcharts) + using the following value: + + - .Values.nsPrefix : override namespace prefix +*/}} +{{- define "common.namespace" -}} + {{- default .Release.Namespace .Values.nsPrefix -}} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_repository.tpl b/smo-install/oran_oom/aux-common/templates/_repository.tpl new file mode 100644 index 00000000..272db421 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_repository.tpl @@ -0,0 +1,49 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. +*/}} + +{{/* + Resolve the name of the common image repository. + The value for .Values.repository is used by default, + unless either override mechanism is used. + + - .Values.global.repository : override default image repository for all images + - .Values.repositoryOverride : override global and default image repository on a per image basis +*/}} +{{- define "common.repository" -}} + {{if .Values.repositoryOverride }} + {{- printf "%s" .Values.repositoryOverride -}} + {{else}} + {{- default .Values.repository .Values.global.repository -}} + {{end}} +{{- end -}} + + +{{/* + Resolve the image repository secret token. + The value for .Values.global.repositoryCred is used: + repositoryCred: + user: user + password: password + mail: email (optional) +*/}} +{{- define "common.repository.secret" -}} + {{- $repo := include "common.repository" . }} + {{- $repo := default "nexus3.onap.org:10001" $repo }} + {{- $cred := .Values.global.repositoryCred }} + {{- $mail := default "@" $cred.mail }} + {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }} + {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $cred.user $cred.password $mail $auth | b64enc -}} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_resources.tpl b/smo-install/oran_oom/aux-common/templates/_resources.tpl new file mode 100644 index 00000000..fae77435 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_resources.tpl @@ -0,0 +1,59 @@ +{{- /* +# Copyright © 2018 Amdocs, Bell Canada +# +# 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. +*/ -}} + +{{- /* + Resolve the name of the common resource limit/request flavor. + The value for .Values.flavor is used by default, + unless either override mechanism is used. + + - .Values.global.flavor : override default flavor for all charts + - .Values.flavorOverride : override global and default flavor on a per chart basis +*/ -}} +{{- define "common.flavor" -}} + {{if .Values.flavorOverride }} + {{- printf "%s" .Values.flavorOverride -}} + {{else}} + {{- default .Values.flavor .Values.global.flavor -}} + {{end}} +{{- end -}} + +{{- /* + Resolve the resource limit/request flavor using the desired flavor value. + + - .Values.resources : YAML definition of resource limits. The flavor key + is computed based on the common.flavor template and + is used as the selected resource limit through the pluck + e.g: resources: + small: + limits: + cpu: 200m + memory: 4Gi + requests: + cpu: 100m + memory: 1Gi + large: + limits: + cpu: 400m + memory: 8Gi + requests: + cpu: 200m + memory: 2Gi + unlimited: {} +*/ -}} +{{- define "common.resources" -}} +{{- $flavor := include "common.flavor" . -}} +{{- toYaml (pluck $flavor .Values.resources | first) | indent 12 -}} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_secret.yaml b/smo-install/oran_oom/aux-common/templates/_secret.yaml new file mode 100644 index 00000000..523d7880 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_secret.yaml @@ -0,0 +1,276 @@ +{{/* +# Copyright © 2019 AT&T, Samsung Electronics +# +# 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. +*/}} + +{{/* + For internal use only! + + Generates a secret header with given name and desired labels. + + The template takes two arguments: + - .global: environment (.) + - .name: name of the secret + + Example call: + {{ include "common.secret._header" (dict "global" . "name" "myFancyName") }} +*/}} +{{- define "common.secret._header" -}} +{{- $global := .global }} +{{- $name := .name }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ $name }} + namespace: {{ include "common.namespace" $global }} + labels: + app: {{ include "common.name" $global }} + chart: {{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }} + release: {{ $global.Release.Name }} + heritage: {{ $global.Release.Service }} +type: Opaque +{{- end -}} + +{{/* + For internal use only! + + Pick a value based on "user input" and generation policy. + + The template takes below arguments: + - .global: environment (.) + - .secretName: name of the secret where the value will be placed + - .secretEnv: map of values which configures this secret. This can contain below keys: + - value: Value of secret key provided by user (can be a template inside a string) + - policy: What to do if value is missing or empty. Possible options are: + - generate: Generate a new password deriving it from master password + - required: Fail the deployment if value has not been provided + Defaults to generate. + - name: Name of the key to which this value should be assigned +*/}} +{{- define "common.secret._value" -}} + {{- $global := .global }} + {{- $name := .secretName }} + {{- $secretEnv := .secretEnv }} + {{- $value := tpl $secretEnv.value $global }} + {{- $policy := default "generate" $secretEnv.policy }} + + {{- if $value }} + {{- $value | quote }} + {{- else if eq $policy "generate" }} + {{- include "common.createPassword" (dict "dot" $global "uid" $name) | quote }} + {{- else }} + {{- fail (printf "Value for %s secret %s key not provided" $name $secretEnv.name) }} + {{- end }} +{{- end -}} + + +{{/* + For internal use only! + + Generate a secret name based on provided name or UID. + If UID is provided then the name is generated by appending this UID right after + the chart name. If name is provided, it overrides the name generation algorith + and is used right away. Both name and uid strings may contain a template to be + resolved. + + The template takes below arguments: + - .global: environment (.) + - .uid: string that uniquely identifies this secret within a helm chart + - .name: string that can be used to override default name generation algorithm + and provide a custom name for the secret +*/}} +{{- define "common.secret._genName" -}} + {{- $global := .global }} + {{- $uid := tpl (default "" .uid) $global }} + {{- $name := tpl (default "" .name) $global }} + {{- default (printf "%s-%s" (include "common.fullname" $global) $uid) $name }} +{{- end -}} + +{{/* + Get the real secret name by UID or name, based on the configuration provided by user. + User may decide to not create a new secret but reuse existing one for this deployment + (aka externalSecret). In this case the real name of secret to be used is different + than the one declared in secret definition. This easily retrieve current secret real + name based on declared name or UID even if it has been overrided by the user using + externalSecret option. You should use this template always when you need to reference + a secret created using common.secret template by name. + + The template takes below arguments: + - .global: environment (.) + - .uid: string that uniquely identifies this secret within a helm chart + (can be omitted if name has been provided) + - .name: name which was used to declare a secret + (can be omitted if uid has been provided) +*/}} +{{- define "common.secret.getSecretName" -}} + {{- $global := .global }} + {{- $targetName := include "common.secret._genName" (dict "global" $global "uid" .uid "name" .name) }} + {{- range $secret := $global.Values.secrets }} + {{- $currName := include "common.secret._genName" (dict "global" $global "uid" $secret.uid "name" $secret.name) }} + {{- if eq $currName $targetName }} + {{- $externalSecret := tpl (default "" $secret.externalSecret) $global }} + {{- default $currName $externalSecret }} + {{- end }} + {{- end }} +{{- end -}} + +{{/* + Convenience template which can be used to easily set the value of environment variable + to the value of a key in a secret. + + It takes care of all name mangling, usage of external secrets etc. + + The template takes below arguments: + - .global: environment (.) + - .uid: string that uniquely identifies this secret within a helm chart + (can be omitted if name has been provided) + - .name: name which was used to declare a secret + (can be omitted if uid has been provided) + - .key: Key within this secret which value should be assigned to this variable + + Example usage: + env: + - name: SECRET_PASSWORD + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "secret" "key" "password") | indent 8}} +*/}} +{{- define "common.secret.envFromSecret" -}} + {{- $key := .key }} +valueFrom: + secretKeyRef: + name: {{ include "common.secret.getSecretName" . }} + key: {{ $key }} +{{- end -}} + +{{/* + Define secrets to be used by chart. + Every secret has a type which is one of: + - generic: + Generic secret template that allows to input some raw data (from files). + File Input can be passed as list of files (filePaths) or as a single string + (filePath) + - genericKV: + Type of secret which allows you to define a list of key value pairs. + The list is assiged to envs value. Every item may define below items: + - name: + Identifier of this value within secret + - value: + String that defines a value associated with given key. + This can be a simple string or a template. + - policy: + Defines what to do if value is not provided by the user. + Available options are: + - generate: + Generate a value by derriving it from master password + - required: + Fail the deployment + - password: + Type of secret that holds only the password. + Only two items can be defined for this type: + - password: + Equivalent of value field from genericKV + - policy: + The same meaning as for genericKV policy field + - basicAuth: + Type of secret that holds both username and password. + Below fields are available: + - login: + The value for login key. + This can be a simple string or a template. + Providing a value for login is always required. + - password: + The value for password key. + This can be a simple string or a template. + - passwordPolicy: + The same meaning as the policy field in genericKV. + Only the policy for password can be set. + + Every secret can be identified using: + - uid: + A string to be appended to the chart fullname to generate a secret name. + - name: + Overrides default secret name generation and allows to set immutable + and globaly unique name + + To allow sharing a secret between the components and allow to pre-deploy secrets + before ONAP deployment it is possible to use already existing secret instead of + creating a new one. For this purpose externalSecret field can be used. If value of + this field is evaluated to true no new secret is created, only the name of the + secret is aliased to the external one. + + Example usage: + secrets.yaml: + {{ include "common.secret" . }} + + values.yaml: + mysqlLogin: "root" + + mysqlExternalSecret: "some-other-secret-name" + + secrets: + - uid: "mysql" + externalSecret: '{{ tpl .Values.passExternalSecret . }}' + type: basicAuth + login: '{{ .Values.mysqlLogin }}' + mysqlPassword: '{{ .Values.mysqlPassword }}' + passwordPolicy: generate + + In the above example new secret is not going to be created. + Already existing one (some-other-secret-name) is going to be used. + To force creating a new one, just make sure that mysqlExternalSecret + is not set. + +*/}} +{{- define "common.secret" -}} + {{- $global := . }} + {{- range $secret := .Values.secrets }} + {{- $name := include "common.secret._genName" (dict "global" $global "uid" $secret.uid "name" $secret.name) }} + {{- $type := default "generic" $secret.type }} + {{- $externalSecret := tpl (default "" $secret.externalSecret) $global }} + {{- if not $externalSecret }} +--- + {{ include "common.secret._header" (dict "global" $global "name" $name) }} + + {{- if eq $type "generic" }} +data: + {{- range $curFilePath := $secret.filePaths }} + {{ tpl ($global.Files.Glob $curFilePath).AsSecrets $global | indent 2 }} + {{- end }} + {{- if $secret.filePath }} + {{ tpl ($global.Files.Glob $secret.filePath).AsSecrets $global | indent 2 }} + {{- end }} + {{- else if eq $type "genericKV" }} +stringData: + {{- if $secret.envs }} + {{- range $secretEnv := $secret.envs }} + {{- $valueDesc := (dict "global" $global "secretName" $name "secretEnv" $secretEnv) }} + {{ $secretEnv.name }}: {{ include "common.secret._value" $valueDesc }} + {{- end }} + {{- end }} + {{- else if eq $type "password" }} + {{- $secretEnv := (dict "policy" (default "generate" $secret.policy) "name" "password" "value" $secret.password) }} + {{- $valueDesc := (dict "global" $global "secretName" $name "secretEnv" $secretEnv) }} +stringData: + password: {{ include "common.secret._value" $valueDesc }} + {{- else if eq $type "basicAuth" }} +stringData: + {{- $secretEnv := (dict "policy" "required" "name" "login" "value" $secret.login) }} + {{- $valueDesc := (dict "global" $global "secretName" $name "secretEnv" $secretEnv) }} + login: {{ include "common.secret._value" $valueDesc }} + {{- $secretEnv := (dict "policy" (default "generate" $secret.passwordPolicy) "name" "password" "value" $secret.password) }} + {{- $valueDesc := (dict "global" $global "secretName" $name "secretEnv" $secretEnv) }} + password: {{ include "common.secret._value" $valueDesc }} + {{- end }} + {{- end }} + {{- end }} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/templates/_service.tpl b/smo-install/oran_oom/aux-common/templates/_service.tpl new file mode 100644 index 00000000..77b77d05 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_service.tpl @@ -0,0 +1,31 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. +*/}} + +{{/* + Resolve the name of a chart's service. + + The default will be the chart name (or .Values.nameOverride if set). + And the use of .Values.service.name overrides all. + + - .Values.service.name : override default service (ie. chart) name +*/}} +{{/* + Expand the service name for a chart. +*/}} +{{- define "common.servicename" -}} + {{- $name := default .Chart.Name .Values.nameOverride -}} + {{- default $name .Values.service.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} \ No newline at end of file diff --git a/smo-install/oran_oom/aux-common/templates/_storageClass.tpl b/smo-install/oran_oom/aux-common/templates/_storageClass.tpl new file mode 100644 index 00000000..8fd1f977 --- /dev/null +++ b/smo-install/oran_oom/aux-common/templates/_storageClass.tpl @@ -0,0 +1,57 @@ +{{/* +# Copyright © 2019 Amdocs, Bell Canada, Orange +# +# 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. +*/}} + +{{/* + Expand the name of the storage class. + The value "common.fullname"-data is used by default, + unless either override mechanism is used. + + - .Values.global.persistence.storageClass : override default storageClass for all charts + - .Values.persistence.storageClassOverride : override global and default storage class on a per chart basis + - .Values.persistence.storageClass : override default storage class on a per chart basis +*/}} +{{- define "common.storageClass" -}} + {{- if .Values.persistence.storageClassOverride -}} + {{- if ne "-" .Values.persistence.storageClassOverride -}} + {{- printf "%s" .Values.persistence.storageClassOverride -}} + {{- else -}} + {{- $storage_class := "" -}} + {{- printf "%q" $storage_class -}} + {{- end -}} + {{- else -}} + {{- if or .Values.persistence.storageClass .Values.global.persistence.storageClass }} + {{- if ne "-" (default .Values.persistence.storageClass .Values.global.persistence.storageClass) -}} + {{- printf "%s" (default .Values.persistence.storageClass .Values.global.persistence.storageClass) -}} + {{- else -}} + {{- $storage_class := "" -}} + {{- printf "%q" $storage_class -}} + {{- end -}} + {{- else -}} + {{- printf "%s-data" (include "common.fullname" .) -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{/* + Calculate if we need a PV. If a storageClass is provided, then we don't need. +*/}} +{{- define "common.needPV" -}} +{{- if or (or .Values.persistence.storageClassOverride .Values.persistence.storageClass) .Values.global.persistence.storageClass -}} + False +{{- else -}} + True +{{- end -}} +{{- end -}} diff --git a/smo-install/oran_oom/aux-common/values.yaml b/smo-install/oran_oom/aux-common/values.yaml new file mode 100644 index 00000000..60788f1f --- /dev/null +++ b/smo-install/oran_oom/aux-common/values.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +################################################################# +# Global configuration default values that can be inherited by +# all subcharts. +################################################################# diff --git a/smo-install/oran_oom/controlpanel/.helmignore b/smo-install/oran_oom/controlpanel/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/controlpanel/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/controlpanel/Chart.yaml b/smo-install/oran_oom/controlpanel/Chart.yaml new file mode 100644 index 00000000..585ada4c --- /dev/null +++ b/smo-install/oran_oom/controlpanel/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for nonrtric controlpanel +name: controlpanel +version: 2.0.0 diff --git a/smo-install/oran_oom/controlpanel/requirements.yaml b/smo-install/oran_oom/controlpanel/requirements.yaml new file mode 100644 index 00000000..f3b3ecd4 --- /dev/null +++ b/smo-install/oran_oom/controlpanel/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/controlpanel/resources/nginx.conf b/smo-install/oran_oom/controlpanel/resources/nginx.conf new file mode 100644 index 00000000..46f87d09 --- /dev/null +++ b/smo-install/oran_oom/controlpanel/resources/nginx.conf @@ -0,0 +1,28 @@ +events{} + +http { + include /etc/nginx/mime.types; + + upstream backend { + server nonrtricgateway:9090; + } + + server { + listen 8080; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location /a1-policy/ { + proxy_pass http://backend; + } + location /data-producer/ { + proxy_pass http://backend; + } + location /data-consumer/ { + proxy_pass http://backend; + } + location / { + try_files $uri $uri/ /index.html; + } + } +} \ No newline at end of file diff --git a/smo-install/oran_oom/controlpanel/templates/configmap.yaml b/smo-install/oran_oom/controlpanel/templates/configmap.yaml new file mode 100644 index 00000000..e351ce97 --- /dev/null +++ b/smo-install/oran_oom/controlpanel/templates/configmap.yaml @@ -0,0 +1,28 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.controlpanel" . }}-configmap + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/smo-install/oran_oom/controlpanel/templates/deployment.yaml b/smo-install/oran_oom/controlpanel/templates/deployment.yaml new file mode 100644 index 00000000..eb8fccea --- /dev/null +++ b/smo-install/oran_oom/controlpanel/templates/deployment.yaml @@ -0,0 +1,70 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.controlpanel" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: {{ .Values.controlpanel.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.controlpanel" . }} + containers: + - name: {{ include "common.containername.controlpanel" . }} + image: {{ .Values.controlpanel.image.registry }}/{{ .Values.controlpanel.image.name }}:{{ .Values.controlpanel.image.tag }} + imagePullPolicy: {{ .Values.controlpanel.imagePullPolicy }} + ports: + - containerPort: {{ .Values.controlpanel.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.controlpanel.service.targetPort2 }} + protocol: TCP + volumeMounts: + - name: configmap + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + readinessProbe: + tcpSocket: + port: {{ .Values.controlpanel.service.targetPort1 }} + initialDelaySeconds: {{ .Values.controlpanel.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.controlpanel.liveness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.controlpanel.service.targetPort1 }} + initialDelaySeconds: {{ .Values.controlpanel.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.controlpanel.liveness.periodSeconds }} + volumes: + - name: configmap + configMap: + name: {{ include "common.name.controlpanel" . }}-configmap \ No newline at end of file diff --git a/smo-install/oran_oom/controlpanel/templates/service.yaml b/smo-install/oran_oom/controlpanel/templates/service.yaml new file mode 100644 index 00000000..1a61ed75 --- /dev/null +++ b/smo-install/oran_oom/controlpanel/templates/service.yaml @@ -0,0 +1,44 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.controlpanel" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: NodePort + ports: + {{if eq .Values.controlpanel.service.allowHttp true -}} + - name: {{ index .Values.controlpanel.service.httpName }} + port: {{ .Values.controlpanel.service.internalPort1 }} + targetPort: {{ .Values.controlpanel.service.targetPort1 }} + nodePort: {{ .Values.controlpanel.service.externalPort1 }} + protocol: TCP + {{- end }} + - name: {{ index .Values.controlpanel.service.httpsName }} + port: {{ .Values.controlpanel.service.internalPort2 }} + targetPort: {{ .Values.controlpanel.service.targetPort2 }} + nodePort: {{ .Values.controlpanel.service.externalPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }} + release: {{ .Release.Name }} \ No newline at end of file diff --git a/smo-install/oran_oom/controlpanel/values.yaml b/smo-install/oran_oom/controlpanel/values.yaml new file mode 100644 index 00000000..397633fe --- /dev/null +++ b/smo-install/oran_oom/controlpanel/values.yaml @@ -0,0 +1,43 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for controlpanel. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +controlpanel: + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-controlpanel + tag: 2.2.0 + replicaCount: 1 + service: + allowHttp: true + httpName: http + internalPort1: 8182 + targetPort1: 8080 + externalPort1: 30091 + httpsName: https + internalPort2: 8082 + targetPort2: 8082 + externalPort2: 30092 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 diff --git a/smo-install/oran_oom/dmaapadapterservice/Chart.yaml b/smo-install/oran_oom/dmaapadapterservice/Chart.yaml new file mode 100644 index 00000000..623ae8b8 --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart for Dmaap Adapter Service +name: dmaapadapterservice +version: 1.0.0 diff --git a/smo-install/oran_oom/dmaapadapterservice/requirements.yaml b/smo-install/oran_oom/dmaapadapterservice/requirements.yaml new file mode 100644 index 00000000..69b4db6d --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/dmaapadapterservice/resources/config/application.yaml b/smo-install/oran_oom/dmaapadapterservice/resources/config/application.yaml new file mode 100644 index 00000000..2067a819 --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/resources/config/application.yaml @@ -0,0 +1,59 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +spring: + profiles: + active: prod + main: + allow-bean-definition-overriding: true + aop: + auto: false +management: + endpoints: + web: + exposure: + include: "loggers,logfile,health,info,metrics,threaddump,heapdump" + +logging: + level: + ROOT: ERROR + org.springframework: ERROR + org.springframework.data: ERROR + org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR + org.oran.dmaapadapter: INFO + file: + name: /var/log/dmaap-adaptor-service/application.log +server: + port : 8435 + http-port: 8084 + ssl: + key-store-type: JKS + key-store-password: policy_agent + key-store: /opt/app/dmaap-adaptor-service/etc/cert/keystore.jks + key-password: policy_agent + key-alias: policy_agent +app: + webclient: + trust-store-used: false + trust-store-password: policy_agent + trust-store: /opt/app/dmaap-adaptor-service/etc/cert/truststore.jks + http.proxy-host: + http.proxy-port: 0 + ecs-base-url: https://enrichmentservice:9083 + configuration-filepath: /opt/app/dmaap-adaptor-service/data/application_configuration.json + dmaap-base-url: http://message-router.onap:3904 + # The url used to adress this component. This is used as a callback url sent to other components. + dmaap-adapter-base-url: https://dmaapadapterservice:9088 diff --git a/smo-install/oran_oom/dmaapadapterservice/resources/data/application_configuration.json b/smo-install/oran_oom/dmaapadapterservice/resources/data/application_configuration.json new file mode 100644 index 00000000..a8967d8b --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/resources/data/application_configuration.json @@ -0,0 +1,8 @@ +{ + "types": [ + { + "id": "ExampleInformationType", + "dmaapTopicUrl": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12" + } + ] +} diff --git a/smo-install/oran_oom/dmaapadapterservice/templates/configmap.yaml b/smo-install/oran_oom/dmaapadapterservice/templates/configmap.yaml new file mode 100644 index 00000000..e0552132 --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/templates/configmap.yaml @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.dmaapadapterservice" . }}-configmap-config + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.dmaapadapterservice" . }}-configmap-data + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }} diff --git a/smo-install/oran_oom/dmaapadapterservice/templates/service.yaml b/smo-install/oran_oom/dmaapadapterservice/templates/service.yaml new file mode 100644 index 00000000..b2f0ad68 --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/templates/service.yaml @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.dmaapadapterservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.dmaapadapterservice.service.allowHttp true -}} + - name: {{ index .Values.dmaapadapterservice.service.httpName }} + port: {{ .Values.dmaapadapterservice.service.internalPort1 }} + targetPort: {{ .Values.dmaapadapterservice.service.targetPort1 }} + protocol: TCP + {{- end }} + - name: {{ index .Values.dmaapadapterservice.service.httpsName }} + port: {{ .Values.dmaapadapterservice.service.internalPort2 }} + targetPort: {{ .Values.dmaapadapterservice.service.targetPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + release: {{ .Release.Name }} + type: ClusterIP diff --git a/smo-install/oran_oom/dmaapadapterservice/templates/statefulset.yaml b/smo-install/oran_oom/dmaapadapterservice/templates/statefulset.yaml new file mode 100644 index 00000000..5bc2979a --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/templates/statefulset.yaml @@ -0,0 +1,74 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.dmaapadapterservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + serviceName: {{ include "common.name.dmaapadapterservice" . }} + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.dmaapadapterservice" . }} + containers: + - name: {{ include "common.container.dmaapadapterservice" . }} + image: {{ .Values.dmaapadapterservice.image.registry }}/{{ .Values.dmaapadapterservice.image.name }}:{{ .Values.dmaapadapterservice.image.tag }} + imagePullPolicy: {{ .Values.dmaapadapterservice.imagePullPolicy }} + ports: + - containerPort: {{ .Values.dmaapadapterservice.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.dmaapadapterservice.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.dmaapadapterservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.dmaapadapterservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.dmaapadapterservice.liveness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.dmaapadapterservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.dmaapadapterservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.dmaapadapterservice.liveness.periodSeconds }} + volumeMounts: + - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-config + mountPath: /opt/app/dmaap-adaptor-service/config + - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-data + mountPath: /opt/app/dmaap-adaptor-service/data + volumes: + - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-config + configMap: + name: {{ include "common.name.dmaapadapterservice" . }}-configmap-config + - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-data + configMap: + name: {{ include "common.name.dmaapadapterservice" . }}-configmap-data diff --git a/smo-install/oran_oom/dmaapadapterservice/values.yaml b/smo-install/oran_oom/dmaapadapterservice/values.yaml new file mode 100644 index 00000000..123b2b73 --- /dev/null +++ b/smo-install/oran_oom/dmaapadapterservice/values.yaml @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +# Default values for Dmaap Adapter Service. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +dmaapadapterservice: + imagePullPolicy: IfNotPresent + image: + registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" + name: "nonrtric-dmaap-adaptor" + tag: 1.0.0 + service: + allowHttp: true + httpName: http + internalPort1: 9087 + targetPort1: 8084 + httpsName: https + internalPort2: 9088 + targetPort2: 8435 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 diff --git a/smo-install/oran_oom/du-simulator/Chart.yaml b/smo-install/oran_oom/du-simulator/Chart.yaml new file mode 100644 index 00000000..dfbd9989 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart for o-du simulator +name: du-simulator +version: 1.0.0 diff --git a/smo-install/oran_oom/du-simulator/resources/config/config.json b/smo-install/oran_oom/du-simulator/resources/config/config.json new file mode 100644 index 00000000..290d21b6 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/resources/config/config.json @@ -0,0 +1,74 @@ +{ + "container-rules": { + "excluded-modules": [], + "excluded-features": [] + }, + + "supervisor-rules": { + "netopeer": { + "path": "/usr/local/bin/netopeer2-server", + "args": ["-d", "-v2"], + "autorestart": true, + "stdout": "log/netopeer-stdout.log", + "stderr": "log/netopeer-stderr.log" + }, + + "ntsim-network-function": { + "path": "/opt/dev/ntsim-ng/ntsim-ng", + "args": ["-w/opt/dev/ntsim-ng", "-f"], + "nomanual": true + } + }, + + "datastore-random-generation-rules" : { + "excluded-modules": [ + "sysrepo", + "sysrepo-monitoring", + "ietf-yang-library", + "ietf-netconf-acm", + "ietf-netconf-monitoring", + "nc-notifications", + "ietf-keystore", + "ietf-truststore", + "ietf-system", + "ietf-netconf-server", + "nts-network-function" + ], + + "default-list-instances": 2, + "custom-list-instances" : [] + }, + + "datastore-populate-rules": { + "random-generation-enabled": true, + + "pre-generated-operational-data": [ + "/opt/dev/deploy/data/o-ran-sc-du-hello-world-operational.xml" + ], + "pre-generated-running-data": [ + "/opt/dev/deploy/data/o-ran-sc-du-hello-world-running.xml" + ] + }, + + "fault-rules" : { + "yang-notif-template" : "$$uint16_counter$$%%object%%%%affected-object%%%%fault-severity%%%%cleared%%%%text%%%%date-time%%", + "choosing-method" : "linear", + "faults" : [ +{{ $faultsSize := (len .du.simulatedFaults) }} +{{ range $i, $fault := .du.simulatedFaults }} + { + "condition" : "{{ $fault.condition }}", + "object" : "/o-ran-sc-du-hello-world:network-function/du-to-ru-connection[name='{{$fault.name}}']", + "severity" : "{{$fault.severity}}", + "date-time" : "$$time$$", + "specific-problem" : "{{$fault.specificProblem}}", + + "fault-severity" : "{{$fault.faultSeverity}}", + "affected-object" : "%%object%%", + "cleared" : "{{$fault.cleared}}", + "text" : "{{$fault.text}}" + }{{ if lt (add1 $i) $faultsSize }},{{ end }} +{{ end }} + ] + } +} diff --git a/smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-operational.xml b/smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-operational.xml new file mode 100644 index 00000000..c3785ebf --- /dev/null +++ b/smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-operational.xml @@ -0,0 +1,10 @@ + +{{ range $i, $ru := .du.rus }} + + {{ $ru.name }} + {{ $ru.administrativeState }} + {{ $ru.operationalState }} + {{ $ru.status }} + +{{ end }} + diff --git a/smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-running.xml b/smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-running.xml new file mode 100644 index 00000000..739d57d9 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/resources/config/o-ran-sc-du-hello-world-running.xml @@ -0,0 +1,10 @@ + +{{ range $ru := .du.rus }} + + + {{ $ru.name }} + {{ $ru.administrativeState }} + +{{ end }} + + diff --git a/smo-install/oran_oom/du-simulator/templates/configmap.yaml b/smo-install/oran_oom/du-simulator/templates/configmap.yaml new file mode 100644 index 00000000..b890ef78 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/templates/configmap.yaml @@ -0,0 +1,15 @@ +{{ $currentScope := .}} +{{- range $i, $du := .Values.dus }} + {{- $_ := set $ "du" $du }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $du.name }}-configmap + labels: + sim-name: {{ $du.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +data: +{{ tpl ($.Files.Glob "resources/config/*.{json,xml}").AsConfig $ | indent 2 }} +{{- end }} diff --git a/smo-install/oran_oom/du-simulator/templates/configmapenv.yaml b/smo-install/oran_oom/du-simulator/templates/configmapenv.yaml new file mode 100644 index 00000000..905788e3 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/templates/configmapenv.yaml @@ -0,0 +1,41 @@ +{{- range $i, $du := .Values.dus }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $du.name }}-configmapenv + labels: + sim-name: {{ $du.name }}-env + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +data: + IPv6_ENABLED: {{ $.Values.ntsimNg.ipV6Enabled | quote }} + SSH_CONNECTIONS: {{ $.Values.ntsimNg.sshConnections | quote }} + TLS_CONNECTIONS: {{ $.Values.ntsimNg.tlsConnections | quote }} + NTS_HOST_IP: {{ $du.name }}.{{ $.Release.Namespace }} + NTS_HOST_BASE_PORT: {{ $.Values.ntsimNg.ntsHostBasePort | quote }} + NTS_HOST_NETCONF_SSH_BASE_PORT: {{ $.Values.ntsimNg.ntsHostNetconfSshBasePort | quote }} + NTS_HOST_NETCONF_TLS_BASE_PORT: {{ $.Values.ntsimNg.ntsHostNetconfTlsBasePort | quote }} + NTS_HOST_TRANSFER_FTP_BASE_PORT: {{ $.Values.ntsimNg.ntsHostTransferFtpBasePort | quote }} + NTS_HOST_TRANSFER_SFTP_BASE_PORT: {{ $.Values.ntsimNg.ntsHostTransferSftpBasePort | quote }} + NTS_NF_MOUNT_POINT_ADDRESSING_METHOD: {{ $.Values.ntsimNg.ntsNfMountPointAddressingMethod | quote }} + + SDN_CONTROLLER_USERNAME: {{ $.Values.ntsimNg.sdnControllerUsername | quote }} + SDN_CONTROLLER_PASSWORD: {{ $.Values.ntsimNg.sdnControllerPassword | quote }} + SDN_CONTROLLER_PROTOCOL: {{ $.Values.ntsimNg.sdnControllerProtocol | quote }} + SDN_CONTROLLER_CALLHOME_IP: {{ $.Values.ntsimNg.sdnControllerCallHomeAddress | quote }} + SDN_CONTROLLER_CALLHOME_PORT: {{ $.Values.ntsimNg.sdnControllerCallHomePort | quote }} + SDN_CONTROLLER_IP: {{ $.Values.ntsimNg.sdnControllerAddress | quote }} + SDN_CONTROLLER_PORT: {{ $.Values.ntsimNg.sdnControllerPort | quote }} + + VES_COMMON_HEADER_VERSION: {{ $.Values.ntsimNg.vesCommonHeaderVersion | quote }} + VES_ENDPOINT_PROTOCOL: {{ $.Values.ntsimNg.vesEndpointProtocol | quote }} + VES_ENDPOINT_IP: {{ $.Values.ntsimNg.vesEndpointAddress | quote }} + VES_ENDPOINT_PORT: {{ $.Values.ntsimNg.vesEndpointPort | quote }} + VES_ENDPOINT_AUTH_METHOD: {{ $.Values.ntsimNg.vesEndpointAuthMethod | quote }} + VES_ENDPOINT_USERNAME: {{ $.Values.ntsimNg.vesEndpointUsername | quote }} + VES_ENDPOINT_PASSWORD: {{ $.Values.ntsimNg.vesEndpointPassword | quote }} + + NTS_NF_STANDALONE_START_FEATURES: {{ $.Values.ntsimNg.ntsNfStandaloneStartFeatures | quote }} + +{{- end }} diff --git a/smo-install/oran_oom/du-simulator/templates/deployment.yaml b/smo-install/oran_oom/du-simulator/templates/deployment.yaml new file mode 100644 index 00000000..b5d8decc --- /dev/null +++ b/smo-install/oran_oom/du-simulator/templates/deployment.yaml @@ -0,0 +1,62 @@ +{{- range $i, $du := .Values.dus }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ $du.name }} + labels: + sim-name: {{ $du.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +spec: + replicas: 1 + selector: + matchLabels: + sim-name: {{ $du.name }} + template: + metadata: + labels: + sim-name: {{ $du.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} + annotations: + checksum/config: {{ print $du | sha256sum }} + spec: + hostname: "{{ $du.name }}" + containers: + - name: {{ $.Chart.Name }} + image: "{{ $.Values.image.repository }}/{{ $.Values.image.name}}:{{ $.Values.image.tag }}" + imagePullPolicy: {{ $.Values.image.pullPolicy }} + tty: true + stdin: true + envFrom: + - configMapRef: + name: {{ $du.name }}-configmapenv + volumeMounts: + - name: {{ $du.name }}-config-volume + subPath: config.json + mountPath: /opt/dev/ntsim-ng/config/config.json + - name: {{ $du.name }}-config-volume + subPath: o-ran-sc-du-hello-world-running.xml + mountPath: /opt/dev/deploy/data/o-ran-sc-du-hello-world-running.xml + - name: {{ $du.name }}-config-volume + subPath: o-ran-sc-du-hello-world-operational.xml + mountPath: /opt/dev/deploy/data/o-ran-sc-du-hello-world-operational.xml + securityContext: + capabilities: + add: + - SYS_ADMIN + - SYS_PTRACE + volumes: + - name: {{ $du.name }}-config-volume + configMap: + name: {{ $du.name }}-configmap + items: + - key: config.json + path: config.json + - key: o-ran-sc-du-hello-world-running.xml + path: o-ran-sc-du-hello-world-running.xml + - key: o-ran-sc-du-hello-world-operational.xml + path: o-ran-sc-du-hello-world-operational.xml + +{{- end }} diff --git a/smo-install/oran_oom/du-simulator/templates/service.yaml b/smo-install/oran_oom/du-simulator/templates/service.yaml new file mode 100644 index 00000000..32ebb8b6 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/templates/service.yaml @@ -0,0 +1,20 @@ +{{ range $i, $du := .Values.dus }} +--- +apiVersion: v1 +kind: Service +metadata: + name: "{{ $du.name }}" + labels: + sim-name: {{ $du.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +spec: + type: {{ $.Values.service.type }} + ports: + - port: {{ $.Values.service.ports.port }} + selector: + sim-name: {{ $du.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} + +{{- end }} diff --git a/smo-install/oran_oom/du-simulator/values.yaml b/smo-install/oran_oom/du-simulator/values.yaml new file mode 100644 index 00000000..674de8d0 --- /dev/null +++ b/smo-install/oran_oom/du-simulator/values.yaml @@ -0,0 +1,82 @@ +# Static Defaults +image: + repository: 'nexus3.o-ran-sc.org:10004/o-ran-sc' + name: nts-ng-o-ran-du + tag: 1.3.7 + pullPolicy: IfNotPresent + +service: + type: NodePort + ports: + port: 830 + +dus: + - name: o-du-1122 + rus: + - name: o-ru-11221 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + - name: o-ru-11222 + administrativeState: LOCKED + operationalState: ENABLED + status: disconnected + simulatedFaults: + - name: o-ru-11221 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11221 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + - name: o-ru-11222 + condition: "O-RU Port Down" + severity: CRITICAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + - name: o-ru-11222 + condition: "O-RU Port Down" + severity: NORMAL + specificProblem: "O-RU Port Down" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + +# NTS NG settings +ntsimNg: + ipV6Enabled: true + sshConnections: 0 + tlsConnections: 1 + ntsHostBasePort: 50000 + ntsHostNetconfSshBasePort: 0 + ntsHostNetconfTlsBasePort: 1000 + ntsHostTransferFtpBasePort: 2000 + ntsHostTransferSftpBasePort: 2000 + ntsNfMountPointAddressingMethod: docker-mapping + + sdnControllerProtocol: http + sdnControllerCallHomeAddress: sdnc-callhome.onap + sdnControllerCallHomePort: 6666 + sdnControllerUsername: admin + sdnControllerPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + sdnControllerPort: 8443 + sdnControllerAddress: sdnc.onap + + vesCommonHeaderVersion: 7.2.1 + vesEndpointProtocol: https + vesEndpointAddress: dcae-ves-collector.onap + vesEndpointPort: 8443 + vesEndpointAuthMethod: basic-auth + vesEndpointUsername: sample1 + vesEndpointPassword: sample1 + + ntsNfStandaloneStartFeatures: datastore-populate ves-heartbeat ves-file-ready ves-pnf-registration web-cut-through diff --git a/smo-install/oran_oom/enrichmentservice/.helmignore b/smo-install/oran_oom/enrichmentservice/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/enrichmentservice/Chart.yaml b/smo-install/oran_oom/enrichmentservice/Chart.yaml new file mode 100644 index 00000000..de02e98b --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart for Enrichment Coordinator Service +name: enrichmentservice +version: 1.0.0 diff --git a/smo-install/oran_oom/enrichmentservice/requirements.yaml b/smo-install/oran_oom/enrichmentservice/requirements.yaml new file mode 100644 index 00000000..f3b3ecd4 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/enrichmentservice/resources/config/application.yaml b/smo-install/oran_oom/enrichmentservice/resources/config/application.yaml new file mode 100644 index 00000000..75b11ad8 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/resources/config/application.yaml @@ -0,0 +1,54 @@ +################################################################################ +# 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. # +################################################################################ + +spring: + profiles: + active: prod + main: + allow-bean-definition-overriding: true + aop: + auto: false +management: + endpoints: + web: + exposure: + include: "loggers,logfile,health,info,metrics,threaddump,heapdump" + +logging: + level: + ROOT: ERROR + org.springframework: ERROR + org.springframework.data: ERROR + org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR + org.oransc.enrichment: INFO + file: + name: /var/log/enrichment-coordinator-service/application.log +server: + port : 8434 + http-port: 8083 + ssl: + key-store-type: JKS + key-store-password: policy_agent + key-store: /opt/app/enrichment-coordinator-service/etc/cert/keystore.jks + key-password: policy_agent + key-alias: policy_agent +app: + filepath: /opt/app/enrichment-coordinator-service/data/application_configuration.json + webclient: + trust-store-used: false + trust-store-password: policy_agent + trust-store: /opt/app/enrichment-coordinator-service/etc/cert/truststore.jks + vardata-directory: /var/enrichment-coordinator-service \ No newline at end of file diff --git a/smo-install/oran_oom/enrichmentservice/templates/configmap.yaml b/smo-install/oran_oom/enrichmentservice/templates/configmap.yaml new file mode 100644 index 00000000..d8e4f895 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/templates/configmap.yaml @@ -0,0 +1,29 @@ +################################################################################ +# 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. # +################################################################################ + + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.enrichmentservice" . }}-configmap + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/smo-install/oran_oom/enrichmentservice/templates/ingress.yaml b/smo-install/oran_oom/enrichmentservice/templates/ingress.yaml new file mode 100644 index 00000000..f7520221 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/templates/ingress.yaml @@ -0,0 +1,45 @@ +{{/* +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ +*/}} + +{{- if .Values.enrichmentservice.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "common.name.enrichmentservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + +spec: + ingressClassName: {{ include "common.ingressClassName" . }} + rules: + - http: + paths: + - path: "/data-producer" + backend: + service: + name: {{ include "common.name.enrichmentservice" . }} + port: + number: {{ .Values.enrichmentservice.service.internalPort1 }} + pathType: Prefix + path: "/data-consumer" + backend: + service: + name: {{ include "common.name.enrichmentservice" . }} + port: + number: {{ .Values.enrichmentservice.service.internalPort1 }} + pathType: Prefix +{{- end -}} \ No newline at end of file diff --git a/smo-install/oran_oom/enrichmentservice/templates/service.yaml b/smo-install/oran_oom/enrichmentservice/templates/service.yaml new file mode 100644 index 00000000..0b2a110c --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/templates/service.yaml @@ -0,0 +1,42 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.enrichmentservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.enrichmentservice.service.allowHttp true -}} + - name: {{ index .Values.enrichmentservice.service.httpName }} + port: {{ .Values.enrichmentservice.service.internalPort1 }} + targetPort: {{ .Values.enrichmentservice.service.targetPort1 }} + protocol: TCP + {{- end }} + - name: {{ index .Values.enrichmentservice.service.httpsName }} + port: {{ .Values.enrichmentservice.service.internalPort2 }} + targetPort: {{ .Values.enrichmentservice.service.targetPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + release: {{ .Release.Name }} + type: ClusterIP diff --git a/smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml b/smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml new file mode 100644 index 00000000..678e8b15 --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/templates/statefulset.yaml @@ -0,0 +1,82 @@ +################################################################################ +# 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. # +################################################################################ + +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.enrichmentservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + serviceName: {{ include "common.name.enrichmentservice" . }} + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.enrichmentservice" . }} + containers: + - name: {{ include "common.container.enrichmentservice" . }} + image: {{ .Values.enrichmentservice.image.registry }}/{{ .Values.enrichmentservice.image.name }}:{{ .Values.enrichmentservice.image.tag }} + imagePullPolicy: {{ .Values.enrichmentservice.imagePullPolicy }} + ports: + - containerPort: {{ .Values.enrichmentservice.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.enrichmentservice.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.enrichmentservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.enrichmentservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.enrichmentservice.liveness.periodSeconds }} + livenessProbe: + httpGet: + path: /status + port: {{ .Values.enrichmentservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.enrichmentservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.enrichmentservice.liveness.periodSeconds }} + volumeMounts: + - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config + mountPath: /opt/app/enrichment-coordinator-service/config + - name: {{ include "common.name.enrichmentservice" . }}-vardata + mountPath: /var/enrichment-coordinator-service + volumes: + - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config + configMap: + name: {{ include "common.name.enrichmentservice" . }}-configmap + + volumeClaimTemplates: + - metadata: + name: {{ include "common.name.enrichmentservice" . }}-vardata + spec: + accessModes: [ ReadWriteOnce ] + storageClassName: "{{ .Values.enrichmentservice.persistence.storageClassName }}" + resources: + requests: + storage: "{{ .Values.enrichmentservice.persistence.size }}" diff --git a/smo-install/oran_oom/enrichmentservice/values.yaml b/smo-install/oran_oom/enrichmentservice/values.yaml new file mode 100644 index 00000000..f780305e --- /dev/null +++ b/smo-install/oran_oom/enrichmentservice/values.yaml @@ -0,0 +1,45 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for Enrichment Coordinate Service. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +enrichmentservice: + imagePullPolicy: IfNotPresent + image: + registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" + name: "nonrtric-enrichment-coordinator-service" + tag: 1.2.0 + service: + allowHttp: true + httpName: http + internalPort1: 8083 + targetPort1: 8083 + httpsName: https + internalPort2: 8434 + targetPort2: 8434 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 + persistence: + size: 2Gi + storageClassName: standard + ingress: + enabled: false diff --git a/smo-install/oran_oom/nonrtric-common/Chart.yaml b/smo-install/oran_oom/nonrtric-common/Chart.yaml new file mode 100644 index 00000000..693b6dfa --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/Chart.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +description: NONRTRIC Common templates for inclusion in other charts +name: nonrtric-common +version: 2.0.0 \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtric-common/templates/_a1controller.tpl b/smo-install/oran_oom/nonrtric-common/templates/_a1controller.tpl new file mode 100644 index 00000000..afb5097b --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_a1controller.tpl @@ -0,0 +1,24 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.name.a1controller" -}} + {{- printf "a1controller" -}} +{{- end -}} + +{{- define "common.containername.a1controller" -}} + {{- $name := ( include "common.name.a1controller" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl b/smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl new file mode 100644 index 00000000..d15ee939 --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl @@ -0,0 +1,30 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.name.a1simulator" -}} + {{- printf "a1simulator" -}} +{{- end -}} + +{{- define "common.fullname.a1simulator" -}} + {{- $name := ( include "common.name.a1simulator" . ) -}} + {{- $namespace := ( include "common.namespace.nonrtric" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.a1simulator" -}} + {{- $name := ( include "common.fullname.a1simulator" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/templates/_common.tpl b/smo-install/oran_oom/nonrtric-common/templates/_common.tpl new file mode 100644 index 00000000..af3226f7 --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_common.tpl @@ -0,0 +1,19 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.namespace.nonrtric" -}} + {{- default .Release.Namespace .Values.nsPrefix -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/templates/_controlpanel.tpl b/smo-install/oran_oom/nonrtric-common/templates/_controlpanel.tpl new file mode 100644 index 00000000..1f1430e9 --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_controlpanel.tpl @@ -0,0 +1,24 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.name.controlpanel" -}} + {{- printf "controlpanel" -}} +{{- end -}} + +{{- define "common.containername.controlpanel" -}} + {{- $name := ( include "common.name.controlpanel" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtric-common/templates/_dmaapadapterservice.tpl b/smo-install/oran_oom/nonrtric-common/templates/_dmaapadapterservice.tpl new file mode 100644 index 00000000..0d730461 --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_dmaapadapterservice.tpl @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +{{- define "common.name.dmaapadapterservice" -}} + {{- printf "dmaapadapterservice" -}} +{{- end -}} + +{{- define "common.container.dmaapadapterservice" -}} + {{- $name := ( include "common.name.dmaapadapterservice" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/templates/_enrichmentservice.tpl b/smo-install/oran_oom/nonrtric-common/templates/_enrichmentservice.tpl new file mode 100644 index 00000000..c80cf2e5 --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_enrichmentservice.tpl @@ -0,0 +1,24 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.name.enrichmentservice" -}} + {{- printf "enrichmentservice" -}} +{{- end -}} + +{{- define "common.container.enrichmentservice" -}} + {{- $name := ( include "common.name.enrichmentservice" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl b/smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl new file mode 100644 index 00000000..d14e540b --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl @@ -0,0 +1,28 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +{{- define "common.name.nonrtricgateway" -}} + {{- printf "nonrtricgateway" -}} +{{- end -}} + +{{- define "common.container.nonrtricgateway" -}} + {{- $name := ( include "common.name.nonrtricgateway" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressClassName" -}} + {{- printf "kong" -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/templates/_policymanagementservice.tpl b/smo-install/oran_oom/nonrtric-common/templates/_policymanagementservice.tpl new file mode 100644 index 00000000..b265ec34 --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_policymanagementservice.tpl @@ -0,0 +1,24 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.name.policymanagementservice" -}} + {{- printf "policymanagementservice" -}} +{{- end -}} + +{{- define "common.container.policymanagementservice" -}} + {{- $name := ( include "common.name.policymanagementservice" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/templates/_rappcatalogueservice.tpl b/smo-install/oran_oom/nonrtric-common/templates/_rappcatalogueservice.tpl new file mode 100644 index 00000000..230c807b --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/templates/_rappcatalogueservice.tpl @@ -0,0 +1,24 @@ +################################################################################ +# 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. # +################################################################################ + +{{- define "common.name.rappcatalogueservice" -}} + {{- printf "rappcatalogueservice" -}} +{{- end -}} + +{{- define "common.container.rappcatalogueservice" -}} + {{- $name := ( include "common.name.rappcatalogueservice" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/nonrtric-common/values.yaml b/smo-install/oran_oom/nonrtric-common/values.yaml new file mode 100644 index 00000000..10520add --- /dev/null +++ b/smo-install/oran_oom/nonrtric-common/values.yaml @@ -0,0 +1,15 @@ +################################################################################ +# 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. # +################################################################################ \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtric/Chart.yaml b/smo-install/oran_oom/nonrtric/Chart.yaml new file mode 100644 index 00000000..df4f747d --- /dev/null +++ b/smo-install/oran_oom/nonrtric/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +name: nonrtric +version: 1.0.0 +appVersion: test +description: Open Radio Access Network (ORAN) +home: https://www.onap.org/ +sources: +- https://gerrit.o-ran-sc.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" diff --git a/smo-install/oran_oom/nonrtric/requirements.yaml b/smo-install/oran_oom/nonrtric/requirements.yaml new file mode 100644 index 00000000..b43fdda5 --- /dev/null +++ b/smo-install/oran_oom/nonrtric/requirements.yaml @@ -0,0 +1,75 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: a1controller + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installA1controller + + - name: a1simulator + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installA1simulator + + - name: controlpanel + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installControlpanel + + - name: policymanagementservice + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installPms + + - name: enrichmentservice + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installEnrichmentservice + + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" + + - name: rappcatalogueservice + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installRappcatalogueservice + + - name: nonrtricgateway + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installNonrtricgateway + + - name: oru-app + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installORUApp + + - name: topology + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installTopology + +# - name: kong +# version: ~2.4.0 +# repository: https://charts.konghq.com +# condition: nonrtric.installKong + + - name: dmaapadapterservice + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installDmaapadapterservice diff --git a/smo-install/oran_oom/nonrtric/templates/pv1.yaml b/smo-install/oran_oom/nonrtric/templates/pv1.yaml new file mode 100644 index 00000000..b600c991 --- /dev/null +++ b/smo-install/oran_oom/nonrtric/templates/pv1.yaml @@ -0,0 +1,35 @@ +############################################################################### +# Copyright (c) 2021 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. # +################################################################################ + +{{- if .Values.nonrtric.volume1.size }} + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: nonrtric-pv1 + namespace: {{ include "common.namespace.nonrtric" . }} +spec: + capacity: + storage: {{ .Values.nonrtric.volume1.size}} + accessModes: + - ReadWriteOnce + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: {{ .Values.nonrtric.persistence.mountPath }}/nonrtric/volume1 + storageClassName: {{ .Values.nonrtric.volume1.storageClassName }} + +{{- end }} diff --git a/smo-install/oran_oom/nonrtric/templates/pv2.yaml b/smo-install/oran_oom/nonrtric/templates/pv2.yaml new file mode 100644 index 00000000..cdf5eaf3 --- /dev/null +++ b/smo-install/oran_oom/nonrtric/templates/pv2.yaml @@ -0,0 +1,36 @@ +############################################################################### +# Copyright (c) 2021 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. # +################################################################################ + +{{- if .Values.nonrtric.volume2.size }} + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: nonrtric-pv2 + namespace: {{ include "common.namespace.nonrtric" . }} +spec: + capacity: + storage: {{ .Values.nonrtric.volume2.size }} + accessModes: + - ReadWriteOnce + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: {{ .Values.nonrtric.persistence.mountPath }}/nonrtric/volume2 + storageClassName: {{ .Values.nonrtric.volume2.storageClassName }} + +{{- end }} + diff --git a/smo-install/oran_oom/nonrtric/values.yaml b/smo-install/oran_oom/nonrtric/values.yaml new file mode 100644 index 00000000..d30c241c --- /dev/null +++ b/smo-install/oran_oom/nonrtric/values.yaml @@ -0,0 +1,41 @@ +################################################################################ +# 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. # +################################################################################ + +nonrtric: + persistence: + mountPath: /dockerdata-nfs + installPms: true + installA1controller: true + installA1simulator: true + installControlpanel: true + installEnrichmentservice: true + installRappcatalogueservice: true + installNonrtricgateway: true + installORUApp: true + installTopology: true + installKong: true + installDmaapadapterservice: true + volume1: + size: 1Gi + storageClassName: volume1 + volume2: + size: 1Gi + storageClassName: volume2 +kong: + ingressController: + installCRDs: false + admin: + enabled: true diff --git a/smo-install/oran_oom/nonrtricgateway/.helmignore b/smo-install/oran_oom/nonrtricgateway/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/nonrtricgateway/Chart.yaml b/smo-install/oran_oom/nonrtricgateway/Chart.yaml new file mode 100644 index 00000000..c989221e --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +apiVersion: v1 +appVersion: "0.0.1" +description: A Helm chart for Nonrtric Gateway +name: nonrtricgateway +version: 1.0.0 diff --git a/smo-install/oran_oom/nonrtricgateway/requirements.yaml b/smo-install/oran_oom/nonrtricgateway/requirements.yaml new file mode 100644 index 00000000..69b4db6d --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/nonrtricgateway/resources/config/application.yaml b/smo-install/oran_oom/nonrtricgateway/resources/config/application.yaml new file mode 100644 index 00000000..2dd40528 --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/resources/config/application.yaml @@ -0,0 +1,52 @@ +################################################################################ +# Copyright (c) 2021 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: 9090 +spring: + cloud: + gateway: + httpclient: + ssl: + useInsecureTrustManager: true + wiretap: true + httpserver: + wiretap: true + routes: + - id: A1-Policy + uri: {{ .Values.a1PolicyLink }} + predicates: + - Path=/a1-policy/** + - id: A1-EI + uri: https://enrichmentservice:8434 + predicates: + - Path=/data-producer/**,/data-consumer/** +management: + endpoint: + gateway: + enabled: true + endpoints: + web: + exposure: + include: "gateway,loggers,logfile,health,info,metrics,threaddump,heapdump" +logging: + level: + ROOT: ERROR + org.springframework: ERROR + org.springframework.cloud.gateway: INFO + reactor.netty: INFO + file: + name: /var/log/nonrtric-gateway/application.log \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtricgateway/templates/configmap.yaml b/smo-install/oran_oom/nonrtricgateway/templates/configmap.yaml new file mode 100644 index 00000000..d391d1ee --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/templates/configmap.yaml @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.nonrtricgateway" . }}-configmap + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtricgateway/templates/deployment.yaml b/smo-install/oran_oom/nonrtricgateway/templates/deployment.yaml new file mode 100644 index 00000000..bd742a9a --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/templates/deployment.yaml @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.nonrtricgateway" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.nonrtricgateway" . }} + containers: + - name: {{ include "common.container.nonrtricgateway" . }} + image: {{ .Values.nonrtricgateway.image.registry }}/{{ .Values.nonrtricgateway.image.name }}:{{ .Values.nonrtricgateway.image.tag }} + imagePullPolicy: {{ .Values.nonrtricgateway.imagePullPolicy }} + ports: + - containerPort: {{ .Values.nonrtricgateway.service.targetPort1 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.nonrtricgateway.service.targetPort1 }} + initialDelaySeconds: {{ .Values.nonrtricgateway.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.nonrtricgateway.liveness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.nonrtricgateway.service.targetPort1 }} + initialDelaySeconds: {{ .Values.nonrtricgateway.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.nonrtricgateway.liveness.periodSeconds }} + volumeMounts: + - name: {{ include "common.name.nonrtricgateway" . }}-config + mountPath: /opt/app/nonrtric-gateway/config + volumes: + - name: {{ include "common.name.nonrtricgateway" . }}-config + configMap: + name: {{ include "common.name.nonrtricgateway" . }}-configmap \ No newline at end of file diff --git a/smo-install/oran_oom/nonrtricgateway/templates/service.yaml b/smo-install/oran_oom/nonrtricgateway/templates/service.yaml new file mode 100644 index 00000000..085c0e65 --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/templates/service.yaml @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.nonrtricgateway" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + - name: {{ index .Values.nonrtricgateway.service.httpName }} + port: {{ .Values.nonrtricgateway.service.internalPort1 }} + targetPort: {{ .Values.nonrtricgateway.service.targetPort1 }} + nodePort: {{ .Values.nonrtricgateway.service.externalPort1 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }} + release: {{ .Release.Name }} + type: NodePort diff --git a/smo-install/oran_oom/nonrtricgateway/values.yaml b/smo-install/oran_oom/nonrtricgateway/values.yaml new file mode 100644 index 00000000..80ffe374 --- /dev/null +++ b/smo-install/oran_oom/nonrtricgateway/values.yaml @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ + +# Default values for Gateway application. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +nonrtricgateway: + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-gateway + tag: 1.0.0 + service: + httpName: http + internalPort1: 9090 + targetPort1: 9090 + externalPort1: 30093 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 +a1PolicyLink: https://a1policymanagement.onap:8433 \ No newline at end of file diff --git a/smo-install/oran_oom/oru-app/Chart.yaml b/smo-install/oran_oom/oru-app/Chart.yaml new file mode 100644 index 00000000..0728b48f --- /dev/null +++ b/smo-install/oran_oom/oru-app/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart to deploy oru-app +name: oru-app +version: 1.0.0 diff --git a/smo-install/oran_oom/oru-app/resources/config/o-ru-to-o-du-map.txt b/smo-install/oran_oom/oru-app/resources/config/o-ru-to-o-du-map.txt new file mode 100644 index 00000000..b1fde240 --- /dev/null +++ b/smo-install/oran_oom/oru-app/resources/config/o-ru-to-o-du-map.txt @@ -0,0 +1,8 @@ +{ +{{ $simsSize := (len .Values.simulators) }} +{{ range $i, $sim := .Values.simulators }} + "{{$sim.simRu}}": "{{$sim.simDu}}" + {{ if lt (add1 $i) $simsSize }},{{ end }} +{{ end }} +} + diff --git a/smo-install/oran_oom/oru-app/templates/configmap.yaml b/smo-install/oran_oom/oru-app/templates/configmap.yaml new file mode 100644 index 00000000..259387f4 --- /dev/null +++ b/smo-install/oran_oom/oru-app/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: oru-app-configmap + labels: + name: oru-app + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +data: +{{ tpl (.Files.Glob "resources/config/*.{json,xml,txt}").AsConfig . | indent 2 }} diff --git a/smo-install/oran_oom/oru-app/templates/configmapenv.yaml b/smo-install/oran_oom/oru-app/templates/configmapenv.yaml new file mode 100644 index 00000000..3a10003f --- /dev/null +++ b/smo-install/oran_oom/oru-app/templates/configmapenv.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: oru-app-configmapenv + labels: + name: oru-app-env + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +data: + MR-HOST: {{ .Values.conf.mrHost | quote }} + MR-PORT: {{ .Values.conf.mrPort | quote }} + SDNR-HOST: {{ .Values.conf.sdnrHost | quote }} + SDNR-PORT: {{ .Values.conf.sdnrPort | quote }} + VERBOSE: {{ .Values.conf.verbose | quote }} + diff --git a/smo-install/oran_oom/oru-app/templates/deployment.yaml b/smo-install/oran_oom/oru-app/templates/deployment.yaml new file mode 100644 index 00000000..c3f5603a --- /dev/null +++ b/smo-install/oran_oom/oru-app/templates/deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: oru-app + labels: + name: oru-app + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + name: oru-app + template: + metadata: + labels: + name: oru-app + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}/{{ .Values.image.name}}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + tty: true + stdin: true + env: + - name: CURL_CA_BUNDLE + value: '' + envFrom: + - configMapRef: + name: oru-app-configmapenv + volumeMounts: + - name: oru-app-config-volume + subPath: o-ru-to-o-du-map.txt + mountPath: /usr/src/app/o-ru-to-o-du-map.txt + securityContext: + capabilities: + add: + - SYS_ADMIN + - SYS_PTRACE + volumes: + - name: oru-app-config-volume + configMap: + name: oru-app-configmap + items: + - key: o-ru-to-o-du-map.txt + path: o-ru-to-o-du-map.txt diff --git a/smo-install/oran_oom/oru-app/templates/service.yaml b/smo-install/oran_oom/oru-app/templates/service.yaml new file mode 100644 index 00000000..46d78c6c --- /dev/null +++ b/smo-install/oran_oom/oru-app/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: "oru-app" + labels: + name: oru-app + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.ports.port }} + nodePort: {{ .Values.service.ports.nodePort }} + selector: + name: oru-app + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} diff --git a/smo-install/oran_oom/oru-app/values.yaml b/smo-install/oran_oom/oru-app/values.yaml new file mode 100644 index 00000000..6d92c37a --- /dev/null +++ b/smo-install/oran_oom/oru-app/values.yaml @@ -0,0 +1,25 @@ +# Static Defaults +replicaCount: 1 +image: + repository: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-o-ru-closed-loop-recovery + tag: 1.0.0 + pullPolicy: IfNotPresent + +service: + type: NodePort + ports: + port: 830 + nodePort: 30835 + +simulators: + - simRu: o-ru-11221 + simDu: o-du-1122 + +conf: + mrHost: http://message-router.onap + mrPort: 3904 + sdnrHost: https://sdnc.onap + sdnrPort: 8443 + verbose: on + diff --git a/smo-install/oran_oom/policymanagementservice/.helmignore b/smo-install/oran_oom/policymanagementservice/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/policymanagementservice/Chart.yaml b/smo-install/oran_oom/policymanagementservice/Chart.yaml new file mode 100644 index 00000000..256af345 --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for Policy Management Service +name: policymanagementservice +version: 2.0.0 diff --git a/smo-install/oran_oom/policymanagementservice/requirements.yaml b/smo-install/oran_oom/policymanagementservice/requirements.yaml new file mode 100644 index 00000000..f3b3ecd4 --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/policymanagementservice/resources/config/application.yaml b/smo-install/oran_oom/policymanagementservice/resources/config/application.yaml new file mode 100644 index 00000000..5fc5051e --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/resources/config/application.yaml @@ -0,0 +1,69 @@ +################################################################################ +# 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. # +################################################################################ + +spring: + profiles: + active: prod + main: + allow-bean-definition-overriding: true + aop: + auto: false +management: + endpoints: + web: + exposure: + # Enabling of springboot actuator features. See springboot documentation. + include: "loggers,logfile,health,info,metrics,threaddump,heapdump" + +logging: + # Configuration of logging + level: + ROOT: ERROR + org.springframework: ERROR + org.springframework.data: ERROR + org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR + org.onap.ccsdk.oran.a1policymanagementservice: INFO + file: + name: /var/log/policy-agent/application.log + +server: + # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework. + # See springboot documentation. + port : 8433 + http-port: 8081 + ssl: + key-store-type: JKS + key-store-password: policy_agent + key-store: /opt/app/policy-agent/etc/cert/keystore.jks + key-password: policy_agent + key-alias: policy_agent +app: + # Location of the component configuration file. The file will only be used if the Consul database is not used; + # configuration from the Consul will override the file. + filepath: /opt/app/policy-agent/data/application_configuration.json + webclient: + # Configuration of the trust store used for the HTTP client (outgoing requests) + # The file location and the password for the truststore is only relevant if trust-store-used == true + # Note that the same keystore as for the server is used. + trust-store-used: false + trust-store-password: policy_agent + trust-store: /opt/app/policy-agent/etc/cert/truststore.jks + # Configuration of usage of HTTP Proxy for the southbound accesses. + # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s + http.proxy-host: + http.proxy-port: 0 + # path where the service can store data + vardata-directory: /var/policy-management-service diff --git a/smo-install/oran_oom/policymanagementservice/resources/data/application_configuration.json b/smo-install/oran_oom/policymanagementservice/resources/data/application_configuration.json new file mode 100644 index 00000000..8c446fab --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/resources/data/application_configuration.json @@ -0,0 +1,84 @@ +{ + "config":{ + "controller": [ + { + "name": "controller1", + "baseUrl": "https://a1controller:8383", + "userName": "admin", + "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + } + ], + "ric": [ + { + "name":"ric1", + "baseUrl":"https://a1-sim-osc-0.a1-sim:8185", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric2", + "baseUrl":"https://a1-sim-osc-1.a1-sim:8185", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric3", + "baseUrl":"https://a1-sim-std-0.a1-sim:8185", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric4", + "baseUrl":"https://a1-sim-std-1.a1-sim:8185", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric5", + "baseUrl":"https://a1-sim-std2-0.a1-sim:8185", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric6", + "baseUrl":"https://a1-sim-std2-1.a1-sim:8185", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + } + ], + "streams_publishes": { + "dmaap_publisher": { + "type":"message_router", + "dmaap_info":{ + "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-WRITE" + } + } + }, + "streams_subscribes": { + "dmaap_subscriber":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" + } + } + } + } +} diff --git a/smo-install/oran_oom/policymanagementservice/templates/configmap.yaml b/smo-install/oran_oom/policymanagementservice/templates/configmap.yaml new file mode 100644 index 00000000..9c91f7d0 --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/templates/configmap.yaml @@ -0,0 +1,42 @@ +################################################################################ +# 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. # +################################################################################ + + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.policymanagementservice" . }}-configmap-config + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name.policymanagementservice" . }}-configmap-data + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/smo-install/oran_oom/policymanagementservice/templates/ingress.yaml b/smo-install/oran_oom/policymanagementservice/templates/ingress.yaml new file mode 100644 index 00000000..e9158e2c --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/templates/ingress.yaml @@ -0,0 +1,38 @@ +{{/* +################################################################################ +# Copyright (c) 2021 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. # +################################################################################ +*/}} + +{{- if .Values.policymanagementservice.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "common.name.policymanagementservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + +spec: + ingressClassName: {{ include "common.ingressClassName" . }} + rules: + - http: + paths: + - backend: + service: + name: {{ include "common.name.policymanagementservice" . }} + port: + number: {{ .Values.policymanagementservice.service.internalPort1 }} + path: "/a1-policy" + pathType: Prefix +{{- end -}} diff --git a/smo-install/oran_oom/policymanagementservice/templates/service.yaml b/smo-install/oran_oom/policymanagementservice/templates/service.yaml new file mode 100644 index 00000000..6d820e21 --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/templates/service.yaml @@ -0,0 +1,42 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.policymanagementservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.policymanagementservice.service.allowHttp true -}} + - name: {{ index .Values.policymanagementservice.service.httpName }} + port: {{ .Values.policymanagementservice.service.internalPort1 }} + targetPort: {{ .Values.policymanagementservice.service.targetPort1 }} + protocol: TCP + {{- end }} + - name: {{ index .Values.policymanagementservice.service.httpsName }} + port: {{ .Values.policymanagementservice.service.internalPort2 }} + targetPort: {{ .Values.policymanagementservice.service.targetPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + release: {{ .Release.Name }} + type: ClusterIP diff --git a/smo-install/oran_oom/policymanagementservice/templates/statefulset.yaml b/smo-install/oran_oom/policymanagementservice/templates/statefulset.yaml new file mode 100644 index 00000000..3ef28260 --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/templates/statefulset.yaml @@ -0,0 +1,87 @@ +################################################################################ +# 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. # +################################################################################ + +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.policymanagementservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + serviceName: {{ include "common.name.policymanagementservice" . }} + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.policymanagementservice" . }} + containers: + - name: {{ include "common.container.policymanagementservice" . }} + image: {{ .Values.policymanagementservice.image.registry }}/{{ .Values.policymanagementservice.image.name }}:{{ .Values.policymanagementservice.image.tag }} + imagePullPolicy: {{ .Values.policymanagementservice.imagePullPolicy }} + ports: + - containerPort: {{ .Values.policymanagementservice.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.policymanagementservice.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.policymanagementservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.policymanagementservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.policymanagementservice.liveness.periodSeconds }} + livenessProbe: + httpGet: + path: /status + port: {{ .Values.policymanagementservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.policymanagementservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.policymanagementservice.liveness.periodSeconds }} + volumeMounts: + - name: {{ include "common.name.policymanagementservice" . }}-vardata + mountPath: "/var/policy-management-service" + - name: {{ include "common.name.policymanagementservice" . }}-policy-config + mountPath: /opt/app/policy-agent/config + - name: {{ include "common.name.policymanagementservice" . }}-policy-data + mountPath: /opt/app/policy-agent/data + volumes: + - name: {{ include "common.name.policymanagementservice" . }}-policy-config + configMap: + name: {{ include "common.name.policymanagementservice" . }}-configmap-config + - name: {{ include "common.name.policymanagementservice" . }}-policy-data + configMap: + name: {{ include "common.name.policymanagementservice" . }}-configmap-data + volumeClaimTemplates: + - metadata: + name: {{ include "common.name.policymanagementservice" . }}-vardata + spec: + accessModes: + - ReadWriteOnce + storageClassName: "{{ .Values.policymanagementservice.persistence.storageClassName }}" + resources: + requests: + storage: "{{ .Values.policymanagementservice.persistence.size }}" diff --git a/smo-install/oran_oom/policymanagementservice/values.yaml b/smo-install/oran_oom/policymanagementservice/values.yaml new file mode 100644 index 00000000..637e660b --- /dev/null +++ b/smo-install/oran_oom/policymanagementservice/values.yaml @@ -0,0 +1,48 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for Policy Management Service. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +policymanagementservice: + imagePullPolicy: IfNotPresent + image: + registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" + name: nonrtric-policy-agent + tag: 2.2.1 + service: + type: NodePort + allowHttp: true + httpName: http + internalPort1: 8081 + targetPort1: 8081 + nodePort1: 30094 + httpsName: https + internalPort2: 8433 + targetPort2: 8433 + nodePort2: 30095 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 + persistence: + size: 2Gi + storageClassName: standard + ingress: + enabled: false diff --git a/smo-install/oran_oom/rappcatalogueservice/Chart.yaml b/smo-install/oran_oom/rappcatalogueservice/Chart.yaml new file mode 100644 index 00000000..4482422d --- /dev/null +++ b/smo-install/oran_oom/rappcatalogueservice/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "2.0.0" +description: A Helm chart for rAPP Catalogue Service +name: rappcatalogueservice +version: 1.0.0 diff --git a/smo-install/oran_oom/rappcatalogueservice/requirements.yaml b/smo-install/oran_oom/rappcatalogueservice/requirements.yaml new file mode 100644 index 00000000..f3b3ecd4 --- /dev/null +++ b/smo-install/oran_oom/rappcatalogueservice/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/rappcatalogueservice/templates/deployment.yaml b/smo-install/oran_oom/rappcatalogueservice/templates/deployment.yaml new file mode 100644 index 00000000..95304c5d --- /dev/null +++ b/smo-install/oran_oom/rappcatalogueservice/templates/deployment.yaml @@ -0,0 +1,61 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: {{ include "common.name.rappcatalogueservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.rappcatalogueservice" . }} + containers: + - name: {{ include "common.container.rappcatalogueservice" . }} + image: {{ .Values.rappcatalogueservice.image.registry }}/{{ .Values.rappcatalogueservice.image.name }}:{{ .Values.rappcatalogueservice.image.tag }} + imagePullPolicy: {{ .Values.rappcatalogueservice.imagePullPolicy }} + ports: + - containerPort: {{ .Values.rappcatalogueservice.service.targetPort1 }} + protocol: TCP + - containerPort: {{ .Values.rappcatalogueservice.service.targetPort2 }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.rappcatalogueservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.rappcatalogueservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.rappcatalogueservice.liveness.periodSeconds }} + livenessProbe: + tcpSocket: + port: {{ .Values.rappcatalogueservice.service.targetPort1 }} + initialDelaySeconds: {{ .Values.rappcatalogueservice.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.rappcatalogueservice.liveness.periodSeconds }} diff --git a/smo-install/oran_oom/rappcatalogueservice/templates/service.yaml b/smo-install/oran_oom/rappcatalogueservice/templates/service.yaml new file mode 100644 index 00000000..2c056eb5 --- /dev/null +++ b/smo-install/oran_oom/rappcatalogueservice/templates/service.yaml @@ -0,0 +1,42 @@ +################################################################################ +# 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. # +################################################################################ + +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.name.rappcatalogueservice" . }} + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.rappcatalogueservice.service.allowHttp true -}} + - name: {{ index .Values.rappcatalogueservice.service.httpName }} + port: {{ .Values.rappcatalogueservice.service.internalPort1 }} + targetPort: {{ .Values.rappcatalogueservice.service.targetPort1 }} + protocol: TCP + {{- end }} + - name: {{ index .Values.rappcatalogueservice.service.httpsName }} + port: {{ .Values.rappcatalogueservice.service.internalPort2 }} + targetPort: {{ .Values.rappcatalogueservice.service.targetPort2 }} + protocol: TCP + selector: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }} + release: {{ .Release.Name }} + type: ClusterIP diff --git a/smo-install/oran_oom/rappcatalogueservice/values.yaml b/smo-install/oran_oom/rappcatalogueservice/values.yaml new file mode 100644 index 00000000..d939ac3e --- /dev/null +++ b/smo-install/oran_oom/rappcatalogueservice/values.yaml @@ -0,0 +1,40 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for rAPP Catalogue Service. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +rappcatalogueservice: + imagePullPolicy: IfNotPresent + image: + registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + name: nonrtric-r-app-catalogue + tag: 1.0.0 + service: + allowHttp: true + httpName: http + internalPort1: 9085 + targetPort1: 8080 + httpsName: https + internalPort2: 9086 + targetPort2: 8433 + liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 diff --git a/smo-install/oran_oom/ric-common/Chart.yaml b/smo-install/oran_oom/ric-common/Chart.yaml new file mode 100644 index 00000000..56ddffe9 --- /dev/null +++ b/smo-install/oran_oom/ric-common/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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 +description: Common templates for inclusion in other charts +name: ric-common +version: 3.3.2 diff --git a/smo-install/oran_oom/ric-common/templates/_a1mediator.tpl b/smo-install/oran_oom/ric-common/templates/_a1mediator.tpl new file mode 100644 index 00000000..ec4740fb --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_a1mediator.tpl @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.a1mediator" -}} + {{- printf "a1mediator" -}} +{{- end -}} + +{{- define "common.fullname.a1mediator" -}} + {{- $name := ( include "common.name.a1mediator" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.a1mediator" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.a1mediator" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.a1mediator" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.a1mediator" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.a1mediator" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.kongpath.ric.a1mediator" -}}/a1mediator{{- end -}} + +{{- define "common.servicename.a1mediator.rmr" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.a1mediator.http" -}} + {{- $name := ( include "common.fullname.a1mediator" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.a1mediator.rmr.data" -}}4562{{- end -}} +{{- define "common.serviceport.a1mediator.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.a1mediator.http" -}}10000{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_alarmmanager.tpl b/smo-install/oran_oom/ric-common/templates/_alarmmanager.tpl new file mode 100755 index 00000000..a172e5ea --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_alarmmanager.tpl @@ -0,0 +1,81 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.alarmmanager" -}} + {{- printf "alarmmanager" -}} +{{- end -}} + +{{- define "common.fullname.alarmmanager" -}} + {{- $name := ( include "common.name.alarmmanager" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- define "common.kongpath.ric.alarmmanager" -}}/alarmmanager{{- end -}} + +{{- define "common.servicename.alarmmanager.rmr" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.alarmmanager.http" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.alarmmanager.rest" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "service-%s-rest" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.pvname.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.pvcname.alarmmanager" -}} + {{- $name := ( include "common.fullname.alarmmanager" . ) -}} + {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.alarmmanager.rmr.data" -}}4560{{- end -}} +{{- define "common.serviceport.alarmmanager.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.alarmmanager.http" -}}8080{{- end -}} +{{- define "common.serviceport.alarmmanager.rest" -}}8088{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_appmgr.tpl b/smo-install/oran_oom/ric-common/templates/_appmgr.tpl new file mode 100644 index 00000000..954ba3d0 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_appmgr.tpl @@ -0,0 +1,74 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.appmgr" -}} + {{- printf "appmgr" -}} +{{- end -}} + + +{{- define "common.fullname.appmgr" -}} + {{- $name := ( include "common.name.appmgr" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.appmgr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.appmgr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.appmgr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.serviceaccountname.appmgr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.appmgr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.kongpath.ric.appmgr" -}}/appmgr{{- end -}} + +{{- define "common.servicename.appmgr.rmr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.appmgr.http" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.secretname.appmgr" -}} + {{- $name := ( include "common.fullname.appmgr" . ) -}} + {{- printf "secret-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.appmgr.rmr.data" -}}4560{{- end -}} +{{- define "common.serviceport.appmgr.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.appmgr.http" -}}8080{{- end -}} + diff --git a/smo-install/oran_oom/ric-common/templates/_chart.tpl b/smo-install/oran_oom/ric-common/templates/_chart.tpl new file mode 100644 index 00000000..54875fdc --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_chart.tpl @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + + +{{- define "common.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_context_locator.tpl b/smo-install/oran_oom/ric-common/templates/_context_locator.tpl new file mode 100644 index 00000000..5155dec7 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_context_locator.tpl @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + + + + + +{{- define "locate" -}} + {{- $ctx := .ctx }} + {{- $keylist := .keylist }} + {{- $currentkey := first $keylist -}} + {{- $restkeys := rest $keylist -}} + {{- if empty $restkeys -}} + {{- $result := index $ctx $currentkey -}} + {{- if not (empty $result) -}} + {{- $result -}} + {{- end -}} + {{- else -}} + {{- with index $ctx $currentkey }} + {{- $newctx := dict "ctx" . "keylist" $restkeys -}} + {{- include "locate" $newctx -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_dashboard.tpl b/smo-install/oran_oom/ric-common/templates/_dashboard.tpl new file mode 100644 index 00000000..7193400a --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_dashboard.tpl @@ -0,0 +1,59 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.dashboard" -}} + {{- printf "dashboard" -}} +{{- end -}} + + +{{- define "common.fullname.dashboard" -}} + {{- $name := ( include "common.name.dashboard" . ) -}} + {{- $namespace := ( include "common.namespace.aux" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.dashboard" -}} + {{- $name := ( include "common.fullname.dashboard" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.dashboard" -}} + {{- $name := ( include "common.fullname.dashboard" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.dashboard" -}} + {{- $name := ( include "common.fullname.dashboard" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.dashboard" -}} + {{- $name := ( include "common.fullname.dashboard" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.dashboard" -}} + {{- $name := ( include "common.fullname.dashboard" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.dashboard.http" -}} + {{- $name := ( include "common.fullname.dashboard" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.dashboard.http" -}}30080{{- end -}} +{{- define "common.serviceport.dashboard.container" -}}8080{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_dbaas.tpl b/smo-install/oran_oom/ric-common/templates/_dbaas.tpl new file mode 100644 index 00000000..9f3daca5 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_dbaas.tpl @@ -0,0 +1,58 @@ +################################################################################ +# Copyright (c) 2020 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. # +################################################################################ + +{{- define "common.name.dbaas" -}} + {{- printf "dbaas" -}} +{{- end -}} + +{{- define "common.fullname.dbaas" -}} + {{- $name := ( include "common.name.dbaas" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.dbaas" -}} + {{- $name := ( include "common.fullname.dbaas" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.dbaas" -}} + {{- $name := ( include "common.fullname.dbaas" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.statefulsetname.dbaas" -}} + {{- $name := ( include "common.fullname.dbaas" . ) -}} + {{- printf "statefulset-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.dbaas" -}} + {{- $name := ( include "common.fullname.dbaas" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.dbaas" -}} + {{- $name := ( include "common.fullname.dbaas" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.dbaas.tcp" -}} + {{- $name := ( include "common.fullname.dbaas" . ) -}} + {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.dbaas.redis" -}}6379{{- end -}} +{{- define "common.serviceport.dbaas.sentinel" -}}26379{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_docker.tpl b/smo-install/oran_oom/ric-common/templates/_docker.tpl new file mode 100644 index 00000000..62ef1717 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_docker.tpl @@ -0,0 +1,63 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.dockerregistry.url" -}} + {{- $defaultregistry := .defaultregistry }} + {{- $keylist := list $.ctx.Chart.Name "registry" -}} + {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}} + {{- $overrideregistry := include "locate" $ctx -}} + {{- $keylist := list "common" "localregistry" -}} + {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}} + {{- $localregistry := include "locate" $ctx -}} + {{- if not (empty $overrideregistry) -}} + {{- $overrideregistry -}} + {{- else -}} + {{- if not (empty $localregistry) -}} + {{- $localregistry -}} + {{- else -}} + {{- $defaultregistry -}} + {{- end -}} + {{- end -}} +{{- end -}} + + +{{- define "common.dockerregistry.credential" -}} + {{- $reponame := include "common.dockerregistry.url" . -}} + {{- $postfix := $reponame | replace "." "-" | replace ":" "-" | replace "/" "-" | trunc 63 | trimSuffix "-" -}} + {{- printf "secret-%s" $postfix -}} +{{- end -}} + + +{{- define "common.dockerregistry.pullpolicy" -}} + {{- $defaulpullpolicy := .defaultpullpolicy }} + {{- $keylist := list $.ctx.Chart.Name "pullpolicy" -}} + {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}} + {{- $overridepullpolicy := include "locate" $ctx -}} + {{- $keylist := list "common" "pullpolicy" -}} + {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}} + {{- $globalpullpolicy := include "locate" $ctx -}} + {{- if not (empty $overridepullpolicy) -}} + {{- $overridepullpolicy -}} + {{- else -}} + {{- if not (empty $globalpullpolicy) -}} + {{- $globalpullpolicy -}} + {{- else -}} + {{- $defaulpullpolicy -}} + {{- end -}} + {{- end -}} +{{- end -}} + + diff --git a/smo-install/oran_oom/ric-common/templates/_e2mgr.tpl b/smo-install/oran_oom/ric-common/templates/_e2mgr.tpl new file mode 100644 index 00000000..5275d280 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_e2mgr.tpl @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.e2mgr" -}} + {{- printf "e2mgr" -}} +{{- end -}} + +{{- define "common.fullname.e2mgr" -}} + {{- $name := ( include "common.name.e2mgr" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.e2mgr" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.e2mgr" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.e2mgr" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.e2mgr" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.e2mgr" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.kongpath.ric.e2mgr" -}}/e2mgr{{- end -}} + +{{- define "common.servicename.e2mgr.rmr" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.e2mgr.http" -}} + {{- $name := ( include "common.fullname.e2mgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.e2mgr.rmr.data" -}}3801{{- end -}} +{{- define "common.serviceport.e2mgr.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.e2mgr.http" -}}3800{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_e2term.tpl b/smo-install/oran_oom/ric-common/templates/_e2term.tpl new file mode 100644 index 00000000..5a431617 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_e2term.tpl @@ -0,0 +1,89 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.e2term" -}} + {{- printf "e2term" -}} +{{- end -}} + +{{- define "common.fullname.e2term" -}} + {{- $name := ( include "common.name.e2term" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.deploymentname.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.pvname.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.pvcname.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.e2term.rmr" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- define "common.servicename.e2term.sctp" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "service-%s-sctp" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.e2term.http" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.e2term.prometheus" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "service-%s-prometheus" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.serviceport.e2term.rmr.data" -}}38000{{- end -}} +{{- define "common.serviceport.e2term.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.e2term.http" -}}8080{{- end -}} +{{- define "common.serviceport.e2term.sctp" -}}36422{{- end -}} +{{- define "common.serviceport.e2term.prometheus" -}}8088{{- end -}} + + +{{- define "common.serviceaccountname.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.ingressname.e2term" -}} + {{- $name := ( include "common.fullname.e2term" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_esreader.tpl b/smo-install/oran_oom/ric-common/templates/_esreader.tpl new file mode 100644 index 00000000..d895ddc9 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_esreader.tpl @@ -0,0 +1,60 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + + +{{- define "common.name.esreader" -}} + {{- printf "esreader" -}} +{{- end -}} + + +{{- define "common.fullname.esreader" -}} + {{- $name := ( include "common.name.esreader" . ) -}} + {{- $namespace := ( include "common.namespace.infra" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + + +{{- define "common.deploymentname.esreader" -}} + {{- $name := ( include "common.fullname.esreader" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.configmapname.esreader" -}} + {{- $name := ( include "common.fullname.esreader" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.containername.esreader" -}} + {{- $name := ( include "common.fullname.esreader" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.serviceport.esreader.http" -}}8080{{- end -}} + +{{- define "common.pvname.esreader" -}} + {{- $name := ( include "common.fullname.esreader" . ) -}} + {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.pvcname.esreader" -}} + {{- $name := ( include "common.fullname.esreader" . ) -}} + {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + diff --git a/smo-install/oran_oom/ric-common/templates/_influxdb.tpl b/smo-install/oran_oom/ric-common/templates/_influxdb.tpl new file mode 100644 index 00000000..c6be83cb --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_influxdb.tpl @@ -0,0 +1,57 @@ +################################################################################ +# Copyright (c) 2021 HCL Technologies Limited. # +# # +# 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. # +################################################################################ + +{{- define "common.name.influxdb" -}} + {{- printf "influxdb" -}} +{{- end -}} + +{{- define "common.fullname.influxdb" -}} + {{- $name := ( include "common.name.influxdb" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.influxdb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.influxdb.labels" -}} +helm.sh/chart: {{ include "common.influxdb.chart" . }} +{{ include "common.influxdb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{- define "common.influxdb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "common.name.influxdb" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{- define "common.influxdb.serviceAccountName" -}} + {{- $name := ( include "common.fullname.influxdb" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.influxdb.http" -}}8086{{- end -}} +{{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}} +{{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}} +{{- define "common.serviceport.influxdb.rpc.bind_address" -}}8088{{- end -}} +{{- define "common.serviceport.influxdb.graphite.bind_address" -}}2003{{- end -}} +{{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}} +{{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}} +{{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_ingress_controller.tpl b/smo-install/oran_oom/ric-common/templates/_ingress_controller.tpl new file mode 100644 index 00000000..e136404d --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_ingress_controller.tpl @@ -0,0 +1,71 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.ingresscontroller.url.platform" -}} + {{- $keylist := list "common" "ingresscontroller" "url" "platform" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $url := include "locate" $ctx -}} + {{- if not (empty $url) -}} + {{- $url -}} + {{- else -}} + {{- printf "ric-entry" -}} + {{- end -}} +{{- end -}} + +{{- define "common.ingresscontroller.url.aux" -}} + {{- $keylist := list "common" "ingresscontroller" "url" "aux" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $url := include "locate" $ctx -}} + {{- if not (empty $url) -}} + {{- $url -}} + {{- else -}} + {{- printf "aux-entry" -}} + {{- end -}} +{{- end -}} + + +{{- define "common.ingresscontroller.url.dashboard" -}} + {{- $keylist := list "common" "ingresscontroller" "url" "dashboard" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $url := include "locate" $ctx -}} + {{- if not (empty $url) -}} + {{- $url -}} + {{- else -}} + {{- printf "dashboard-entry" -}} + {{- end -}} +{{- end -}} + +{{- define "common.ingresscontroller.port.http" -}} + {{- $keylist := list "common" "ingresscontroller" "port" "http" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $port := include "locate" $ctx -}} + {{- if not (empty $port) -}} + {{- $port -}} + {{- else -}} + {{- printf "32080" -}} + {{- end -}} +{{- end -}} + +{{- define "common.ingresscontroller.port.https" -}} + {{- $keylist := list "common" "ingresscontroller" "port" "https" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $port := include "locate" $ctx -}} + {{- if not (empty $port) -}} + {{- $port -}} + {{- else -}} + {{- printf "32443" -}} + {{- end -}} +{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_jaegeradapter.tpl b/smo-install/oran_oom/ric-common/templates/_jaegeradapter.tpl new file mode 100644 index 00000000..07437100 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_jaegeradapter.tpl @@ -0,0 +1,72 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.jaegeradapter" -}} + {{- printf "jaegeradapter" -}} +{{- end -}} + +{{- define "common.fullname.jaegeradapter" -}} + {{- $name := ( include "common.name.jaegeradapter" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.jaegeradapter" -}} + {{- $name := ( include "common.fullname.jaegeradapter" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.jaegeradapter" -}} + {{- $name := ( include "common.fullname.jaegeradapter" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.jaegeradapter" -}} + {{- $name := ( include "common.fullname.jaegeradapter" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.servicename.jaegeradapter.query" -}} + {{- $name := ( include "common.fullname.jaegeradapter" . ) -}} + {{- printf "service-%s-query" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- define "common.servicename.jaegeradapter.collector" -}} + {{- $name := ( include "common.fullname.jaegeradapter" . ) -}} + {{- printf "service-%s-collector" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- define "common.servicename.jaegeradapter.agent" -}} + {{- $name := ( include "common.fullname.jaegeradapter" . ) -}} + {{- printf "service-%s-agent" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.jaegeradapter.zipkincompact" -}}5775{{- end -}} +{{- define "common.serviceport.jaegeradapter.jaegercompact" -}}6831{{- end -}} +{{- define "common.serviceport.jaegeradapter.jaegerbinary" -}}6832{{- end -}} +{{- define "common.serviceport.jaegeradapter.httpquery" -}}16686{{- end -}} +{{- define "common.serviceport.jaegeradapter.httpconfig" -}}5778{{- end -}} +{{- define "common.serviceport.jaegeradapter.zipkinhttp" -}}9411{{- end -}} +{{- define "common.serviceport.jaegeradapter.jaegerhttp" -}}14268{{- end -}} +{{- define "common.serviceport.jaegeradapter.jaegerhttpt" -}}14267{{- end -}} + +{{- define "common.portname.jaegeradapter.zipkincompact" -}}"zipkincompact"{{- end -}} +{{- define "common.portname.jaegeradapter.jaegercompact" -}}"jaegercompact"{{- end -}} +{{- define "common.portname.jaegeradapter.jaegerbinary" -}}"jaegerbinary"{{- end -}} +{{- define "common.portname.jaegeradapter.zipkinhttp" -}}"zipkinhttp"{{- end -}} +{{- define "common.portname.jaegeradapter.jaegerhttp" -}}"jaegerhttp"{{- end -}} +{{- define "common.portname.jaegeradapter.jaegerhttpt" -}}"jaegerhttpt"{{- end -}} +{{- define "common.portname.jaegeradapter.httpquery" -}}"httpquery"{{- end -}} +{{- define "common.portname.jaegeradapter.httpconfig" -}}"httpconfig"{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_logstash.tpl b/smo-install/oran_oom/ric-common/templates/_logstash.tpl new file mode 100644 index 00000000..7e50e037 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_logstash.tpl @@ -0,0 +1,49 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.logstash" -}} + {{- printf "logstash" -}} +{{- end -}} + + +{{- define "common.fullname.logstash" -}} + {{- $name := ( include "common.name.logstash" . ) -}} + {{- $namespace := ( include "common.namespace.aux" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + + +{{- define "common.deploymentname.logstash" -}} + {{- $name := ( include "common.fullname.logstash" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.configmapname.logstash" -}} + {{- $name := ( include "common.fullname.logstash" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.containername.logstash" -}} + {{- $name := ( include "common.fullname.logstash" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.serviceport.logstash.http" -}}8080{{- end -}} +{{- define "common.servicename.logstash.http" -}}logstash{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_messagerouter.tpl b/smo-install/oran_oom/ric-common/templates/_messagerouter.tpl new file mode 100644 index 00000000..ac73f6c8 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_messagerouter.tpl @@ -0,0 +1,58 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.messagerouter" -}} + {{- printf "messagerouter" -}} +{{- end -}} + +{{- define "common.fullname.messagerouter" -}} + {{- $name := ( include "common.name.messagerouter" . ) -}} + {{- $namespace := ( include "common.namespace.aux" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.messagerouter" -}} + {{- $name := ( include "common.fullname.messagerouter" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.messagerouter" -}} + {{- $name := ( include "common.fullname.messagerouter" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.messagerouter" -}} + {{- $name := ( include "common.fullname.messagerouter" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.messagerouter" -}} + {{- $name := ( include "common.fullname.messagerouter" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.messagerouter.tcp" -}} + {{- $name := ( include "common.fullname.messagerouter" . ) -}} + {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.messagerouter.http" -}}3904{{- end -}} +{{- define "common.serviceport.messagerouter.https" -}}3905{{- end -}} +{{- define "common.serviceport.messagerouter.kafka" -}}9092{{- end -}} +{{- define "common.serviceport.messagerouter.zookeeper" -}}2181{{- end -}} + +{{- define "common.servicename.messagerouter.http" -}}ricaux-messagerouter{{- end -}} + diff --git a/smo-install/oran_oom/ric-common/templates/_mrsub.tpl b/smo-install/oran_oom/ric-common/templates/_mrsub.tpl new file mode 100644 index 00000000..15583d55 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_mrsub.tpl @@ -0,0 +1,48 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + + +{{- define "common.name.mrsub" -}} + {{- printf "mrsub" -}} +{{- end -}} + +{{- define "common.fullname.mrsub" -}} + {{- $name := ( include "common.name.mrsub" . ) -}} + {{- $namespace := ( include "common.namespace.aux" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + + +{{- define "common.deploymentname.mrsub" -}} + {{- $name := ( include "common.fullname.mrsub" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.configmapname.mrsub" -}} + {{- $name := ( include "common.fullname.mrsub" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.containername.mrsub" -}} + {{- $name := ( include "common.fullname.mrsub" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.serviceport.mrsub.http" -}}8080{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_namespace.tpl b/smo-install/oran_oom/ric-common/templates/_namespace.tpl new file mode 100644 index 00000000..d2df3eef --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_namespace.tpl @@ -0,0 +1,60 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.namespace.platform" -}} + {{- $keylist := list "common" "namespace" "platform" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $namespace := include "locate" $ctx -}} + {{- if not (empty $namespace) -}} + {{- $namespace -}} + {{- else -}} + {{- printf "ricplt" -}} + {{- end -}} +{{- end -}} + +{{- define "common.namespace.infra" -}} + {{- $keylist := list "common" "namespace" "infra" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $namespace := include "locate" $ctx -}} + {{- if not (empty $namespace) -}} + {{- $namespace -}} + {{- else -}} + {{- printf "ricinfra" -}} + {{- end -}} +{{- end -}} + +{{- define "common.namespace.xapp" -}} + {{- $keylist := list "common" "namespace" "xapp" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $namespace := include "locate" $ctx -}} + {{- if not (empty $namespace) -}} + {{- $namespace -}} + {{- else -}} + {{- printf "ricxapp" -}} + {{- end -}} +{{- end -}} + + +{{- define "common.namespace.aux" -}} + {{- $keylist := list "common" "namespace" "aux" -}} + {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}} + {{- $namespace := include "locate" $ctx -}} + {{- if not (empty $namespace) -}} + {{- $namespace -}} + {{- else -}} + {{- printf "ricaux" -}} + {{- end -}} +{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_o1mediator.tpl b/smo-install/oran_oom/ric-common/templates/_o1mediator.tpl new file mode 100644 index 00000000..1abcbe6d --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_o1mediator.tpl @@ -0,0 +1,69 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.o1mediator" -}} + {{- printf "o1mediator" -}} +{{- end -}} + +{{- define "common.fullname.o1mediator" -}} + {{- $name := ( include "common.name.o1mediator" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.o1mediator" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.o1mediator" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.o1mediator" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.o1mediator" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.o1mediator" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- define "common.kongpath.ric.o1mediator" -}}/o1mediator{{- end -}} + +{{- define "common.servicename.o1mediator.http" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.o1mediator.tcp.netconf" -}} + {{- $name := ( include "common.fullname.o1mediator" . ) -}} + {{- printf "service-%s-tcp-netconf" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.serviceport.o1mediator.http.supervise" -}}9001{{- end -}} +{{- define "common.serviceport.o1mediator.http.mediation" -}}8080{{- end -}} +{{- define "common.serviceport.o1mediator.http.event" -}}3000{{- end -}} +{{- define "common.serviceport.o1mediator.tcp.netconf" -}}830{{- end -}} + +{{- define "common.nodeport.o1mediator.tcp.netconf" -}}30830{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_rsm.tpl b/smo-install/oran_oom/ric-common/templates/_rsm.tpl new file mode 100644 index 00000000..4fe5d46c --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_rsm.tpl @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.rsm" -}} + {{- printf "rsm" -}} +{{- end -}} + +{{- define "common.fullname.rsm" -}} + {{- $name := ( include "common.name.rsm" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.rsm" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.rsm" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.rsm" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.rsm" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.rsm" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.kongpath.ric.rsm" -}}/rsm{{- end -}} + +{{- define "common.servicename.rsm.rmr" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.rsm.http" -}} + {{- $name := ( include "common.fullname.rsm" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.rsm.rmr.data" -}}4801{{- end -}} +{{- define "common.serviceport.rsm.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.rsm.http" -}}4800{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_rtmgr.tpl b/smo-install/oran_oom/ric-common/templates/_rtmgr.tpl new file mode 100644 index 00000000..f3dd2abe --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_rtmgr.tpl @@ -0,0 +1,64 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.rtmgr" -}} + {{- printf "rtmgr" -}} +{{- end -}} + +{{- define "common.fullname.rtmgr" -}} + {{- $name := ( include "common.name.rtmgr" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.rtmgr" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.rtmgr" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.rtmgr" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.rtmgr" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.rtmgr" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.rtmgr.rmr" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.rtmgr.http" -}} + {{- $name := ( include "common.fullname.rtmgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.rtmgr.rmr.data" -}}4560{{- end -}} +{{- define "common.serviceport.rtmgr.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.rtmgr.http" -}}3800{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_submgr.tpl b/smo-install/oran_oom/ric-common/templates/_submgr.tpl new file mode 100644 index 00000000..b4b06c1a --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_submgr.tpl @@ -0,0 +1,55 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.submgr" -}} + {{- printf "submgr" -}} +{{- end -}} + +{{- define "common.fullname.submgr" -}} + {{- $name := ( include "common.name.submgr" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.deploymentname.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.submgr.rmr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.submgr.http" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.submgr.rmr.data" -}}4560{{- end -}} +{{- define "common.serviceport.submgr.rmr.route" -}}4561{{- end -}} +{{- define "common.serviceport.submgr.http" -}}3800{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_tiller.tpl b/smo-install/oran_oom/ric-common/templates/_tiller.tpl new file mode 100644 index 00000000..d423c396 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_tiller.tpl @@ -0,0 +1,149 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + +{{- define "recursiveprinter" -}} + {{- $ctx := .ctx }} + {{- $printkeys := .printkeys }} + {{- $currentkey := first $printkeys -}} + {{- $restkeys := rest $printkeys -}} + {{- if empty $restkeys -}} + {{- $result := index $ctx $currentkey -}} + {{- if not (empty $result) -}} + {{- $result -}} + {{- end -}} + {{- else -}} + {{- with index $ctx $currentkey }} + {{- $newctx := dict "ctx" . "printkeys" $restkeys -}} + {{- include "recursiveprinter" $newctx -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{- define "printer" -}} + {{- $topctx := .ctx }} + {{- if hasKey $topctx.Values "common" }} + {{- if hasKey $topctx.Values.common "tillers" }} + {{- $ctx := index $topctx.Values.common.tillers .key -}} + {{- if not (empty $ctx) -}} + {{- $newctx := dict "ctx" $ctx "printkeys" .printkey -}} + {{- include "recursiveprinter" $newctx -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} + + + + +{{- define "common.tillerName" -}} + {{- $printkey := list "name" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default "tiller-deploy" (include "printer" $newctx) -}} +{{- end -}} + + +{{- define "common.tillerNameSpace" -}} + {{- $printkey := list "nameSpace" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default "kube-system" (include "printer" $newctx) -}} +{{- end -}} + +{{- define "common.tillerDeployNameSpace" -}} + {{- $printkey := list "deployNameSpace" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default "kube-system" (include "printer" $newctx) -}} +{{- end -}} + + + +{{- define "common.tillerPort" -}} + {{- $printkey := list "port" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default 44134 (include "printer" $newctx) -}} +{{- end -}} + + + + +{{- define "common.tillerTLSVerify" -}} + {{- $printkey := list "tls" "verify" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default false (include "printer" $newctx) -}} +{{- end -}} + + +{{- define "common.tillerTLSAuthenticate" -}} + {{- $printkey := list "tls" "authenticate" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default false (include "printer" $newctx) -}} +{{- end -}} + + +{{- define "common.tillerHelmClientTLSSecret" -}} + {{- $tlsverify := include "common.tillerTLSVerify" . }} + {{- $tlsauthenticate := include "common.tillerTLSAuthenticate" . }} + {{- if or (eq $tlsverify "true") (eq $tlsauthenticate "true") }} + {{- $printkey := list "secret" "helmSecretName" -}} + {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }} + {{- default "" (include "printer" $newctx) -}} + {{- else -}} + {{- printf "" -}} + {{- end }} +{{- end -}} + + +{{- define "common.serviceaccountname.tiller" -}} + {{- $name := ( include "common.tillerName" . ) -}} + {{- printf "svcacct-tiller-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + + +{{- define "common.deploymentname.tiller" -}} + {{- $name := ( include "common.tillerName" . ) -}} + {{- printf "deployment-tiller-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{- define "common.servicename.tiller" -}} + {{- $topctx := .ctx }} + {{- if hasKey $topctx.Values "common" }} + {{- if hasKey $topctx.Values.common "tillers" }} + {{- $ctx := index $topctx.Values.common.tillers .key -}} + {{- if not (empty $ctx) -}} + {{- if hasKey $ctx "name" -}} + {{- $name := include "common.tillerName" . -}} + {{- printf "service-tiller-%s" $name | trunc 63 | trimSuffix "-" -}} + {{- else -}} + {{ "tiller-deploy" }} + {{- end -}} + {{- else -}} + {{ "tiller-deploy" }} + {{- end -}} + {{- else -}} + {{ "tiller-deploy" }} + {{- end -}} + {{- else -}} + {{ "tiller-deploy" }} + {{- end -}} +{{- end -}} + +{{- define "common.tillerEndpoint" -}} + {{- $servicename := ( include "common.servicename.tiller" . ) -}} + {{- $deploynamespace := ( include "common.tillerDeployNameSpace" . ) -}} + {{- printf "%s.%s" $servicename $deploynamespace -}} +{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_ves.tpl b/smo-install/oran_oom/ric-common/templates/_ves.tpl new file mode 100644 index 00000000..e768551a --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_ves.tpl @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.ves" -}} + {{- printf "ves" -}} +{{- end -}} + + +{{- define "common.fullname.ves" -}} + {{- $name := ( include "common.name.ves" . ) -}} + {{- $namespace := ( include "common.namespace.aux" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.ves" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.ves" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.ves" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.ves" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.ves" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.kongpath.aux.vescollector" -}}/vescollector{{- end -}} + +{{- define "common.servicename.ves.http" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.ves.tcp" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.ves.http" -}}8080{{- end -}} +{{- define "common.serviceport.ves.https" -}}8443{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_vespamgr.tpl b/smo-install/oran_oom/ric-common/templates/_vespamgr.tpl new file mode 100644 index 00000000..a1c443dc --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_vespamgr.tpl @@ -0,0 +1,53 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.vespamgr" -}} + {{- printf "vespamgr" -}} +{{- end -}} + +{{- define "common.fullname.vespamgr" -}} + {{- $name := ( include "common.name.vespamgr" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.vespamgr" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.vespamgr" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.vespamgr" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.vespamgr.http" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.vespamgr.alert" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "service-%s-alert" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.vespamgr.http" -}}8080{{- end -}} +{{- define "common.serviceport.vespamgr.alert" -}}9095{{- end -}} diff --git a/smo-install/oran_oom/ric-common/templates/_xapp_onboarder.tpl b/smo-install/oran_oom/ric-common/templates/_xapp_onboarder.tpl new file mode 100644 index 00000000..357f3ea6 --- /dev/null +++ b/smo-install/oran_oom/ric-common/templates/_xapp_onboarder.tpl @@ -0,0 +1,65 @@ +################################################################################ +# Copyright (c) 2019 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. # +################################################################################ + +{{- define "common.name.xapp-onboarder" -}} + {{- printf "xapp-onboarder" -}} +{{- end -}} + +{{- define "common.fullname.xapp-onboarder" -}} + {{- $name := ( include "common.name.xapp-onboarder" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.configmapname.xapp-onboarder" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.deploymentname.xapp-onboarder" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.containername.xapp-onboarder" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- define "common.containername.xapp-onboarder.chartmuseum" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "container-%s-chartmuseum" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceaccountname.xapp-onboarder" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.ingressname.xapp-onboarder" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.servicename.xapp-onboarder.server" -}} + {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.serviceport.xapp-onboarder.server" -}}8888{{- end -}} +{{- define "common.serviceport.xapp-onboarder.chartmuseum" -}}8080{{- end -}} + +{{- define "common.kongpath.ric.xapp-onboarder" -}}/onboard{{- end -}} +{{- define "common.kongpath.ric.chartmuseum" -}}/helmrepo{{- end -}} diff --git a/smo-install/oran_oom/ric-common/values.yaml b/smo-install/oran_oom/ric-common/values.yaml new file mode 100644 index 00000000..85432116 --- /dev/null +++ b/smo-install/oran_oom/ric-common/values.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + +################################################################# +# Global configuration default values that can be inherited by +# all subcharts. +################################################################# diff --git a/smo-install/oran_oom/ru-du-simulators/Chart.yaml b/smo-install/oran_oom/ru-du-simulators/Chart.yaml new file mode 100644 index 00000000..9b9b1bf8 --- /dev/null +++ b/smo-install/oran_oom/ru-du-simulators/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +name: ru-du-simulators +version: 1.0.0 +appVersion: test +description: Open Radio Access Network (ORAN) +home: https://www.onap.org +sources: +- https://gerrit.o-ran-sc.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" diff --git a/smo-install/oran_oom/ru-du-simulators/requirements.yaml b/smo-install/oran_oom/ru-du-simulators/requirements.yaml new file mode 100644 index 00000000..819c431b --- /dev/null +++ b/smo-install/oran_oom/ru-du-simulators/requirements.yaml @@ -0,0 +1,31 @@ +################################################################################ +# 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. # +################################################################################ + +dependencies: + - name: topology-server + version: ~1.0.0 + repository: "@local" + condition: ru-du-simulators.topologyServer + + - name: ru-simulator + version: ~1.0.0 + repository: "@local" + condition: ru-du-simulators.ruSimulator + + - name: du-simulator + version: ~1.0.0 + repository: "@local" + condition: ru-du-simulators.duSimulator diff --git a/smo-install/oran_oom/ru-du-simulators/values.yaml b/smo-install/oran_oom/ru-du-simulators/values.yaml new file mode 100644 index 00000000..08451557 --- /dev/null +++ b/smo-install/oran_oom/ru-du-simulators/values.yaml @@ -0,0 +1,20 @@ +################################################################################ +# 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. # +################################################################################ + +ru-du-simulators: + topologyServer: true + ruSimulator: true + duSimulator: true diff --git a/smo-install/oran_oom/ru-simulator/Chart.yaml b/smo-install/oran_oom/ru-simulator/Chart.yaml new file mode 100644 index 00000000..8287022c --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart to deploy o-ru-simulator +name: ru-simulator +version: 1.0.0 diff --git a/smo-install/oran_oom/ru-simulator/resources/config/config.json b/smo-install/oran_oom/ru-simulator/resources/config/config.json new file mode 100644 index 00000000..551c6eeb --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/resources/config/config.json @@ -0,0 +1,97 @@ +{ + "container-rules": { + "excluded-modules": [], + "excluded-features": [] + }, + + "supervisor-rules": { + "netopeer": { + "path": "/usr/local/bin/netopeer2-server", + "args": ["-d", "-v2"], + "autorestart": true, + "stdout": "log/netopeer-stdout.log", + "stderr": "log/netopeer-stderr.log" + }, + + "ntsim-network-function": { + "path": "/opt/dev/ntsim-ng/ntsim-ng", + "args": ["-w/opt/dev/ntsim-ng", "-f"], + "nomanual": true + } + }, + + "datastore-random-generation-rules" : { + "excluded-modules": [ + "sysrepo", + "sysrepo-monitoring", + "ietf-yang-library", + "ietf-netconf-acm", + "ietf-netconf-monitoring", + "nc-notifications", + "ietf-keystore", + "ietf-truststore", + "ietf-system", + "ietf-netconf-server", + "ietf-alarms", + "ietf-network-instance", + "ietf-restconf", + "ietf-yang-schema-mount", + "ietf-subscribed-notifications", + "o-ran-uplane-conf", + "o-ran-performance-management", + "o-ran-transceiver", + "o-ran-mplane-int", + "o-ran-processing-element", + "o-ran-shared-cell", + "nts-network-function" + ], + + "default-list-instances": 2, + "custom-list-instances" : [ + {"/ietf-interfaces:interfaces/interface": 4} + + ], + + "restrict-schema": [ + {"/ietf-interfaces:interfaces/interface/type": ["iana-if-type:ethernetCsmacd"]} + ] + + }, + + "datastore-populate-rules": { + "random-generation-enabled": true, + + "pre-generated-operational-data": [ + "../deploy/data/ietf-hardware-operational.json", + "../deploy/data/ietf-interfaces-operational.xml" + ], + "pre-generated-running-data": [ + "../deploy/data/ietf-hardware-running.json", + "../deploy/data/ietf-interfaces-running.xml", + "/opt/dev/deploy/data/nts-network-function-running.xml" + ] + }, + + "fault-rules" : { + "yang-notif-template" : "%%fault-id%%%%object%%%%affected-object%%%%fault-severity%%%%cleared%%%%text%%%%date-time%%", + "choosing-method" : "linear", + "faults" : [ +{{ $faultsSize := (len .ru.simulatedFaults) }} +{{ range $i, $fault := .ru.simulatedFaults }} + { + "condition" : "{{ $fault.condition }}", + "object" : "{{ $fault.object }}", + "severity" : "{{ $fault.severity }}", + "date-time" : "$$time$$", + "specific-problem" : "{{ $fault.specificProblem }}", + + "fault-id": "{{ $fault.faultId }}", + "fault-severity" : "{{ $fault.faultSeverity }}", + "affected-object" : "$$hostname$$", + "cleared" : "{{ $fault.cleared }}", + "text" : "{{ $fault.text }}" + }{{ if lt (add1 $i) $faultsSize }},{{ end }} +{{ end }} + ] + } +} diff --git a/smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-operational.json b/smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-operational.json new file mode 100644 index 00000000..18c83c95 --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-operational.json @@ -0,0 +1,307 @@ +{ + "ietf-hardware:hardware": { + "component": [ + { + "name": "chassis", + "serial-num": "23412", + "software-rev": "3.8.1 (2029-10-30 11:47:59)", + "mfg-name": "NTS", + "model-name": "O1-O-RU-Simulator", + "description": "O-RAN O-RU O1 Simulator", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "chassis-temperature-exhaust", + "chassis-temperature-inlet", + "chassis-fan0", + "chassis-fan1", + "chassis-fan2", + "chassis-fan3", + "cpu", + "slot0", + "slot2" + ] + }, + { + "name": "chassis-temperature-exhaust", + "sensor-data": { + "value": 30, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "chassis-temperature-inlet", + "sensor-data": { + "value": 29, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "chassis-fan0", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "chassis-fan0-speed" + ] + }, + { + "name": "chassis-fan0-speed", + "sensor-data": { + "value": 4100, + "value-type": "rpm", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "chassis-fan1", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "chassis-fan1-speed" + ] + }, + { + "name": "chassis-fan1-speed", + "sensor-data": { + "value": 4100, + "value-type": "rpm", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "chassis-fan2", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "chassis-fan2-speed" + ] + }, + { + "name": "chassis-fan2-speed", + "sensor-data": { + "value": 4100, + "value-type": "rpm", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "chassis-fan3", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "chassis-fan3-speed" + ] + }, + { + "name": "chassis-fan3-speed", + "sensor-data": { + "value": 1000, + "value-type": "rpm", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "cpu", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "cpu-temperature" + ] + }, + { + "name": "cpu-temperature", + "sensor-data": { + "value": 30, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "slot0", + "serial-num": "7220530", + "firmware-rev": "12.00.42-S (0F7F1001)", + "software-rev": "0", + "model-name": "385A-SFP-2P-40-FHL-JC3", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "slot0-temperature", + "slot0-logical0", + "slot0-logical1", + "slot0-logical2" + ] + }, + { + "name": "slot0-temperature", + "sensor-data": { + "value": 51, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "slot0-logical0", + "description": "SLOT0-AZ", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "slot0-logical0-bbu", + "slot0-logical0-rrh" + ] + }, + { + "name": "slot0-logical0-bbu", + "serial-num": "AGNN214S", + "mfg-name": "ACME GMBH.", + "model-name": "ANSHEONXH-E7", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "slot0-logical0-bbu-temperature" + ] + }, + { + "name": "slot0-logical0-bbu-temperature", + "sensor-data": { + "value": 37, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "slot0-logical0-rrh", + "serial-num": "AGNF714S", + "mfg-name": "ACME GMBH.", + "model-name": "ANSHEONXH-E7", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "slot0-logical0-rrh-temperature" + ] + }, + { + "name": "slot0-logical0-rrh-temperature", + "sensor-data": { + "value": 35, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "slot0-logical1", + "description": "SLOT0-B", + "state": { + "oper-state": "disabled" + } + }, + { + "name": "slot0-logical2", + "description": "SLOT0-C", + "state": { + "oper-state": "disabled" + } + }, + { + "name": "slot2", + "serial-num": "2522642", + "firmware-rev": "12.00.42-S (0F7F1001)", + "software-rev": "0", + "model-name": "339B-SFP-2P-75-FHL-JC3", + "state": { + "oper-state": "enabled" + }, + "contains-child": [ + "slot2-temperature", + "slot2-logical0", + "slot2-logical1", + "slot2-logical2" + ] + }, + { + "name": "slot2-temperature", + "sensor-data": { + "value": 49, + "value-type": "celsius", + "value-timestamp": "2021-03-18T19:51:50.3Z", + "oper-status": "ok" + }, + "state": { + "oper-state": "enabled" + } + }, + { + "name": "slot2-logical0", + "description": "SLOT2-C", + "state": { + "oper-state": "disabled" + } + }, + { + "name": "slot2-logical1", + "description": "SLOT3-A", + "state": { + "oper-state": "disabled" + } + }, + { + "name": "slot2-logical2", + "description": "SLOT3-B", + "state": { + "oper-state": "disabled" + } + } + ] + } +} diff --git a/smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-running.json b/smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-running.json new file mode 100644 index 00000000..ab757fa1 --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/resources/config/ietf-hardware-running.json @@ -0,0 +1,276 @@ +{ + "ietf-hardware:hardware": { + "component": [ + { + "name": "chassis", + "alias": "chassis", + "class": "iana-hardware:chassis", + "state": { + "admin-state": "unlocked" + } + }, + { + "name": "chassis-temperature-exhaust", + "alias": "chassis-temperature-exhaust", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 0 + }, + { + "name": "chassis-temperature-inlet", + "alias": "chassis-temperature-inlet", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 1 + }, + { + "name": "chassis-fan0", + "alias": "chassis-fan0", + "class": "iana-hardware:fan", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 2 + }, + { + "name": "chassis-fan0-speed", + "alias": "chassis-fan0-speed", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "chassis-fan0", + "parent-rel-pos": 0 + }, + { + "name": "chassis-fan1", + "alias": "chassis-fan1", + "class": "iana-hardware:fan", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 3 + }, + { + "name": "chassis-fan1-speed", + "alias": "chassis-fan1-speed", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "chassis-fan1", + "parent-rel-pos": 0 + }, + { + "name": "chassis-fan2", + "alias": "chassis-fan2", + "class": "iana-hardware:fan", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 4 + }, + { + "name": "chassis-fan2-speed", + "alias": "chassis-fan2-speed", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "chassis-fan2", + "parent-rel-pos": 0 + }, + { + "name": "chassis-fan3", + "alias": "chassis-fan3", + "class": "iana-hardware:fan", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 5 + }, + { + "name": "chassis-fan3-speed", + "alias": "chassis-fan3-speed", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "chassis-fan3", + "parent-rel-pos": 0 + }, + { + "name": "cpu", + "alias": "cpu", + "class": "iana-hardware:cpu", + "state": { + "admin-state": "locked" + }, + "parent": "chassis", + "parent-rel-pos": 6 + }, + { + "name": "cpu-temperature", + "alias": "cpu-temperature", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "cpu", + "parent-rel-pos": 0 + }, + { + "name": "slot0", + "alias": "slot0", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "chassis", + "parent-rel-pos": 7 + }, + { + "name": "slot0-temperature", + "alias": "slot0-temperature", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "slot0", + "parent-rel-pos": 0 + }, + { + "name": "slot0-logical0", + "alias": "Slot0-A", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot0", + "parent-rel-pos": 1 + }, + { + "name": "slot0-logical0-bbu", + "alias": "Slot0-A-bbu", + "class": "iana-hardware:port", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot0-logical0", + "parent-rel-pos": 0, + "o-ran-hardware:o-ran-name": "slot0-logical0-bbu" + }, + { + "name": "slot0-logical0-bbu-temperature", + "alias": "Slot0-A-bbu-temperature", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "slot0-logical0-bbu", + "parent-rel-pos": 0 + }, + { + "name": "slot0-logical0-rrh", + "alias": "Slot0-A-rrh", + "class": "iana-hardware:port", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot0-logical0", + "parent-rel-pos": 1, + "o-ran-hardware:o-ran-name": "slot0-logical0-rrh" + }, + { + "name": "slot0-logical0-rrh-temperature", + "alias": "Slot0-A-rrh-temperature", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "slot0-logical0-rrh", + "parent-rel-pos": 0 + }, + { + "name": "slot0-logical1", + "alias": "Slot0-B", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot0", + "parent-rel-pos": 2 + }, + { + "name": "slot0-logical2", + "alias": "Slot0-C", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot0", + "parent-rel-pos": 3 + }, + { + "name": "slot2", + "alias": "slot2", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "chassis", + "parent-rel-pos": 9 + }, + { + "name": "slot2-temperature", + "alias": "slot2-temperature", + "class": "iana-hardware:sensor", + "state": { + "admin-state": "locked" + }, + "parent": "slot2", + "parent-rel-pos": 0 + }, + { + "name": "slot2-logical0", + "alias": "Slot2-C", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot2", + "parent-rel-pos": 1 + }, + { + "name": "slot2-logical1", + "alias": "Slot3-A", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot2", + "parent-rel-pos": 2 + }, + { + "name": "slot2-logical2", + "alias": "Slot3-B", + "class": "iana-hardware:module", + "state": { + "admin-state": "unlocked" + }, + "parent": "slot2", + "parent-rel-pos": 3 + } + ] + } +} diff --git a/smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-operational.xml b/smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-operational.xml new file mode 100644 index 00000000..75f0eec2 --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-operational.xml @@ -0,0 +1,151 @@ + + + 09a95e08-5b53-4734-815f-a9c12300fc62 + Simulated interface for O-RU + ianaift:ethernetCsmacd + true + disabled + + false + false + 42783 +
+ 6.122.172.49 + 14 + static +
+
+ 206.35.59.57 + 199.41.255.188 + random +
+ + 48.159.72.129 + 42:8f:12:23:03:d3 + other + + + 187.230.45.63 + 77:b5:38:45:08:be + dynamic + + 13 + + 38 + 16 + 62 + 27 + + X5f0ExbIx4jg5fpd9c0wiOEJbCXzpYxe3M7AkiaRnlZsAgxCsx0LlFmwhk6yavM5iTFu4Idr3cTwtj0NQ0ycFVAO7ymh41meM2IQCNhFZ33km30c4ygJlRqshMJlFYrsS1iuOs1Gv5SJ8SNcr4WENm740IiyGJ0qLaUrCW7Z10A9SombsaQ7oPboptWYdOoQRjhl7hl8hV91bv5vxNCVuOcTh0RmP84Grm1qD + 21 + + + 2zF55KBup + 5 + + +
+ + true + true + 1163652863 +
+ ea87:d264:da5e:5b19:4713:7266:f91e:14f7 + 124 + other + tentative +
+
+ 2853:6b9:c531:f3c1:6875:f55:17ea:157b + 65 + link-layer + preferred +
+ + e6ae:4eeb:25c8:4ce6:9a7:5c2c:4293:f42e + 65:58:a4:47:f1:91 + other + + probe + + + f88d:e8e9:8f68:ff46:ae1a:8329:67bc:bd6f + 32:d7:a9:c1:37:14 + other + incomplete + + 1225514618 + + true + true + 2335597472 + 922813230 + + 33 + + 29 + 50 + 14 + 61 + + 8iROcw05EJqk0qe08RerP + 18 + + + M14steKtoB9s09xEKPYLf4LfWZHDetPSuUkP05bgykIym746WUR3ZCjVuSqIlgAI2Nx2KIiaV0Bh7xnVs7YjB965TwF7E8PGVeAxPSHKKaTJI8w2fnlRwjWqPuxmCe2xsDWhnvT0GMBoV8i2vDTTOIbvcAROOUd9p9qMEcEcYgsLgKODfzw3hAzlaq9Zce8BfqgUCUYt2r6abMNrmcuDMVZWm0Nq7N2m6a8IW73Zy21BOP2aTpGxkxlyp9ZwO + 29 + + +
+ b2:24:6a:90:68:bb + ba:33:50:5b:58:f7 + 2c:2b:1f:8c:3f:a2 + + 113 + + 60489 + true + + 3 + 0 + 1 + 6 + 4 + + dtSbiQU8fgixwU6tOQNLIc1PPuz2LFeQ862rPWr44JtAvzVbi + 5 + + + MQHBk8vYNCGOII7pwymAaP2xhPJrxxjcn1NA9bqPN6D + 2 + + + up + unknown + 2018-12-04T01:22:44Z + 1399123220 + fc:07:1e:ec:24:a3 + 80kcD05DwnN81FHWZgSwQXgpN7kjx4KF44JzXOcl3St5p21gjLM9A2yg1LzyPk + 80kcD05DwnN81FHWZgSwQXgpN7kjx4KF44JzXOcl3St5p21gjLM9A2yg1LzyPk + 2897952377425309696 + + 2037-04-15T16:07:29Z + 2571268368646403584 + 6267618126971935744 + 1109994561130658944 + 3315305959068576256 + 1267048002 + 2454029092 + 603209482 + 1059514199864528128 + 6657904184753078272 + 5105130509884859392 + 2014558074734005248 + 2053161590 + 1475901304 + + 1976-10-15T10:34:12Z + 56 + 143 +
+
diff --git a/smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-running.xml b/smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-running.xml new file mode 100644 index 00000000..3de642b9 --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/resources/config/ietf-interfaces-running.xml @@ -0,0 +1,111 @@ + + + 09a95e08-5b53-4734-815f-a9c12300fc62 + Simulated interface for O-RU + ianaift:ethernetCsmacd + true + disabled + + false + false + 42783 +
+ 6.122.172.49 + 14 +
+
+ 206.35.59.57 + 199.41.255.188 +
+ + 48.159.72.129 + 42:8f:12:23:03:d3 + + + 187.230.45.63 + 77:b5:38:45:08:be + + 13 + + 38 + 16 + 62 + 27 + + X5f0ExbIx4jg5fpd9c0wiOEJbCXzpYxe3M7AkiaRnlZsAgxCsx0LlFmwhk6yavM5iTFu4Idr3cTwtj0NQ0ycFVAO7ymh41meM2IQCNhFZ33km30c4ygJlRqshMJlFYrsS1iuOs1Gv5SJ8SNcr4WENm740IiyGJ0qLaUrCW7Z10A9SombsaQ7oPboptWYdOoQRjhl7hl8hV91bv5vxNCVuOcTh0RmP84Grm1qD + 21 + + + 2zF55KBup + 5 + + +
+ + true + true + 1163652863 +
+ ea87:d264:da5e:5b19:4713:7266:f91e:14f7 + 124 +
+
+ 2853:6b9:c531:f3c1:6875:f55:17ea:157b + 65 +
+ + e6ae:4eeb:25c8:4ce6:9a7:5c2c:4293:f42e + 65:58:a4:47:f1:91 + + + f88d:e8e9:8f68:ff46:ae1a:8329:67bc:bd6f + 32:d7:a9:c1:37:14 + + 1225514618 + + true + true + 2335597472 + 922813230 + + 33 + + 29 + 50 + 14 + 61 + + 8iROcw05EJqk0qe08RerP + 18 + + + M14steKtoB9s09xEKPYLf4LfWZHDetPSuUkP05bgykIym746WUR3ZCjVuSqIlgAI2Nx2KIiaV0Bh7xnVs7YjB965TwF7E8PGVeAxPSHKKaTJI8w2fnlRwjWqPuxmCe2xsDWhnvT0GMBoV8i2vDTTOIbvcAROOUd9p9qMEcEcYgsLgKODfzw3hAzlaq9Zce8BfqgUCUYt2r6abMNrmcuDMVZWm0Nq7N2m6a8IW73Zy21BOP2aTpGxkxlyp9ZwO + 29 + + +
+ b2:24:6a:90:68:bb + ba:33:50:5b:58:f7 + 2c:2b:1f:8c:3f:a2 + + 113 + + 60489 + true + + 3 + 0 + 1 + 6 + 4 + + dtSbiQU8fgixwU6tOQNLIc1PPuz2LFeQ862rPWr44JtAvzVbi + 5 + + + MQHBk8vYNCGOII7pwymAaP2xhPJrxxjcn1NA9bqPN6D + 2 + + +
+
diff --git a/smo-install/oran_oom/ru-simulator/templates/configmap.yaml b/smo-install/oran_oom/ru-simulator/templates/configmap.yaml new file mode 100644 index 00000000..14fe7468 --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/templates/configmap.yaml @@ -0,0 +1,15 @@ +{{ $currentScope := .}} +{{- range $i, $ru := .Values.rus }} + {{- $_ := set $ "ru" $ru }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $ru.name }}-configmap + labels: + sim-name: {{ $ru.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +data: +{{ tpl ($.Files.Glob "resources/config/*.{json,xml}").AsConfig $ | indent 2 }} +{{- end }} diff --git a/smo-install/oran_oom/ru-simulator/templates/configmapenv.yaml b/smo-install/oran_oom/ru-simulator/templates/configmapenv.yaml new file mode 100644 index 00000000..4be9b38e --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/templates/configmapenv.yaml @@ -0,0 +1,41 @@ +{{- range $i, $ru := .Values.rus }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $ru.name }}-configmapenv + labels: + sim-name: {{ $ru.name }}-env + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +data: + IPv6_ENABLED: {{ $.Values.ntsimNg.ipV6Enabled | quote }} + SSH_CONNECTIONS: {{ $.Values.ntsimNg.sshConnections | quote }} + TLS_CONNECTIONS: {{ $.Values.ntsimNg.tlsConnections | quote }} + NTS_HOST_IP: {{ $ru.name }}.{{ $.Release.Namespace }} + NTS_HOST_BASE_PORT: {{ $.Values.ntsimNg.ntsHostBasePort | quote }} + NTS_HOST_NETCONF_SSH_BASE_PORT: {{ $.Values.ntsimNg.ntsHostNetconfSshBasePort | quote }} + NTS_HOST_NETCONF_TLS_BASE_PORT: {{ $.Values.ntsimNg.ntsHostNetconfTlsBasePort | quote }} + NTS_HOST_TRANSFER_FTP_BASE_PORT: {{ $.Values.ntsimNg.ntsHostTransferFtpBasePort | quote }} + NTS_HOST_TRANSFER_SFTP_BASE_PORT: {{ $.Values.ntsimNg.ntsHostTransferSftpBasePort | quote }} + NTS_NF_MOUNT_POINT_ADDRESSING_METHOD: {{ $.Values.ntsimNg.ntsNfMountPointAddressingMethod | quote }} + + SDN_CONTROLLER_USERNAME: {{ $.Values.ntsimNg.sdnControllerUsername | quote }} + SDN_CONTROLLER_PASSWORD: {{ $.Values.ntsimNg.sdnControllerPassword | quote }} + SDN_CONTROLLER_PROTOCOL: {{ $.Values.ntsimNg.sdnControllerProtocol | quote }} + SDN_CONTROLLER_CALLHOME_IP: {{ $.Values.ntsimNg.sdnControllerCallHomeAddress | quote }} + SDN_CONTROLLER_CALLHOME_PORT: {{ $.Values.ntsimNg.sdnControllerCallHomePort | quote }} + SDN_CONTROLLER_IP: {{ $.Values.ntsimNg.sdnControllerAddress | quote }} + SDN_CONTROLLER_PORT: {{ $.Values.ntsimNg.sdnControllerPort | quote }} + + VES_COMMON_HEADER_VERSION: {{ $.Values.ntsimNg.vesCommonHeaderVersion | quote }} + VES_ENDPOINT_PROTOCOL: {{ $.Values.ntsimNg.vesEndpointProtocol | quote }} + VES_ENDPOINT_IP: {{ $.Values.ntsimNg.vesEndpointAddress | quote }} + VES_ENDPOINT_PORT: {{ $.Values.ntsimNg.vesEndpointPort | quote }} + VES_ENDPOINT_AUTH_METHOD: {{ $.Values.ntsimNg.vesEndpointAuthMethod | quote }} + VES_ENDPOINT_USERNAME: {{ $.Values.ntsimNg.vesEndpointUsername | quote }} + VES_ENDPOINT_PASSWORD: {{ $.Values.ntsimNg.vesEndpointPassword | quote }} + + NTS_NF_STANDALONE_START_FEATURES: {{ $.Values.ntsimNg.ntsNfStandaloneStartFeatures | quote }} + +{{- end }} diff --git a/smo-install/oran_oom/ru-simulator/templates/deployment.yaml b/smo-install/oran_oom/ru-simulator/templates/deployment.yaml new file mode 100644 index 00000000..808cb9e4 --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/templates/deployment.yaml @@ -0,0 +1,73 @@ +{{- range $i, $ru := .Values.rus }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ $ru.name }} + labels: + sim-name: {{ $ru.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +spec: + replicas: 1 + selector: + matchLabels: + sim-name: {{ $ru.name }} + template: + metadata: + labels: + sim-name: {{ $ru.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} + annotations: + checksum/config: {{ print $ru | sha256sum }} + spec: + hostname: "{{ $ru.name }}" + containers: + - name: {{ $.Chart.Name }} + image: "{{ $.Values.image.repository }}/{{ $.Values.image.name}}:{{ $.Values.image.tag }}" + imagePullPolicy: {{ $.Values.image.pullPolicy }} + tty: true + stdin: true + envFrom: + - configMapRef: + name: {{ $ru.name }}-configmapenv + volumeMounts: + - name: {{ $ru.name }}-config-volume + subPath: config.json + mountPath: /opt/dev/ntsim-ng/config/config.json + - name: {{ $ru.name }}-config-volume + subPath: ietf-hardware-operational.json + mountPath: /opt/dev/deploy/data/ietf-hardware-operational.json + - name: {{ $ru.name }}-config-volume + subPath: ietf-hardware-running.json + mountPath: /opt/dev/deploy/data/ietf-hardware-running.json + - name: {{ $ru.name }}-config-volume + subPath: ietf-interfaces-operational.xml + mountPath: /opt/dev/deploy/data/ietf-interfaces-operational.xml + - name: {{ $ru.name }}-config-volume + subPath: ietf-interfaces-running.xml + mountPath: /opt/dev/deploy/data/ietf-interfaces-running.xml + securityContext: + capabilities: + add: + - SYS_ADMIN + - SYS_PTRACE + volumes: + - name: {{ $ru.name }}-config-volume + configMap: + name: {{ $ru.name }}-configmap + items: + - key: config.json + path: config.json + - key: ietf-hardware-operational.json + path: ietf-hardware-operational.json + - key: ietf-hardware-running.json + path: ietf-hardware-running.json + - key: ietf-interfaces-operational.xml + path: ietf-interfaces-operational.xml + - key: ietf-interfaces-running.xml + path: ietf-interfaces-running.xml + + +{{- end }} diff --git a/smo-install/oran_oom/ru-simulator/templates/service.yaml b/smo-install/oran_oom/ru-simulator/templates/service.yaml new file mode 100644 index 00000000..35f475be --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/templates/service.yaml @@ -0,0 +1,20 @@ +{{ range $i, $ru := .Values.rus }} +--- +apiVersion: v1 +kind: Service +metadata: + name: "{{ $ru.name }}" + labels: + sim-name: {{ $ru.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} +spec: + type: {{ $.Values.service.type }} + ports: + - port: {{ $.Values.service.ports.port }} + selector: + sim-name: {{ $ru.name }} + release: {{ $.Release.Name }} + chart: {{ $.Chart.Name }} + +{{ end }} diff --git a/smo-install/oran_oom/ru-simulator/values.yaml b/smo-install/oran_oom/ru-simulator/values.yaml new file mode 100644 index 00000000..1b8a650c --- /dev/null +++ b/smo-install/oran_oom/ru-simulator/values.yaml @@ -0,0 +1,85 @@ +# Static Defaults +image: + repository: 'nexus3.o-ran-sc.org:10004/o-ran-sc' + name: nts-ng-o-ran-ru-fh + tag: 1.3.7 + pullPolicy: IfNotPresent + +service: + type: NodePort + ports: + port: 830 + +rus: + - name: o-ru-11221 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc62" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc62" + + - name: o-ru-11222 + simulatedFaults: + - name: fault1 + condition: "C/U-plane logical Connection faulty" + severity: CRITICAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: false + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc63" + - name: fault1-close + condition: "C/U-plane logical Connection faulty" + severity: NORMAL + specificProblem: "C/U-plane logical Connection faulty" + faultSeverity: CRITICAL + cleared: true + text: "O-RU Port Down" + faultId: 28, + object: "09a95e08-5b53-4734-815f-a9c12300fc63" + + +# NTS NG settings +ntsimNg: + ipV6Enabled: true + sshConnections: 0 + tlsConnections: 1 + ntsHostBasePort: 50000 + ntsHostNetconfSshBasePort: 0 + ntsHostNetconfTlsBasePort: 1000 + ntsHostTransferFtpBasePort: 2000 + ntsHostTransferSftpBasePort: 2000 + ntsNfMountPointAddressingMethod: docker-mapping + + sdnControllerProtocol: https + sdnControllerCallHomeAddress: sdnc-callhome.onap + sdnControllerCallHomePort: 6666 + sdnControllerUsername: admin + sdnControllerPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + sdnControllerPort: 8443 + sdnControllerAddress: sdnc.onap + + vesCommonHeaderVersion: 7.2.1 + vesEndpointProtocol: https + vesEndpointAddress: dcae-ves-collector.onap + vesEndpointPort: 8443 + vesEndpointAuthMethod: basic-auth + vesEndpointUsername: sample1 + vesEndpointPassword: sample1 + + ntsNfStandaloneStartFeatures: datastore-populate netconf-call-home web-cut-through diff --git a/smo-install/oran_oom/topology-server/Chart.yaml b/smo-install/oran_oom/topology-server/Chart.yaml new file mode 100644 index 00000000..9add21c3 --- /dev/null +++ b/smo-install/oran_oom/topology-server/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart to deploy the topology server +name: topology-server +version: 1.0.0 diff --git a/smo-install/oran_oom/topology-server/resources/config/config.json b/smo-install/oran_oom/topology-server/resources/config/config.json new file mode 100644 index 00000000..9d53af19 --- /dev/null +++ b/smo-install/oran_oom/topology-server/resources/config/config.json @@ -0,0 +1,73 @@ +{ + "container-rules": { + "excluded-modules": [], + "excluded-features": [] + }, + + "supervisor-rules": { + "netopeer": { + "path": "/usr/local/bin/netopeer2-server", + "args": ["-d", "-v2"], + "autorestart": true, + "stdout": "log/netopeer-stdout.log", + "stderr": "log/netopeer-stderr.log" + }, + + "ntsim-network-function": { + "path": "/opt/dev/ntsim-ng/ntsim-ng", + "args": ["-w/opt/dev/ntsim-ng", "-f"], + "nomanual": true + } + }, + + "datastore-random-generation-rules" : { + "excluded-modules": [ + "sysrepo", + "sysrepo-monitoring", + "ietf-yang-library", + "ietf-netconf-acm", + "ietf-netconf-monitoring", + "nc-notifications", + "ietf-keystore", + "ietf-truststore", + "ietf-system", + "ietf-netconf-server", + "nts-network-function" + ], + + "default-list-instances": 2, + "custom-list-instances" : [] + }, + + "datastore-populate-rules": { + "random-generation-enabled": false, + + "pre-generated-operational-data": [ + "/opt/dev/deploy/data/tapi-common-operational.xml" + ], + "pre-generated-running-data": [ + "/opt/dev/deploy/data/tapi-common-running.xml" + ] + }, + + "fault-rules" : { + "yang-notif-template" : "$$uint16_counter$$%%object%%%%affected-object%%%%fault-severity%%%%cleared%%%%text%%%%date-time%%", + "choosing-method" : "linear", + "faults" : [ +{{ $faultsSize := (len .Values.simulatedFaults) }} +{{ range $i, $fault := .Values.simulatedFaults }} + { + "condition" : "{{ $fault.condition }}", + "object" : "{{ $fault.object }}", + "severity" : "{{ $fault.severity }}", + "date-time" : "$$time$$", + "specific-problem" : "{{ $fault.specificProblem }}", + "fault-severity" : "{{ $fault.faultSeverity }}", + "affected-object" : "%%object%%", + "cleared" : "{{ $fault.cleared }}", + "text" : "{{ $fault.text }}" + }{{ if lt (add1 $i) $faultsSize }},{{ end }} +{{ end }} + ] + } +} diff --git a/smo-install/oran_oom/topology-server/resources/config/tapi-common-operational.xml b/smo-install/oran_oom/topology-server/resources/config/tapi-common-operational.xml new file mode 100644 index 00000000..87927ca2 --- /dev/null +++ b/smo-install/oran_oom/topology-server/resources/config/tapi-common-operational.xml @@ -0,0 +1,113 @@ + + 6f69da3a-a243-4058-974e-baf11c357b7a + + test + context + + + + 7adfee73-44be-4813-a0dc-89f657f0a436 +{{ range $node := .Values.nodes }} + + {{ $node.uuid }} + + {{ $node.nodeEdgePointUuid }} + ETH + tapi-dsr:DIGITAL_SIGNAL_TYPE_GigE + BIDIRECTIONAL + SYMMETRIC + + interface-name + {{ $node.interfaceName }} + + + interface-description + {{ $node.interfaceDescription }} + + LOCKED + ENABLED + INSTALLED + + + ETH + + device-name + {{ $node.name }} + + LOCKED + ENABLED + INSTALLED + + cost + value-1 + alg1 + + + property-1 + latency-1 + queue-1 + jitter-1 + wander-1 + + +{{ end }} +{{ $topologyUuid := .Values.topologyUuid }} {{ $nodes := .Values.nodes }} +{{ range $link := .Values.links }} + + {{ $link.uuid }} + + {{ $topologyUuid }} + {{ range $duNode := $nodes }}{{ if eq $duNode.name $link.duNode}} + {{ $duNode.uuid }} + {{ $duNode.nodeEdgePointUuid }} + {{ end }}{{ end }} + + + {{ $topologyUuid }} + {{ range $ruNode := $nodes }}{{ if eq $ruNode.name $link.ruNode }} + {{ $ruNode.uuid }} + {{ $ruNode.nodeEdgePointUuid }} + {{ end }}{{ end }} + + ETH + BIDIRECTIONAL + + link-name + {{ $link.duNode }}-to-{{ $link.ruNode }} + + LOCKED + ENABLED + INSTALLED + + cost + value-1 + alg1 + + + property-1 + latency-1 + queue-1 + jitter-1 + wander-1 + + + risk-name + risk-1 + + + mechanism-1 + validated + very-robust + + layer-protocol-1---should-it-be-an-uuid? + layer-protocol-2---should-it-be-an-uuid? + +{{ end }} + ETH + + test + topology + + + + diff --git a/smo-install/oran_oom/topology-server/resources/config/tapi-common-running.xml b/smo-install/oran_oom/topology-server/resources/config/tapi-common-running.xml new file mode 100644 index 00000000..f5e48a27 --- /dev/null +++ b/smo-install/oran_oom/topology-server/resources/config/tapi-common-running.xml @@ -0,0 +1,7 @@ + + 6f69da3a-a243-4058-974e-baf11c357b7a + + test + context + + diff --git a/smo-install/oran_oom/topology-server/templates/configmap.yaml b/smo-install/oran_oom/topology-server/templates/configmap.yaml new file mode 100644 index 00000000..4d4a2a93 --- /dev/null +++ b/smo-install/oran_oom/topology-server/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.vnf_name }}-configmap + labels: + vnf-name: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +data: +{{ tpl (.Files.Glob "resources/config/*.{json,xml}").AsConfig . | indent 2 }} diff --git a/smo-install/oran_oom/topology-server/templates/configmapenv.yaml b/smo-install/oran_oom/topology-server/templates/configmapenv.yaml new file mode 100644 index 00000000..2cffaaee --- /dev/null +++ b/smo-install/oran_oom/topology-server/templates/configmapenv.yaml @@ -0,0 +1,37 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.vnf_name }}-configmapenv + labels: + vnf-name: {{ .Values.vnf_name }}-env + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +data: + IPv6_ENABLED: {{ .Values.ntsimNg.ipV6Enabled | quote }} + SSH_CONNECTIONS: {{ .Values.ntsimNg.sshConnections | quote }} + TLS_CONNECTIONS: {{ .Values.ntsimNg.tlsConnections | quote }} + NTS_HOST_IP: {{ .Values.vnf_name }}.{{ .Release.Namespace }} + NTS_HOST_BASE_PORT: {{ .Values.ntsimNg.ntsHostBasePort | quote }} + NTS_HOST_NETCONF_SSH_BASE_PORT: {{ .Values.ntsimNg.ntsHostNetconfSshBasePort | quote }} + NTS_HOST_NETCONF_TLS_BASE_PORT: {{ .Values.ntsimNg.ntsHostNetconfTlsBasePort | quote }} + NTS_HOST_TRANSFER_FTP_BASE_PORT: {{ .Values.ntsimNg.ntsHostTransferFtpBasePort | quote }} + NTS_HOST_TRANSFER_SFTP_BASE_PORT: {{ .Values.ntsimNg.ntsHostTransferSftpBasePort | quote }} + NTS_NF_MOUNT_POINT_ADDRESSING_METHOD: {{ .Values.ntsimNg.ntsNfMountPointAddressingMethod | quote }} + + SDN_CONTROLLER_USERNAME: {{ .Values.ntsimNg.sdnControllerUsername | quote }} + SDN_CONTROLLER_PASSWORD: {{ .Values.ntsimNg.sdnControllerPassword | quote }} + SDN_CONTROLLER_PROTOCOL: {{ .Values.ntsimNg.sdnControllerProtocol | quote }} + SDN_CONTROLLER_CALLHOME_IP: {{ .Values.ntsimNg.sdnControllerCallHomeAddress | quote }} + SDN_CONTROLLER_CALLHOME_PORT: {{ .Values.ntsimNg.sdnControllerCallHomePort | quote }} + SDN_CONTROLLER_IP: {{ .Values.ntsimNg.sdnControllerAddress | quote }} + SDN_CONTROLLER_PORT: {{ .Values.ntsimNg.sdnControllerPort | quote }} + + VES_COMMON_HEADER_VERSION: {{ .Values.ntsimNg.vesCommonHeaderVersion | quote }} + VES_ENDPOINT_PROTOCOL: {{ .Values.ntsimNg.vesEndpointProtocol | quote }} + VES_ENDPOINT_IP: {{ .Values.ntsimNg.vesEndpointAddress | quote }} + VES_ENDPOINT_PORT: {{ .Values.ntsimNg.vesEndpointPort | quote }} + VES_ENDPOINT_AUTH_METHOD: {{ .Values.ntsimNg.vesEndpointAuthMethod | quote }} + VES_ENDPOINT_USERNAME: {{ .Values.ntsimNg.vesEndpointUsername | quote }} + VES_ENDPOINT_PASSWORD: {{ .Values.ntsimNg.vesEndpointPassword | quote }} + + NTS_NF_STANDALONE_START_FEATURES: {{ .Values.ntsimNg.ntsNfStandaloneStartFeatures | quote }} diff --git a/smo-install/oran_oom/topology-server/templates/deployment.yaml b/smo-install/oran_oom/topology-server/templates/deployment.yaml new file mode 100644 index 00000000..8df10b3c --- /dev/null +++ b/smo-install/oran_oom/topology-server/templates/deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.vnf_name }} + labels: + vnf-name: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + vnf-name: {{ .Values.vnf_name }} + template: + metadata: + labels: + vnf-name: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} + annotations: + checksum/config: {{ print .Values | sha256sum }} + spec: + hostname: "{{ .Values.vnf_name }}" + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}/{{ .Values.image.name}}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + tty: true + stdin: true + envFrom: + - configMapRef: + name: {{ .Values.vnf_name }}-configmapenv + volumeMounts: + - name: {{ .Values.vnf_name }}-config-volume + subPath: config.json + mountPath: /opt/dev/ntsim-ng/config/config.json + - name: {{ .Values.vnf_name }}-config-volume + subPath: tapi-common-operational.xml + mountPath: /opt/dev/deploy/data/tapi-common-operational.xml + - name: {{ .Values.vnf_name }}-config-volume + subPath: tapi-common-running.xml + mountPath: /opt/dev/deploy/data/tapi-common-running.xml + securityContext: + capabilities: + add: + - SYS_ADMIN + - SYS_PTRACE + volumes: + - name: {{ .Values.vnf_name }}-config-volume + configMap: + name: {{ .Values.vnf_name }}-configmap + items: + - key: config.json + path: config.json + - key: tapi-common-operational.xml + path: tapi-common-operational.xml + - key: tapi-common-running.xml + path: tapi-common-running.xml diff --git a/smo-install/oran_oom/topology-server/templates/service.yaml b/smo-install/oran_oom/topology-server/templates/service.yaml new file mode 100644 index 00000000..602d6350 --- /dev/null +++ b/smo-install/oran_oom/topology-server/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Values.vnf_name }}" + labels: + vnf-name: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.ports.port }} + nodePort: {{ .Values.service.ports.nodePort }} + selector: + vnf-name: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} diff --git a/smo-install/oran_oom/topology-server/values.yaml b/smo-install/oran_oom/topology-server/values.yaml new file mode 100644 index 00000000..f76e5558 --- /dev/null +++ b/smo-install/oran_oom/topology-server/values.yaml @@ -0,0 +1,124 @@ +# Static Defaults +replicaCount: 1 +image: + repository: 'nexus3.o-ran-sc.org:10004/o-ran-sc' + name: smo-nts-ng-topology-server + tag: 1.3.7 + pullPolicy: IfNotPresent + +service: + type: NodePort + ports: + port: 830 + nodePort: 30832 + +# Names +vnf_name: topology-server + +simulatedFaults: + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: MAJOR + object: "Slot-0-Port-A" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: NORMAL + object: "Slot-0-Port-A" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: true + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: MAJOR + object: "Slot-0-Port-C" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: NORMAL + object: "Slot-0-Port-C" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: true + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: MAJOR + object: "Slot-2-Port-B" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + - name: o-ru-11221 + condition: "CPRI Port Down" + severity: NORMAL + object: "Slot-2-Port-B" + specificProblem: "CPRI Port Down" + faultSeverity: MAJOR + cleared: false + text: "CPRI Port Down" + +nodes: + - name: o-du-1122 + uuid: ac089635-7a85-4197-9310-9b14f476a4a9 + nodeEdgePointUuid: 539f24cb-a5e9-454f-b05d-6307be419afe + interfaceName: "O-DU-interface-1" + interfaceDescription: "Simulated interface for O-DU" + - name: o-ru-11221 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa1 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede22 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc62" + interfaceDescription: "Simulated interface for O-RU" + - name: o-ru-11222 + uuid: 6b0d3930-100b-466c-9f44-2748ffb6aaa2 + nodeEdgePointUuid: bb7e5882-6e3a-46a7-a95b-0bb7310ede23 + interfaceName: "09a95e08-5b53-4734-815f-a9c12300fc63" + interfaceDescription: "Simulated interface for O-RU" + + +topologyUuid: 7adfee73-44be-4813-a0dc-89f657f0a436 +links: + - duNode: o-du-1122 + ruNode: o-ru-11221 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abc + - duNode: o-du-1122 + ruNode: o-ru-11222 + uuid: ac78b69f-22df-46fd-ae76-cc989bc30abd + + +# NTS NG settings +ntsimNg: + ipV6Enabled: true + sshConnections: 1 + tlsConnections: 0 + ntsHostBasePort: 50000 + ntsHostNetconfSshBasePort: 0 + ntsHostNetconfTlsBasePort: 1000 + ntsHostTransferFtpBasePort: 2000 + ntsHostTransferSftpBasePort: 2000 + ntsNfMountPointAddressingMethod: docker-mapping + + sdnControllerProtocol: https + sdnControllerCallHomeAddress: sdnc-callhome.onap + sdnControllerCallHomePort: 6666 + sdnControllerUsername: admin + sdnControllerPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + sdnControllerPort: 8443 + sdnControllerAddress: sdnc.onap + + vesCommonHeaderVersion: 7.2.1 + vesEndpointProtocol: https + vesEndpointAddress: dcae-ves-collector.onap + vesEndpointPort: 8443 + vesEndpointAuthMethod: basic-auth + vesEndpointUsername: sample1 + vesEndpointPassword: sample1 + + ntsNfStandaloneStartFeatures: datastore-populate netconf-call-home web-cut-through diff --git a/smo-install/oran_oom/topology/Chart.yaml b/smo-install/oran_oom/topology/Chart.yaml new file mode 100644 index 00000000..51513382 --- /dev/null +++ b/smo-install/oran_oom/topology/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0.0" +description: A Helm chart to deploy topology +name: topology +version: 1.0.0 diff --git a/smo-install/oran_oom/topology/templates/configmapenv.yaml b/smo-install/oran_oom/topology/templates/configmapenv.yaml new file mode 100644 index 00000000..9c167ddb --- /dev/null +++ b/smo-install/oran_oom/topology/templates/configmapenv.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: topology-configmapenv + labels: + name: topology-env + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +data: + AUTH_ENABLED: {{ .Values.conf.authEnabled | quote }} + AUTH_HOST_URL: {{ .Values.conf.authHostUrl | quote }} + PROVIDERS: {{ .Values.conf.providers | quote }} + LOAD_PACKAGES: {{ .Values.conf.loadPackages | quote }} + diff --git a/smo-install/oran_oom/topology/templates/deployment.yaml b/smo-install/oran_oom/topology/templates/deployment.yaml new file mode 100644 index 00000000..52eea18a --- /dev/null +++ b/smo-install/oran_oom/topology/templates/deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: topology + labels: + name: topology + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + name: topology + template: + metadata: + labels: + name: topology + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}/{{ .Values.image.name}}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + tty: true + stdin: true + envFrom: + - configMapRef: + name: topology-configmapenv + securityContext: + capabilities: + add: + - SYS_ADMIN + - SYS_PTRACE diff --git a/smo-install/oran_oom/topology/templates/service.yaml b/smo-install/oran_oom/topology/templates/service.yaml new file mode 100644 index 00000000..2f1d4e36 --- /dev/null +++ b/smo-install/oran_oom/topology/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: "topology" + labels: + name: topology + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.ports.port }} + nodePort: {{ .Values.service.ports.nodePort }} + selector: + name: topology + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} diff --git a/smo-install/oran_oom/topology/values.yaml b/smo-install/oran_oom/topology/values.yaml new file mode 100644 index 00000000..73f7efd1 --- /dev/null +++ b/smo-install/oran_oom/topology/values.yaml @@ -0,0 +1,19 @@ +# Static Defaults +replicaCount: 1 +image: + repository: 'docker.io/hightec' + name: smo-topology-api-v2 + tag: 2.0.2-SNAPSHOT-20210315T160448Z + pullPolicy: IfNotPresent + +service: + type: NodePort + ports: + port: 3001 + nodePort: 32001 + +conf: + authEnabled: false + authHostUrl: http://noidea:80 + providers: 5GBerlin,winlab + loadPackages: com.highstreet diff --git a/smo-install/scripts/layer-0/0-setup-charts-museum.sh b/smo-install/scripts/layer-0/0-setup-charts-museum.sh new file mode 100755 index 00000000..2b9ac192 --- /dev/null +++ b/smo-install/scripts/layer-0/0-setup-charts-museum.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +#curl https://raw.githubusercontent.com/helm/chartmuseum/main/scripts/get-chartmuseum | bash +wget https://get.helm.sh/chartmuseum-v0.13.1-linux-amd64.tar.gz +mv chartmuseum-v0.13.1-linux-amd64.tar.gz /tmp +cd /tmp +tar xvfz chartmuseum-v0.13.1-linux-amd64.tar.gz +mv /tmp/linux-amd64/chartmuseum /usr/local/bin/chartmuseum + +chartmuseum --port=18080 --storage="local" --storage-local-rootdir="./chartstorage" & diff --git a/smo-install/scripts/layer-0/0-setup-helm3.sh b/smo-install/scripts/layer-0/0-setup-helm3.sh new file mode 100755 index 00000000..09eafe2f --- /dev/null +++ b/smo-install/scripts/layer-0/0-setup-helm3.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +#Helm package +wget https://get.helm.sh/helm-v3.5.4-linux-amd64.tar.gz +mv helm-v3.5.4-linux-amd64.tar.gz /tmp/helm-v3.5.4-linux-amd64.tar.gz +cd /tmp/ +tar xvfz /tmp/helm-v3.5.4-linux-amd64.tar.gz +mv linux-amd64/helm /usr/local/bin/helm +apt-get install git -y + + +echo "Checking HELM ..." +helm version + +helm plugin install --version v0.9.0 https://github.com/chartmuseum/helm-push.git +helm repo remove local +helm repo add local http://localhost:18080 diff --git a/smo-install/scripts/layer-0/0-setup-kud-node.sh b/smo-install/scripts/layer-0/0-setup-kud-node.sh new file mode 100755 index 00000000..c94e6d68 --- /dev/null +++ b/smo-install/scripts/layer-0/0-setup-kud-node.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +echo '### Installing some TOOLS ###' +apt-get update -y +apt-get upgrade -y +apt-get install -y python3-pip python3.8 maven +update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 +pip install pipenv + +echo '### Installing the K8S cluster using MULTICLOUD KUD INSTALL ###' +../../multicloud-k8s/kud/hosting_providers/baremetal/aio.sh + diff --git a/smo-install/scripts/layer-0/0-setup-microk8s.sh b/smo-install/scripts/layer-0/0-setup-microk8s.sh new file mode 100755 index 00000000..800a953b --- /dev/null +++ b/smo-install/scripts/layer-0/0-setup-microk8s.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +## Microk8S part +sudo swapoff -a +sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab +snap remove microk8s +snap remove kubectl +snap install microk8s --classic --channel=1.22/stable +sudo snap install kubectl --classic --channel=1.22/stable + +## Firewall +ufw allow in on cni0 && sudo ufw allow out on cni0 +ufw default allow routed + +## Enable required features for K8S +microk8s enable dns storage + +## Setup kubectl +cd +mkdir .kube +cd .kube +sudo microk8s.config > config +chmod 700 config + +#Check the install +echo "Checking Kubernetes ..." +kubectl version diff --git a/smo-install/scripts/layer-1/1-build-all-charts.sh b/smo-install/scripts/layer-1/1-build-all-charts.sh new file mode 100755 index 00000000..4bea2c11 --- /dev/null +++ b/smo-install/scripts/layer-1/1-build-all-charts.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +../sub-scripts/build-onap.sh +../sub-scripts/build-oran.sh diff --git a/smo-install/scripts/layer-2/2-install-nonrtric-only.sh b/smo-install/scripts/layer-2/2-install-nonrtric-only.sh new file mode 100755 index 00000000..5ad6b1e1 --- /dev/null +++ b/smo-install/scripts/layer-2/2-install-nonrtric-only.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +echo "Starting NONRTRIC namespace..." + +../sub-scripts/install-nonrtric.sh ../../helm-override/oran-override.yaml + +kubectl get pods -n nonrtric +kubectl get namespaces diff --git a/smo-install/scripts/layer-2/2-install-oran-cnf.sh b/smo-install/scripts/layer-2/2-install-oran-cnf.sh new file mode 100755 index 00000000..da5ec653 --- /dev/null +++ b/smo-install/scripts/layer-2/2-install-oran-cnf.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +echo "Starting ONAP CNF & NONRTRIC namespaces..." + +../sub-scripts/install-onap.sh ../../helm-override/onap-override-cnf.yaml +../sub-scripts/install-nonrtric.sh ../../helm-override/oran-override.yaml + +kubectl get pods -n onap +kubectl get pods -n nonrtric +kubectl get namespaces diff --git a/smo-install/scripts/layer-2/2-install-oran.sh b/smo-install/scripts/layer-2/2-install-oran.sh new file mode 100755 index 00000000..8e432ceb --- /dev/null +++ b/smo-install/scripts/layer-2/2-install-oran.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +echo "Starting ONAP & NONRTRIC namespaces ..." +../sub-scripts/install-onap.sh ../../helm-override/onap-override.yaml +../sub-scripts/install-nonrtric.sh ../../helm-override/oran-override.yaml + +kubectl get pods -n onap +kubectl get pods -n nonrtric +kubectl get namespaces diff --git a/smo-install/scripts/layer-2/2-install-simulators.sh b/smo-install/scripts/layer-2/2-install-simulators.sh new file mode 100755 index 00000000..f9d6fdeb --- /dev/null +++ b/smo-install/scripts/layer-2/2-install-simulators.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +echo "Starting Network Simulators namespace ..." +../sub-scripts/install-simulators.sh ../../helm-override/network-simulators-override.yaml ../../helm-override/network-simulators-topology-override.yaml + +kubectl get pods -n network +kubectl get namespaces diff --git a/smo-install/scripts/layer-2/2-upgrade-simulators.sh b/smo-install/scripts/layer-2/2-upgrade-simulators.sh new file mode 100755 index 00000000..ce31ded5 --- /dev/null +++ b/smo-install/scripts/layer-2/2-upgrade-simulators.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +echo "Starting Network Simulators namespace ..." +../sub-scripts/upgrade-simulators.sh ../../helm-override/network-simulators-override.yaml ../../helm-override/network-simulators-topology-override.yaml + +kubectl get pods -n network +kubectl get namespaces diff --git a/smo-install/scripts/sub-scripts/build-onap.sh b/smo-install/scripts/sub-scripts/build-onap.sh new file mode 100755 index 00000000..2033ef09 --- /dev/null +++ b/smo-install/scripts/sub-scripts/build-onap.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +apt-get install make -y + +helm plugin install ../../onap_oom/kubernetes/helm/plugins/undeploy/ +helm plugin install ../../onap_oom/kubernetes/helm/plugins/deploy/ + +echo '### Building ONAP part###' +(cd ../../onap_oom/kubernetes && make all -e SKIP_LINT=TRUE) diff --git a/smo-install/scripts/sub-scripts/build-oran.sh b/smo-install/scripts/sub-scripts/build-oran.sh new file mode 100755 index 00000000..9e3f1646 --- /dev/null +++ b/smo-install/scripts/sub-scripts/build-oran.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +apt-get install make -y + +echo '### Building ORAN part ###' +(cd ../../oran_oom && make all) diff --git a/smo-install/scripts/sub-scripts/clean-up.sh b/smo-install/scripts/sub-scripts/clean-up.sh new file mode 100755 index 00000000..a5adb13a --- /dev/null +++ b/smo-install/scripts/sub-scripts/clean-up.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl delete pv --all +sudo rm -rf /dockerdata-nfs diff --git a/smo-install/scripts/sub-scripts/install-nonrtric.sh b/smo-install/scripts/sub-scripts/install-nonrtric.sh new file mode 100755 index 00000000..d8b60001 --- /dev/null +++ b/smo-install/scripts/sub-scripts/install-nonrtric.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl create namespace nonrtric +echo '### Installing ORAN NONRTRIC part ###' +helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $1 diff --git a/smo-install/scripts/sub-scripts/install-onap.sh b/smo-install/scripts/sub-scripts/install-onap.sh new file mode 100755 index 00000000..652b8a95 --- /dev/null +++ b/smo-install/scripts/sub-scripts/install-onap.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl create namespace onap +echo '### Installing ONAP part ###' +helm deploy --debug onap local/onap --namespace onap -f $1 diff --git a/smo-install/scripts/sub-scripts/install-simulators.sh b/smo-install/scripts/sub-scripts/install-simulators.sh new file mode 100755 index 00000000..a8a1fce5 --- /dev/null +++ b/smo-install/scripts/sub-scripts/install-simulators.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl create namespace network +echo '### Installing ORAN SIMULATORS part ###' +helm install --debug oran-simulator local/ru-du-simulators --namespace network -f $1 -f $2 diff --git a/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh b/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh new file mode 100755 index 00000000..61a87e71 --- /dev/null +++ b/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl delete namespace nonrtric +kubectl delete pv nonrtric-pv2 +kubectl delete pv nonrtric-pv1 diff --git a/smo-install/scripts/sub-scripts/uninstall-onap.sh b/smo-install/scripts/sub-scripts/uninstall-onap.sh new file mode 100755 index 00000000..96888e75 --- /dev/null +++ b/smo-install/scripts/sub-scripts/uninstall-onap.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl delete namespace onap diff --git a/smo-install/scripts/sub-scripts/uninstall-simulators.sh b/smo-install/scripts/sub-scripts/uninstall-simulators.sh new file mode 100755 index 00000000..1698d0a6 --- /dev/null +++ b/smo-install/scripts/sub-scripts/uninstall-simulators.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl delete namespace network diff --git a/smo-install/scripts/sub-scripts/upgrade-simulators.sh b/smo-install/scripts/sub-scripts/upgrade-simulators.sh new file mode 100755 index 00000000..7e5b9a53 --- /dev/null +++ b/smo-install/scripts/sub-scripts/upgrade-simulators.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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============================================ +# =================================================================== +# +### + +kubectl create namespace network +echo '### Installing ORAN SIMULATORS part ###' +helm upgrade --debug oran-simulator local/ru-du-simulators --namespace network -f $1 -f $2 diff --git a/smo-install/scripts/uninstall-all.sh b/smo-install/scripts/uninstall-all.sh new file mode 100755 index 00000000..ee15d501 --- /dev/null +++ b/smo-install/scripts/uninstall-all.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ORAN SMO Package +# ================================================================================ +# Copyright (C) 2021 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 + +./sub-scripts/uninstall-onap.sh +./sub-scripts/uninstall-nonrtric.sh +./sub-scripts/uninstall-simulators.sh +./sub-scripts/clean-up.sh -- 2.16.6