diff options
Diffstat (limited to 'kubernetes/sdnc')
65 files changed, 2587 insertions, 1280 deletions
diff --git a/kubernetes/sdnc/.helmignore b/kubernetes/sdnc/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/sdnc/.helmignore @@ -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 diff --git a/kubernetes/sdnc/Chart.yaml b/kubernetes/sdnc/Chart.yaml index 6e0ec8d433..fe27426f13 100644 --- a/kubernetes/sdnc/Chart.yaml +++ b/kubernetes/sdnc/Chart.yaml @@ -13,6 +13,6 @@ # limitations under the License. apiVersion: v1 -description: A Helm chart for Kubernetes +description: SDN Controller name: sdnc -version: 0.1.0 +version: 2.0.0 diff --git a/kubernetes/sdnc/charts/dmaap-listener/Chart.yaml b/kubernetes/sdnc/charts/dmaap-listener/Chart.yaml new file mode 100644 index 0000000000..ba2e574d06 --- /dev/null +++ b/kubernetes/sdnc/charts/dmaap-listener/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: SDNC DMaaP Listener +name: dmaap-listener +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/dmaap-listener/requirements.yaml b/kubernetes/sdnc/charts/dmaap-listener/requirements.yaml new file mode 100644 index 0000000000..ce82a2f838 --- /dev/null +++ b/kubernetes/sdnc/charts/dmaap-listener/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local' diff --git a/kubernetes/sdnc/charts/dmaap-listener/resources/config/dblib.properties b/kubernetes/sdnc/charts/dmaap-listener/resources/config/dblib.properties new file mode 100644 index 0000000000..9e4c88a879 --- /dev/null +++ b/kubernetes/sdnc/charts/dmaap-listener/resources/config/dblib.properties @@ -0,0 +1,32 @@ +### +# ============LICENSE_START======================================================= +# Copyright (C) 2018 ONAP Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### +org.onap.ccsdk.sli.dbtype=jdbc +org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 +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 +org.onap.ccsdk.sli.jdbc.password=gamma +org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01 +org.onap.ccsdk.sli.jdbc.connection.timeout=50 +org.onap.ccsdk.sli.jdbc.request.timeout=100 +org.onap.ccsdk.sli.jdbc.limit.init=10 +org.onap.ccsdk.sli.jdbc.limit.min=10 +org.onap.ccsdk.sli.jdbc.limit.max=20 +org.onap.dblib.connection.recovery=false diff --git a/kubernetes/sdnc/resources/config/dmaap/dhcpalert.properties b/kubernetes/sdnc/charts/dmaap-listener/resources/config/dhcpalert.properties index cfc8e130be..422696afbd 100644 --- a/kubernetes/sdnc/resources/config/dmaap/dhcpalert.properties +++ b/kubernetes/sdnc/charts/dmaap-listener/resources/config/dhcpalert.properties @@ -2,7 +2,7 @@ TransportType=HTTPAUTH Latitude =50.000000 Longitude =-100.000000 Version =1.0 -ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events +ServiceName =message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}}/events Environment =TEST Partner = BOT_R routeOffer=MR1 @@ -14,7 +14,7 @@ password =admin contenttype =application/json authKey=fxoW4jZrO7mdLWWa:f4KxkoBtToyoEG7suMoV8KhnkwM= authDate=2016-02-18T13:57:37-0800 -host=dmaap.{{.Values.nsPrefix}}:3904 +host=message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}} topic=VCPE-DHCP-EVENT group=jmsgrp id=sdnc1 @@ -31,5 +31,5 @@ AFT_DME2_EP_READ_TIMEOUT_MS=50000 sessionstickinessrequired=NO DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt sdnc.odl.user=admin -sdnc.odl.password=admin -sdnc.odl.url-base=https://sdnhost.{{.Values.nsPrefix}}:8443/restconf/operations +sdnc.odl.password={{.Values.config.odlPassword}} +sdnc.odl.url-base=http://sdnc.{{.Release.Namespace}}:{{.Values.config.sdncPort}}/restconf/operations diff --git a/kubernetes/sdnc/charts/dmaap-listener/resources/config/lcm.properties b/kubernetes/sdnc/charts/dmaap-listener/resources/config/lcm.properties new file mode 100644 index 0000000000..69085701d3 --- /dev/null +++ b/kubernetes/sdnc/charts/dmaap-listener/resources/config/lcm.properties @@ -0,0 +1,35 @@ +TransportType=HTTPAUTH +Latitude =50.000000 +Longitude =-100.000000 +Version =1.0 +ServiceName =message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}}/events +Environment =TEST +Partner = BOT_R +routeOffer=MR1 +SubContextPath =/ +Protocol =http +MethodType =GET +username =admin +password =admin +contenttype =application/json +authKey=fxoW4jZrO7mdLWWa:f4KxkoBtToyoEG7suMoV8KhnkwM= +authDate=2016-02-18T13:57:37-0800 +host=message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}} +topic=SDNC-LCM-READ +group=jmsgrp +id=sdnc_1 +timeout=15000 +limit=1000 +filter= +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler +AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler +AFT_DME2_REQ_TRACE_ON=true +AFT_ENVIRONMENT=AFTUAT +AFT_DME2_EP_CONN_TIMEOUT=15000 +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000 +AFT_DME2_EP_READ_TIMEOUT_MS=50000 +sessionstickinessrequired=NO +DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt +sdnc.odl.user=admin +sdnc.odl.password={{.Values.config.odlPassword}} +sdnc.odl.url-base=http://sdnc.{{.Release.Namespace}}:{{.Values.config.sdncPort}}/restconf/operations
\ No newline at end of file diff --git a/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml b/kubernetes/sdnc/charts/dmaap-listener/templates/configmap.yaml index 0e5b3ac62e..fd8934b22c 100644 --- a/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml +++ b/kubernetes/sdnc/charts/dmaap-listener/templates/configmap.yaml @@ -12,12 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -#{{ if not .Values.disableSdncUeb }} apiVersion: v1 kind: ConfigMap metadata: - name: sdnc-ueb-configmap - namespace: {{ .Values.nsPrefix }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/ueb/*").AsConfig . | indent 2 }} -#{{ end }} +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml b/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml new file mode 100644 index 0000000000..1a13cc3595 --- /dev/null +++ b/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml @@ -0,0 +1,96 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.config.mysqlChartName }} + - --container-name + - {{ .Values.config.sdncChartName }} + - --container-name + - {{ .Values.config.msgRouterContainerName }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - command: + - /opt/onap/sdnc/dmaap-listener/bin/start-dmaap-listener.sh + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + env: + - name: PROPERTY_DIR + value: "{{ .Values.config.configDir }}" + - name: SDNC_CONFIG_DIR + value: "{{ .Values.config.configDir }}" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: {{ .Values.config.configDir }}/dblib.properties + name: properties + subPath: dblib.properties + - mountPath: {{ .Values.config.configDir }}/dhcpalert.properties + name: properties + subPath: dhcpalert.properties + - mountPath: {{ .Values.config.configDir }}/lcm.properties + name: properties + subPath: lcm.properties + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: properties + configMap: + name: {{ include "common.fullname" . }} + defaultMode: 0644 + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/sdnc/templates/mysql-configmap.yaml b/kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml index e8c267261c..b2b34d0e08 100644 --- a/kubernetes/sdnc/templates/mysql-configmap.yaml +++ b/kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml @@ -13,22 +13,16 @@ # limitations under the License. apiVersion: v1 -kind: ConfigMap +kind: Service metadata: - name: sdnc-mysql - namespace: "{{ .Values.nsPrefix }}" + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} labels: - app: mysql -data: - master.cnf: | - # Apply this config only on the master. - [mysqld] - log-bin - [localpathprefix] - master - slave.cnf: | - # Apply this config only on slaves. - [mysqld] - super-read-only - [localpathprefix] - slave + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: ClusterIP + clusterIP: None diff --git a/kubernetes/sdnc/charts/dmaap-listener/values.yaml b/kubernetes/sdnc/charts/dmaap-listener/values.yaml new file mode 100644 index 0000000000..fec13eb654 --- /dev/null +++ b/kubernetes/sdnc/charts/dmaap-listener/values.yaml @@ -0,0 +1,83 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/sdnc-dmaap-listener-image:1.3-STAGING-latest +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: + dmaapPort: 3904 + mysqlChartName: sdnc-db + sdncChartName: sdnc + sdncPort: 8282 + msgRouterContainerName: message-router + configDir: /opt/onap/sdnc/data/properties + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +ingress: + enabled: false + +service: + name: sdnc-dmaap-listener + +mysql: + service: + name: sdnc-dbhost + internalPort: 3306 + +resources: {} +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/.helmignore b/kubernetes/sdnc/charts/sdnc-ansible-server/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/.helmignore @@ -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 diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/Chart.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/Chart.yaml new file mode 100644 index 0000000000..82b9fc5f89 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: SDN-C Ansible Server +name: sdnc-ansible-server +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/requirements.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/requirements.yaml new file mode 100644 index 0000000000..1e8f788318 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local'
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/resources/config/RestServer_config b/kubernetes/sdnc/charts/sdnc-ansible-server/resources/config/RestServer_config new file mode 100644 index 0000000000..f63fe211f6 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/resources/config/RestServer_config @@ -0,0 +1,45 @@ +# Copyright © 2017 AT&T, Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Host definition +ip: 0.0.0.0 +port: {{.Values.service.internalPort}} + +# Security (controls use of TLS encrypton and RestServer authentication) +tls: no +auth: no + +# TLS certificates (must be built on application host) +priv: provide_privated_key.pem +pub: provide_public_key.pem + +# RestServer authentication +id: sdnc +psswd: sdnc + +# Mysql +host: {{.Values.config.mysqlServiceName}} +user: sdnc +passwd: sdnc +db: ansible + +# Playbooks +from_files: yes +ansible_path: /opt/onap/sdnc/Playbooks +ansible_inv: Ansible_inventory +ansible_temp: PlaybooksTemp +timeout_seconds: 60 + +# Blocking on GetResults +getresults_block: yes diff --git a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/configmap.yaml index 3d89f20cab..f57dc78107 100644 --- a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/configmap.yaml @@ -12,12 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -#{{ if not .Values.disableSdncSdnc }} apiVersion: v1 kind: ConfigMap metadata: - name: sdnc-conf-configmap - namespace: {{ .Values.nsPrefix }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }} -#{{ end }} +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/templates/deployment.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/deployment.yaml new file mode 100644 index 0000000000..a19c33a7c6 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/deployment.yaml @@ -0,0 +1,96 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.config.sdncChartName }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + command: ["/bin/bash"] + args: ["-c", "cd /opt/onap/sdnc && ./startAnsibleServer.sh"] + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{ if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: {{ .Values.config.configDir }}/RestServer_config + name: config + subPath: RestServer_config + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: config + configMap: + name: {{ include "common.fullname" . }} + defaultMode: 0644 + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/templates/service.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/service.yaml new file mode 100644 index 0000000000..3325d6bc0f --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/service.yaml @@ -0,0 +1,33 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }}
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-ansible-server/values.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/values.yaml new file mode 100644 index 0000000000..088008bf7e --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-ansible-server/values.yaml @@ -0,0 +1,79 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/sdnc-ansible-server-image:1.3-STAGING-latest +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: + sdncChartName: sdnc + configDir: /opt/onap/sdnc + mysqlServiceName: sdnc-dbhost + + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 60 + periodSeconds: 10 + +service: + type: ClusterIP + name: sdnc-ansible-server + portName: sdnc-ansible-server + internalPort: 8000 + externalPort: 8000 + +ingress: + enabled: false + +resources: {} +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/sdnc/charts/sdnc-portal/.helmignore b/kubernetes/sdnc/charts/sdnc-portal/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/.helmignore @@ -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 diff --git a/kubernetes/sdnc/charts/sdnc-portal/Chart.yaml b/kubernetes/sdnc/charts/sdnc-portal/Chart.yaml new file mode 100644 index 0000000000..193c38ffce --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: SDN-C Admin Portal +name: sdnc-portal +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/sdnc-portal/requirements.yaml b/kubernetes/sdnc/charts/sdnc-portal/requirements.yaml new file mode 100644 index 0000000000..1e8f788318 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local'
\ No newline at end of file diff --git a/kubernetes/sdnc/resources/config/conf/admportal.json b/kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json index ee575c22ac..f6d202ef09 100755..100644 --- a/kubernetes/sdnc/resources/config/conf/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,12 +39,12 @@ "dbPassword": "gamma", "dbName": "sdnctl", "odlProtocol": "http", - "odlHost": "sdnhost.{{.Values.nsPrefix}}", - "odlConexusHost": "sdnhost.{{.Values.nsPrefix}}", + "odlHost": "sdnc.{{.Release.Namespace}}", + "odlConexusHost": "sdnc.{{.Release.Namespace}}", "odlPort": "8181", "odlConexusPort": "8181", "odlUser": "admin", - "odlPasswd": "admin", + "odlPasswd": "{{.Values.config.odlPassword}}", "ConexusNetwork_sslCert": "", "ConexusNetwork_sslKey": "", "AppNetwork_sslCert": "", diff --git a/kubernetes/sdnc/charts/sdnc-portal/resources/config/dblib.properties b/kubernetes/sdnc/charts/sdnc-portal/resources/config/dblib.properties new file mode 100644 index 0000000000..9e4c88a879 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/resources/config/dblib.properties @@ -0,0 +1,32 @@ +### +# ============LICENSE_START======================================================= +# Copyright (C) 2018 ONAP Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### +org.onap.ccsdk.sli.dbtype=jdbc +org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 +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 +org.onap.ccsdk.sli.jdbc.password=gamma +org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01 +org.onap.ccsdk.sli.jdbc.connection.timeout=50 +org.onap.ccsdk.sli.jdbc.request.timeout=100 +org.onap.ccsdk.sli.jdbc.limit.init=10 +org.onap.ccsdk.sli.jdbc.limit.min=10 +org.onap.ccsdk.sli.jdbc.limit.max=20 +org.onap.dblib.connection.recovery=false 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.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/templates/dmaap-deployment-configmap.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml index b2b8a45cbc..f57dc78107 100644 --- a/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/configmap.yaml @@ -12,12 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -#{{ if not .Values.disableSdncDmaap }} apiVersion: v1 kind: ConfigMap metadata: - name: sdnc-dmaap-configmap - namespace: {{ .Values.nsPrefix }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/dmaap/*").AsConfig . | indent 2 }} -#{{ end }} +{{ 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 new file mode 100644 index 0000000000..87ed6aa283 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml @@ -0,0 +1,118 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.config.mysqlChartName }} + - --container-name + - {{ .Values.config.sdncChartName }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + command: ["/bin/bash"] + args: ["-c", "cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh"] + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{ if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "common.fullname" . }} + key: db-root-password + - name: SDNC_CONFIG_DIR + value: "{{ .Values.config.configDir }}" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: {{ .Values.config.configDir }}/admportal.json + name: properties + subPath: admportal.json + - mountPath: {{ .Values.config.configDir }}/dblib.properties + name: properties + subPath: dblib.properties + - mountPath: {{ .Values.config.configDir }}/svclogic.properties + name: properties + subPath: svclogic.properties + - mountPath: {{ .Values.config.configDir }}/svclogic.properties.sdnctldb01 + name: properties + subPath: svclogic.properties + - mountPath: {{ .Values.config.configDir }}/svclogic.properties.sdnctldb02 + name: properties + subPath: svclogic.properties.sdnctldb02 + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: properties + configMap: + name: {{ include "common.fullname" . }} + defaultMode: 0644 + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/secrets.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/secrets.yaml new file mode 100644 index 0000000000..345c194d96 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/secrets.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }} diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml new file mode 100644 index 0000000000..2976287341 --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml @@ -0,0 +1,50 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + msb.onap.org/service-info: '[ + { + "serviceName": "sdnc-portal", + "version": "v1", + "url": "/", + "protocol": "UI", + "port": "{{ .Values.service.externalPort }}", + "visualRange":"0|1" + } + ]' +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/sdnc/charts/sdnc-portal/values.yaml b/kubernetes/sdnc/charts/sdnc-portal/values.yaml new file mode 100644 index 0000000000..f5cd48c12f --- /dev/null +++ b/kubernetes/sdnc/charts/sdnc-portal/values.yaml @@ -0,0 +1,86 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/admportal-sdnc-image:1.3-STAGING-latest +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: + mysqlChartName: sdnc-db + dbRootPassword: openECOMP1.0 + sdncChartName: sdnc + configDir: /opt/onap/sdnc/data/properties + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 60 + periodSeconds: 10 + +service: + type: NodePort + name: sdnc-portal + portName: sdnc-portal + internalPort: 8843 + externalPort: 8843 + nodePort: "01" + +ingress: + enabled: false + +mysql: + service: + name: sdnc-dbhost + internalPort: 3306 + +resources: {} +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/sdnc/charts/ueb-listener/Chart.yaml b/kubernetes/sdnc/charts/ueb-listener/Chart.yaml new file mode 100644 index 0000000000..35b2a2e9c3 --- /dev/null +++ b/kubernetes/sdnc/charts/ueb-listener/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: SDNC UEB Listener +name: ueb-listener +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/sdnc/charts/ueb-listener/requirements.yaml b/kubernetes/sdnc/charts/ueb-listener/requirements.yaml new file mode 100644 index 0000000000..ce82a2f838 --- /dev/null +++ b/kubernetes/sdnc/charts/ueb-listener/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local' diff --git a/kubernetes/sdnc/charts/ueb-listener/resources/config/dblib.properties b/kubernetes/sdnc/charts/ueb-listener/resources/config/dblib.properties new file mode 100644 index 0000000000..15cb2182a2 --- /dev/null +++ b/kubernetes/sdnc/charts/ueb-listener/resources/config/dblib.properties @@ -0,0 +1,37 @@ +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +# dblib.properties +org.onap.ccsdk.sli.dbtype=jdbc + +org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 +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 +org.onap.ccsdk.sli.jdbc.password=gamma +org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01 +org.onap.ccsdk.sli.jdbc.connection.timeout=50 +org.onap.ccsdk.sli.jdbc.request.timeout=100 +org.onap.ccsdk.sli.jdbc.limit.init=10 +org.onap.ccsdk.sli.jdbc.limit.min=10 +org.onap.ccsdk.sli.jdbc.limit.max=20 +org.onap.dblib.connection.recovery=false diff --git a/kubernetes/sdnc/resources/config/ueb/ueb-listener.properties b/kubernetes/sdnc/charts/ueb-listener/resources/config/ueb-listener.properties index fb6e26da11..b5c88241c4 100644 --- a/kubernetes/sdnc/resources/config/ueb/ueb-listener.properties +++ b/kubernetes/sdnc/charts/ueb-listener/resources/config/ueb-listener.properties @@ -1,12 +1,12 @@ -org.onap.ccsdk.sli.northbound.uebclient.asdc-address=sdc-be.{{.Values.nsPrefix}}:8443 +org.onap.ccsdk.sli.northbound.uebclient.asdc-address=sdc-be.{{.Release.Namespace}}:8443 org.onap.ccsdk.sli.northbound.uebclient.consumer-group=sdc-OpenSource-Env1-sdnc-dockero org.onap.ccsdk.sli.northbound.uebclient.consumer-id=sdc-COpenSource-Env11-sdnc-dockero org.onap.ccsdk.sli.northbound.uebclient.environment-name=AUTO org.onap.ccsdk.sli.northbound.uebclient.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U org.onap.ccsdk.sli.northbound.uebclient.user=sdnc org.onap.ccsdk.sli.northbound.uebclient.sdnc-user=admin -org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -org.onap.ccsdk.sli.northbound.uebclient.asdc-api-base-url=http://sdnhost.{{.Values.nsPrefix}}:8282/restconf/operations/ +org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd={{.Values.config.odlPassword}} +org.onap.ccsdk.sli.northbound.uebclient.asdc-api-base-url=http://sdnc.{{.Release.Namespace}}:{{.Values.config.sdncPort}}/restconf/operations/ org.onap.ccsdk.sli.northbound.uebclient.asdc-api-namespace=org:onap:ccsdk org.onap.ccsdk.sli.northbound.uebclient.spool.incoming=/opt/onap/sdnc/ueb-listener/spool/incoming org.onap.ccsdk.sli.northbound.uebclient.spool.archive=/opt/onap/sdnc/ueb-listener/spool/archive @@ -19,3 +19,4 @@ org.onap.ccsdk.sli.northbound.uebclient.keystore-path= org.onap.ccsdk.sli.northbound.uebclient.keystore-password= org.onap.ccsdk.sli.northbound.uebclient.xslt-path-list= org.onap.ccsdk.sli.northbound.uebclient.artifact-map=/opt/onap/sdnc/data/properties/artifact.map +org.onap.ccsdk.sli.northbound.uebclient.msg-bus-address=message-router.{{.Release.Namespace}},message-router.{{.Release.Namespace}} diff --git a/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml b/kubernetes/sdnc/charts/ueb-listener/templates/configmap.yaml index 1e6bf53b21..fd8934b22c 100644 --- a/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml +++ b/kubernetes/sdnc/charts/ueb-listener/templates/configmap.yaml @@ -12,13 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -#{{ if not .Values.disableSdncSdncDbhost }} -#{{ if not .Values.disableNfsProvisioner }} -kind: StorageClass -apiVersion: storage.k8s.io/v1 +apiVersion: v1 +kind: ConfigMap metadata: - name: "{{ .Values.nsPrefix }}-sdnc-data" - namespace: "{{ .Values.nsPrefix }}" -provisioner: sdnc/nfs -#{{ end }} -#{{ end }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml b/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml new file mode 100644 index 0000000000..5aa1a31116 --- /dev/null +++ b/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml @@ -0,0 +1,95 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.config.mysqlChartName }} + - --container-name + - {{ .Values.config.sdncChartName }} + - --container-name + - {{ .Values.config.sdcbeChartName }} + - --container-name + - {{ .Values.config.msgRouterContainerName }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - command: + - /opt/onap/sdnc/ueb-listener/bin/start-ueb-listener.sh + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + env: + - name: PROPERTY_DIR + value: "{{ .Values.config.configDir }}" + - name: SDNC_CONFIG_DIR + value: "{{ .Values.config.configDir }}" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: {{ .Values.config.configDir }}/dblib.properties + name: properties + subPath: dblib.properties + - mountPath: {{ .Values.config.configDir }}/ueb-listener.properties + name: properties + subPath: ueb-listener.properties + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: properties + configMap: + name: {{ include "common.fullname" . }} + defaultMode: 0644 + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml b/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml new file mode 100644 index 0000000000..b2b34d0e08 --- /dev/null +++ b/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml @@ -0,0 +1,28 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: ClusterIP + clusterIP: None diff --git a/kubernetes/sdnc/charts/ueb-listener/values.yaml b/kubernetes/sdnc/charts/ueb-listener/values.yaml new file mode 100644 index 0000000000..12f675c0e4 --- /dev/null +++ b/kubernetes/sdnc/charts/ueb-listener/values.yaml @@ -0,0 +1,84 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/sdnc-ueb-listener-image:1.3-STAGING-latest +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: + sdncPort: 8282 + mysqlChartName: sdnc-db + sdncChartName: sdnc + sdcbeChartName: sdc-be + msgRouterContainerName: message-router + configDir: /opt/onap/sdnc/data/properties + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: sdnc-ueb-listener + +mysql: + service: + name: sdnc-dbhost + internalPort: 3306 + +ingress: + enabled: false + +resources: {} +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/sdnc/requirements.yaml b/kubernetes/sdnc/requirements.yaml new file mode 100644 index 0000000000..c458755a85 --- /dev/null +++ b/kubernetes/sdnc/requirements.yaml @@ -0,0 +1,24 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local' + - name: mysql + version: ~2.0.0 + repository: '@local' + - name: dgbuilder + version: ~2.0.0 + repository: '@local'
\ No newline at end of file diff --git a/kubernetes/sdnc/resources/config/bin/installSdncDb.sh b/kubernetes/sdnc/resources/config/bin/installSdncDb.sh new file mode 100644 index 0000000000..e574bd7aec --- /dev/null +++ b/kubernetes/sdnc/resources/config/bin/installSdncDb.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ONAP : SDN-C +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} +MYSQL_HOST=${MYSQL_HOST:-{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}} +MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} + +SDNC_DB_USER=${SDNC_DB_USER:-sdnctl} +SDNC_DB_PASSWD=${SDNC_DB_PASSWD:-gamma} +SDNC_DB_DATABASE=${SDN_DB_DATABASE:-sdnctl} + + +# Create tablespace and user account +mysql -h ${MYSQL_HOST} -u root -p${MYSQL_PASSWD} mysql <<-END +CREATE DATABASE ${SDNC_DB_DATABASE}; +CREATE USER '${SDNC_DB_USER}'@'localhost' IDENTIFIED BY '${SDNC_DB_PASSWD}'; +CREATE USER '${SDNC_DB_USER}'@'%' IDENTIFIED BY '${SDNC_DB_PASSWD}'; +GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'localhost' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'%' WITH GRANT OPTION; +commit; +END + +# load schema +if [ -f ${SDNC_HOME}/data/sdnctl.dump ] +then + mysql -h ${MYSQL_HOST} -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/sdnctl.dump +fi + +for datafile in ${SDNC_HOME}/data/*.data.dump +do + mysql -h ${MYSQL_HOST} -u root -p${MYSQL_PASSWD} sdnctl < $datafile +done + +# Create VNIs 100-199 +${SDNC_HOME}/bin/addVnis.sh 100 199 diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh new file mode 100755 index 0000000000..86f45d3fbd --- /dev/null +++ b/kubernetes/sdnc/resources/config/bin/startODL.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# SDNC +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +function enable_odl_cluster(){ + if [ -z $SDNC_REPLICAS ]; then + echo "SDNC_REPLICAS is not configured in Env field" + exit + fi + + echo "Installing Opendaylight cluster features" + ${ODL_HOME}/bin/client feature:install odl-mdsal-clustering + ${ODL_HOME}/bin/client feature:install odl-jolokia + + echo "Update cluster information statically" + hm=$(hostname) + echo "Get current Hostname ${hm}" + + node=($(echo ${hm} | sed 's/-[0-9]*$//g')) + node_index=($(echo ${hm} | awk -F"-" '{print $NF}')) + member_offset=1 + + 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 + + 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} + else + 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} + fi +} + + +# 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}}} +MYSQL_HOST=${MYSQL_HOST:-{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}} +ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} +GEO_ENABLED=${GEO_ENABLED:-false} + +# +# Wait for database to init properly +# +echo "Waiting for mysql" +until mysql -h ${MYSQL_HOST} -u root -p${MYSQL_PASSWD} mysql &> /dev/null +do + printf "." + sleep 1 +done +echo -e "\nmysql ready" + +if [ ! -f ${SDNC_HOME}/.installed ] +then + echo "Installing SDNC database" + ${SDNC_HOME}/bin/installSdncDb.sh + 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} + echo "Installing SDN-C platform features" + ${SDNC_HOME}/bin/installFeatures.sh + if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ] + then + echo "Installing directed graphs" + ${SDNC_HOME}/svclogic/bin/install.sh + fi + + if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi + + echo "Restarting OpenDaylight" + ${ODL_HOME}/bin/stop + + echo "Waiting 60 seconds for OpenDaylight stop to complete" + sleep 60 + + echo "Installed at `date`" > ${SDNC_HOME}/.installed +fi + +exec ${ODL_HOME}/bin/karaf + diff --git a/kubernetes/sdnc/resources/config/conf/aaiclient.properties b/kubernetes/sdnc/resources/config/conf/aaiclient.properties index 81f63ecdde..c925bfd07f 100755 --- a/kubernetes/sdnc/resources/config/conf/aaiclient.properties +++ b/kubernetes/sdnc/resources/config/conf/aaiclient.properties @@ -2,15 +2,15 @@ # ============LICENSE_START======================================================= # openECOMP : SDN-C # ================================================================================ -# Copyright (C) 2017 ONAP Intellectual Property. All rights +# Copyright (C) 2018 ONAP Intellectual Property. All rights # reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,219 +26,52 @@ # # Certificate keystore and truststore # -org.onap.ccsdk.sli.adaptors.aai.ssl.trust=/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks -org.onap.ccsdk.sli.adaptors.aai.ssl.trust.psswd=adminadmin +org.onap.ccsdk.sli.adaptors.aai.ssl.trust=/opt/onap/sdnc/data/stores/truststoreONAPall.jks +org.onap.ccsdk.sli.adaptors.aai.ssl.trust.psswd=changeit org.onap.ccsdk.sli.adaptors.aai.host.certificate.ignore=true -org.onap.ccsdk.sli.adaptors.aai.client.name=AAI -org.onap.ccsdk.sli.adaptors.aai.client.psswd=AAI +org.onap.ccsdk.sli.adaptors.aai.client.name=SDNC +org.onap.ccsdk.sli.adaptors.aai.client.psswd=SDNC org.onap.ccsdk.sli.adaptors.aai.application=openECOMP -#connection.timeout=1000 -#read.timeout=2000 - # # Configuration file for A&AI Client # -org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-service.{{.Values.nsPrefix}}:8443 - +org.onap.ccsdk.sli.adaptors.aai.uri=https://aai.{{.Release.Namespace}}:8443 +connection.timeout=60000 +read.timeout=60000 # query -org.onap.ccsdk.sli.adaptors.aai.path.query=/aai/v11/search/sdn-zone-query -org.onap.ccsdk.sli.adaptors.aai.query.nodes=/aai/v11/search/nodes-query?search-node-type={node-type}&filter={entity-identifier}:EQUALS:{entity-name} -org.onap.ccsdk.sli.adaptors.aai.query.generic=/aai/v11/search/generic-query?key={identifier}:{value}&start-node-type={start-node-type}&include=complex&depth=3 +org.onap.ccsdk.sli.adaptors.aai.path.query=/aai/v13/search/sdn-zone-query +org.onap.ccsdk.sli.adaptors.aai.query.nodes=/aai/v13/search/nodes-query?search-node-type={node-type}&filter={entity-identifier}:EQUALS:{entity-name} +org.onap.ccsdk.sli.adaptors.aai.query.generic=/aai/v13/search/generic-query?key={identifier}:{value}&start-node-type={start-node-type}&include=complex&depth=3 # named query org.onap.ccsdk.sli.adaptors.aai.query.named=/aai/search/named-query - #update -org.onap.ccsdk.sli.adaptors.aai.update=/aai/v11/actions/update - -# vce -org.onap.ccsdk.sli.adaptors.aai.path.vce =/aai/v11/network/vces/vce/ -org.onap.ccsdk.sli.adaptors.aai.path.vces=/aai/v11/network/vces/ - -# vpe -org.onap.ccsdk.sli.adaptors.aai.path.vpe =/aai/v11/network/vpes/vpe/ -org.onap.ccsdk.sli.adaptors.aai.path.vpes=/aai/v11/network/vpes/ - -# customer -org.onap.ccsdk.sli.adaptors.aai.path.customer=/aai/v11/business/customers/customer/{customer-id} - -# service subscription -org.onap.ccsdk.sli.adaptors.aai.path.service.subscription=/aai/v11/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type} - -# service instance -org.onap.ccsdk.sli.adaptors.aai.path.svcinst=/aai/v11/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances -org.onap.ccsdk.sli.adaptors.aai.path.svcinst.query=/aai/v11/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance -org.onap.ccsdk.sli.adaptors.aai.path.service.instance=/aai/v11/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id} - -# complex -org.onap.ccsdk.sli.adaptors.aai.path.complexes=/aai/v11/cloud-infrastructure/complexes -org.onap.ccsdk.sli.adaptors.aai.path.complex=/aai/v11/cloud-infrastructure/complexes/complex/{physical-location-id} - -# tenant -org.onap.ccsdk.sli.adaptors.aai.path.tenant=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id} -org.onap.ccsdk.sli.adaptors.aai.path.tenant.query=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant?tenant-name={tenant-name} - -# vservers -org.onap.ccsdk.sli.adaptors.aai.path.vservers=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/ -org.onap.ccsdk.sli.adaptors.aai.path.vserver=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id} - -# vpls-pe -org.onap.ccsdk.sli.adaptors.aai.path.vpls.pes=/aai/v11/network/vpls-pes/ -org.onap.ccsdk.sli.adaptors.aai.path.vpls.pe =/aai/v11/network/vpls-pes/vpls-pe/ +org.onap.ccsdk.sli.adaptors.aai.update=/aai/v13/actions/update -# ctag-pool -org.onap.ccsdk.sli.adaptors.aai.path.ctag.pools=/aai/v11/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools -org.onap.ccsdk.sli.adaptors.aai.path.ctag.pool=/aai/v11/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools/ctag-pool/{target-pe}/{availability-zone-name} - -# -#-------------- 1510 ---------------------- -# - -# pservers -org.onap.ccsdk.sli.adaptors.aai.path.pservers=/aai/v11/cloud-infrastructure/pservers -org.onap.ccsdk.sli.adaptors.aai.path.pserver=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname} - -# generic-vnf -org.onap.ccsdk.sli.adaptors.aai.path.generic.vnfs=/aai/v11/network/generic-vnfs -org.onap.ccsdk.sli.adaptors.aai.path.generic.vnf=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id} - -# dvs-switch -org.onap.ccsdk.sli.adaptors.aai.path.dvsswitches=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches -org.onap.ccsdk.sli.adaptors.aai.path.dvsswitch=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches/dvs-switch/{switch-name} - -# L3 Networks -org.onap.ccsdk.sli.adaptors.aai.path.l3networks=/aai/v11/network/l3-networks -org.onap.ccsdk.sli.adaptors.aai.path.l3network=/aai/v11/network/l3-networks/l3-network/{network-id} -org.onap.ccsdk.sli.adaptors.aai.path.l3network.query.name=/aai/v11/network/l3-networks/l3-network?network-name={network-name} +# UBB Notify +org.onap.ccsdk.sli.adaptors.aai.path.notify=/aai/v13/actions/notify +org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=<%= @ubbUri %>/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id} +org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=<%= @ubbUri %>/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information # P-Interfaces -org.onap.ccsdk.sli.adaptors.aai.path.pserver.pinterfaces=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces -org.onap.ccsdk.sli.adaptors.aai.path.pserver.pinterface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name} - -# Physical Link -org.onap.ccsdk.sli.adaptors.aai.path.physical.links=/aai/v11/network/physical-links -org.onap.ccsdk.sli.adaptors.aai.path.physical.link=/aai/v11/network/physical-links/physical-link/{link-name} - -# VPN Bindings -org.onap.ccsdk.sli.adaptors.aai.path.vpn.bindings=/aai/v11/network/vpn-bindings/ -org.onap.ccsdk.sli.adaptors.aai.path.vpn.binding=/aai/v11/network/vpn-bindings/vpn-binding/{vpn-id} +org.onap.ccsdk.sli.adaptors.aai.path.pserver.pinterfaces=/aai/v13/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces +org.onap.ccsdk.sli.adaptors.aai.path.pserver.pinterface=/aai/v13/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name} # VNF IMAGES -org.onap.ccsdk.sli.adaptors.aai.path.vnf.images=/aai/v11/service-design-and-creation/vnf-images -org.onap.ccsdk.sli.adaptors.aai.path.vnf.image=/aai/v11/service-design-and-creation/vnf-images/vnf-image/{att-uuid} -org.onap.ccsdk.sli.adaptors.aai.path.vnf.image.query=/aai/v11/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor} - -# UBB Notify -org.onap.ccsdk.sli.adaptors.aai.path.notify=/aai/v11/actions/notify -org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=https://aai-service.{{.Values.nsPrefix}}:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id} -org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=https://aai-service.{{.Values.nsPrefix}}:8543/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information - -# Service -org.onap.ccsdk.sli.adaptors.aai.path.service=/aai/v11/service-design-and-creation/services/service/{service-id} -org.onap.ccsdk.sli.adaptors.aai.path.services=/aai/v11/service-design-and-creation/services - - -# -#-------------- 1604 ---------------------- -# - -# VNFC -org.onap.ccsdk.sli.adaptors.aai.path.vnfc=/aai/v11/network/vnfcs/vnfc/{vnfc-name} - -# class-of-service -org.onap.ccsdk.sli.adaptors.aai.path.class.of.service=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}/classes-of-service/class-of-service/{cos-id} - -# site-pair -org.onap.ccsdk.sli.adaptors.aai.path.site.pair=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id} - -# routing-instance -org.onap.ccsdk.sli.adaptors.aai.path.routing.instance=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id} - -# site-pair-set -org.onap.ccsdk.sli.adaptors.aai.path.site.pair.set=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id} - -# license key resource -org.onap.ccsdk.sli.adaptors.aai.path.license.acquire=/aai/v11/actions/assignment/license-management/assignment-group-uuid/{assignment-group-uuid} -org.onap.ccsdk.sli.adaptors.aai.path.license=/aai/v11/license-management/license-key-resources/license-key-resource/{att-uuid} - -# logical-link -org.onap.ccsdk.sli.adaptors.aai.path.logical.link =/aai/v11/network/logical-links/logical-link/{link-name} - -# virtual-data-center -org.onap.ccsdk.sli.adaptors.aai.path.virtual.data.center=/aai/v11/cloud-infrastructure/virtual-data-centers/virtual-data-center/{vdc-id} - -# wan-connector -org.onap.ccsdk.sli.adaptors.aai.path.wan.connector=/aai/v11/business/connectors/connector/{resource-instance-id} - -# l-interface -org.onap.ccsdk.sli.adaptors.aai.path.lag.interface.l.interface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name} -org.onap.ccsdk.sli.adaptors.aai.path.p.interface.l.interface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name} - -# l-interface pnf -org.onap.ccsdk.sli.adaptors.aai.path.lag.interface.l.interface.pnf=/aai/v11/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name} -org.onap.ccsdk.sli.adaptors.aai.path.p.interface.l.interface.pnf=/aai/v11/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name} - -# subinterface -org.onap.ccsdk.sli.adaptors.aai.path.pnf.lag.interface.subinterface=/aai/v11/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name} -org.onap.ccsdk.sli.adaptors.aai.path.pnf.p.interface.l.interface=/aai/v11/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name} - -# vlans -org.onap.ccsdk.sli.adaptors.aai.path.vlan=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface} -org.onap.ccsdk.sli.adaptors.aai.path.generic.vnf.vlan=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface} +org.onap.ccsdk.sli.adaptors.aai.path.vnf.images=/aai/v13/service-design-and-creation/vnf-images +org.onap.ccsdk.sli.adaptors.aai.path.vnf.image=/aai/v13/service-design-and-creation/vnf-images/vnf-image/{att-uuid} +org.onap.ccsdk.sli.adaptors.aai.path.vnf.image.query=/aai/v13/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor} -# l3-interface-ipv4-address-list -org.onap.ccsdk.sli.adaptors.aai.path.l3.interface.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} -org.onap.ccsdk.sli.adaptors.aai.path.vlan.l3.interface.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - -# l3-interface-ipv6-address-list -org.onap.ccsdk.sli.adaptors.aai.path.l3.interface.ipv6.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} -org.onap.ccsdk.sli.adaptors.aai.path.vlan.l3.interface.ipv6.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - -# ipsec-configuration -org.onap.ccsdk.sli.adaptors.aai.path.ipsec.configuration=/aai/v11/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id} - -# vig server -org.onap.ccsdk.sli.adaptors.aai.path.vig.server=/aai/v11/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}/vig-servers/vig-server/{vig-address-type} - -# l3-network -org.onap.ccsdk.sli.adaptors.aai.path.l3.network=/aai/v11/network/l3-networks/l3-network/{network-id} - -# subnet -org.onap.ccsdk.sli.adaptors.aai.path.subnet=/aai/v11/network/l3-networks/l3-network/{network-id}/subnets/subnet/{subnet-id} - -# multicast-configuration -org.onap.ccsdk.sli.adaptors.aai.path.multicast.configuration=/aai/v11/network/multicast-configurations/multicast-configuration/{multicast-configuration-id} - -# org.onap.ccsdk.sli.adaptors.aai.path.l.interface.ipv4.address.list -org.onap.ccsdk.sli.adaptors.aai.path.l3-interface.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - -# org.onap.ccsdk.sli.adaptors.aai.path.l.interface.vlan.ipv4.address.list -org.onap.ccsdk.sli.adaptors.aai.path.l3-interface.vlan.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address} - -# org.onap.ccsdk.sli.adaptors.aai.path.l.interface.ipv6.address.list -org.onap.ccsdk.sli.adaptors.aai.path.l3-interface.ipv6.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address} - -# volume.group -org.onap.ccsdk.sli.adaptors.aai.path.volume.group=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/volume-groups/volume-group/{volume-group-id} - -#cloud region -org.onap.ccsdk.sli.adaptors.aai.path.cloud.region=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id} - -# vf-module -org.onap.ccsdk.sli.adaptors.aai.path.vf.module=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id} - -# l-interface through generic-vnf -org.onap.ccsdk.sli.adaptors.aai.path.generic.vnf.linterface=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name} - -# network-policy -org.onap.ccsdk.sli.adaptors.aai.path.network.policy=/aai/v11/network/network-policies/network-policy/{network-policy-id} +# service instance +org.onap.ccsdk.sli.adaptors.aai.path.svcinst.query=/aai/v13/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance +org.onap.ccsdk.sli.adaptors.aai.path.service.instance=/aai/v13/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id} -# pnf -org.onap.ccsdk.sli.adaptors.aai.path.pnf=/aai/v11/network/pnfs/pnf/{pnf-name} +# VNF IMAGES QUERY +org.onap.ccsdk.sli.adaptors.aai.path.vnf.image.query=/aai/v13/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor} # # Formatting @@ -246,4 +79,4 @@ org.onap.ccsdk.sli.adaptors.aai.path.pnf=/aai/v11/network/pnfs/pnf/{pnf-name} org.onap.ccsdk.sli.adaptors.aai.param.format=filter=%s:%s org.onap.ccsdk.sli.adaptors.aai.param.vnf_type=vnf-type org.onap.ccsdk.sli.adaptors.aai.param.physical.location.id=physical-location-id -org.onap.ccsdk.sli.adaptors.aai.param.service.type=service-type +org.onap.ccsdk.sli.adaptors.aai.param.service.type=service-type
\ No newline at end of file diff --git a/kubernetes/sdnc/resources/config/conf/dblib.properties b/kubernetes/sdnc/resources/config/conf/dblib.properties new file mode 100644 index 0000000000..362726a6d8 --- /dev/null +++ b/kubernetes/sdnc/resources/config/conf/dblib.properties @@ -0,0 +1,32 @@ +### +# ============LICENSE_START======================================================= +# Copyright (C) 2018 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### +org.onap.ccsdk.sli.dbtype=jdbc +org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01 +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 +org.onap.ccsdk.sli.jdbc.password=gamma +org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01 +org.onap.ccsdk.sli.jdbc.connection.timeout=50 +org.onap.ccsdk.sli.jdbc.request.timeout=100 +org.onap.ccsdk.sli.jdbc.limit.init=10 +org.onap.ccsdk.sli.jdbc.limit.min=10 +org.onap.ccsdk.sli.jdbc.limit.max=20 +org.onap.dblib.connection.recovery=false diff --git a/kubernetes/sdnc/resources/config/conf/lcm-dg.properties b/kubernetes/sdnc/resources/config/conf/lcm-dg.properties new file mode 100644 index 0000000000..625cf63e03 --- /dev/null +++ b/kubernetes/sdnc/resources/config/conf/lcm-dg.properties @@ -0,0 +1,18 @@ +ansible.agenturl=http://{{.Values.config.ansibleServiceName}}:{{.Values.config.ansiblePort}}/Dispatch +ansible.user=sdnc +ansible.password=sdnc +ansible.lcm.localparameters= +ansible.nodelist= +ansible.timeout=60 +ansible.version=0.00 +lcm.upgrade-pre-check.playbookname=ansible_precheck +lcm.upgrade-post-check.playbookname=ansible_postcheck +lcm.upgrade-software.playbookname=ansible_upgradesw +restapi.templateDir=/opt/onap/sdnc/restapi/templates +restapi.lcm.dmaap.publish.templatefile=lcm-dmaap-publish-template.json +lcm.dmaap.url=http://message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}}/events/SDNC-LCM-WRITE +lcm.dmaap.user=admin +lcm.dmaap.password=admin +lcm.dmaap.version=1.0 +lcm.dmaap.partition=SDNC-LCM-WRITE +lcm.dmaap.type=response
\ No newline at end of file diff --git a/kubernetes/sdnc/resources/config/conf/svclogic.properties b/kubernetes/sdnc/resources/config/conf/svclogic.properties new file mode 100644 index 0000000000..99f6cf84b7 --- /dev/null +++ b/kubernetes/sdnc/resources/config/conf/svclogic.properties @@ -0,0 +1,27 @@ +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +org.onap.ccsdk.sli.dbtype = jdbc +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/resources/config/log/org.ops4j.pax.logging.cfg b/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg index 50818a3d18..7b6563656b 100644 --- a/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg +++ b/kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg @@ -1,57 +1,151 @@ -################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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 logger
-log4j.rootLogger=INFO, async, osgi:*
-log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
-
-# Log Directory
-logDir=/var/log/onap
-componentName=sdnc
-logDirectory=${logDir}/${componentName}
-maxFileSize=100MB
-maxBackupIndex=20
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n
-
-# Async appender forwarding to file appender
-log4j.appender.async=org.apache.log4j.AsyncAppender
-log4j.appender.async.appenders=out
-
-# File appender
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout
-log4j.appender.out.layout.Properties=true
-log4j.appender.out.file=${logDirectory}/karaf.log
-log4j.appender.out.append=true
-log4j.appender.out.maxFileSize=${maxFileSize}
-log4j.appender.out.maxBackupIndex=${maxBackupIndex}
-
-# Sift appender
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
-log4j.appender.sift.key=bundle.name
-log4j.appender.sift.default=karaf
-log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender
-log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout
-log4j.appender.sift.appender.layout.Properties=true
-log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
+################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 logger +log4j.rootLogger=INFO, async, osgi:* +log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer + +maxFileSize=100MB +maxBackupIndex=20 +logDir=/var/log/onap +componentName=sdnc +logDirectory=${logDir}/${componentName} +karafLogName=karaf +errorLogName=error +metricsLogName=metrics +auditLogName=audit +debugLogName=debug + + +# CONSOLE appender not used by default +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}\t%-16.16t\t%-5.5p\t%c{36}\t%X{bundle.id} - %X{bundle.name} - %X{bundle.version}\t%m%n + +# Async appender forwarding to file appender +log4j.appender.async=org.apache.log4j.AsyncAppender +log4j.appender.async.appenders=out + +# File appender +log4j.appender.out=org.apache.log4j.RollingFileAppender +log4j.appender.out.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.out.layout.Properties=true +log4j.appender.out.file=${logDirectory}/${karafLogName}.log +log4j.appender.out.append=true +log4j.appender.out.maxFileSize=${maxFileSize} +log4j.appender.out.maxBackupIndex=${maxBackupIndex} + +# Sift appender +log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender +log4j.appender.sift.key=bundle.name +log4j.appender.sift.default=karaf +log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender +log4j.appender.sift.appender.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.sift.appender.layout.Properties=true +log4j.appender.sift.appender.file=${logDirectory}/$\\{bundle.name\\}.log +log4j.appender.sift.appender.append=true + + + +log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPusherImpl=DEBUG +log4j.category.org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator=DEBUG + + +#ECOMP Debug appender +log4j.appender.debug=org.apache.log4j.RollingFileAppender +log4j.appender.debug.key=bundle.name +log4j.appender.debug.default=karaf +log4j.appender.debug.appName=EELFDebug +log4j.appender.debug.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.debug.layout.Properties=true +log4j.appender.debug.file=${logDirectory}/${debugLogName}.log +log4j.appender.debug.append=true +log4j.appender.debug.maxFileSize=${maxFileSize} +log4j.appender.debug.maxBackupIndex=${maxBackupIndex} +#log4j.appender.debug.filter.f1=org.apache.log4j.varia.LevelRangeFilter +#log4j.appender.debug.filter.f1.LevelMax=WARN +#log4j.appender.debug.filter.f1.LevelMin=TRACE + + +#Error appender +log4j.appender.error=org.apache.log4j.RollingFileAppender +log4j.appender.error.appName=EELFError +log4j.appender.error.File=${logDirectory}/${errorLogName}.log +log4j.appender.error.Threshold=ERROR +log4j.appender.error.maxFileSize=${maxFileSize} +log4j.appender.error.maxBackupIndex=${maxBackupIndex} +log4j.appender.error.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.error.layout.Properties=true + +#Metrics appender +log4j.appender.metric=org.apache.log4j.RollingFileAppender +log4j.appender.metric.appName=EELFMetrics +log4j.appender.metric.File=${logDirectory}/${metricsLogName}.log +log4j.appender.metric.maxFileSize=${maxFileSize} +log4j.appender.metric.maxBackupIndex=${maxBackupIndex} +log4j.appender.metric.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.metric.layout.Properties=true + +#Audit appender +log4j.appender.audit=org.apache.log4j.RollingFileAppender +log4j.appender.audit.appName=EELFAudit +log4j.appender.audit.File=${logDirectory}/${auditLogName}.log +log4j.appender.audit.maxFileSize=${maxFileSize} +log4j.appender.audit.maxBackupIndex=${maxBackupIndex} +log4j.appender.audit.layout=org.apache.log4j.xml.XMLLayout +log4j.appender.audit.layout.Properties=true + +#Loggers +#Routing of all messages from root logger +log4j.logger.com.att=TRACE, debug, error +#Store to the same log file messages from upper level appender or not +log4j.additivity.com.att=false + +#EELFManager loggers +#EELF parent logger +log4j.logger.com.att.eelf=TRACE, debug +log4j.additivity.com.att.eelf=false + +#Audit logger routing +log4j.logger.com.att.eelf.audit=DEBUG, audit +log4j.additivity.com.att.eelf.audit=false + +#Metric logger routing +log4j.logger.com.att.eelf.metrics=DEBUG, metric +log4j.additivity.com.att.eelf.metrics=false + +#Performance logger routing +log4j.logger.com.att.eelf.perf=DEBUG, metric +log4j.additivity.com.att.eelf.perf=false + +#Server logger routing +log4j.logger.com.att.eelf.server=DEBUG, debug +log4j.additivity.com.att.eelf.server=false + +#Policy logger routing +log4j.logger.com.att.eelf.policy=DEBUG, debug +log4j.additivity.com.att.eelf.policy=false + +#Error logger routing +log4j.logger.com.att.eelf.error=DEBUG, error +log4j.additivity.com.att.eelf.error=false + +#Debug logger routing +log4j.logger.com.att.eelf.debug=DEBUG, debug +log4j.additivity.com.att.eelf.debug=false diff --git a/kubernetes/sdnc/resources/geo/bin/sdnc.cluster b/kubernetes/sdnc/resources/geo/bin/sdnc.cluster new file mode 100755 index 0000000000..d59718fa27 --- /dev/null +++ b/kubernetes/sdnc/resources/geo/bin/sdnc.cluster @@ -0,0 +1,52 @@ +#!/bin/bash + +OOM_HOME=${OOM_HOME:-$HOME} + +if ! [ "$(command -v jq)" ]; then + echo "Error: jq is not installed." + echo "use: sudo apt install jq" + exit 1 +fi + +IS_PRIMARY_CLUSTER=`./sdnc.isPrimaryCluster` + +case $IS_PRIMARY_CLUSTER in +true) + MEMBER_NUMBER=1 + ;; +false) + MEMBER_NUMBER=4 + ;; +*) + echo "Error: isPrimaryODLCluster not defined in ${OOM_HOME}/oom/kubernetes/sdnc/values.yaml." + exit 1 + ;; +esac + +for pod_number in {0..2} +do + curl "http://localhost:3026$((${pod_number} + 1))" > /dev/null 2>&1 + if [ "$?" = "7" ]; then + continue + fi + + VOTING_RESULT=`curl -u admin:admin -H "Content-Type: application/json" -H "Accept: application/json" -X GET http://localhost:3026$((${pod_number} + 1))/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-$((${MEMBER_NUMBER} + ${pod_number}))-shard-default-config,type=DistributedConfigDatastore 2>/dev/null | jq '.value.Voting'` + + case $VOTING_RESULT in + true) + echo "active" + exit 0 + ;; + false) + echo "standby" + exit 0 + ;; + *) + echo "Error: Voting status could not be determined." + exit 1 + ;; + esac +done + +echo "Error: Voting status could not be determined." +exit 1 diff --git a/kubernetes/sdnc/resources/geo/bin/sdnc.failover b/kubernetes/sdnc/resources/geo/bin/sdnc.failover new file mode 100755 index 0000000000..961a5cb5cf --- /dev/null +++ b/kubernetes/sdnc/resources/geo/bin/sdnc.failover @@ -0,0 +1,65 @@ +#!/usr/bin/perl -s
+use strict;
+
+my $keyWord_standby = "standby";
+my $keyWord_active = "active";
+my $keyWord_true = "true";
+my $keyWord_false = "false";
+my $keyWord_success = "success";
+my $keyWord_failure = "failure";
+my $file_cluster = "sdnc.cluster";
+my $file_switchVoting = "switchVoting.sh";
+my $file_isPrimaryCluster = "sdnc.isPrimaryCluster";
+
+if ((!(-e $file_cluster)) || (!(-e $file_switchVoting))|| (!(-e $file_isPrimaryCluster))) {
+ # file not exist.
+ print qq|$keyWord_failure\n|;
+ exit 1;
+}
+
+my $roleRes = qx("./$file_isPrimaryCluster");
+my $clusterRes = qx("./$file_cluster");
+
+if ( index ($clusterRes, $keyWord_standby) != -1) {
+ # We are at standby side
+ if ( index ($roleRes, $keyWord_false) != -1) {
+ # We are at Secondary cluster
+ sub_activate_secondary();
+ } elsif ( index ($roleRes, $keyWord_true) != -1) {
+ # We are at Primary cluster
+ sub_activate_primary();
+ } else {
+ # Error.
+ print qq|$keyWord_failure\n|;
+ exit 1;
+ }
+} elsif ( index ($clusterRes, $keyWord_active) != -1) {
+ # We are at active side
+ if ( index ($roleRes, $keyWord_false) != -1) {
+ # We are at Secondary cluster
+ sub_activate_primary();
+ } elsif ( index ($roleRes, $keyWord_true) != -1) {
+ # We are at Primary cluster
+ sub_activate_secondary();
+ } else {
+ # Error.
+ print qq|$keyWord_failure\n|;
+ exit 1;
+ }
+} else {
+ # Error.
+ print qq|$keyWord_failure\n|;
+ exit 1;
+}
+
+sub sub_activate_primary {
+ #Switching voting in Primary cluster
+ system("./$file_switchVoting primary");
+ print qq|$keyWord_success\n|;
+}
+
+sub sub_activate_secondary {
+ #Switching voting in secondary cluster
+ system("./$file_switchVoting secondary");
+ print qq|$keyWord_success\n|;
+}
diff --git a/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster b/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster new file mode 100755 index 0000000000..77fc65fe39 --- /dev/null +++ b/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster @@ -0,0 +1,19 @@ +#!/bin/bash + +OOM_HOME=${OOM_HOME:-$HOME} + +IS_PRIMARY_CLUSTER=`awk '/isPrimaryCluster/ {print $2}' ${OOM_HOME}/oom/kubernetes/sdnc/values.yaml` + +if [ "$?" -eq "2" ]; then + echo "Make sure you are ubuntu user." >&2 +fi + +case $IS_PRIMARY_CLUSTER in +true|false) + echo $IS_PRIMARY_CLUSTER + ;; +*) + echo "NOT CLUSTERED" + exit 1 + ;; +esac diff --git a/kubernetes/sdnc/resources/geo/bin/switchVoting.sh b/kubernetes/sdnc/resources/geo/bin/switchVoting.sh new file mode 100755 index 0000000000..27e4ead99d --- /dev/null +++ b/kubernetes/sdnc/resources/geo/bin/switchVoting.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +function usage() +{ + echo usage: switchVoting.sh primary\|secondary + exit 1 +} + +if [ $# -ne 1 ]; then + usage +fi + +partition=$1 + +if [ "$partition" == "primary" ]; then + curl -u admin:{{.Values.config.odlPassword}} -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:30202/restconf/operations/cluster-admin:change-member-voting-states-for-all-shards -d '{ "input" : { "member-voting-state" : [ { "member-name" : "member-1", "voting":true}, { "member-name" : "member-2", "voting":true}, { "member-name" : "member-3", "voting":true},{ "member-name" : "member-4", "voting":false},{ "member-name" : "member-5", "voting":false},{ "member-name" : "member-6", "voting":false}] } }' > switch_voting_resp.json 2>/dev/null + echo "" >> switch_voting_resp.json + exit 0 +fi + +if [ "$partition" == "secondary" ]; then + curl -u admin:{{.Values.config.odlPassword}} -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:30202/restconf/operations/cluster-admin:change-member-voting-states-for-all-shards -d '{ "input" : { "member-voting-state" : [ { "member-name" : "member-1", "voting":false}, { "member-name" : "member-2", "voting":false}, { "member-name" : "member-3", "voting":false},{ "member-name" : "member-4", "voting":true},{ "member-name" : "member-5", "voting":true},{ "member-name" : "member-6", "voting":true}] } }' > switch_voting_resp.json 2>/dev/null + echo "" >> switch_voting_resp.json + exit 0 +fi + +usage diff --git a/kubernetes/sdnc/templates/all-services.yaml b/kubernetes/sdnc/templates/all-services.yaml deleted file mode 100644 index 14d7b01a59..0000000000 --- a/kubernetes/sdnc/templates/all-services.yaml +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncSdncDbhost }} -apiVersion: v1 -kind: Service -metadata: - name: dbhost - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc-dbhost -spec: - ports: - - port: 3306 - selector: - app: sdnc-dbhost - clusterIP: None ---- -# Client service for connecting to any MySQL instance for reads. -# Only master: sdnc-dbhost-0 accepts the write request. -apiVersion: v1 -kind: Service -metadata: - name: dbhost-read - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc-dbhost -spec: - ports: - - name: sdnc-dbhost - port: 3306 - selector: - app: sdnc-dbhost ---- -apiVersion: v1 -kind: Service -metadata: - name: sdnctldb01 - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc-dbhost -spec: - ports: - - port: 3306 - selector: - app: sdnc-dbhost - clusterIP: None ---- -apiVersion: v1 -kind: Service -metadata: - name: sdnctldb02 - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc-dbhost -spec: - ports: - - port: 3306 - selector: - app: sdnc-dbhost - clusterIP: None -#{{ end }} -#{{ if not .Values.disableSdncSdnc }} ---- -apiVersion: v1 -kind: Service -metadata: - name: sdnc-dgbuilder - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc-dgbuilder -spec: - ports: - - name: "sdnc-dgbuilder-port" - port: 3000 - targetPort: 3100 - nodePort: {{ .Values.nodePortPrefix }}03 - type: NodePort - selector: - app: sdnc-dgbuilder ---- -apiVersion: v1 -kind: Service -metadata: - name: sdnhost - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc - annotations: - msb.onap.org/service-info: '[ - { - "serviceName": "sdnc", - "version": "v1", - "url": "/", - "protocol": "REST", - "port": "8282", - "visualRange":"1", - "path": "/" - } - ]' -spec: - ports: - - name: "sdnc-port-8181" - port: 8282 - targetPort: 8181 - nodePort: {{ .Values.nodePortPrefix }}02 - - name: "sdnc-port-8101" - port: 8201 - targetPort: 8101 - nodePort: {{ .Values.nodePortPrefix }}08 - - name: "sdnc-jolokia-port-8080" - port: 8280 - targetPort: 8080 - nodePort: {{ .Values.nodePortPrefix }}46 - type: NodePort - selector: - app: sdnc ---- -kind: Service -apiVersion: v1 -metadata: - name: nfs-provisioner - namespace: "{{ .Values.nsPrefix }}" - labels: - app: nfs-provisioner -spec: - ports: - - name: nfs - port: 2049 - - name: mountd - port: 20048 - - name: rpcbind - port: 111 - - name: rpcbind-udp - port: 111 - protocol: UDP - selector: - app: nfs-provisioner -#{{ end }} -#{{ if not .Values.disableSdncSdncPortal }} ---- -apiVersion: v1 -kind: Service -metadata: - name: sdnc-portal - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc-portal - annotations: - msb.onap.org/service-info: '[ - { - "serviceName": "sdnc-portal", - "version": "v1", - "url": "/", - "protocol": "UI", - "port": "8843", - "visualRange":"0|1" - } - ]' -spec: - ports: - - name: "sdnc-portal-port" - port: 8843 - nodePort: {{ .Values.nodePortPrefix }}01 - type: NodePort - selector: - app: sdnc-portal -#{{ end }} -#{{ if .Values.enableODLCluster }} ---- -apiVersion: v1 -kind: Service -metadata: - name: sdnhost-cluster - namespace: "{{ .Values.nsPrefix }}" - labels: - app: sdnc - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - ports: - - name: "sdnc-cluster-port" - port: 2550 - clusterIP: None - selector: - app: sdnc - sessionAffinity: None - type: ClusterIP -#{{ end }} diff --git a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml b/kubernetes/sdnc/templates/configmap.yaml index a0bf0e211a..e9498cb8dc 100644 --- a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml +++ b/kubernetes/sdnc/templates/configmap.yaml @@ -12,20 +12,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -#{{ if not .Values.disableSdncSdnc }} apiVersion: v1 kind: ConfigMap metadata: - name: sdnc-log-configmap - namespace: {{ .Values.nsPrefix }} + name: {{ include "common.fullname" . }}-filebeat-configmap + namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }} --- apiVersion: v1 kind: ConfigMap metadata: - name: sdnc-logging-cfg-configmap - namespace: {{ .Values.nsPrefix }} + name: {{ include "common.fullname" . }}-log-configmap + namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }} -#{{ end }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-bin + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/bin/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-properties + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }} diff --git a/kubernetes/sdnc/templates/db-statefulset.yaml b/kubernetes/sdnc/templates/db-statefulset.yaml deleted file mode 100644 index 29d592a6a7..0000000000 --- a/kubernetes/sdnc/templates/db-statefulset.yaml +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncSdncDbhost }} -apiVersion: apps/v1beta1 -kind: StatefulSet -metadata: - name: sdnc-dbhost - namespace: "{{ .Values.nsPrefix }}" -spec: - serviceName: "dbhost" - replicas: {{ .Values.numberOfDbReplicas }} - selector: - matchLabels: - app: sdnc-dbhost - template: - metadata: - labels: - app: sdnc-dbhost - name: sdnc-dbhost - spec: - initContainers: - - name: init-mysql - image: {{ .Values.image.mysql }} - imagePullPolicy: {{ .Values.pullPolicy }} - command: - - bash - - "-c" - - | - set -ex - # Generate mysql server-id from pod ordinal index. - [[ `hostname` =~ -([0-9]+)$ ]] || exit 1 - ordinal=${BASH_REMATCH[1]} - echo BASH_REMATCH=${BASH_REMATCH} - echo [mysqld] > /mnt/conf.d/server-id.cnf - # Add an offset to avoid reserved server-id=0 value. - echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf - # Copy appropriate conf.d files from config-map to emptyDir. - if [[ $ordinal -eq 0 ]]; then - cp /mnt/config-map/master.cnf /mnt/conf.d/ - else - cp /mnt/config-map/slave.cnf /mnt/conf.d/ - fi - volumeMounts: - - name: conf - mountPath: /mnt/conf.d - - name: config-map - mountPath: /mnt/config-map - - name: clone-mysql - image: {{ .Values.image.xtrabackup }} - env: - - name: MYSQL_ROOT_PASSWORD - value: openECOMP1.0 - command: - - bash - - "-c" - - | - set -ex - # Skip the clone if data already exists. - [[ -d /var/lib/mysql/mysql ]] && exit 0 - # Skip the clone on master (ordinal index 0). - [[ `hostname` =~ -([0-9]+)$ ]] || exit 1 - ordinal=${BASH_REMATCH[1]} - echo ${BASH_REMATCH} - [[ $ordinal -eq 0 ]] && exit 0 - # Clone data from previous peer. - ncat --recv-only sdnc-dbhost-$(($ordinal-1)).dbhost.{{ .Values.nsPrefix }} 3307 | xbstream -x -C /var/lib/mysql - # Prepare the backup. - xtrabackup --user=root --password=$MYSQL_ROOT_PASSWORD --prepare --target-dir=/var/lib/mysql - ls -l /var/lib/mysql - volumeMounts: - - name: sdnc-data - mountPath: /var/lib/mysql -#{{ if not .Values.disableNfsProvisioner }} - subPath: mysql -#{{ end }} - - name: conf - mountPath: /etc/mysql/conf.d - containers: - - env: - - name: MYSQL_ROOT_PASSWORD - value: openECOMP1.0 - - name: MYSQL_ROOT_HOST - value: '%' - - name: MYSQL_ALLOW_EMPTY_PASSWORD - value: "0" - image: {{ .Values.image.mysql }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-db-container - volumeMounts: - - mountPath: /var/lib/mysql - name: sdnc-data -#{{ if not .Values.disableNfsProvisioner }} - subPath: mysql -#{{ end }} - - name: conf - mountPath: /etc/mysql/conf.d - ports: - - containerPort: 3306 - resources: - requests: - cpu: 500m - memory: 1Gi - livenessProbe: - exec: - command: ["mysqladmin", "ping"] - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 5 - periodSeconds: 10 - - name: xtrabackup - image: {{ .Values.image.xtrabackup }} - env: - - name: MYSQL_ROOT_PASSWORD - value: openECOMP1.0 - ports: - - name: xtrabackup - containerPort: 3307 - command: - - bash - - "-c" - - | - set -ex - cd /var/lib/mysql - ls -l - # Determine binlog position of cloned data, if any. - if [[ -f xtrabackup_slave_info ]]; then - echo "Inside xtrabackup_slave_info" - # XtraBackup already generated a partial "CHANGE MASTER TO" query - # because we're cloning from an existing slave. - mv xtrabackup_slave_info change_master_to.sql.in - # Ignore xtrabackup_binlog_info in this case (it's useless). - rm -f xtrabackup_binlog_info - elif [[ -f xtrabackup_binlog_info ]]; then - echo "Inside xtrabackup_binlog_info" - # We're cloning directly from master. Parse binlog position. - [[ `cat xtrabackup_binlog_info` =~ ^(.*?)[[:space:]]+(.*?)$ ]] || exit 1 - rm xtrabackup_binlog_info - echo "CHANGE MASTER TO MASTER_LOG_FILE='${BASH_REMATCH[1]}',\ - MASTER_LOG_POS=${BASH_REMATCH[2]}" > change_master_to.sql.in - fi - - # Check if we need to complete a clone by starting replication. - if [[ -f change_master_to.sql.in ]]; then - echo "Waiting for mysqld to be ready (accepting connections)" - [[ `hostname` =~ -([0-9]+)$ ]] || exit 1 - ordinal=${BASH_REMATCH[1]} - echo $ordinal - until mysql --user=root --password=$MYSQL_ROOT_PASSWORD -h 127.0.0.1 -e "SELECT 1"; do sleep 1; done - - echo "Initializing replication from clone position" - # In case of container restart, attempt this at-most-once. - mv change_master_to.sql.in change_master_to.sql.orig - mysql --user=root --password=$MYSQL_ROOT_PASSWORD -h 127.0.0.1 <<EOF - $(<change_master_to.sql.orig), - MASTER_HOST="sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}", - MASTER_USER="root", - MASTER_PASSWORD="$MYSQL_ROOT_PASSWORD", - MASTER_CONNECT_RETRY=10; - START SLAVE; - EOF - fi - - # Start a server to send backups when requested by peers. - exec ncat --listen --keep-open --send-only --max-conns=1 3307 -c \ - "xtrabackup --user=root --password=$MYSQL_ROOT_PASSWORD --backup --slave-info --stream=xbstream --host=127.0.0.1" - volumeMounts: - - name: sdnc-data - mountPath: /var/lib/mysql -#{{ if not .Values.disableNfsProvisioner }} - subPath: mysql -#{{ end }} - - name: conf - mountPath: /etc/mysql/conf.d - resources: - requests: - cpu: 100m - memory: 100Mi - volumes: - - name: conf - emptyDir: {} - - name: config-map - configMap: - name: sdnc-mysql - - name: localtime - hostPath: - path: /etc/localtime -#{{ if .Values.disableNfsProvisioner }} - - name: sdnc-data - hostPath: - path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data/mysql -#{{ else }} - volumeClaimTemplates: - - metadata: - name: sdnc-data - annotations: - volume.beta.kubernetes.io/storage-class: "{{ .Values.nsPrefix }}-sdnc-data" - spec: - accessModes: ["ReadWriteMany"] - resources: - requests: - storage: 1Gi -#{{ end }} -#{{ end }} - diff --git a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml deleted file mode 100644 index 62f1d004d0..0000000000 --- a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncSdncDgbuilder }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: sdnc-dgbuilder - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.dgbuilderReplicas }} - selector: - matchLabels: - app: sdnc-dgbuilder - template: - metadata: - labels: - app: sdnc-dgbuilder - name: sdnc-dgbuilder - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdnc-db-container - - --container-name - - sdnc-controller-container - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ .Values.image.readiness }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-dgbuilder-readiness - containers: - - command: - - /bin/bash - - -c - - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait - env: - - name: MYSQL_ROOT_PASSWORD - value: openECOMP1.0 - - name: SDNC_CONFIG_DIR - value: /opt/onap/sdnc/data/properties - image: {{ .Values.image.dgbuilderSdnc }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-dgbuilder-container - ports: - - containerPort: 3100 - readinessProbe: - tcpSocket: - port: 3100 - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - name: localtime - mountPath: /etc/localtime - readOnly: true - restartPolicy: Always - volumes: - - name: localtime - hostPath: - path: /etc/localtime - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} diff --git a/kubernetes/sdnc/templates/dmaap-deployment.yaml b/kubernetes/sdnc/templates/dmaap-deployment.yaml deleted file mode 100644 index ca092ff261..0000000000 --- a/kubernetes/sdnc/templates/dmaap-deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncDmaap }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: sdnc-dmaap-listener - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.dmaapReplicas }} - selector: - matchLabels: - app: dmaap-listener - template: - metadata: - labels: - app: dmaap-listener - name: sdnc-dmaap-listener - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdnc-db-container - - --container-name - - sdnc-controller-container - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ .Values.image.readiness }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-dmaap-readiness - containers: - - command: - - /opt/onap/sdnc/dmaap-listener/bin/start-dmaap-listener.sh - env: - - name: PROPERTY_DIR - value: /opt/onap/sdnc/data/properties - - name: SDNC_CONFIG_DIR - value: /opt/onap/sdnc/data/properties - image: {{ .Values.image.dmaaplistener }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: dmaapp-listener-container - volumeMounts: - - mountPath: /etc/localtime - name: localtime - readOnly: true - - mountPath: /opt/onap/sdnc/data/properties/dhcpalert.properties - subPath: dhcpalert.properties - name: dmaap-dhcapalert-config - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: dmaap-dhcapalert-config - configMap: - name: sdnc-dmaap-configmap - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} diff --git a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml deleted file mode 100644 index 12713a1dbb..0000000000 --- a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncSdncDbhost }} -#{{ if not .Values.disableNfsProvisioner }} -kind: Deployment -apiVersion: extensions/v1beta1 -metadata: - name: sdnc-nfs-provisioner - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.nfsReplicas }} - strategy: - type: Recreate - template: - metadata: - labels: - app: nfs-provisioner - name: sdnc-nfs-provisioner - spec: - containers: - - name: nfs-provisioner - image: quay.io/kubernetes_incubator/nfs-provisioner:v1.0.8 - ports: - - name: nfs - containerPort: 2049 - - name: mountd - containerPort: 20048 - - name: rpcbind - containerPort: 111 - - name: rpcbind-udp - containerPort: 111 - protocol: UDP - securityContext: - capabilities: - add: - - DAC_READ_SEARCH - - SYS_RESOURCE - args: - - "-provisioner=sdnc/nfs" - env: - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: SERVICE_NAME - value: nfs-provisioner - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - imagePullPolicy: "IfNotPresent" - volumeMounts: - - name: export-volume - mountPath: /export - volumes: - - name: export-volume - hostPath: - path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data -#{{ end }} -#{{ end }} diff --git a/kubernetes/sdnc/templates/pv.yaml b/kubernetes/sdnc/templates/pv.yaml new file mode 100644 index 0000000000..f10d67ad68 --- /dev/null +++ b/kubernetes/sdnc/templates/pv.yaml @@ -0,0 +1,84 @@ +{{/* +# Copyright © 2018 Amdocs, AT&T, Bell Canada +# # +# # Licensed under the Apache License, Version 2.0 (the "License"); +# # you may not use this file except in compliance with the License. +# # You may obtain a copy of the License at +# # +# # http://www.apache.org/licenses/LICENSE-2.0 +# # +# # Unless required by applicable law or agreed to in writing, software +# # distributed under the License is distributed on an "AS IS" BASIS, +# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# # See the License for the specific language governing permissions and +# # limitations under the License. +*/}} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{ $pvNum := default 1 .Values.replicaCount | int }} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }}-mdsal0 + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + storageClassName: "{{ include "common.fullname" . }}-mdsal" + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}0 +{{ if gt $pvNum 1 }} +--- +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }}-mdsal1 + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + storageClassName: "{{ include "common.fullname" . }}-mdsal" + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}1 +{{ end }} +{{ if gt $pvNum 2 }} +--- +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }}-mdsal2 + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + storageClassName: "{{ include "common.fullname" . }}-mdsal" + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}2 +{{ end }} +{{- end -}} diff --git a/kubernetes/sdnc/templates/sdnc-statefulset.yaml b/kubernetes/sdnc/templates/sdnc-statefulset.yaml deleted file mode 100644 index 3b07896462..0000000000 --- a/kubernetes/sdnc/templates/sdnc-statefulset.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncSdnc }} -apiVersion: apps/v1beta1 -kind: StatefulSet -metadata: - name: sdnc - namespace: "{{ .Values.nsPrefix }}" -spec: - serviceName: "sdnhost-cluster" - replicas: {{ .Values.numberOfODLReplicas }} - podManagementPolicy: Parallel - selector: - matchLabels: - app: sdnc - template: - metadata: - labels: - app: sdnc - name: sdnc - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdnc-db-container - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ .Values.image.readiness }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-readiness - containers: - - command: - - bash - - "-c" - - | - sed -i 's/dbhost/sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/g' /opt/onap/sdnc/data/properties/svclogic.properties - sed -i 's/^\(org.onap.ccsdk.sli.jdbc.hosts=\).*/\1sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/' /opt/onap/sdnc/data/properties/dblib.properties - /opt/onap/sdnc/bin/startODL.sh - env: - - name: MYSQL_ROOT_PASSWORD - value: openECOMP1.0 - - name: SDNC_CONFIG_DIR - value: /opt/onap/sdnc/data/properties - - name: ENABLE_ODL_CLUSTER - value: "{{ .Values.enableODLCluster }}" - - name: SDNC_REPLICAS - value: "{{ .Values.numberOfODLReplicas }}" - image: {{ .Values.image.sdnc }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-controller-container - volumeMounts: - - mountPath: /etc/localtime - name: localtime - readOnly: true - - mountPath: /opt/onap/sdnc/data/properties/admportal.json - name: sdnc-conf - subPath: admportal.json - - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties - name: sdnc-conf - subPath: aaiclient.properties - - mountPath: /var/log/onap - name: sdnc-logs - - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg - name: sdnc-logging-cfg-config - subPath: org.ops4j.pax.logging.cfg - ports: - - containerPort: 8181 - - containerPort: 8101 - - containerPort: 2550 - - containerPort: 8080 - readinessProbe: - tcpSocket: - port: 8181 - initialDelaySeconds: 5 - periodSeconds: 10 - - image: {{ .Values.image.filebeat }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: sdnc-logs - - mountPath: /usr/share/filebeat/data - name: sdnc-data-filebeat - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: filebeat-conf - configMap: - name: sdnc-log-configmap - - name: sdnc-logging-cfg-config - configMap: - name: sdnc-logging-cfg-configmap - - name: sdnc-logs - emptyDir: {} - - name: sdnc-data-filebeat - emptyDir: {} - - name: sdnc-conf - configMap: - name: sdnc-conf-configmap - items: - - key: admportal.json - path: admportal.json - mode: 0755 - - key: aaiclient.properties - path: aaiclient.properties - mode: 0755 - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} diff --git a/kubernetes/sdnc/templates/secrets.yaml b/kubernetes/sdnc/templates/secrets.yaml new file mode 100644 index 0000000000..754f117e38 --- /dev/null +++ b/kubernetes/sdnc/templates/secrets.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-odl + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + odl-password: {{ .Values.config.odlPassword | b64enc | quote }} diff --git a/kubernetes/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml new file mode 100644 index 0000000000..63a85a39aa --- /dev/null +++ b/kubernetes/sdnc/templates/service.yaml @@ -0,0 +1,155 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + msb.onap.org/service-info: '[ + { + "serviceName": "sdnc", + "version": "v1", + "url": "/", + "protocol": "REST", + "port": "{{ .Values.service.externalPort }}", + "visualRange":"1", + "path": "/" + } + ]' +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: "{{ .Values.service.portName }}-8282" + - port: {{ .Values.service.externalPort2 }} + targetPort: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} + name: "{{ .Values.service.portName }}-8202" + - port: {{ .Values.service.externalPort3 }} + targetPort: {{ .Values.service.internalPort3 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} + name: "{{ .Values.service.portName }}-8280" + - port: {{ .Values.service.externalPort4 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} + name: "{{ .Values.service.portName }}-8443" + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.portName }}-cluster + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + annotations: + service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" +spec: + ports: + - name: "{{ .Values.service.portName }}-cluster-port" + port: {{ .Values.service.clusterPort }} + clusterIP: None + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + sessionAffinity: None + type: ClusterIP + +{{ if .Values.config.geoEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnhost-{{ include "common.servicename" . }}-0 + namespace: {{ .Release.Namespace }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 +spec: + ports: + - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }} + port: {{ .Values.service.clusterPort2 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort4 }} + - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} + port: {{ .Values.service.clusterPort3 }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort1 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 +{{ end }} +{{ if .Values.config.geoEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnhost-{{ include "common.servicename" . }}-1 + namespace: {{ .Release.Namespace }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 +spec: + ports: + - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }} + port: {{ .Values.service.clusterPort2 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort5 }} + - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }} + port: {{ .Values.service.clusterPort3 }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort2 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 +{{ end }} +{{ if .Values.config.geoEnabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: sdnhost-{{ include "common.servicename" . }}-2 + namespace: {{ .Release.Namespace }} + labels: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 +spec: + ports: + - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }} + port: {{ .Values.service.clusterPort2 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort6 }} + - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} + port: {{ .Values.service.clusterPort3 }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort3 }} + type: NodePort + selector: + statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 +{{ end }} diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml new file mode 100644 index 0000000000..69816dffb4 --- /dev/null +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -0,0 +1,187 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1beta1 +kind: StatefulSet +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + serviceName: {{ include "common.servicename" . }}-cluster + replicas: {{ .Values.replicaCount }} + podManagementPolicy: Parallel + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.mysql.nameOverride }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash"] + args: ["-c", "/opt/sdnc/bin/startODL.sh"] + ports: + - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.internalPort2 }} + - containerPort: {{ .Values.service.internalPort3 }} + - containerPort: {{ .Values.service.clusterPort }} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "common.fullname" . }} + key: db-root-password + - name: ODL_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "common.fullname" . }}-odl + key: odl-password + - name: SDNC_CONFIG_DIR + value: "{{ .Values.config.configDir }}" + - name: ENABLE_ODL_CLUSTER + value: "{{ .Values.config.enableClustering }}" + - name: MY_ODL_CLUSTER + value: "{{ .Values.config.myODLCluster }}" + - name: PEER_ODL_CLUSTER + value: "{{ .Values.config.peerODLCluster }}" + - name: IS_PRIMARY_CLUSTER + value: "{{ .Values.config.isPrimaryCluster }}" + - name: GEO_ENABLED + value: "{{ .Values.config.geoEnabled}}" + - name: SDNC_REPLICAS + value: "{{ .Values.replicaCount }}" + - name: MYSQL_HOST + value: "{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg + name: sdnc-logging-cfg-config + subPath: org.ops4j.pax.logging.cfg + - mountPath: {{ .Values.config.binDir }}/startODL.sh + name: bin + subPath: startODL.sh + - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh + name: bin + subPath: installSdncDb.sh + - mountPath: {{ .Values.config.configDir }}/aaiclient.properties + name: properties + subPath: aaiclient.properties + - mountPath: {{ .Values.config.configDir }}/dblib.properties + name: properties + subPath: dblib.properties + - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties + name: properties + subPath: lcm-dg.properties + - mountPath: {{ .Values.config.configDir }}/svclogic.properties + name: properties + subPath: svclogic.properties + - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties + name: properties + subPath: svclogic.properties + - mountPath: {{ .Values.persistence.mdsalPath }} + name: {{ include "common.fullname" . }}-mdsal + - mountPath: /var/log/onap + name: logs + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + + # side car containers + - name: filebeat-onap + image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + name: filebeat-conf + subPath: filebeat.yml + - mountPath: /var/log/onap + name: logs + - mountPath: /usr/share/filebeat/data + name: data-filebeat + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: logs + emptyDir: {} + - name: data-filebeat + emptyDir: {} + - name: filebeat-conf + configMap: + name: {{ include "common.fullname" . }}-filebeat-configmap + - name: sdnc-logging-cfg-config + configMap: + name: {{ include "common.fullname" . }}-log-configmap + - name: bin + configMap: + name: {{ include "common.fullname" . }}-bin + defaultMode: 0755 + - name: properties + configMap: + name: {{ include "common.fullname" . }}-properties + defaultMode: 0644 + {{ if not .Values.persistence.enabled }} + - name: {{ include "common.fullname" . }}-mdsal + emptyDir: {} + {{ else }} + volumeClaimTemplates: + - metadata: + name: {{ include "common.fullname" . }}-mdsal + labels: + name: {{ include "common.fullname" . }} + spec: + accessModes: [ {{ .Values.persistence.accessMode }} ] + storageClassName: {{ include "common.fullname" . }}-mdsal + resources: + requests: + storage: {{ .Values.persistence.size }} + {{ end }} diff --git a/kubernetes/sdnc/templates/ueb-deployment.yaml b/kubernetes/sdnc/templates/ueb-deployment.yaml deleted file mode 100644 index f785cf7411..0000000000 --- a/kubernetes/sdnc/templates/ueb-deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncUeb }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: sdnc-ueb-listener - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.uebReplicas }} - selector: - matchLabels: - app: ueb-listener - template: - metadata: - labels: - app: ueb-listener - name: sdnc-ueb-listener - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdnc-db-container - - --container-name - - sdnc-controller-container - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ .Values.image.readiness }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-ueb-readiness - containers: - - command: - - /opt/onap/sdnc/ueb-listener/bin/start-ueb-listener.sh - env: - - name: PROPERTY_DIR - value: /opt/onap/sdnc/data/properties - - name: SDNC_CONFIG_DIR - value: /opt/onap/sdnc/data/properties - image: {{ .Values.image.ueblistener }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: ueb-listener-container - volumeMounts: - - mountPath: /etc/localtime - name: localtime - readOnly: true - - mountPath: /opt/onap/sdnc/data/properties/ueb-listener.properties - subPath: ueb-listener.properties - name: ueb-config - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: ueb-config - configMap: - name: sdnc-ueb-configmap - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} diff --git a/kubernetes/sdnc/templates/web-deployment.yaml b/kubernetes/sdnc/templates/web-deployment.yaml deleted file mode 100644 index ef469ac523..0000000000 --- a/kubernetes/sdnc/templates/web-deployment.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#{{ if not .Values.disableSdncSdncPortal }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: sdnc-portal - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.portalReplicas }} - selector: - matchLabels: - app: sdnc-portal - template: - metadata: - labels: - app: sdnc-portal - name: sdnc-portal - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdnc-db-container - - --container-name - - sdnc-controller-container - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ .Values.image.readiness }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-portal-readiness - containers: - - command: - - /bin/bash - - -c - - cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh - env: - - name: MYSQL_ROOT_PASSWORD - value: openECOMP1.0 - - name: SDNC_CONFIG_DIR - value: /opt/onap/sdnc/data/properties - image: {{ .Values.image.admportalSdnc }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: sdnc-portal-container - ports: - - containerPort: 8843 - volumeMounts: - - name: localtime - mountPath: /etc/localtime - readOnly: true - - mountPath: /opt/onap/sdnc/data/properties/ - name: sdnc-conf - readinessProbe: - tcpSocket: - port: 8843 - initialDelaySeconds: 5 - periodSeconds: 10 - restartPolicy: Always - volumes: - - name: localtime - hostPath: - path: /etc/localtime - - name: sdnc-conf - configMap: - name: sdnc-conf-configmap - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 94029179db..a550b22e11 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -12,31 +12,190 @@ # See the License for the specific language governing permissions and # limitations under the License. -nsPrefix: onap -pullPolicy: IfNotPresent -nodePortPrefix: 302 -dataRootDir: /dockerdata-nfs -image: - readiness: oomk8s/readiness-check:1.1.0 - mysql: mysql:5.7 - xtrabackup: gcr.io/google-samples/xtrabackup:1.0 - dgbuilderSdnc: nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:v0.1.0 - sdnc: nexus3.onap.org:10001/onap/sdnc-image:v1.2.1 - admportalSdnc: nexus3.onap.org:10001/onap/admportal-sdnc-image:v1.2.1 - ueblistener: nexus3.onap.org:10001/onap/sdnc-ueb-listener-image:v1.2.1 - dmaaplistener: nexus3.onap.org:10001/onap/sdnc-dmaap-listener-image:v1.2.1 - filebeat: docker.elastic.co/beats/filebeat:5.5.0 -enableODLCluster: false -numberOfODLReplicas: 1 -numberOfDbReplicas: 1 -dgbuilderReplicas: 1 -dmaapReplicas: 1 -nfsReplicas: 1 -uebReplicas: 1 -portalReplicas: 1 -disableSdncSdncDgbuilder: false -disableSdncSdncPortal: false -disableNfsProvisioner: false +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repository: nexus3.onap.org:10001 + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + persistence: + mountPath: /dockerdata-nfs + +################################################################# +# Application configuration defaults. +################################################################# +# application images +repository: nexus3.onap.org:10001 +pullPolicy: Always +image: onap/sdnc-image:1.3-STAGING-latest + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration config: + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + dbRootPassword: openECOMP1.0 + enableClustering: true + binDir: /opt/onap/sdnc/bin + geoEnabled: false +# if geoEnabled is set to true the following 3 values must be set to their proper values + myODLCluster: 127.0.0.1 + peerODLCluster: 127.0.0.1 + isPrimaryCluster: false + configDir: /opt/onap/sdnc/data/properties + dmaapTopic: SUCCESS + dmaapPort: 3904 logstashServiceName: log-ls logstashPort: 5044 + ansibleServiceName: sdnc-ansible-server + ansiblePort: 8000 + + +# dependency / sub-chart configuration +dmaap-listener: + nameOverride: sdnc-dmaap-listener + config: + sdncChartName: sdnc + mysqlChartName: sdnc-db + dmaapPort: 3904 + sdncPort: 8282 + configDir: /opt/onap/sdnc/data/properties + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +ueb-listener: + nameOverride: sdnc-ueb-listener + config: + sdncPort: 8282 + sdncChartName: sdnc + mysqlChartName: sdnc-db + configDir: /opt/onap/sdnc/data/properties + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +sdnc-portal: + config: + sdncChartName: sdnc + mysqlChartName: sdnc-db + configDir: /opt/onap/sdnc/data/properties + dbRootPassword: openECOMP1.0 + odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +sdnc-ansible-server: + service: + name: sdnc-ansible-server + internalPort: 8000 + config: + mysqlServiceName: sdnc-dbhost + +mysql: + nameOverride: sdnc-db + service: + name: sdnc-dbhost + internalPort: 3306 + nfsprovisionerPrefix: sdnc + sdnctlPrefix: sdnc + persistence: + mountSubPath: sdnc/mysql + enabled: true + disableNfsProvisioner: true + replicaCount: 1 + +dgbuilder: + nameOverride: sdnc-dgbuilder + config: + dbPodName: sdnc-db + dbServiceName: sdnc-dbhost + dbRootPassword: openECOMP1.0 + service: + name: sdnc-dgbuilder + nodePort: "03" + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: NodePort + name: sdnc + portName: sdnc + internalPort: 8181 + internalPort2: 8101 + internalPort3: 8080 + internalPort4: 2550 + + #port + externalPort: 8282 + nodePort: "02" + + externalPort2: 8202 + nodePort2: "08" + + externalPort3: 8280 + nodePort3: 46 + + externalPort4: 8443 + nodePort4: 67 + + clusterPort: 2550 + clusterPort2: 2650 + clusterPort3: 2681 + + geoNodePort1: 61 + geoNodePort2: 62 + geoNodePort3: 63 + geoNodePort4: 64 + geoNodePort5: 65 + geoNodePort6: 66 + +## Persist data to a persitent volume +persistence: + enabled: true + + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + volumeReclaimPolicy: Retain + + ## database data Persistent Volume Storage Class + ## If defined, storageClassName: <storageClass> + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + accessMode: ReadWriteOnce + size: 1Gi + mountPath: /dockerdata-nfs + mountSubPath: sdnc/mdsal + mdsalPath: /opt/opendaylight/current/daexim + +ingress: + enabled: false + +resources: {} +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi |