Merge "[AAI] Keycloak integration into aai-traversal"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 10 May 2021 09:32:55 +0000 (09:32 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 10 May 2021 09:32:55 +0000 (09:32 +0000)
23 files changed:
docs/release-notes.rst
kubernetes/aaf/components/aaf-cass/values.yaml
kubernetes/appc/values.yaml
kubernetes/common/cassandra/templates/statefulset.yaml
kubernetes/common/cassandra/values.yaml
kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
kubernetes/common/certInitializer/resources/ingress/onboard.sh [new file with mode: 0644]
kubernetes/common/certInitializer/resources/retrieval/retrieval_check.sh [moved from kubernetes/common/certInitializer/resources/retrieval_check.sh with 99% similarity]
kubernetes/common/certInitializer/resources/retrieval/tls_certs_configure.sh [new file with mode: 0644]
kubernetes/common/certInitializer/templates/_certInitializer.yaml
kubernetes/common/certInitializer/templates/configmap.yaml
kubernetes/common/certInitializer/templates/job.yaml [new file with mode: 0644]
kubernetes/common/certInitializer/values.yaml
kubernetes/common/mariadb-galera/templates/statefulset.yaml
kubernetes/common/mariadb-galera/values.yaml
kubernetes/helm/plugins/deploy/deploy.sh
kubernetes/helm/plugins/undeploy/undeploy.sh
kubernetes/policy/components/policy-clamp-be/resources/config/create-db-tables.sh
kubernetes/robot/instantiate-k8s.sh
kubernetes/sdnc/templates/service.yaml
kubernetes/sdnc/templates/statefulset.yaml
kubernetes/sdnc/values.yaml
kubernetes/vfc/values.yaml

index d8e529a..ae0ea45 100644 (file)
@@ -42,7 +42,7 @@ Release Data
 | **Release designation**              | Honolulu                             |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
-| **Release date**                     | 2020/12/03                           |
+| **Release date**                     | 2021/04/29                           |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
 
@@ -52,18 +52,53 @@ New features
 * Kubernetes support for version up to 1.20
 * Helm support for version up to 3.5
 * Limits are set for most of the components
+* Portal-Cassandra image updated to Bitnami, supporting IPv4/IPv6 Dual Stack
+* CMPv2 external issuer implemented which extends Cert-Manager with ability  to
+  enroll X.509 certificates from CMPv2 servers
+* New version for mariadb galera using Bitnami image, supporting IPv4/IPv6 Dual
+  Stack
+* Bump version of common PostgreSQL and ElasticSearch
+* Move to automatic certificates retrieval for 80% of the components
+* Consistent retrieval of docker images, with ability to configure proxy for
+  the 4 repositories used by ONAP
 
 **Bug fixes**
 
 A list of issues resolved in this release can be found here:
-https://jira.onap.org/projects/OOM/versions/10826
+https://jira.onap.org/projects/OOM/versions/11073
 
-**Known Issues**
+major issues solved:
 
-- `<https://github.com/bitnami/bitnami-docker-mariadb-galera/issues/35>`_
-  bitnami mariadb galera image doesn't support single quote in password.
+* Better handling of persistence on PostgreSQL
+* Better Ingress templating
+* Better Service templating
 
+**Known Issues**
 
+- `OOM-2554 <https://jira.onap.org/browse/OOM-2554>`_ Common pods have java 8
+- `OOM-2435 <https://jira.onap.org/browse/OOM-2435>`_ SDNC karaf shell:
+  log:list: Error executing command: Unrecognized configuration
+- `OOM-2629 <https://jira.onap.org/browse/OOM-2629>`_ NetBox demo entry setup
+  not complete
+- `OOM-2706 <https://jira.onap.org/browse/OOM-2706>`_ CDS Blueprint Processor
+  does not work with local DB
+- `OOM-2713 <https://jira.onap.org/browse/OOM-2713>`_ Problem on onboarding
+  custom cert to SDNC ONAP during deployment
+- `OOM-2698 <https://jira.onap.org/browse/OOM-2698>`_ SO helm override fails in
+  for value with multi-level replacement
+- `OOM-2697 <https://jira.onap.org/browse/OOM-2697>`_ SO with local MariaDB
+  deployment fails
+- `OOM-2538 <https://jira.onap.org/browse/OOM-2538>`_ strange error with
+  CertInitializer template
+- `OOM-2547 <https://jira.onap.org/browse/OOM-2547>`_ Health Check failures
+  seen after bringing down/up control plane & worker node VM instances on which
+  ONAP hosted
+- `OOM-2699 <https://jira.onap.org/browse/OOM-2699>`_ SO so-mariadb
+  readinessCheck fails for local MariaDB instance
+- `OOM-2705 <https://jira.onap.org/browse/OOM-2705>`_ SDNC DB installation fails
+  on local MariaDB instance
+- `OOM-2603 <https://jira.onap.org/browse/OOM-2603>`_ [SDNC] allign password for
+  scaleoutUser/restconfUser/odlUser
 
 Deliverables
 ------------
index 5256744..a1a1abe 100644 (file)
@@ -93,4 +93,4 @@ persistence:
   mountSubPath: "cass"
   volumeReclaimPolicy: Retain
   accessMode: ReadWriteOnce
-  size: 20Gi
+  size: 5Gi
index cc56bb4..83d00a7 100644 (file)
@@ -129,6 +129,7 @@ mariadb-galera:
   disableNfsProvisioner: true
   serviceAccount:
     nameOverride: *appc-db
+  replicaCount: 1
 
 dgbuilder:
   nameOverride: appc-dgbuilder
index 953c89d..3553cd4 100644 (file)
@@ -71,6 +71,17 @@ spec:
           timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
           successThreshold: {{ .Values.readiness.successThreshold }}
           failureThreshold: {{ .Values.readiness.failureThreshold }}
+        startupProbe:
+          exec:
+            command:
+            - /bin/bash
+            - -c
+            - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
+          initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
+          periodSeconds: {{ .Values.startup.periodSeconds }}
+          timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
+          successThreshold: {{ .Values.startup.successThreshold }}
+          failureThreshold: {{ .Values.startup.failureThreshold }}
         env:
           {{- $seed_size := default 1 .Values.replicaCount | int -}}
           {{- $global := . }}
index c3d22ce..9f19bf5 100644 (file)
@@ -54,8 +54,8 @@ affinity: {}
 
 # probe configuration parameters
 liveness:
-  initialDelaySeconds: 60
-  periodSeconds: 20
+  initialDelaySeconds: 1
+  periodSeconds: 10
   timeoutSeconds: 10
   successThreshold: 1
   failureThreshold: 3
@@ -64,12 +64,19 @@ liveness:
   enabled: true
 
 readiness:
-  initialDelaySeconds: 120
-  periodSeconds: 20
+  initialDelaySeconds: 1
+  periodSeconds: 10
   timeoutSeconds: 10
   successThreshold: 1
   failureThreshold: 3
 
+startup:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  timeoutSeconds: 10
+  successThreshold: 1
+  failureThreshold: 90
+
 service:
   name: cassandra
   headless:
@@ -119,7 +126,7 @@ persistence:
   ## storageClass: "-"
   ## Not set as it depends of the backup enabledment or not.
   accessMode: ReadWriteOnce
-  size: 2Gi
+  size: 10Gi
   mountPath: /dockerdata-nfs
   mountSubPath: cassandra
   storageType: local
index d955ecd..ec1ce94 100755 (executable)
@@ -17,6 +17,7 @@
 */}}
 
 CERTS_DIR=${CERTS_DIR:-/certs}
+MORE_CERTS_DIR=${MORE_CERTS_DIR:-/more_certs}
 WORK_DIR=${WORK_DIR:-/updatedTruststore}
 ONAP_TRUSTSTORE=${ONAP_TRUSTSTORE:-truststoreONAPall.jks}
 JRE_TRUSTSTORE=${JRE_TRUSTSTORE:-$JAVA_HOME/lib/security/cacerts}
@@ -47,6 +48,13 @@ for f in $CERTS_DIR/*; do
   fi
 done
 
+for f in $MORE_CERTS_DIR/*; do
+  if [ ${f: -4} == ".pem" ]
+    then
+      cp $f $WORK_DIR/.
+  fi
+done
+
 # Prepare truststore output file
 if [ "$AAF_ENABLED" = "true" ]
   then
diff --git a/kubernetes/common/certInitializer/resources/ingress/onboard.sh b/kubernetes/common/certInitializer/resources/ingress/onboard.sh
new file mode 100644 (file)
index 0000000..9cc5ec5
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+{{/*
+# Copyright © 2020 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.
+*/ -}}
+
+echo "*** retrieving certificates and keys"
+export CRT=$(cat {{ .Values.credsPath }}/certs/tls.crt | base64 -w 0)
+export KEY=$(cat {{ .Values.credsPath }}/certs/tls.key | base64 -w 0)
+export CACERT=$(cat {{ .Values.credsPath }}/certs/cacert.pem | base64 -w 0)
+echo "*** creating tls secret"
+cat <<EOF | kubectl apply -f -
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ tpl .Values.ingressTlsSecret . }}
+  namespace: {{ include "common.namespace" . }}
+data:
+  ca.crt: "${CACERT}"
+  tls.crt: "${CRT}"
+  tls.key: '${KEY}'
+type: kubernetes.io/tls
+EOF
@@ -14,7 +14,8 @@
 # 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.
-*/}}
+*/ -}}
+
 echo "*** retrieving passwords for certificates"
 export $(/opt/app/aaf_config/bin/agent.sh local showpass \
   {{.Values.fqi}} {{ .Values.fqdn }} | grep '^c' | xargs -0)
diff --git a/kubernetes/common/certInitializer/resources/retrieval/tls_certs_configure.sh b/kubernetes/common/certInitializer/resources/retrieval/tls_certs_configure.sh
new file mode 100644 (file)
index 0000000..f201ead
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+{{/*
+# Copyright © 2021 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.
+*/ -}}
+
+echo "--- Cert transformation for use with Ingress"
+echo "*** transform AAF certs into pem files"
+mkdir -p {{ .Values.credsPath }}/certs
+keytool -exportcert -rfc -file {{ .Values.credsPath }}/certs/cacert.pem \
+  -keystore {{ .Values.credsPath }}/{{ .Values.fqi_namespace }}.trust.jks \
+  -alias ca_local_0 \
+  -storepass $cadi_truststore_password
+openssl pkcs12 -in {{ .Values.credsPath }}/{{ .Values.fqi_namespace }}.p12 \
+  -out {{ .Values.credsPath }}/certs/tls.crt -nokeys \
+  -passin pass:$cadi_keystore_password_p12 \
+  -passout pass:$cadi_keystore_password_p12
+cp {{ .Values.credsPath }}/{{ .Values.fqi_namespace }}.key \
+  {{ .Values.credsPath }}/certs/tls.key
+echo "--- Done"
index 414192e..f3ba8a2 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright © 2020 Bell Canada, Samsung Electronics
+# Copyright © 2021 Orange
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
   - name: {{ include "common.certInitializer._aafAddConfigVolumeName" $dot }}
     mountPath: /opt/app/aaf_config/bin/retrieval_check.sh
     subPath: retrieval_check.sh
+{{-     if hasKey $initRoot "ingressTlsSecret" }}
+  - name: {{ include "common.certInitializer._aafAddConfigVolumeName" $dot }}
+    mountPath: /opt/app/aaf_config/bin/tls_certs_configure.sh
+    subPath: tls_certs_configure.sh
+{{-     end }}
 {{-     if $initRoot.aaf_add_config }}
   - name: {{ include "common.certInitializer._aafAddConfigVolumeName" $dot }}
     mountPath: /opt/app/aaf_config/bin/aaf-add-config.sh
@@ -69,6 +75,9 @@
     - |
       /opt/app/aaf_config/bin/agent.sh
       . /opt/app/aaf_config/bin/retrieval_check.sh
+{{-     if hasKey $initRoot "ingressTlsSecret" }}
+      /opt/app/aaf_config/bin/tls_certs_configure.sh
+{{-     end -}}
 {{-     if $initRoot.aaf_add_config }}
       /opt/app/aaf_config/bin/aaf-add-config.sh
 {{-     end }}
   volumeMounts:
     - mountPath: /certs
       name: aaf-agent-certs
+    - mountPath: /more_certs
+      name: provided-custom-certs
     - mountPath: /root/import-custom-certs.sh
       name: aaf-agent-certs
       subPath: import-custom-certs.sh
   configMap:
     name: {{ tpl $subchartDot.Values.certsCMName $subchartDot }}
     defaultMode: 0700
+{{- if $dot.Values.global.importCustomCertsEnabled }}
+- name: provided-custom-certs
+{{-   if $dot.Values.global.customCertsSecret }}
+  secret:
+    secretName: {{ $dot.Values.global.customCertsSecret }}
+{{-   else }}
+{{-     if $dot.Values.global.customCertsConfigMap }}
+  configMap:
+    name: {{ $dot.Values.global.customCertsConfigMap }}
+{{-     else }}
+  emptyDir:
+    medium: Memory
+{{-     end }}
+{{-   end }}
+{{- end }}
 - name: {{ include "common.certInitializer._aafAddConfigVolumeName" $dot }}
   configMap:
     name: {{ include "common.fullname" $subchartDot }}-add-config
index 1e9254a..abd1575 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright © 2020 Samsung Electronics
+# Copyright © 2021 Orange
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,8 +20,20 @@ kind: ConfigMap
 {{- $suffix := "add-config" }}
 metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "dot" . )| nindent 2 }}
 data:
-{{ tpl (.Files.Glob "resources/*").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/retrieval/retrieval_check.sh").AsConfig . | indent 2 }}
+{{- if hasKey .Values "ingressTlsSecret" }}
+{{ tpl (.Files.Glob "resources/retrieval/tls_certs_configure.sh").AsConfig . | indent 2 }}
+{{- end }}
 {{ if .Values.aaf_add_config }}
   aaf-add-config.sh: |
     {{ tpl .Values.aaf_add_config . | indent 4 | trim }}
 {{- end }}
+{{- if hasKey .Values "ingressTlsSecret" }}
+---
+apiVersion: v1
+kind: ConfigMap
+{{- $suffix := "ingress" }}
+metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "dot" . )| nindent 2 }}
+data:
+{{ tpl (.Files.Glob "resources/ingress/onboard.sh").AsConfig . | indent 2 }}
+{{- end }}
diff --git a/kubernetes/common/certInitializer/templates/job.yaml b/kubernetes/common/certInitializer/templates/job.yaml
new file mode 100644 (file)
index 0000000..331a58c
--- /dev/null
@@ -0,0 +1,44 @@
+{{/*
+# Copyright © 2021 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.
+*/}}
+
+{{- if hasKey .Values "ingressTlsSecret" }}
+apiVersion: batch/v1
+kind: Job
+{{- $suffix := "set-tls-secret" }}
+metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "dot" . )| nindent 2 }}
+spec:
+  template:
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+    spec:
+      initContainers: {{ include "common.certInitializer.initContainer" (dict "dot" . "initRoot" .Values) | nindent 6 }}
+      containers:
+      - name: create tls secret
+        command:
+          - /ingress/onboard.sh
+        image: {{ include "repositoryGenerator.image.kubectl" . }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts: {{ include "common.certInitializer.volumeMount" (dict "dot" . "initRoot" .Values) | nindent 8 }}
+        - name: ingress-scripts
+          mountPath: /ingress
+      volumes: {{ include "common.certInitializer.volumes" (dict "dot" . "initRoot" .Values) | nindent 6 }}
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: ingress-scripts
+        configMap:
+          name: {{ include "common.fullname" . }}-ingress
+          defaultMode: 0777
+{{- end}}
index 52b2765..747c94f 100644 (file)
 global:
   aafAgentImage: onap/aaf/aaf_agent:2.1.20
   aafEnabled: true
+  # Give the name of a config map where certInitializer will onboard all certs
+  # given (certs must be in pem format)
+  customCertsConfigMap:
+  # Give the name of a secret where certInitializer will onboard all certs given
+  # (certs must be in pem format)
+  # this one superseedes previous one (so if both are given, only certs from
+  # secret will be onboarded).
+  customCertsSecret:
+
 
 pullPolicy: Always
 
@@ -37,7 +46,6 @@ readinessCheck:
     - aaf-cm
     - aaf-service
 
-aafDeployFqi: "changeme"
 fqdn: ""
 app_ns: "org.osaaf.aaf"
 fqi: ""
@@ -55,6 +63,7 @@ truststoreMountpath: ""
 truststoreOutputFileName: truststore.jks
 truststorePassword: changeit
 envVarToCheck: cadi_keystore_password_p12
+# ingressTlsSecret:
 
 # This introduces implicit dependency on cert-wrapper
 # if you are using cert initializer cert-wrapper has to be also deployed.
index bde971f..7b0d90a 100644 (file)
@@ -129,7 +129,7 @@ spec:
           livenessProbe:
             exec:
               command:
-                - bash
+                - sh
                 - -ec
                 - |
                   exec mysqladmin status -u$MARIADB_ROOT_USER -p$MARIADB_ROOT_PASSWORD
@@ -143,7 +143,7 @@ spec:
           readinessProbe:
             exec:
               command:
-                - bash
+                - sh
                 - -ec
                 - |
                   exec mysqladmin status -u$MARIADB_ROOT_USER -p$MARIADB_ROOT_PASSWORD
@@ -153,6 +153,20 @@ spec:
             successThreshold: {{ .Values.readinessProbe.successThreshold }}
             failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
           {{- end }}
+          {{- if .Values.startupProbe.enabled }}
+          startupProbe:
+            exec:
+              command:
+                - sh
+                - -ec
+                - |
+                  exec mysqladmin status -u$MARIADB_ROOT_USER -p$MARIADB_ROOT_PASSWORD
+            initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
+            periodSeconds: {{ .Values.startupProbe.periodSeconds }}
+            timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
+            successThreshold: {{ .Values.startupProbe.successThreshold }}
+            failureThreshold: {{ .Values.startupProbe.failureThreshold }}
+          {{- end }}
           resources: {{ include "common.resources" . | nindent 12 }}
           volumeMounts:
             - name: previous-boot
index 79b1cb2..4c77efc 100644 (file)
@@ -478,18 +478,18 @@ flavor: small
 resources:
   small:
     limits:
-      cpu: 500m
-      memory: 2.5Gi
+      cpu: 1
+      memory: 4Gi
     requests:
-      cpu: 100m
-      memory: 750Mi
+      cpu: 500m
+      memory: 2Gi
   large:
     limits:
       cpu: 2
-      memory: 4Gi
+      memory: 6Gi
     requests:
       cpu: 1
-      memory: 2Gi
+      memory: 3Gi
   unlimited: {}
 
 ## MariaDB Galera containers' liveness and readiness probes
@@ -497,20 +497,29 @@ resources:
 ##
 livenessProbe:
   enabled: true
-  ## Initializing the database could take some time
-  ##
-  initialDelaySeconds: 150
+  initialDelaySeconds: 1
   periodSeconds: 10
   timeoutSeconds: 1
   successThreshold: 1
   failureThreshold: 3
 readinessProbe:
   enabled: true
-  initialDelaySeconds: 60
+  initialDelaySeconds: 1
   periodSeconds: 10
   timeoutSeconds: 1
   successThreshold: 1
   failureThreshold: 3
+startupProbe:
+  ## Initializing the database could take some time
+  ##
+  enabled: true
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  timeoutSeconds: 1
+  successThreshold: 1
+  # will wait up for initialDelaySeconds + failureThreshold*periodSeconds before
+  # stating startup wasn't good (910s per default)
+  failureThreshold: 90
 
 ## Pod disruption budget configuration
 ##
index 6267a35..a7e394d 100755 (executable)
@@ -2,7 +2,7 @@
 
 usage() {
 cat << EOF
-Install (or upgrade) an umbrella Helm Chart, and its subcharts, as separate Helm Releases 
+Install (or upgrade) an umbrella Helm Chart, and its subcharts, as separate Helm Releases
 
 The umbrella Helm Chart is broken apart into a parent release and subchart releases.
 Subcharts the are disabled (<chart>.enabled=false) will not be installed or upgraded.
@@ -257,7 +257,7 @@ deploy() {
       n=${#array[*]}
       for (( i = n-1; i >= 0; i-- )); do
         if [[ $HELM_VER = "v3."* ]]; then
-          helm del "${array[i]}" 
+          helm del "${array[i]}"
         else
           helm del "${array[i]}" --purge
         fi
index 8191174..e5c0c12 100755 (executable)
@@ -2,7 +2,7 @@
 
 usage() {
 cat << EOF
-Delete an umbrella Helm Chart, and its subcharts, that was previously deployed using 'Helm deploy'. 
+Delete an umbrella Helm Chart, and its subcharts, that was previously deployed using 'Helm deploy'.
 
 Example of deleting all Releases that have the prefix 'demo'.
   $ helm undeploy demo
index 329479f..ad9984c 100755 (executable)
@@ -16,4 +16,4 @@
 # limitations under the License.
 */}}
 
-mysql -h"${MYSQL_HOST}" -P"${MYSQL_PORT}" -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" policyclamp < /dbcmd-config/policy-clamp-create-tables.sql
+mysql -h"${MYSQL_HOST}" -P"${MYSQL_PORT}" -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -f policyclamp < /dbcmd-config/policy-clamp-create-tables.sql
index f10ad7e..f4f6b04 100755 (executable)
@@ -111,9 +111,9 @@ kubectl --namespace $NAMESPACE cp $FOLDER ${POD}:/tmp/vnfdata.${BUILDNUM}
 echo "Executing instantiation..."
 
 if [ $POLL = 1 ]; then
-  kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --listener ${ETEHOME}/testsuite/eteutils/robotframework-onap/listeners/OVPListener.py --display $DISPLAY_NUM > /tmp/vnf_instantiation.$BUILDNUM.log 2>&1 &" 
+  kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --listener ${ETEHOME}/testsuite/eteutils/robotframework-onap/listeners/OVPListener.py --display $DISPLAY_NUM > /tmp/vnf_instantiation.$BUILDNUM.log 2>&1 &"
 
-  pid=`kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "pgrep runTags.sh -n"` 
+  pid=`kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "pgrep runTags.sh -n"`
 
   if [ -z "$pid" ]; then
     echo "robot testsuite unable to start"
@@ -123,10 +123,10 @@ if [ $POLL = 1 ]; then
   kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "while ps -p \"$pid\" --no-headers | grep -v defunct; do echo \$'\n\n'; echo \"Testsuite still running \"\`date\`; echo \"LOG FILE: \"; tail -10 /tmp/vnf_instantiation.$BUILDNUM.log; sleep 30; done"
 
 else
-  kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --listener ${ETEHOME}/testsuite/eteutils/robotframework-onap/listeners/OVPListener.py --display $DISPLAY_NUM" 
+  kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --listener ${ETEHOME}/testsuite/eteutils/robotframework-onap/listeners/OVPListener.py --display $DISPLAY_NUM"
 fi
 
-set +x 
+set +x
 
 echo "testsuite has finished"
 
index e3be4bc..693ef41 100644 (file)
@@ -174,3 +174,27 @@ spec:
   selector:
     statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
 {{ end }}
+
+{{ if .Values.config.sdnr.netconfCallHome.enabled }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename" . }}-callhome
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ include "common.release" . }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: NodePort
+  ports:
+    - name: "{{ .Values.service.portName }}-callhome"
+      port: {{ .Values.service.callHomePort }}
+      targetPort: {{ .Values.service.callHomePort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }}
+  selector:
+    app.kubernetes.io/name: {{ include "common.name" . }}
+    app.kubernetes.io/instance: {{ include "common.release" . }}
+{{ end }}
index 152337e..8a7259b 100644 (file)
@@ -192,6 +192,9 @@ spec:
           - containerPort: {{ .Values.service.internalPort2 }}
           - containerPort: {{ .Values.service.internalPort3 }}
           - containerPort: {{ .Values.service.clusterPort }}
+          {{- if .Values.config.sdnr.netconfCallHome.enabled }}
+          - containerPort: {{ .Values.service.callHomePort }}
+          {{- end }}
           readinessProbe:
             tcpSocket:
               port: {{ .Values.service.internalPort }}
@@ -305,6 +308,8 @@ spec:
           {{- end }}
           - name: ENABLE_OAUTH
             value: "{{ .Values.config.sdnr.oauth.enabled | default "false" }}"
+          - name: SDNR_NETCONF_CALLHOME_ENABLED
+            value: "{{ .Values.config.sdnr.netconfCallHome.enabled | default "false" }}"
           volumeMounts:
 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
 {{ include "common.certServiceClient.volumeMounts" . | indent 10 }}
index 43201fe..9f61180 100644 (file)
@@ -323,6 +323,8 @@ config:
     sdnrdbTrustAllCerts: true
     mountpointRegistrarEnabled: false
     mountpointStateProviderEnabled: false
+    netconfCallHome:
+      enabled: true
     #
     # enable and set dmaap-proxy for mountpointRegistrar
     dmaapProxy:
@@ -550,6 +552,9 @@ service:
   geoNodePort5: 65
   geoNodePort6: 66
 
+  callHomePort: 6666
+  callHomeNodePort: 66
+
 ## Persist data to a persitent volume
 persistence:
   enabled: true
index 19197c7..0560832 100644 (file)
@@ -55,6 +55,7 @@ mariadb-galera:
   disableNfsProvisioner: true
   serviceAccount:
     nameOverride: *vfc-mariadb
+  replicaCount: 1
 
 db: &dbConfig
   mariadbService: vfc-mariadb
@@ -100,4 +101,4 @@ vfc-workflow-engine:
     workflowPort: 10550
 
 vfc-zte-vnfm-driver:
-  enabled: true
\ No newline at end of file
+  enabled: true