diff options
Diffstat (limited to 'kubernetes/sdnc')
14 files changed, 69 insertions, 29 deletions
diff --git a/kubernetes/sdnc/charts/dmaap-listener/values.yaml b/kubernetes/sdnc/charts/dmaap-listener/values.yaml index 601e9bb411..474113dd95 100644 --- a/kubernetes/sdnc/charts/dmaap-listener/values.yaml +++ b/kubernetes/sdnc/charts/dmaap-listener/values.yaml @@ -19,7 +19,7 @@ global: nodePortPrefix: 302 repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== readinessRepository: oomk8s - readinessImage: readiness-check:1.0.0 + readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 diff --git a/kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json b/kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json index 4c0754b691..afd872129a 100644 --- a/kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json +++ b/kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json @@ -3,7 +3,7 @@ "dbConnLimit": "100", "home": "/opt/admportal", "sslEnabled": "false", - "nonSslPort": "8843", + "nonSslPort": "{{.Values.service.internalPort}}", "ConexusNetworkPort": "8443", "AppNetworkPort": "8543", "clusterPort": "8443", @@ -25,9 +25,9 @@ "docker0": "172.17.0.1", "virbr0": "192.168.122.1" }, - "svclogicPropertiesDb01": "/opt/onap/sdnc/data/properties/svclogic.properties.sdnctldb01", + "svclogicPropertiesDb01": "{{.Values.config.configDir}}/svclogic.properties.sdnctldb01", "databases": [ - "dbhost|sdnctldb01" + "sdnc-dbhost.{{.Release.Namespace}}|sdnc-sdnctldb01.{{.Release.Namespace}}" ], "dbFabricServer": "localhost", "dbFabricPort": "32275", @@ -39,8 +39,8 @@ "dbPassword": "gamma", "dbName": "sdnctl", "odlProtocol": "http", - "odlHost": "sdnhost.{{.Release.Namespace}}", - "odlConexusHost": "sdnhost.{{.Release.Namespace}}", + "odlHost": "{{.Release.Name}}-sdnc.{{.Release.Namespace}}", + "odlConexusHost": "{{.Release.Name}}-sdnc.{{.Release.Namespace}}", "odlPort": "8181", "odlConexusPort": "8181", "odlUser": "admin", diff --git a/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties b/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties new file mode 100644 index 0000000000..e0e3295735 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties @@ -0,0 +1,5 @@ +org.openecomp.sdnctl.sli.dbtype = jdbc +org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb01:3306/sdnctl +org.openecomp.sdnctl.sli.jdbc.database = sdnctl +org.openecomp.sdnctl.sli.jdbc.user = sdnctl +org.openecomp.sdnctl.sli.jdbc.password = gamma
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb01 b/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb01 new file mode 100644 index 0000000000..e0e3295735 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb01 @@ -0,0 +1,5 @@ +org.openecomp.sdnctl.sli.dbtype = jdbc +org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb01:3306/sdnctl +org.openecomp.sdnctl.sli.jdbc.database = sdnctl +org.openecomp.sdnctl.sli.jdbc.user = sdnctl +org.openecomp.sdnctl.sli.jdbc.password = gamma
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb02 b/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb02 new file mode 100644 index 0000000000..e665a56d75 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb02 @@ -0,0 +1,5 @@ +org.openecomp.sdnctl.sli.dbtype = jdbc +org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb02:3306/sdnctl +org.openecomp.sdnctl.sli.jdbc.database = sdnctl +org.openecomp.sdnctl.sli.jdbc.user = sdnctl +org.openecomp.sdnctl.sli.jdbc.password = gamma
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml index f2f2524dfd..fe08a96b39 100644 --- a/kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml @@ -15,7 +15,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: sdnc-portal-configmap + name: {{ include "common.fullname" . }}-portal namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml index 5e1293c37f..3ca8a6ba47 100644 --- a/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml @@ -57,13 +57,13 @@ spec: - containerPort: {{ .Values.service.internalPort }} # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container - {{- if eq .Values.liveness.enabled true }} + {{ if .Values.liveness.enabled }} livenessProbe: tcpSocket: port: {{ .Values.service.internalPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} - {{ end -}} + {{ end }} readinessProbe: tcpSocket: port: {{ .Values.service.internalPort }} @@ -82,7 +82,7 @@ spec: name: localtime readOnly: true - mountPath: {{ .Values.config.configDir }} - name: sdnc-conf + name: {{ include "common.fullname" . }}-portal resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} @@ -97,8 +97,8 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: sdnc-conf + - name: {{ include "common.fullname" . }}-portal configMap: - name: sdnc-portal-configmap + name: {{ include "common.fullname" . }}-portal imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-portal/values.yaml b/kubernetes/sdnc/charts/sdnc-portal/values.yaml index b5be3a61c6..3b3888973a 100644 --- a/kubernetes/sdnc/charts/sdnc-portal/values.yaml +++ b/kubernetes/sdnc/charts/sdnc-portal/values.yaml @@ -19,7 +19,7 @@ global: nodePortPrefix: 302 repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== readinessRepository: oomk8s - readinessImage: readiness-check:1.0.0 + readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 @@ -63,8 +63,8 @@ readiness: service: type: NodePort name: sdnc-portal - internalPort: 8443 - externalPort: 8443 + internalPort: 8843 + externalPort: 8843 nodePort: "01" ingress: diff --git a/kubernetes/sdnc/charts/ueb-listener/values.yaml b/kubernetes/sdnc/charts/ueb-listener/values.yaml index 0f22647408..b86263315e 100644 --- a/kubernetes/sdnc/charts/ueb-listener/values.yaml +++ b/kubernetes/sdnc/charts/ueb-listener/values.yaml @@ -19,7 +19,7 @@ global: nodePortPrefix: 302 repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== readinessRepository: oomk8s - readinessImage: readiness-check:1.0.0 + readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh index 0c41d3e3e0..288ce11b8b 100755 --- a/kubernetes/sdnc/resources/config/bin/startODL.sh +++ b/kubernetes/sdnc/resources/config/bin/startODL.sh @@ -36,23 +36,47 @@ function enable_odl_cluster(){ node=($(echo ${hm} | sed 's/-[0-9]*$//g')) node_index=($(echo ${hm} | awk -F"-" '{print $NF}')) - node_list="${node}-0.{{ .Values.service.name }}-cluster.{{.Release.Namespace}}"; + member_offset=1 + + if [ -z $PEER_ODL_CLUSTER ]; then + echo "This is a local cluster" + node_list="${node}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"; + + for ((i=1;i<${SDNC_REPLICAS};i++)); + do + node_list="${node_list} ${node}-$i.{{.Values.service.name}}-cluster.{{.Release.Namespace}}" + done + /opt/opendaylight/current/bin/configure_cluster.sh $((node_index+1)) ${node_list} + else + echo "This is a Geo cluster" + + 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}" + /opt/onap/sdnc/bin/configure_geo_cluster.sh $((node_index+member_offset)) ${node_list} + fi +} - for ((i=1;i<${SDNC_REPLICAS};i++)); - do - node_list="${node_list} ${node}-$i.{{ .Values.service.name }}-cluster.{{.Release.Namespace}}" - done - /opt/opendaylight/current/bin/configure_cluster.sh $((node_index+1)) ${node_list} -} +# Install SDN-C platform components if not already installed and start container ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} +CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} SLEEP_TIME=${SLEEP_TIME:-120} MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} MYSQL_HOST=${MYSQL_HOST:-{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}} +IS_PRIMARY_CLUSTER=${IS_PRIMARY_CLUSTER:-false} +MY_ODL_CLUSTER=${MY_ODL_CLUSTER:-127.0.0.1} # # Wait for database to init properly @@ -72,6 +96,7 @@ then echo "Installing SDN-C keyStore" ${SDNC_HOME}/bin/addSdncKeyStore.sh echo "Starting OpenDaylight" + ${CCSDK_HOME}/bin/installOdlHostKey.sh ${ODL_HOME}/bin/start echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize" sleep ${SLEEP_TIME} diff --git a/kubernetes/sdnc/resources/config/conf/dblib.properties b/kubernetes/sdnc/resources/config/conf/dblib.properties index 9faf9e2482..499834e0e2 100644 --- a/kubernetes/sdnc/resources/config/conf/dblib.properties +++ b/kubernetes/sdnc/resources/config/conf/dblib.properties @@ -23,7 +23,7 @@ org.onap.ccsdk.sli.dbtype=jdbc org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 -org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}:{{.Values.mysql.service.internalPort}}/sdnctl +org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:{{.Values.mysql.service.internalPort}}/sdnctl org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver org.onap.ccsdk.sli.jdbc.database=sdnctl org.onap.ccsdk.sli.jdbc.user=sdnctl diff --git a/kubernetes/sdnc/resources/config/conf/svclogic.properties b/kubernetes/sdnc/resources/config/conf/svclogic.properties index dbbbb92b41..99f6cf84b7 100644 --- a/kubernetes/sdnc/resources/config/conf/svclogic.properties +++ b/kubernetes/sdnc/resources/config/conf/svclogic.properties @@ -20,7 +20,7 @@ ### org.onap.ccsdk.sli.dbtype = jdbc -org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}:{{.Values.mysql.service.internalPort}}/sdnctl +org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:{{.Values.mysql.service.internalPort}}/sdnctl org.onap.ccsdk.sli.jdbc.database = sdnctl org.onap.ccsdk.sli.jdbc.user = sdnctl org.onap.ccsdk.sli.jdbc.password = gamma diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index fd4f81bd8f..8b4055e1df 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -76,7 +76,7 @@ spec: - name: SDNC_REPLICAS value: "{{ .Values.replicaCount }}" - name: MYSQL_HOST - value: "{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}" + value: "{{.Values.mysql.service.name}}.{{.Release.Namespace}}" volumeMounts: - mountPath: /etc/localtime name: localtime diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index e0bfbed1b1..6360d37e21 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -20,7 +20,7 @@ global: repository: nexus3.onap.org:10001 repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== readinessRepository: oomk8s - readinessImage: readiness-check:1.1.0 + readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 persistence: @@ -80,7 +80,7 @@ mysql: persistence: mountSubPath: sdnc/data enabled: true - disableNfsProvisioner: false + disableNfsProvisioner: true replicaCount: 1 dgbuilder: |