summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kubernetes/common/mysql/templates/pv.yaml30
-rw-r--r--kubernetes/common/mysql/templates/pvc.yaml39
-rw-r--r--kubernetes/common/mysql/templates/statefulset.yaml41
-rw-r--r--kubernetes/common/mysql/templates/storageclass.yaml2
-rw-r--r--kubernetes/common/mysql/values.yaml5
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml4
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/.helmignore21
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/Chart.yaml18
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/requirements.yaml18
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/resources/config/RestServer_config45
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/templates/configmap.yaml21
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/templates/deployment.yaml96
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/templates/service.yaml33
-rw-r--r--kubernetes/sdnc/charts/sdnc-ansible-server/values.yaml79
-rw-r--r--kubernetes/sdnc/resources/config/conf/lcm-dg.properties18
-rw-r--r--kubernetes/sdnc/templates/pv.yaml14
-rw-r--r--kubernetes/sdnc/templates/statefulset.yaml11
-rw-r--r--kubernetes/sdnc/values.yaml12
18 files changed, 433 insertions, 74 deletions
diff --git a/kubernetes/common/mysql/templates/pv.yaml b/kubernetes/common/mysql/templates/pv.yaml
index 824dcbb87b..3bef651916 100644
--- a/kubernetes/common/mysql/templates/pv.yaml
+++ b/kubernetes/common/mysql/templates/pv.yaml
@@ -15,10 +15,11 @@
*/}}
{{- if (and (and (.Values.persistence.enabled) (not .Values.persistence.existingClaim)) ( .Values.disableNfsProvisioner)) -}}
+{{ $pvNum := default 1 .Values.replicaCount | int }}
kind: PersistentVolume
apiVersion: v1
metadata:
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-mysql0
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -31,8 +32,31 @@ spec:
storage: {{ .Values.persistence.size}}
accessModes:
- {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-data"
+ storageClassName: "{{ include "common.fullname" . }}-mysql"
persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
hostPath:
- path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+ 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" . }}-mysql1
+ 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" . }}-mysql"
+ persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+ hostPath:
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}1
+{{ end }}
{{- end -}}
diff --git a/kubernetes/common/mysql/templates/pvc.yaml b/kubernetes/common/mysql/templates/pvc.yaml
deleted file mode 100644
index d1558f131f..0000000000
--- a/kubernetes/common/mysql/templates/pvc.yaml
+++ /dev/null
@@ -1,39 +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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
- name: {{ include "common.fullname" . }}-data
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: "{{ .Release.Name }}"
- heritage: "{{ .Release.Service }}"
-{{- if .Values.persistence.annotations }}
- annotations:
-{{ toYaml .Values.persistence.annotations | indent 4 }}
-{{- end }}
-spec:
- accessModes:
- - {{ .Values.persistence.accessMode }}
- resources:
- requests:
- storage: {{ .Values.persistence.size }}
- storageClassName: "{{ include "common.fullname" . }}-data"
-{{- end -}}
diff --git a/kubernetes/common/mysql/templates/statefulset.yaml b/kubernetes/common/mysql/templates/statefulset.yaml
index ff73b45620..0f340f00b5 100644
--- a/kubernetes/common/mysql/templates/statefulset.yaml
+++ b/kubernetes/common/mysql/templates/statefulset.yaml
@@ -100,13 +100,13 @@ spec:
echo ${BASH_REMATCH}
[[ $ordinal -eq 0 ]] && exit 0
# Clone data from previous peer.
- ncat --recv-only {{ include "common.fullname" . }}-$(($ordinal-1)).{{ .Values.service.name }}.{{ include "common.namespace" . }} 3307 | xbstream -x -C /var/lib/mysql
+ ncat --recv-only {{ include "common.fullname" . }}-$(($ordinal-1)).{{ .Values.service.name }}.{{ include "common.namespace" . }} 3307 | xbstream -x -C {{ .Values.persistence.mysqlPath }}
# Prepare the backup.
xtrabackup --user=root --password=$MYSQL_ROOT_PASSWORD --prepare --target-dir=/var/lib/mysql
- ls -l /var/lib/mysql
+ ls -l {{ .Values.persistence.mysqlPath }}
volumeMounts:
- - name: {{ include "common.fullname" . }}-data
- mountPath: /var/lib/mysql
+ - name: {{ include "common.fullname" . }}-mysql
+ mountPath: {{ .Values.persistence.mysqlPath }}
- name: conf
mountPath: /etc/mysql/conf.d
@@ -142,8 +142,8 @@ spec:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: {{ .Values.config.dbAllowEmptyPassword | default "0" | quote }}
volumeMounts:
- - mountPath: /var/lib/mysql
- name: {{ include "common.fullname" . }}-data
+ - mountPath: {{ .Values.persistence.mysqlPath }}
+ name: {{ include "common.fullname" . }}-mysql
- mountPath: /etc/mysql/conf.d
name: conf
resources:
@@ -174,7 +174,7 @@ spec:
- "-c"
- |
set -ex
- cd /var/lib/mysql
+ cd {{ .Values.persistence.mysqlPath }}
ls -l
# Determine binlog position of cloned data, if any.
if [[ -f xtrabackup_slave_info ]]; then
@@ -222,8 +222,8 @@ spec:
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=$mysqlhost"
volumeMounts:
- - name: {{ include "common.fullname" . }}-data
- mountPath: /var/lib/mysql
+ - name: {{ include "common.fullname" . }}-mysql
+ mountPath: {{ .Values.persistence.mysqlPath }}
- name: conf
mountPath: /etc/mysql/conf.d
volumes:
@@ -235,11 +235,20 @@ spec:
- name: localtime
hostPath:
path: /etc/localtime
- - name: {{ include "common.fullname" . }}-data
-#{{ if .Values.persistence.enabled }}
- persistentVolumeClaim:
- claimName: {{ include "common.fullname" . }}-data
-#{{ else }}
+ - name: {{ include "common.fullname" . }}-mysql
+ {{ if not .Values.persistence.enabled }}
+ - name: {{ include "common.fullname" . }}-mysql
emptyDir: {}
-#{{ end }}
-
+ {{ else }}
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "common.fullname" . }}-mysql
+ labels:
+ name: {{ include "common.fullname" . }}
+ spec:
+ accessModes: [ {{ .Values.persistence.accessMode }} ]
+ storageClassName: {{ include "common.fullname" . }}-mysql
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
+ {{ end }}
diff --git a/kubernetes/common/mysql/templates/storageclass.yaml b/kubernetes/common/mysql/templates/storageclass.yaml
index 3cd502ea30..4edb477144 100644
--- a/kubernetes/common/mysql/templates/storageclass.yaml
+++ b/kubernetes/common/mysql/templates/storageclass.yaml
@@ -18,7 +18,7 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
- name: "{{ include "common.fullname" . }}-data"
+ name: "{{ include "common.fullname" . }}-mysql"
namespace: {{ include "common.namespace" . }}
provisioner: {{ include "common.fullname" . }}/nfs
{{ end }}
diff --git a/kubernetes/common/mysql/values.yaml b/kubernetes/common/mysql/values.yaml
index 306c2d7fe0..b12e72d0a2 100644
--- a/kubernetes/common/mysql/values.yaml
+++ b/kubernetes/common/mysql/values.yaml
@@ -58,7 +58,7 @@ readiness:
## Persist data to a persitent volume
persistence:
- enabled: false
+ enabled: true
## A manually managed Persistent Volume and Claim
## Requires persistence.enabled: true
@@ -72,10 +72,11 @@ persistence:
## 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: ReadWriteMany
+ accessMode: ReadWriteOnce
size: 1Gi
mountPath: /dockerdata-nfs
mountSubPath: "mysql/data"
+ mysqlPath: /var/lib/mysql
service:
name: mysql
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
index ab7331ef1a..404e059bd7 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
@@ -56,7 +56,9 @@ postgres:
config:
pgPrimaryPassword: onapdemodb
pgRootPassword: onapdemodb
-
+ persistence:
+ mountSubPath: dcae/data
+ mountInitPath: dcae
# application image
repository: nexus3.onap.org:10001
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/charts/sdnc-ansible-server/templates/configmap.yaml b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/configmap.yaml
new file mode 100644
index 0000000000..f57dc78107
--- /dev/null
+++ b/kubernetes/sdnc/charts/sdnc-ansible-server/templates/configmap.yaml
@@ -0,0 +1,21 @@
+# 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: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ 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/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/templates/pv.yaml b/kubernetes/sdnc/templates/pv.yaml
index e20e2818a3..f10d67ad68 100644
--- a/kubernetes/sdnc/templates/pv.yaml
+++ b/kubernetes/sdnc/templates/pv.yaml
@@ -18,7 +18,7 @@
kind: PersistentVolume
apiVersion: v1
metadata:
- name: {{ include "common.fullname" . }}-data0
+ name: {{ include "common.fullname" . }}-mdsal0
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.fullname" . }}
@@ -31,7 +31,7 @@ spec:
storage: {{ .Values.persistence.size}}
accessModes:
- {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-data"
+ 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
@@ -40,7 +40,7 @@ spec:
kind: PersistentVolume
apiVersion: v1
metadata:
- name: {{ include "common.fullname" . }}-data1
+ name: {{ include "common.fullname" . }}-mdsal1
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.fullname" . }}
@@ -53,7 +53,7 @@ spec:
storage: {{ .Values.persistence.size}}
accessModes:
- {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-data"
+ 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
@@ -63,7 +63,7 @@ spec:
kind: PersistentVolume
apiVersion: v1
metadata:
- name: {{ include "common.fullname" . }}-data2
+ name: {{ include "common.fullname" . }}-mdsal2
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.fullname" . }}
@@ -76,9 +76,9 @@ spec:
storage: {{ .Values.persistence.size}}
accessModes:
- {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-data"
+ 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 -}} \ No newline at end of file
+{{- end -}}
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
index 63175c4c4b..83b7a7ce36 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -101,6 +101,9 @@ spec:
- 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
@@ -108,7 +111,7 @@ spec:
name: properties
subPath: svclogic.properties
- mountPath: {{ .Values.persistence.mdsalPath }}
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-mdsal
- mountPath: /var/log/onap
name: logs
resources:
@@ -159,17 +162,17 @@ spec:
name: {{ include "common.fullname" . }}-properties
defaultMode: 0644
{{ if not .Values.persistence.enabled }}
- - name: {{ include "common.fullname" . }}-data
+ - name: {{ include "common.fullname" . }}-mdsal
emptyDir: {}
{{ else }}
volumeClaimTemplates:
- metadata:
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-mdsal
labels:
name: {{ include "common.fullname" . }}
spec:
accessModes: [ {{ .Values.persistence.accessMode }} ]
- storageClassName: {{ include "common.fullname" . }}-data
+ storageClassName: {{ include "common.fullname" . }}-mdsal
resources:
requests:
storage: {{ .Values.persistence.size }}
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
index f077f94bb0..26856da0a9 100644
--- a/kubernetes/sdnc/values.yaml
+++ b/kubernetes/sdnc/values.yaml
@@ -49,6 +49,9 @@ config:
dmaapPort: 3904
logstashServiceName: log-ls
logstashPort: 5044
+ ansibleServiceName: sdnc-ansible-server
+ ansiblePort: 8000
+
# dependency / sub-chart configuration
dmaap-listener:
@@ -78,6 +81,13 @@ sdnc-portal:
dbRootPassword: openECOMP1.0
odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+sdnc-ansible-server:
+ service:
+ name: sdnc-ansible-server
+ internalPort: 8000
+ config:
+ mysqlServiceName: sdnc-dbhost
+
mysql:
nameOverride: sdnc-db
service:
@@ -86,7 +96,7 @@ mysql:
nfsprovisionerPrefix: sdnc
sdnctlPrefix: sdnc
persistence:
- mountSubPath: sdnc/data
+ mountSubPath: sdnc/mysql
enabled: true
disableNfsProvisioner: true
replicaCount: 1