Merge "Replace YAML comments with helm comments in templates"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 21 Sep 2020 10:58:18 +0000 (10:58 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 21 Sep 2020 10:58:18 +0000 (10:58 +0000)
101 files changed:
kubernetes/aaf/components/aaf-cert-service/resources/certServiceClient-keystore.jks [deleted file]
kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.jks [deleted file]
kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.p12 [deleted file]
kubernetes/aaf/components/aaf-cert-service/resources/root.crt [deleted file]
kubernetes/aaf/components/aaf-cert-service/resources/truststore.jks [deleted file]
kubernetes/aaf/requirements.yaml
kubernetes/aaf/values.yaml
kubernetes/appc/values.yaml
kubernetes/clamp/Makefile [new file with mode: 0644]
kubernetes/clamp/components/Makefile [new file with mode: 0644]
kubernetes/clamp/components/clamp-backend/Chart.yaml [moved from kubernetes/clamp/charts/clamp-backend/Chart.yaml with 100% similarity]
kubernetes/clamp/components/clamp-backend/requirements.yaml [new file with mode: 0644]
kubernetes/clamp/components/clamp-backend/resources/config/application.properties [new file with mode: 0644]
kubernetes/clamp/components/clamp-backend/resources/config/log/filebeat/filebeat.yml [moved from kubernetes/clamp/charts/clamp-backend/resources/config/log/filebeat/filebeat.yml with 100% similarity]
kubernetes/clamp/components/clamp-backend/resources/config/sdc-controllers-config.json [moved from kubernetes/clamp/charts/clamp-backend/resources/config/sdc-controllers-config.json with 100% similarity]
kubernetes/clamp/components/clamp-backend/templates/NOTES.txt [moved from kubernetes/clamp/charts/clamp-backend/templates/NOTES.txt with 100% similarity]
kubernetes/clamp/components/clamp-backend/templates/configmap.yaml [moved from kubernetes/clamp/charts/clamp-backend/templates/configmap.yaml with 92% similarity]
kubernetes/clamp/components/clamp-backend/templates/deployment.yaml [moved from kubernetes/clamp/charts/clamp-backend/templates/deployment.yaml with 82% similarity]
kubernetes/clamp/components/clamp-backend/templates/secrets.yaml [moved from kubernetes/clamp/charts/clamp-backend/templates/secrets.yaml with 100% similarity]
kubernetes/clamp/components/clamp-backend/templates/service.yaml [moved from kubernetes/clamp/charts/clamp-backend/templates/service.yaml with 100% similarity]
kubernetes/clamp/components/clamp-backend/values.yaml [moved from kubernetes/clamp/charts/clamp-backend/values.yaml with 64% similarity]
kubernetes/clamp/components/clamp-dash-es/Chart.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/Chart.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/requirements.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/requirements.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/resources/config/elasticsearch.yml [moved from kubernetes/clamp/charts/clamp-dash-es/resources/config/elasticsearch.yml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/templates/configmap.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/templates/configmap.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/templates/deployment.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/templates/deployment.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/templates/pv.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/templates/pv.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/templates/pvc.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/templates/pvc.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/templates/service.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/templates/service.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-es/values.yaml [moved from kubernetes/clamp/charts/clamp-dash-es/values.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/Chart.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/Chart.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/requirements.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/requirements.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/resources/config/kibana.yml [moved from kubernetes/clamp/charts/clamp-dash-kibana/resources/config/kibana.yml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/templates/configmap.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/templates/configmap.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/templates/deployment.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/templates/deployment.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/templates/ingress.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/templates/ingress.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/templates/service.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/templates/service.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-kibana/values.yaml [moved from kubernetes/clamp/charts/clamp-dash-kibana/values.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/Chart.yaml [moved from kubernetes/clamp/charts/clamp-dash-logstash/Chart.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/requirements.yaml [moved from kubernetes/clamp/charts/clamp-dash-logstash/requirements.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/resources/config/logstash.yml [moved from kubernetes/clamp/charts/clamp-dash-logstash/resources/config/logstash.yml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/resources/config/pipeline.conf [moved from kubernetes/clamp/charts/clamp-dash-logstash/resources/config/pipeline.conf with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/templates/configmap.yaml [moved from kubernetes/clamp/charts/clamp-dash-logstash/templates/configmap.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/templates/deployment.yaml [moved from kubernetes/clamp/charts/clamp-dash-logstash/templates/deployment.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/templates/service.yaml [moved from kubernetes/clamp/charts/clamp-dash-logstash/templates/service.yaml with 100% similarity]
kubernetes/clamp/components/clamp-dash-logstash/values.yaml [moved from kubernetes/clamp/charts/clamp-dash-logstash/values.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/Chart.yaml [moved from kubernetes/clamp/charts/mariadb/Chart.yaml with 97% similarity]
kubernetes/clamp/components/clamp-mariadb/NOTES.txt [moved from kubernetes/clamp/charts/mariadb/NOTES.txt with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/requirements.yaml [new file with mode: 0644]
kubernetes/clamp/components/clamp-mariadb/resources/config/init/docker-entrypoint.sh [moved from kubernetes/clamp/charts/mariadb/resources/config/init/docker-entrypoint.sh with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/resources/config/mariadb/conf.d/conf1/my.cnf [moved from kubernetes/clamp/charts/mariadb/resources/config/mariadb/conf.d/conf1/my.cnf with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/resources/config/mariadb/docker-entrypoint-initdb.d/create-tables.sql [moved from kubernetes/clamp/charts/mariadb/resources/config/mariadb/docker-entrypoint-initdb.d/create-tables.sql with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/NOTES.txt [moved from kubernetes/clamp/charts/mariadb/templates/NOTES.txt with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/configmap.yaml [moved from kubernetes/clamp/charts/mariadb/templates/configmap.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/deployment.yaml [moved from kubernetes/clamp/charts/mariadb/templates/deployment.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/pv.yaml [moved from kubernetes/clamp/charts/mariadb/templates/pv.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/pvc.yaml [moved from kubernetes/clamp/charts/mariadb/templates/pvc.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/secrets.yaml [moved from kubernetes/clamp/charts/mariadb/templates/secrets.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/templates/service.yaml [moved from kubernetes/clamp/charts/mariadb/templates/service.yaml with 100% similarity]
kubernetes/clamp/components/clamp-mariadb/values.yaml [moved from kubernetes/clamp/charts/mariadb/values.yaml with 96% similarity]
kubernetes/clamp/requirements.yaml
kubernetes/clamp/resources/config/default.conf
kubernetes/clamp/templates/deployment.yaml
kubernetes/clamp/values.yaml
kubernetes/common/cmpv2Config/values.yaml
kubernetes/common/common/templates/_name.tpl
kubernetes/common/dgbuilder/requirements.yaml
kubernetes/common/dgbuilder/resources/config/customSettings.js
kubernetes/common/dgbuilder/templates/deployment.yaml
kubernetes/common/dgbuilder/values.yaml
kubernetes/dcaegen2/components/dcae-bootstrap/resources/config/k8s-plugin.json
kubernetes/multicloud/charts/multicloud-pike/templates/deployment.yaml
kubernetes/multicloud/charts/multicloud-pike/values.yaml
kubernetes/onap/requirements.yaml
kubernetes/onap/resources/overrides/onap-all.yaml
kubernetes/onap/resources/overrides/oom-cert-service-environment.yaml [moved from kubernetes/onap/resources/overrides/aaf-cert-service-environment.yaml with 97% similarity]
kubernetes/onap/values.yaml
kubernetes/platform/.gitignore [new file with mode: 0644]
kubernetes/platform/.helmignore [new file with mode: 0644]
kubernetes/platform/Chart.yaml [new file with mode: 0644]
kubernetes/platform/Makefile [new file with mode: 0644]
kubernetes/platform/components/Makefile [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/.helmignore [moved from kubernetes/aaf/components/aaf-cert-service/.helmignore with 100% similarity]
kubernetes/platform/components/oom-cert-service/Chart.yaml [moved from kubernetes/aaf/components/aaf-cert-service/Chart.yaml with 88% similarity]
kubernetes/platform/components/oom-cert-service/requirements.yaml [moved from kubernetes/aaf/components/aaf-cert-service/requirements.yaml with 100% similarity]
kubernetes/platform/components/oom-cert-service/resources/certServiceClient-keystore.jks [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.jks [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.p12 [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/resources/default/cmpServers.json [moved from kubernetes/aaf/components/aaf-cert-service/resources/default/cmpServers.json with 100% similarity]
kubernetes/platform/components/oom-cert-service/resources/root.crt [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/resources/test/cmpServers.json [moved from kubernetes/aaf/components/aaf-cert-service/resources/test/cmpServers.json with 100% similarity]
kubernetes/platform/components/oom-cert-service/resources/truststore.jks [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/templates/deployment.yaml [moved from kubernetes/aaf/components/aaf-cert-service/templates/deployment.yaml with 100% similarity]
kubernetes/platform/components/oom-cert-service/templates/secret.yaml [moved from kubernetes/aaf/components/aaf-cert-service/templates/secret.yaml with 93% similarity]
kubernetes/platform/components/oom-cert-service/templates/service.yaml [moved from kubernetes/aaf/components/aaf-cert-service/templates/service.yaml with 100% similarity]
kubernetes/platform/components/oom-cert-service/values.yaml [moved from kubernetes/aaf/components/aaf-cert-service/values.yaml with 88% similarity]
kubernetes/platform/requirements.yaml [moved from kubernetes/clamp/charts/clamp-backend/requirements.yaml with 76% similarity]
kubernetes/platform/values.yaml [new file with mode: 0644]
kubernetes/sdnc/resources/config/bin/startODL.oom.sh [new file with mode: 0644]
kubernetes/sdnc/templates/statefulset.yaml
kubernetes/sdnc/values.yaml

diff --git a/kubernetes/aaf/components/aaf-cert-service/resources/certServiceClient-keystore.jks b/kubernetes/aaf/components/aaf-cert-service/resources/certServiceClient-keystore.jks
deleted file mode 100644 (file)
index e7da9a7..0000000
Binary files a/kubernetes/aaf/components/aaf-cert-service/resources/certServiceClient-keystore.jks and /dev/null differ
diff --git a/kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.jks b/kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.jks
deleted file mode 100644 (file)
index f47adb6..0000000
Binary files a/kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.jks and /dev/null differ
diff --git a/kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.p12 b/kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.p12
deleted file mode 100644 (file)
index 9b90af6..0000000
Binary files a/kubernetes/aaf/components/aaf-cert-service/resources/certServiceServer-keystore.p12 and /dev/null differ
diff --git a/kubernetes/aaf/components/aaf-cert-service/resources/root.crt b/kubernetes/aaf/components/aaf-cert-service/resources/root.crt
deleted file mode 100644 (file)
index b5e75da..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFnjCCA4agAwIBAgIEDQtWKTANBgkqhkiG9w0BAQwFADB3MQswCQYDVQQGEwJV\r
-UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuLUZyYW5jaXNjbzEZ\r
-MBcGA1UEChMQTGludXgtRm91bmRhdGlvbjENMAsGA1UECxMET05BUDERMA8GA1UE\r
-AxMIb25hcC5vcmcwHhcNMjAwNzA5MDgwNDE1WhcNMzAwNzA3MDgwNDE1WjB3MQsw\r
-CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuLUZy\r
-YW5jaXNjbzEZMBcGA1UEChMQTGludXgtRm91bmRhdGlvbjENMAsGA1UECxMET05B\r
-UDERMA8GA1UEAxMIb25hcC5vcmcwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK\r
-AoICAQCkxel9G29Hgy9j7cEQ0BGlPrP9s1SF3ADe7f56jTjQd/jFUsN67Da+l9Dt\r
-vy1yUwPnTr3krpXOHwQKplsuBDMoa0ayRhqUpp6fuSuu/zgGJOQIe7NlJh9FbYfq\r
-ax0nHO8qtwd+eTUCqkwVfOFZpDFwR7Ss73Z++14Em8TgFiIsTlBV1sa/xRWLT9JL\r
-Sqnr0tQiUJewO6sCUsis+U7kEf+QCueJAktMxR70rQcAJ2gd/zlnIaoaL4rF+MU8\r
-xlbEfMK/rxC6jeVm3oJu4ihjDKj1V6PDyEtzjsWQFtM+y6wgd98Kxt+0mHW3mZZ0\r
-+Ul0fHSE0fRNp8qEMOUKYFbCffWBrMBZaOaUy6FSnnGi8frv7WqJXNiO2lClhsN1\r
-2yA1HgiorhK9sXjVdwsjTmJhOdvn5sla22+QXrobNflHZHo8JhWHpZ9RbBWAZdaa\r
-FrEizBoDnkpdaNb2PykYjqPo8D1Y/lOSDOg32wOW50F6bZg3yyQzFe0+PsAPK/u+\r
-b8THRJhkbXYvcAoDQv785aXoaa0mVg+yAvz6dorchJkViaOvUlNl+DNNKGJb1hWc\r
-KWLU1SpH7I9QWQYGExFEzsg4Wv2ErGponSoecAm+IM23mn/fhGrwv1r/bl5WR++5\r
-5nUIAbPysz3yQoMllSsBBOpuSsCLo1KQqQeQxnTwFxLS0Ag2SwIDAQABozIwMDAd\r
-BgNVHQ4EFgQUff+Pkp90yZtYsNvFGhq6SBdL+f0wDwYDVR0TAQH/BAUwAwEB/zAN\r
-BgkqhkiG9w0BAQwFAAOCAgEAAWzAQxiJb+3WiXnVC0AeQ2GBnj3JNWI13WE1VJ1a\r
-+hsKAGHk6ACzsGfN0BiGp81Bt/4y+AinWTPI0xnuYqfJHS8/7sEvC7aSzmR0TsuM\r
-u7xOYCiczoEwlM2YoFt1dRWt+ve6EZgTXzBSm75to7F3HS0dZzRaEKxyOA3ONFHT\r
-tGgT+u7851qJQvNVwTOt54C7/PZ9Me5y98sosiGbp0USKroJbiMXHzIligp8s1uT\r
-+Pm581C8YTVHKciR/4fhChu+tx39ZR2p4AoJFjEvgcWqYy+sOyn+Z8sWWLoj3dFk\r
-xjdpSRLPI771ihGdV2JXwgzN1ei8OvUzrW1a1gLZkZ1ZWtK4rwpJteFh4YW/wuDb\r
-dKElfqXJITmOEO+uT4cJ5+hGa3rl6asxbEJ6vhy7SZPOzgM1uAjRT1MpBtG/ZPY5\r
-mOkjzNbjlNsgwJNkuXCi4+3DWNC3QNrIqm825Wdr79TM3kYGfkK/ngargA0z0KYc\r
-7sF6P0tGo6gLACbx+dO9KFpjBIqVaw9AUwb/IOGm1Yv+QutEISqgDQTKzT0iv2Pt\r
-eSkR2IzaEvH0VmBnTHoHQwrV7x10cMxhwoA1mRvdt8L+gKC91CbVirIiRGCrJabO\r
-GiKKZ+pD5kVi9gy7omrjw2kH6Vu4aQGySGBhzpIZ977oO9u+jaTdMHBtladqVvWd\r
-sIM=
------END CERTIFICATE-----
diff --git a/kubernetes/aaf/components/aaf-cert-service/resources/truststore.jks b/kubernetes/aaf/components/aaf-cert-service/resources/truststore.jks
deleted file mode 100644 (file)
index 90dfcb9..0000000
Binary files a/kubernetes/aaf/components/aaf-cert-service/resources/truststore.jks and /dev/null differ
index ccbe14c..7a7103f 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications Copyright © 2018 AT&T
 # Modifications Copyright © 2020 Orange
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,9 +19,6 @@ dependencies:
   - name: aaf-cass
     version: ~6.x-0
     repository: 'file://components/aaf-cass'
-  - name: aaf-cert-service
-    version: ~6.x-0
-    repository: 'file://components/aaf-cert-service'
   - name: aaf-cm
     version: ~6.x-0
     repository: 'file://components/aaf-cm'
index af42081..2afdb42 100644 (file)
@@ -1,5 +1,6 @@
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications © 2020 AT&T
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -75,10 +76,6 @@ global:
       public_port: 31112
 #     Note: as hello is a sample app, find values in charts/aaf-hello/values.yaml
 
-    certServiceClient:
-      secret:
-        name: aaf-cert-service-client-tls-secret
-
 #################################################################
 # Application configuration defaults.
 #################################################################
index 57ce1e9..8b3ce26 100644 (file)
@@ -133,6 +133,8 @@ mariadb-galera:
 
 dgbuilder:
   nameOverride: appc-dgbuilder
+  certInitializer:
+    nameOverride: appc-dgbuilder-cert-initializer
   config:
     db:
       rootPasswordExternalSecret: '{{ include "common.release" . }}-appc-db-root-pass'
diff --git a/kubernetes/clamp/Makefile b/kubernetes/clamp/Makefile
new file mode 100644 (file)
index 0000000..8af301d
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright © 2020 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dist resources templates charts docker
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+       @helm repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
diff --git a/kubernetes/clamp/components/Makefile b/kubernetes/clamp/components/Makefile
new file mode 100644 (file)
index 0000000..acaf7fb
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright © 2020 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+       @helm repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
\ No newline at end of file
diff --git a/kubernetes/clamp/components/clamp-backend/requirements.yaml b/kubernetes/clamp/components/clamp-backend/requirements.yaml
new file mode 100644 (file)
index 0000000..08708fb
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 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.
+
+dependencies:
+  - name: certInitializer
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/clamp/components/clamp-backend/resources/config/application.properties b/kubernetes/clamp/components/clamp-backend/resources/config/application.properties
new file mode 100644 (file)
index 0000000..b2cee39
--- /dev/null
@@ -0,0 +1,69 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights
+#                             reserved.
+# ================================================================================
+# Modifications 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.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+{{- if .Values.global.aafEnabled }}
+server.ssl.key-store=file:{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }}
+server.ssl.key-store-password=${cadi_keystore_password_p12}
+server.ssl.key-password=${cadi_key_password}
+server.ssl.key-store-type=PKCS12
+server.ssl.key-alias={{ .Values.certInitializer.fqi }}
+
+# The key file used to decode the key store and trust store password
+# If not defined, the key store and trust store password will not be decrypted
+clamp.config.keyFile=file:{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keyFile }}
+
+## Config part for Client certificates
+server.ssl.client-auth=want
+server.ssl.trust-store=file:{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }}
+server.ssl.trust-store-password=${cadi_truststore_password}
+{{- end }}
+
+#clds datasource connection details
+spring.datasource.username=${MYSQL_USER}
+spring.datasource.password=${MYSQL_PASSWORD}
+spring.datasource.url=jdbc:mariadb:sequential://clampdb.{{ include "common.namespace" . }}:3306/${MYSQL_DATABASE}?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3
+spring.profiles.active=clamp-default,clamp-aaf-authentication,clamp-sdc-controller,clamp-ssl-config,clamp-policy-controller,legacy-operational-policy,default-dictionary-elements
+
+#The log folder that will be used in logback.xml file
+clamp.config.files.sdcController=file:/opt/clamp/sdc-controllers-config.json
+
+#
+# Configuration Settings for Policy Engine Components
+clamp.config.policy.api.url=https4://policy-api.{{ include "common.namespace" . }}:6969
+clamp.config.policy.api.userName=healthcheck
+clamp.config.policy.api.password=zb!XztG34
+clamp.config.policy.pap.url=https4://policy-pap.{{ include "common.namespace" . }}:6969
+clamp.config.policy.pap.userName=healthcheck
+clamp.config.policy.pap.password=zb!XztG34
+
+#DCAE Inventory Url Properties
+clamp.config.dcae.inventory.url=https4://inventory.{{ include "common.namespace" . }}:8080
+clamp.config.dcae.dispatcher.url=https4://deployment-handler.{{ include "common.namespace" . }}:8443
+#DCAE Deployment Url Properties
+clamp.config.dcae.deployment.url=https4://deployment-handler.{{ include "common.namespace" . }}:8443
+clamp.config.dcae.deployment.userName=none
+clamp.config.dcae.deployment.password=none
+
+#AAF related parameters
+clamp.config.cadi.aafLocateUrl=https://aaf-locate.{{ include "common.namespace" . }}:8095
\ No newline at end of file
@@ -25,6 +25,5 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
-  spring_application_json: {{ tpl .Values.config.springApplicationJson . | quote }}
 
 {{ include "common.log.configMap" . }}
@@ -39,7 +39,7 @@ spec:
         - /app/ready.py
         args:
         - --container-name
-        - mariadb
+        - clamp-mariadb
         env:
         - name: NAMESPACE
           valueFrom:
@@ -49,6 +49,7 @@ spec:
         image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
+{{ include "common.certInitializer.initContainer" . | indent 6 }}
       containers:
         # side car containers
         {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.sidecar" . | nindent 8 }}{{ end }}
@@ -56,8 +57,19 @@ spec:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          {{- if .Values.global.aafEnabled }}
+          command:
+          - sh
+          workingDir: "/opt/clamp/"
           args:
-            - ""
+          - -c
+          - |
+            export $(grep '^cadi_' {{ .Values.certInitializer.credsPath }}/org.onap.clamp.cred.props | xargs -0)
+            java -Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1g -jar ./app.jar
+          {{- else }}
+          args:
+          - ""
+          {{- end }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           # disable liveness probe when breakpoints set in debugger
@@ -74,12 +86,15 @@ spec:
               port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
-          volumeMounts:
+          volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
           - name: logs
             mountPath: {{ .Values.log.path }}
           - mountPath: /opt/clamp/sdc-controllers-config.json
             name: {{ include "common.fullname" . }}-config
             subPath: sdc-controllers-config.json
+          - mountPath: /opt/clamp/application.properties
+            name: {{ include "common.fullname" . }}-config
+            subPath: application.properties
           env:
           - name: MYSQL_USER
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
@@ -87,11 +102,6 @@ spec:
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
           - name: MYSQL_DATABASE
             value: {{ tpl .Values.db.databaseName .}}
-          - name: SPRING_APPLICATION_JSON
-            valueFrom:
-              configMapKeyRef:
-                name: {{ template "common.fullname" . }}
-                key: spring_application_json
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -102,13 +112,15 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
-      volumes:
+      volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: {{ include "common.fullname" . }}-config
           configMap:
             name: {{ include "common.fullname" . }}
             items:
             - key: sdc-controllers-config.json
               path: sdc-controllers-config.json
+            - key: application.properties
+              path: application.properties
         - name:  logs
           emptyDir: {}
         {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.volumes" . | nindent 8 }}{{ end }}
@@ -21,6 +21,38 @@ global: # global defaults
   repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
   readinessImage: onap/oom/readiness:3.0.1
   persistence: {}
+  centralizedLoggingEnabled: true
+  #AAF service
+  aafEnabled: true
+
+#################################################################
+# AAF part
+#################################################################
+certInitializer:
+  permission_user: 1000
+  permission_group: 999
+  keystoreFile: "org.onap.clamp.p12"
+  truststoreFile: "org.onap.clamp.trust.jks"
+  keyFile: "org.onap.clamp.keyfile"
+  truststoreFileONAP: "truststoreONAPall.jks"
+  nameOverride: clamp-backend-cert-initializer
+  aafDeployFqi: deployer@people.osaaf.org
+  aafDeployPass: demo123456!
+  fqdn: clamp
+  fqi: clamp@clamp.onap.org
+  public_fqdn: clamp.onap.org
+  cadi_longitude: "-72.0"
+  cadi_latitude: "38.0"
+  app_ns: org.osaaf.aaf
+  credsPath: /opt/app/osaaf/local
+  aaf_add_config: >
+    /opt/app/aaf_config/bin/agent.sh local showpass {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop;
+    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_truststore_password=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_truststore_password.pwd;
+    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_key_password=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_key_password.pwd;
+    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_keystore_password=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_keystore_password.pwd;
+    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_keystore_password_p12=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_keystore_password_p12.pwd;
+    cd {{ .Values.credsPath }};
+    chmod a+rx *;
 
 secrets:
   - uid: db-secret
@@ -34,7 +66,7 @@ flavor: small
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-backend:5.0.7
+image: onap/clamp-backend:5.1.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -48,7 +80,12 @@ log:
 # Application configuration defaults.
 #################################################################
 
-db: {}
+#####dummy values for db user and password to pass lint!!!#######
+
+db:
+  user: dummyclds
+  password: dummysidnnd83K
+  databaseName: dummycldsdb4
 
 config:
   log:
@@ -56,26 +93,6 @@ config:
     logstashPort: 5044
   mysqlPassword: strong_pitchou
   dataRootDir: /dockerdata-nfs
-  springApplicationJson: >
-        {
-        "spring.datasource.username": "${MYSQL_USER}",
-        "spring.datasource.password": "${MYSQL_PASSWORD}",
-        "spring.datasource.url": "jdbc:mariadb:sequential://clampdb.{{ include "common.namespace" . }}:3306/${MYSQL_DATABASE}?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3",
-        "spring.profiles.active": "clamp-default,clamp-aaf-authentication,clamp-sdc-controller,clamp-ssl-config,clamp-policy-controller,legacy-operational-policy,default-dictionary-elements",
-        "clamp.config.files.sdcController": "file:/opt/clamp/sdc-controllers-config.json",
-        "clamp.config.dcae.inventory.url": "https4://inventory.{{ include "common.namespace" . }}:8080",
-        "clamp.config.dcae.dispatcher.url": "https4://deployment-handler.{{ include "common.namespace" . }}:8443",
-        "clamp.config.dcae.deployment.url": "https4://deployment-handler.{{ include "common.namespace" . }}:8443",
-        "clamp.config.dcae.deployment.userName": "none",
-        "clamp.config.dcae.deployment.password": "none",
-        "clamp.config.policy.api.url": "https4://policy-api.{{ include "common.namespace" . }}:6969",
-        "clamp.config.policy.api.userName": "healthcheck",
-        "clamp.config.policy.api.password": "zb!XztG34",
-        "clamp.config.policy.pap.url": "https4://policy-pap.{{ include "common.namespace" . }}:6969",
-        "clamp.config.policy.pap.userName": "healthcheck",
-        "clamp.config.policy.pap.password": "zb!XztG34",
-        "clamp.config.cadi.aafLocateUrl": "https://aaf-locate.{{ include "common.namespace" . }}:8095"
-        }
 
 # default number of instances
 replicaCount: 1
@@ -15,5 +15,5 @@
 
 apiVersion: v1
 description: MariaDB Service
-name: mariadb
+name: clamp-mariadb
 version: 6.0.0
diff --git a/kubernetes/clamp/components/clamp-mariadb/requirements.yaml b/kubernetes/clamp/components/clamp-mariadb/requirements.yaml
new file mode 100644 (file)
index 0000000..9b96d0c
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2020 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.
+
+dependencies:
+  - name: common
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
@@ -40,7 +40,11 @@ secrets:
     password: '{{ .Values.db.password }}'
 
 # Application configuration
-db: {}
+# dummy value db user pasword to pass lint!!!
+db:
+  user: dummy-clds
+  password: dummy-sidnnd83K
+  databaseName: dummy-cldsdb4
 
 # default number of instances
 replicaCount: 1
index d3c442d..dd93eac 100644 (file)
 # limitations under the License.
 
 dependencies:
-  - name: common
+  - name: certInitializer
     version: ~6.x-0
-    # local reference to common chart, as it is
-    # a part of this chart's package and will not
-    # be published independently to a repo (at this point)
     repository: '@local'
+  - name: clamp-mariadb
+    version: ~6.x-0
+    repository: 'file://components/clamp-mariadb'
+  - name: clamp-backend
+    version: ~6.x-0
+    repository: 'file://components/clamp-backend'
+  - name: clamp-dash-es
+    version: ~6.x-0
+    repository: 'file://components/clamp-dash-es'
+  - name: clamp-dash-logstash
+    version: ~6.x-0
+    repository: 'file://components/clamp-dash-logstash'
+  - name: clamp-dash-kibana
+    version: ~6.x-0
+    repository: 'file://components/clamp-dash-kibana'
\ No newline at end of file
index 84beff8..3e6fde9 100644 (file)
@@ -2,8 +2,14 @@ server {
 
   listen 2443 default ssl;
   ssl_protocols TLSv1.2;
+  {{ if .Values.global.aafEnabled }}
+  ssl_certificate {{.Values.certInitializer.credsPath}}/{{.Values.certInitializer.clamp_pem}};
+  ssl_certificate_key {{.Values.certInitializer.credsPath}}/{{.Values.certInitializer.clamp_key}};
+  {{ else }}
   ssl_certificate /etc/ssl/clamp.pem;
   ssl_certificate_key /etc/ssl/clamp.key;
+  {{ end }}
+
   ssl_verify_client optional_no_ca;
     location /restservices/clds/ {
         proxy_pass https://clamp-backend:443;
index d64a218..b10d9d7 100644 (file)
@@ -49,6 +49,7 @@ spec:
         image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
+{{ include "common.certInitializer.initContainer" . | nindent 6 }}
       containers:
         # side car containers
         {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.sidecar" . | nindent 8 }}{{ end }}
@@ -72,7 +73,7 @@ spec:
               port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
-          volumeMounts:
+          volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
           - name: logs
             mountPath: {{ .Values.log.path }}
           - mountPath: /etc/nginx/conf.d/default.conf
@@ -88,7 +89,7 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
-      volumes:
+      volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: {{ include "common.fullname" . }}-config
           configMap:
             name: {{ include "common.fullname" . }}
index 49fd98d..d180fbf 100644 (file)
@@ -21,7 +21,43 @@ global: # global defaults
   readinessImage: onap/oom/readiness:3.0.1
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
-  centralizedLoggingEnabled: false
+  centralizedLoggingEnabled: true
+  #AAF service
+  aafEnabled: true
+
+#################################################################
+# AAF part
+#################################################################
+certInitializer:
+  permission_user: 1000
+  permission_group: 999
+  addconfig: true
+  keystoreFile: "org.onap.clamp.p12"
+  truststoreFile: "org.onap.clamp.trust.jks"
+  keyFile: "org.onap.clamp.keyfile"
+  truststoreFileONAP: "truststoreONAPall.jks"
+  clamp_key: "clamp.key"
+  clamp_pem: "clamp.pem"
+  clamp_ca_certs_pem: "clamp-ca-certs.pem"
+  nameOverride: clamp-cert-initializer
+  aafDeployFqi: deployer@people.osaaf.org
+  aafDeployPass: demo123456!
+  # aafDeployCredsExternalSecret: some secret
+  fqdn: clamp
+  fqi: clamp@clamp.onap.org
+  public_fqdn: clamp.onap.org
+  cadi_longitude: "0.0"
+  cadi_latitude: "0.0"
+  app_ns: org.osaaf.aaf
+  credsPath: /opt/app/osaaf/local
+  aaf_add_config: >
+    /opt/app/aaf_config/bin/agent.sh local showpass {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop;
+    export $(/opt/app/aaf_config/bin/agent.sh local showpass | grep '^c' | xargs -0);
+    cd {{ .Values.credsPath }};
+    openssl pkcs12 -in {{ .Values.keystoreFile }} -nocerts -nodes -passin pass:$cadi_keystore_password_p12 > {{ .Values.clamp_key }};
+    openssl pkcs12 -in {{ .Values.keystoreFile }} -clcerts -nokeys -passin pass:$cadi_keystore_password_p12 > {{ .Values.clamp_pem }};
+    openssl pkcs12 -in {{ .Values.keystoreFile }} -cacerts -nokeys -chain -passin pass:$cadi_keystore_password_p12 > {{ .Values.clamp_ca_certs_pem }};
+    chmod a+rx *;
 
 secrets:
   - uid: db-root-pass
@@ -44,7 +80,7 @@ clamp-backend:
   db:
     userCredsExternalSecret: *dbUserPass
     databaseName: *dbName
-mariadb:
+clamp-mariadb:
   db:
     rootCredsExternalSecret: *dbRootPass
     userCredsExternalSecret: *dbUserPass
@@ -57,7 +93,7 @@ flavor: small
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-frontend:5.0.7
+image: onap/clamp-frontend:5.1.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index cf86657..1a18835 100644 (file)
@@ -12,9 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 global:
-  aaf:
+  platform:
     certServiceClient:
-      image: onap/org.onap.aaf.certservice.aaf-certservice-client:1.2.0
+      image: onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.0.0
       envVariables:
         # Certificate related
         cmpv2Organization: "Linux-Foundation"
@@ -23,7 +23,7 @@ global:
         cmpv2State: "California"
         cmpv2Country: "US"
         # Client configuration related
-        requestURL: "https://aaf-cert-service:8443/v1/certificate/"
+        requestURL: "https://oom-cert-service:8443/v1/certificate/"
         requestTimeout: "30000"
         keystorePassword: "secret"
         truststorePassword: "secret"
index e918cc1..adbe2b6 100644 (file)
 {{- $dot := default . .dot -}}
 {{- $suffix := default "" .suffix -}}
   {{- $name := default $dot.Chart.Name $dot.Values.nameOverride -}}
+  {{/* when linted, the name must be lower cased. When used from a component,
+       name should be overriden in order to avoid collision so no need to do it */}}
+  {{- if eq (printf "common/%s/templates" $name) $dot.Template.BasePath -}}
+  {{- $name = lower $name -}}
+  {{- end -}}
   {{- include "common.fullnameExplicit" (dict "dot" $dot "chartName" $name "suffix" $suffix) }}
 {{- end -}}
 
index 4735901..cf305d4 100644 (file)
@@ -16,3 +16,6 @@ dependencies:
   - name: common
     version: ~6.x-0
     repository: 'file://../common'
+  - name: certInitializer
+    version: ~6.x-0
+    repository: '@local'
index 42c2e57..b6a1a86 100644 (file)
@@ -54,6 +54,8 @@ module.exports={
     },
     "uiHost": "0.0.0.0",
     "version": "0.9.1",
-    "performGitPull": "N",
-    "enableHttps" : true
+    {{ if .Values.global.aafEnabled }}
+    "enableHttps" : true,
+    {{ end }}
+    "performGitPull": "N"
 }
index 1c32e12..ec088e9 100644 (file)
@@ -70,6 +70,7 @@ spec:
         image: "{{ .Values.global.envsubstImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
+{{ include "common.certInitializer.initContainer" . | indent 6 }}
       - command:
         - /app/ready.py
         args:
@@ -89,7 +90,7 @@ spec:
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command: ["/bin/bash"]
-          args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"]
+          args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && {{ if .Values.global.aafEnabled}} cp /opt/app/osaaf/local/node-*.pem certs && {{end}}./start.sh sdnc1.0 && wait"]
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           readinessProbe:
@@ -101,6 +102,7 @@ spec:
           - name: SDNC_CONFIG_DIR
             value: /opt/onap/sdnc/data/properties
           volumeMounts:
+{{ include "common.certInitializer.volumeMount" . | indent 10 }}
           - mountPath: /etc/localtime
             name: localtime
             readOnly: true
@@ -127,6 +129,7 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
       volumes:
+{{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: localtime
           hostPath:
             path: /etc/localtime
index a7e6e24..cf88fe5 100644 (file)
@@ -158,21 +158,45 @@ ingress:
   config:
     ssl: "redirect"
 
-resources: {}
-  # We usually recommend not to specify default resources and to leave this as a conscious
-  # choice for the user. This also increases chances charts run on environments with little
-  # resources, such as Minikube. If you do want to specify resources, uncomment the following
-  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
-  #
-  # Example:
-  # Configure resource requests and limits
-  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
-  # Minimum memory for development is 2 CPU cores and 4GB memory
-  # Minimum memory for production is 4 CPU cores and 8GB memory
-#resources:
-#  limits:
-#    cpu: 2
-#    memory: 4Gi
-#  requests:
-#    cpu: 2
-#    memory: 4Gi
+ # dependency / sub-chart configuration
+certInitializer:
+  nameOverride: dgbuilder-cert-initializer
+  truststoreMountpath: /opt/onap/ccsdk/dgbuilder/certs
+  fqdn: "sdnc"
+  app_ns: "org.osaaf.aaf"
+  fqi: "sdnc@sdnc.onap.org"
+  fqi_namespace: org.onap.sdnc
+  public_fqdn: "dgbuilder.onap.org"
+  aafDeployFqi: "deployer@people.osaaf.org"
+  aafDeployPass: demo123456!
+  cadi_latitude: "38.0"
+  cadi_longitude: "-72.0"
+  credsPath: /opt/app/osaaf/local
+  aaf_add_config: >
+    cd /opt/app/osaaf/local;
+    /opt/app/aaf_config/bin/agent.sh local showpass {{.Values.fqi}} {{ .Values.fqdn }} | grep cadi_keystore_password= | cut -d= -f 2 > {{ .Values.credsPath }}/.pass 2>&1 ;
+    cp {{ .Values.fqi_namespace }}.crt node-cert.pem;
+    cp {{ .Values.fqi_namespace }}.key node-key.pem;
+    chmod go+r node-*.pem
+
+#Resource Limit flavor -By Default using small
+flavor: small
+#segregation for different envionment (Small and Large)
+
+resources:
+  small:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 2Gi
+  large:
+    limits:
+      cpu: 4
+      memory: 8Gi
+    requests:
+      cpu: 2
+      memory: 4Gi
+  unlimited: {}
+
index 6de75c9..3979dd2 100644 (file)
     },
   "external_cert":
     {
-      "image_tag": "{{ .Values.global.tlsRepository }}/{{ .Values.cmpv2Config.global.aaf.certServiceClient.image }}",
-      "request_url": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.requestURL }}",
-      "timeout":  "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.requestTimeout }}",
-      "country": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.cmpv2Country }}",
-      "organization": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.cmpv2Organization }}",
-      "state": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.cmpv2State }}",
-      "organizational_unit": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.cmpv2OrganizationalUnit }}",
-      "location": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.cmpv2Location }}",
-      "keystore_password": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.keystorePassword }}",
-      "truststore_password": "{{ .Values.cmpv2Config.global.aaf.certServiceClient.envVariables.truststorePassword }}"
+      "image_tag": "{{ .Values.global.tlsRepository }}/{{ .Values.cmpv2Config.global.platform.certServiceClient.image }}",
+      "request_url": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.requestURL }}",
+      "timeout":  "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.requestTimeout }}",
+      "country": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2Country }}",
+      "organization": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2Organization }}",
+      "state": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2State }}",
+      "organizational_unit": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}",
+      "location": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2Location }}",
+      "keystore_password": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.keystorePassword }}",
+      "truststore_password": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.truststorePassword }}"
     }
 }
+
index 76f3e8c..bfcacb8 100644 (file)
@@ -40,6 +40,8 @@ spec:
     spec:
      containers:
      - env:
+       - name: MSB_PROTO
+         value: {{ .Values.config.msbprotocol }}
        - name: MSB_ADDR
          value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
        - name: MSB_PORT
@@ -54,6 +56,8 @@ spec:
          value: "{{ .Values.config.aai.username }}"
        - name: AAI_PASSWORD
          value: "{{ .Values.config.aai.password }}"
+       - name: SSL_ENABLED
+         value: "{{ .Values.config.ssl_enabled }}"
        name: {{ include "common.name" . }}
        volumeMounts:
        - mountPath: /var/log/onap
index ec79a1a..50ced50 100644 (file)
@@ -31,8 +31,10 @@ istioSidecar: true
 
 # application configuration
 config:
+  ssl_enabled: false
+  msbprotocol: https
   msbgateway: msb-iag
-  msbPort: 80
+  msbPort: 443
   aai:
     port: 8443
     schemaVersion: v13
index f2d1aaf..9143c1f 100755 (executable)
@@ -1,5 +1,6 @@
 # Copyright © 2019 Amdocs, Bell Canada
 # Copyright (c) 2020 Nordix Foundation, Modifications
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -153,6 +154,10 @@ dependencies:
     version: ~6.x-0
     repository: '@local'
     condition: modeling.enabled
+  - name: platform
+    version: ~6.x-0
+    repository: '@local'
+    condition: platform.enabled
   - name: a1policymanagement
     version: ~6.x-0
     repository: '@local'
index bfa0cdf..1d0663e 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright © 2019 Amdocs, Bell Canada
 # Copyright (c) 2020 Nordix Foundation, Modifications
+# Modifications Copyright © 2020 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
@@ -79,5 +81,7 @@ vnfsdk:
   enabled: true
 modeling:
   enabled: true
+platform:
+  enabled: true
 a1policymanagement:
   enabled: true
\ No newline at end of file
@@ -1,4 +1,5 @@
 # Copyright © 2020 Nordix Foundation
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,7 +35,7 @@
 #################################################################
 global:
   cmpv2Enabled: true
-  aaf:
+  platform:
     certServiceClient:
       envVariables:
         # Certificate related
index 2b18288..e699581 100755 (executable)
@@ -1,5 +1,6 @@
 # Copyright © 2019 Amdocs, Bell Canada
 # Copyright (c) 2020 Nordix Foundation, Modifications
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -122,12 +123,12 @@ global:
 
   # Enabling CMPv2
   cmpv2Enabled: true
-  aaf:
+  platform:
     certServiceClient:
-      image: onap/org.onap.aaf.certservice.aaf-certservice-client:1.2.0
+      image: onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.0.0
       secret:
-        name: aaf-cert-service-client-tls-secret
-        mountPath: /etc/onap/aaf/certservice/certs/
+        name: oom-cert-service-client-tls-secret
+        mountPath: /etc/onap/oom/certservice/certs/
       envVariables:
         # Certificate related
         cmpv2Organization: "Linux-Foundation"
@@ -137,11 +138,11 @@ global:
         cmpv2Country: "US"
         # Client configuration related
         caName: "RA"
-        requestURL: "https://aaf-cert-service:8443/v1/certificate/"
+        requestURL: "https://oom-cert-service:8443/v1/certificate/"
         requestTimeout: "30000"
-        keystorePath: "/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks"
+        keystorePath: "/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks"
         keystorePassword: "secret"
-        truststorePath: "/etc/onap/aaf/certservice/certs/truststore.jks"
+        truststorePath: "/etc/onap/oom/certservice/certs/truststore.jks"
         truststorePassword: "secret"
 
   # TLS
@@ -308,5 +309,7 @@ vnfsdk:
   enabled: false
 modeling:
   enabled: false
+platform:
+  enabled: false
 a1policymanagement:
   enabled: false
diff --git a/kubernetes/platform/.gitignore b/kubernetes/platform/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/kubernetes/platform/.helmignore b/kubernetes/platform/.helmignore
new file mode 100644 (file)
index 0000000..c13e3c8
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
\ No newline at end of file
diff --git a/kubernetes/platform/Chart.yaml b/kubernetes/platform/Chart.yaml
new file mode 100644 (file)
index 0000000..000f3b3
--- /dev/null
@@ -0,0 +1,20 @@
+# Copyright © 2018 ZTE
+# Modifications Copyright © 2018 AT&T, Amdocs, Bell Canada
+# Modifications Copyright © 2020 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: ONAP platform components
+name: platform
+version: 6.0.0
diff --git a/kubernetes/platform/Makefile b/kubernetes/platform/Makefile
new file mode 100644 (file)
index 0000000..7a55c2e
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright © 2020 Samsung Electronics, Orange, 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dist resources templates charts
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+       @helm repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
diff --git a/kubernetes/platform/components/Makefile b/kubernetes/platform/components/Makefile
new file mode 100644 (file)
index 0000000..27e17db
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+# Modifications Copyright © 2020 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+       @helm repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: ONAP AAF Cert Service
-name: aaf-cert-service
-version: 6.0.0
+description: ONAP Cert Service
+name: oom-cert-service
+version: 6.0.0
\ No newline at end of file
diff --git a/kubernetes/platform/components/oom-cert-service/resources/certServiceClient-keystore.jks b/kubernetes/platform/components/oom-cert-service/resources/certServiceClient-keystore.jks
new file mode 100644 (file)
index 0000000..c089764
Binary files /dev/null and b/kubernetes/platform/components/oom-cert-service/resources/certServiceClient-keystore.jks differ
diff --git a/kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.jks b/kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.jks
new file mode 100644 (file)
index 0000000..e3882b1
Binary files /dev/null and b/kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.jks differ
diff --git a/kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.p12 b/kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.p12
new file mode 100644 (file)
index 0000000..ce92611
Binary files /dev/null and b/kubernetes/platform/components/oom-cert-service/resources/certServiceServer-keystore.p12 differ
diff --git a/kubernetes/platform/components/oom-cert-service/resources/root.crt b/kubernetes/platform/components/oom-cert-service/resources/root.crt
new file mode 100644 (file)
index 0000000..242e437
--- /dev/null
@@ -0,0 +1,33 @@
+-----BEGIN CERTIFICATE-----
+MIIFnjCCA4agAwIBAgIEHn8h9TANBgkqhkiG9w0BAQwFADB3MQswCQYDVQQGEwJV
+UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuLUZyYW5jaXNjbzEZ
+MBcGA1UEChMQTGludXgtRm91bmRhdGlvbjENMAsGA1UECxMET05BUDERMA8GA1UE
+AxMIb25hcC5vcmcwHhcNMjAwODI3MDg1MjQ3WhcNMzAwODI1MDg1MjQ3WjB3MQsw
+CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuLUZy
+YW5jaXNjbzEZMBcGA1UEChMQTGludXgtRm91bmRhdGlvbjENMAsGA1UECxMET05B
+UDERMA8GA1UEAxMIb25hcC5vcmcwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
+AoICAQCOQ8TArFljhDu9EXKqAppV/eslelFAGG1NhDnh3PI6jK7qKKSTIcUpKPiG
+u9CagyNq4Y1dNt1LsP/KSDDkm6CGYW2z4E0Nm0ckcGc4izdoFDFhoXkrMoKvQxct
+az3YD1AiEH7kIYqDp7S3LMP8FbAXlcV62J2AEPqWtbFGszi6Pj65InNnFTGT4Oon
+E46egKcSWAhNR6vN29MO9/0wZHxwXWlcS2CKt6+2QKpfimHf48EJ0idntsKpj302
+i93jWGVNtORZbDddmVZG6XaVQkfRrJiivPQHvIXU5bWCsV7OQsrzbbsSscnqDuAr
+5DjR1Jbm2394e3DkXZTnqLGKReaaz0roA7ybLSesU1Fu0ZjD5Zq6ZezpXEQvcxcd
+wmq1A8ugeuRKhizeBO9YddjYTHWflHLBpiEyIwDCUsXfdNdS0nHQNKMDNbkC9512
+SLbG1N6iLGt85BriMLzJrlMP48feuheu3G/Mrit01yBzIgbqP30DcAIox5bgnJOY
+knxPctNaGsBup76msBzk+aBeDU5N/zirEJYxTmC3okeISzcLFlqYUUSsEzlqh8SS
+pNDK6ZbnX1khJJdUbCJGmgFS6N4RPXdxX12OCJDyjjCXcn7RXcZsYb3A+eF09+EM
+l0Vp3P+Aj6+eSN+t1Ez0sjGfSv/I8q1zV/trYZBq/LZIznfBFwIDAQABozIwMDAd
+BgNVHQ4EFgQUC0e3vObokYFDHM21OlRF4UO6L7EwDwYDVR0TAQH/BAUwAwEB/zAN
+BgkqhkiG9w0BAQwFAAOCAgEAWLrsWPcRJb81ozx1O8lytX4aUagjYyWIDOst1mqI
+VH+U5bHo7oReKdfFcy4Zen2bKh9DITGD7jweqTxAVx3scLq/3PE2HSG+6fNJ6wt7
+amrMZA6IdWqDWnaFMZQug3JTMH7s6v3rD7FU7awVc6lY+7TjR3qunU2m8F5GvATF
+ag+VmMSLiaBBbbmQqd1JkvCzPXlwwN3rg2u81zMys1AIbgeOlE5ZmWppOQpi7UrZ
+C8PTsRKzapgENlgxtsqVjsAMJI6OGk20bNcQKDn5fU6QwYLfnLPlkuRmFD8FeluI
+jz+ROjzxdC7E/BA80uZctvEEvn2VnD01IlEm6HoC+71erT+zmvM4AGd7EJa6mklb
+X+tGSkfzbIAR2gcn9sdNdhYA2hXXpQaeEp19bB8MAoSp5raCtbqZDQVHofJFY7gG
+FW+yKLlqBTCTm1XOPriUwbP6gkpLlkeTxeIAx8QbucoFx11J7jAeXY7oTXfSQw3h
+OR0/CHlG0BjVep6RNGA0k9cDNRyIdkxvA31rtgYCSbtepR5IhZyFhiN25Djxu/g9
+krspoxAS9ModBSiswjl4Q26eoYT4pnFXMfYbh5E4qNZNv0/S3YQ0HSTupls6M77J
+KHMx17m8EWtdsv2KyUkFqu1Q1nGky7SjpFUsVlp65Q+au3ftKxUDIRWK6jgpRH1e
+YIk=
+-----END CERTIFICATE-----
diff --git a/kubernetes/platform/components/oom-cert-service/resources/truststore.jks b/kubernetes/platform/components/oom-cert-service/resources/truststore.jks
new file mode 100644 (file)
index 0000000..3d857e3
Binary files /dev/null and b/kubernetes/platform/components/oom-cert-service/resources/truststore.jks differ
@@ -31,7 +31,7 @@ data:
 apiVersion: v1
 kind: Secret
 metadata:
-  name: {{ .Values.global.aaf.certServiceClient.secret.name | default .Values.tls.client.secret.defaultName }}
+  name: {{ .Values.global.certService.certServiceClient.secret.name | default .Values.tls.client.secret.defaultName }}
 type: Opaque
 data:
   certServiceClient-keystore.jks:
@@ -1,5 +1,6 @@
 # Copyright © 2020, Nokia
 # Modifications Copyright  © 2020, Nordix Foundation, Orange
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -46,7 +47,7 @@ service:
 
 # Deployment configuration
 repository: nexus3.onap.org:10001
-image: onap/org.onap.aaf.certservice.aaf-certservice-api:1.2.0
+image: onap/org.onap.oom.platform.cert-service.oom-certservice-api:2.0.0
 pullPolicy: Always
 replicaCount: 1
 
@@ -81,21 +82,21 @@ resources:
 # Application configuration
 cmpServers:
   secret:
-    name: aaf-cert-service-secret
+    name: oom-cert-service-secret
   volume:
-    name: aaf-cert-service-volume
-    mountPath: /etc/onap/aaf/certservice
+    name: oom-cert-service-volume
+    mountPath: /etc/onap/oom/certservice
 
 tls:
   server:
     secret:
-      name: aaf-cert-service-server-tls-secret
+      name: oom-cert-service-server-tls-secret
     volume:
-      name: aaf-cert-service-server-tls-volume
-      mountPath: /etc/onap/aaf/certservice/certs/
+      name: oom-cert-service-server-tls-volume
+      mountPath: /etc/onap/oom/certservice/certs/
   client:
     secret:
-      defaultName: aaf-cert-service-client-tls-secret
+      defaultName: oom-cert-service-client-tls-secret
 
 envs:
   keystore:
@@ -116,9 +117,9 @@ credentials:
     #truststorePasswordExternalSecret:
   # Below cmp values contain credentials for EJBCA test instance and are relevant only if global addTestingComponents flag is enabled
   cmp:
-    #clientIakExternalSecret:
+    clientIakExternalSecret: '{{ include "common.release" . }}-ejbca-client-iak'
     #clientRvExternalSecret:
-    #raIakExternalSecret:
+    raIakExternalSecret: '{{ include "common.release" . }}-ejbca-ra-iak'
     #raRvExternalSecret:
     client: {}
       # iak: mypassword
@@ -1,5 +1,7 @@
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications Copyright © 2018 AT&T
+# Modifications Copyright © 2020 Orange
+# Modifications Copyright © 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,9 +16,6 @@
 # limitations under the License.
 
 dependencies:
-  - name: common
+  - name: oom-cert-service
     version: ~6.x-0
-    # local reference to common chart, as it is
-    # a part of this chart's package and will not
-    # be published independently to a repo (at this point)
-    repository: '@local'
+    repository: 'file://components/oom-cert-service'
\ No newline at end of file
diff --git a/kubernetes/platform/values.yaml b/kubernetes/platform/values.yaml
new file mode 100644 (file)
index 0000000..687fb61
--- /dev/null
@@ -0,0 +1,79 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications © 2020 AT&T
+# Modifications Copyright © 2020 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 defaults.
+#################################################################
+
+global:
+  nodePortPrefix: 302
+  # Readiness image
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.2
+  # Ubuntu Init image
+  ubuntuInitRepository: registry.hub.docker.com
+  ubuntuInitImage: oomk8s/ubuntu-init:2.0.0
+  # Logging image
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+  # BusyBox image
+  busyboxRepository: registry.hub.docker.com
+  busyboxImage: library/busybox:1.31
+  persistence:
+    enabled: true
+  # Standard OOM
+  pullPolicy: "Always"
+  repository: "nexus3.onap.org:10001"
+
+  # Use Local
+  #pullPolicy: IfNotPresent
+  #repository: "nexus3.onap.org:10003"
+
+  cmpv2Enabled: true
+  addTestingComponents: false
+
+  certService:
+    certServiceClient:
+      secret:
+        name: oom-cert-service-client-tls-secret
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+flavor: small
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 350
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 150
+  periodSeconds: 10
+
+persistence: {}
+
+resources: {}
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.oom.sh b/kubernetes/sdnc/resources/config/bin/startODL.oom.sh
new file mode 100644 (file)
index 0000000..721f340
--- /dev/null
@@ -0,0 +1,322 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# SDNC
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Update by Copyright (C) 2020 highstreet technologies GmbH. 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=========================================================
+###
+
+# Install SDN-C platform components if not already installed and start container
+
+# List of used constants, that are provided during container initialization
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_FEATURES_BOOT_FILE=$ODL_HOME/etc/org.apache.karaf.features.cfg
+#
+ODL_REMOVEIDMDB=${ODL_REMOVEIDMDB:-false}
+
+#ODL_CERT_DIR
+ODL_ADMIN_USERNAME=${ODL_ADMIN_USERNAME:-admin}
+if $ODL_REMOVEIDMDB ; then
+   echo "Remove odl idmdb"
+   rm $ODL_HOME/data/idmlight.db.mv.db
+   ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-admin}
+else
+   ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+fi
+
+export ODL_ADMIN_PASSWORD ODL_ADMIN_USERNAME
+
+SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
+SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin}
+CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
+
+#- ODL Cluster
+ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
+#SDNC_REPLICAS
+
+#- ODL GEO cluster
+GEO_ENABLED=${GEO_ENABLED:-false}
+#IS_PRIMARY_CLUSTER
+#MY_ODL_CLUSTER
+#PEER_ODL_CLUSTER
+
+#- AAF
+SDNC_AAF_ENABLED=${SDNC_AAF_ENABLED:-false}
+
+#- SDN-R
+SDNRWT=${SDNRWT:-false}
+SDNRWT_BOOTFEATURES=${SDNRWT_BOOTFEATURES:-sdnr-wt-feature-aggregator}
+SDNRDM=${SDNRDM:-false}
+# Add devicemanager base and specific repositories
+SDNRDM_BASE_REPO=${SDNRDM_BASE_REPO:-mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-devicemanager-base/$CCSDKFEATUREVERSION/xml/features}
+SDNRDM_ONF_REPO=${SDNRDM_ONF_REPO:-mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-devicemanager-onf-feature/$CCSDKFEATUREVERSION/xml/features}
+SDNRDM_ORAN_REPO=${SDNRDM_ORAN_REPO:-mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-devicemanager-oran-feature/$CCSDKFEATUREVERSION/xml/features}
+SDNRDM_GRAN_REPO=${SDNRDM_GRAN_REPO:-mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-devicemanager-gran-feature/$CCSDKFEATUREVERSION/xml/features}
+# Add devicemanager features
+SDNRDM_SDM_LIST=${SDNRDM_SDM_LIST:-sdnr-wt-devicemanager-onf-feature, sdnr-wt-devicemanager-oran-feature, sdnr-wt-devicemanager-gran-feature}
+SDNRDM_BOOTFEATURES=${SDNRDM_BOOTFEATURES:-sdnr-wt-feature-aggregator-devicemanager-base, ${SDNRDM_SDM_LIST}}
+SDNRINIT=${SDNRINIT:-false}
+SDNRONLY=${SDNRONLY:-false}
+SDNRDBURL=${SDNRDBURL:-http://sdnrdb:9200}
+#SDNRDBUSERNAME
+#SDNRDBPASSWORD
+#SDNRDBPARAMETER
+SDNRDBCOMMAND=${SDNRDBCOMMAND:--c init -db $SDNRDBURL -dbu $SDNRDBUSERNAME -dbp $SDNRDBPASSWORD $SDNRDBPARAMETER}
+
+SDNR_NORTHBOUND=${SDNR_NORTHBOUND:-false}
+SDNR_NORTHBOUND_BOOTFEATURES=${SDNR_NORTHBOUND_BOOTFEATURES:-sdnr-northbound-all}
+
+# Functions
+
+# Test if repository exists, like this mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-devicemanager-oran-feature/0.7.2/xml/features
+# $1 repository
+function isRepoExisting() {
+  REPO=$(echo $1 | sed -E "s#mvn:(.*)/xml/features\$#\1#")
+  OIFS="$IFS"
+  IFS='/' parts=($REPO)
+  IFS="$OIFS"
+  path="$ODL_HOME/system/"${parts[0]//./\/}"/"${parts[1]}"/"${parts[2]}
+  [ -d "$path" ]
+}
+
+# Add features repository to karaf featuresRepositories configuration
+# $1 repositories to be added
+function addRepository() {
+  CFG=$ODL_FEATURES_BOOT_FILE
+  ORIG=$CFG.orig
+  if isRepoExisting "$1" ; then
+    echo "Add repository: $1"
+    sed -i "\|featuresRepositories|s|$|, $1|" $CFG
+  else
+    echo "Repo does not exist: $1"
+  fi
+}
+
+# Append features to karaf boot feature configuration
+# $1 additional feature to be added
+# $2 repositories to be added (optional)
+function addToFeatureBoot() {
+  CFG=$ODL_FEATURES_BOOT_FILE
+  ORIG=$CFG.orig
+  if [ -n "$2" ] ; then
+    addRepository $2
+  fi
+  echo "Add boot feature: $1"
+  sed -i "\|featuresBoot *=|s|$|,$1|" $CFG
+}
+
+# Append features to karaf boot feature configuration
+# $1 search pattern
+# $2 replacement
+function replaceFeatureBoot() {
+  CFG=$ODL_FEATURES_BOOT_FILE
+  echo "Replace boot feature $1 with: $2"
+  sed -i "/featuresBoot/ s/$1/$2/g" $CFG
+}
+
+# Remove all sdnc specific features
+function cleanupFeatureBoot() {
+  echo "Remove northbound bootfeatures "
+  sed -i "/featuresBoot/ s/,ccsdk-sli-core-all.*$//g" $ODL_FEATURES_BOOT_FILE
+}
+
+function initialize_sdnr() {
+  echo "SDN-R Database Initialization"
+  INITCMD="$JAVA_HOME/bin/java -jar "
+  INITCMD+="$ODL_HOME/system/org/onap/ccsdk/features/sdnr/wt/sdnr-wt-data-provider-setup/$CCSDKFEATUREVERSION/sdnr-dmt.jar "
+  INITCMD+="$SDNRDBCOMMAND"
+  echo "Execute: $INITCMD"
+  n=0
+  until [ $n -ge 5 ] ; do
+    $INITCMD && break
+    n=$[$n+1]
+    sleep 15
+  done
+  return $?
+}
+
+function install_sdnrwt_features() {
+  # Repository setup provided via sdnc dockerfile
+  if $SDNRWT; then
+    addRepository $SDNRDM_BASE_REPO
+    addRepository $SDNRDM_ONF_REPO
+    addRepository $SDNRDM_ORAN_REPO
+    addRepository $SDNRDM_GRAN_REPO
+
+    if $SDNRONLY; then
+      cleanupFeatureBoot
+    fi
+    if $SDNRDM; then
+      addToFeatureBoot "$SDNRDM_BOOTFEATURES"
+    else
+      addToFeatureBoot "$SDNRWT_BOOTFEATURES"
+    fi
+  fi
+}
+
+
+function install_sdnr_northbound_features() {
+  # Repository setup provided via sdnc dockerfile
+  addToFeatureBoot "$SDNR_NORTHBOUND_BOOTFEATURES"
+}
+
+# Reconfigure ODL from default single node configuration to cluster
+
+function enable_odl_cluster(){
+  if [ -z $SDNC_REPLICAS ]; then
+     echo "SDNC_REPLICAS is not configured in Env field"
+     exit
+  fi
+
+  # ODL NETCONF setup
+  echo "Installing Opendaylight cluster features for mdsal and netconf"
+
+  #Be sure to remove feature odl-netconf-connector-all from list
+  replaceFeatureBoot "odl-netconf-connector-all,"
+  #Activate cluster
+  replaceFeatureBoot odl-netconf-topology odl-netconf-clustered-topology
+  replaceFeatureBoot odl-mdsal-all odl-mdsal-all,odl-mdsal-clustering
+  addToFeatureBoot odl-jolokia
+
+  # ODL Cluster or Geo cluster configuration
+
+  echo "Update cluster information statically"
+  fqdn=$(hostname -f)
+  echo "Get current fqdn ${fqdn}"
+
+  # Extract node index using first digit after "-"
+  # Example 2 from "sdnr-2.logo.ost.das.r32.com"
+  node_index=($(echo ${fqdn} | sed -r 's/.*-([0-9]).*/\1/g'))
+
+  if $GEO_ENABLED; then
+    echo "This is a Geo cluster"
+
+    if [ -z $IS_PRIMARY_CLUSTER ] || [ -z $MY_ODL_CLUSTER ] || [ -z $PEER_ODL_CLUSTER ]; then
+     echo "IS_PRIMARY_CLUSTER, MY_ODL_CLUSTER and PEER_ODL_CLUSTER must all be configured in Env field"
+     return
+    fi
+
+    member_offset=1
+    if $IS_PRIMARY_CLUSTER; then
+       PRIMARY_NODE=${MY_ODL_CLUSTER}
+       SECONDARY_NODE=${PEER_ODL_CLUSTER}
+    else
+       PRIMARY_NODE=${PEER_ODL_CLUSTER}
+       SECONDARY_NODE=${MY_ODL_CLUSTER}
+       member_offset=4
+    fi
+
+    node_list="${PRIMARY_NODE} ${SECONDARY_NODE}"
+    $SDNC_BIN/configure_geo_cluster.sh $((node_index+member_offset)) ${node_list}
+  else
+    echo "This is a local cluster"
+    for ((i=0;i<${SDNC_REPLICAS};i++)); do
+      #assemble node list by replaceing node-index in hostname with "i"
+      node_name=$(echo ${fqdn} | sed -r "s/-[0-9]/-$i/g")
+      node_list="${node_list} $node_name"
+    done
+    echo "Node index: $((node_index+1)) list: ${node_list[@]}"
+    $ODL_HOME/bin/configure_cluster.sh $((node_index+1)) ${node_list}
+  fi
+}
+
+# -----------------------
+# Main script starts here
+
+echo "Image path=${IMAGEPATH}"
+echo "Image names=${IMAGENAMES}"
+echo "Settings:"
+echo "  USER=$(whoami)"
+echo "  SDNC_BIN=$SDNC_BIN"
+echo "  SDNC_HOME=$SDNC_HOME"
+echo "  ODL_CERT_DIR=$ODL_CERT_DIR"
+echo "  CCSDKFEATUREVERSION=$CCSDKFEATUREVERSION"
+echo "  ENABLE_ODL_CLUSTER=$ENABLE_ODL_CLUSTER"
+echo "  ODL_REMOVEIDMDB=$ODL_REMOVEIDMDB"
+echo "  SDNC_REPLICAS=$SDNC_REPLICAS"
+echo "  SDNRWT=$SDNRWT"
+echo "  SDNRDM=$SDNRDM"
+echo "  SDNRONLY=$SDNRONLY"
+echo "  SDNRINIT=$SDNRINIT"
+echo "  SDNRDBURL=$SDNRDBURL"
+echo "  SDNRDBUSERNAME=$SDNRDBUSERNAME"
+echo "  SDNRDBPASSWORD=$SDNRDBPASSWORD"
+echo "  GEO_ENABLED=$GEO_ENABLED"
+echo "  IS_PRIMARY_CLUSTER=$IS_PRIMARY_CLUSTER"
+echo "  MY_ODL_CLUSTER=$MY_ODL_CLUSTER"
+echo "  PEER_ODL_CLUSTER=$PEER_ODL_CLUSTER"
+echo "  AAF_ENABLED=$SDNC_AAF_ENABLED"
+
+if $SDNC_AAF_ENABLED; then
+    export SDNC_AAF_STORE_DIR=/opt/app/osaaf/local
+    export SDNC_AAF_CONFIG_DIR=/opt/app/osaaf/local
+    export SDNC_KEYPASS=`cat /opt/app/osaaf/local/.pass`
+    export SDNC_KEYSTORE=org.onap.sdnc.p12
+    sed -i '/cadi_prop_files/d' $ODL_HOME/etc/system.properties
+    echo "cadi_prop_files=$SDNC_AAF_CONFIG_DIR/org.onap.sdnc.props" >> $ODL_HOME/etc/system.properties
+
+    sed -i '/org.ops4j.pax.web.ssl.keystore/d' $ODL_HOME/etc/custom.properties
+    sed -i '/org.ops4j.pax.web.ssl.password/d' $ODL_HOME/etc/custom.properties
+    sed -i '/org.ops4j.pax.web.ssl.keypassword/d' $ODL_HOME/etc/custom.properties
+    echo org.ops4j.pax.web.ssl.keystore=$SDNC_AAF_STORE_DIR/$SDNC_KEYSTORE >> $ODL_HOME/etc/custom.properties
+    echo org.ops4j.pax.web.ssl.password=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties
+    echo org.ops4j.pax.web.ssl.keypassword=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties
+fi
+
+if $SDNRINIT ; then
+  #One time intialization action
+  initialize_sdnr
+  init_result=$?
+  echo "Result of init script: $init_result"
+  if $SDNRWT ; then
+    echo "Proceed to initialize sdnr"
+  else
+    exit $init_result
+  fi
+fi
+
+if [ ! -f ${SDNC_HOME}/.installed ]
+then
+    echo "Installing SDN-C keyStore"
+    /bin/bash ${SDNC_HOME}/bin/addSdncKeyStore.sh
+
+    if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
+
+    if $SDNRWT ; then install_sdnrwt_features ; fi
+
+    if $SDNR_NORTHBOUND ; then install_sdnr_northbound_features ; fi
+
+    echo "Installed at `date`" > ${SDNC_HOME}/.installed
+fi
+
+# Odl configuration done
+ODL_FEATURES_BOOT=$(sed -n "/featuresBoot =/p" $ODL_FEATURES_BOOT_FILE)
+export ODL_FEATURES_BOOT
+
+if [ -z "$ODL_CERT_DIR" ] ; then
+  echo "No certs provided. Skip installation."
+else
+  echo "Start background cert installer"
+  nohup python ${SDNC_BIN}/installCerts.oom.py &
+fi
+
+echo "Startup opendaylight"
+echo $ODL_FEATURES_BOOT
+exec ${ODL_HOME}/bin/karaf server
index d765197..b1da64a 100644 (file)
@@ -189,6 +189,9 @@ spec:
           - mountPath: {{ .Values.config.binDir }}/startODL.sh
             name: bin
             subPath: startODL.sh
+          - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
+            name: bin
+            subPath: startODL.oom.sh
           - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
             name: bin
             subPath: installSdncDb.sh
index aee6f25..244a7d5 100644 (file)
@@ -187,7 +187,7 @@ config:
       numberGGLogFiles: 10
         # enables sdnr functionality
   sdnr:
-    enabled: false
+    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
@@ -283,6 +283,8 @@ sdnc-ansible-server:
 dgbuilder:
   enabled: true
   nameOverride: sdnc-dgbuilder
+  certInitializer:
+    nameOverride: sdnc-dgbuilder-cert-initializer
   config:
     db:
       dbName: *sdncDbName