summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kubernetes/dcaegen2/charts/dcae-healthcheck/Chart.yaml21
-rw-r--r--kubernetes/dcaegen2/charts/dcae-healthcheck/requirements.yaml22
-rw-r--r--kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml65
-rw-r--r--kubernetes/dcaegen2/charts/dcae-healthcheck/templates/service.yaml45
-rw-r--r--kubernetes/dcaegen2/charts/dcae-healthcheck/values.yaml54
-rw-r--r--kubernetes/portal/charts/portal-cassandra/templates/configmap.yaml2
-rw-r--r--kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml18
-rw-r--r--kubernetes/portal/charts/portal-cassandra/templates/secrets.yaml27
-rwxr-xr-xkubernetes/sdnc/resources/config/bin/startODL.sh12
9 files changed, 227 insertions, 39 deletions
diff --git a/kubernetes/dcaegen2/charts/dcae-healthcheck/Chart.yaml b/kubernetes/dcaegen2/charts/dcae-healthcheck/Chart.yaml
new file mode 100644
index 0000000000..770f82d2b3
--- /dev/null
+++ b/kubernetes/dcaegen2/charts/dcae-healthcheck/Chart.yaml
@@ -0,0 +1,21 @@
+#============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=========================================================
+
+apiVersion: v1
+description: ONAP DCAE Health Check
+name: dcae-healtcheck
+version: 2.0.0
diff --git a/kubernetes/dcaegen2/charts/dcae-healthcheck/requirements.yaml b/kubernetes/dcaegen2/charts/dcae-healthcheck/requirements.yaml
new file mode 100644
index 0000000000..d031e2e890
--- /dev/null
+++ b/kubernetes/dcaegen2/charts/dcae-healthcheck/requirements.yaml
@@ -0,0 +1,22 @@
+#============LICENSE_START========================================================
+#=================================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2018 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.
+# ============LICENSE_END=========================================================
+
+dependencies:
+ - name: common
+ version: ~2.0.0
+ repository: '@local'
diff --git a/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml b/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml
new file mode 100644
index 0000000000..2166ca9b54
--- /dev/null
+++ b/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml
@@ -0,0 +1,65 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2018 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.
+# ============LICENSE_END=========================================================
+
+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: 1
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.global.repository | default .Values.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 eq .Values.liveness.enabled true }}
+ 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: DCAE_NAMESPACE
+ value: {{ .Values.dcae_ns }}
+ - name: ONAP_NAMESPACE
+ value: {{ include "common.namespace" . }}
+ - name: HELM_RELEASE
+ value: {{ .Release.Name }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/service.yaml b/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/service.yaml
new file mode 100644
index 0000000000..05405340e3
--- /dev/null
+++ b/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/service.yaml
@@ -0,0 +1,45 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2018 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.
+# ============LICENSE_END=========================================================
+
+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 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.externalPort }}
+ #Example internal target port if required
+ #targetPort: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.name }}
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.name }}
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/kubernetes/dcaegen2/charts/dcae-healthcheck/values.yaml b/kubernetes/dcaegen2/charts/dcae-healthcheck/values.yaml
new file mode 100644
index 0000000000..a4d2f292a5
--- /dev/null
+++ b/kubernetes/dcaegen2/charts/dcae-healthcheck/values.yaml
@@ -0,0 +1,54 @@
+#============LICENSE_START========================================================
+#=================================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2018 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.
+# ============LICENSE_END=========================================================
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiZGNhZUBkY2FlLm9uYXAub3JnIiwiYXV0aCI6IlpHOWphMlZ5T21SdlkydGxjZz09In19
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:1.1.0
+ loggingRepository: docker.elastic.co
+ loggingImage: beats/filebeat:5.5.0
+
+service:
+ name: dcae-healthcheck
+ internalPort: 80
+ externalPort: 80
+ type: ClusterIP
+
+# 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
+# application image
+repository: nexus3.onap.org:10001
+image: onap/org.onap.dcaegen2.deployments.healthcheck-container:1.0.0
+
+# Kubernetes namespace for components deployed via Cloudify manager
+# If empty, use the common namespace
+dcae_ns: "dcae"
+
diff --git a/kubernetes/portal/charts/portal-cassandra/templates/configmap.yaml b/kubernetes/portal/charts/portal-cassandra/templates/configmap.yaml
index fd42fd49ac..e0fec186bb 100644
--- a/kubernetes/portal/charts/portal-cassandra/templates/configmap.yaml
+++ b/kubernetes/portal/charts/portal-cassandra/templates/configmap.yaml
@@ -18,5 +18,5 @@ metadata:
name: {{ include "common.fullname" . }}-docker-entry-initd
namespace: {{ include "common.namespace" . }}
data:
-{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/cassandra/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml b/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml
index 91c4fa4140..cfd3ac507c 100644
--- a/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml
+++ b/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml
@@ -40,13 +40,13 @@ spec:
- containerPort: {{ .Values.service.internalPort3 }}
- containerPort: {{ .Values.service.internalPort4 }}
- containerPort: {{ .Values.service.internalPort5 }}
- {{- if eq .Values.liveness.enabled true }}
+ {{ if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{end -}}
+ {{ end }}
readinessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
@@ -56,10 +56,7 @@ spec:
- name: CASSUSER
value: "{{ .Values.config.cassandraUsername }}"
- name: CASSPASS
- valueFrom:
- secretKeyRef:
- name: {{ template "common.fullname" . }}
- key: db-root-password
+ value: "{{ .Values.config.cassandraPassword }}"
volumeMounts:
- mountPath: /etc/localtime
name: localtime
@@ -70,6 +67,8 @@ spec:
- name: cassandra-docker-entrypoint-initdb
mountPath: /docker-entrypoint-initdb.d/zzz_portalsdk.cql
subPath: portalsdk.cql
+ - name: {{ include "common.fullname" . }}-data
+ mountPath: /var/lib/cassandra/data
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.nodeSelector }}
@@ -87,5 +86,12 @@ spec:
- name: localtime
hostPath:
path: /etc/localtime
+ {{- if .Values.persistence.enabled }}
+ - name: {{ include "common.fullname" . }}-data
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/portal/charts/portal-cassandra/templates/secrets.yaml b/kubernetes/portal/charts/portal-cassandra/templates/secrets.yaml
deleted file mode 100644
index 6e4c210f6e..0000000000
--- a/kubernetes/portal/charts/portal-cassandra/templates/secrets.yaml
+++ /dev/null
@@ -1,27 +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.
-
-apiVersion: v1
-kind: Secret
-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 }}
-type: Opaque
-data:
- db-root-password: {{ .Values.config.cassandraPassword | b64enc | quote }}
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh
index aa5b6d1479..288ce11b8b 100755
--- a/kubernetes/sdnc/resources/config/bin/startODL.sh
+++ b/kubernetes/sdnc/resources/config/bin/startODL.sh
@@ -34,17 +34,17 @@ function enable_odl_cluster(){
hm=$(hostname)
echo "Get current Hostname ${hm}"
- node=($(echo ${hm} | tr '-' '\n'))
- node_name=${node[0]}
- node_index=${node[1]}
+ node=($(echo ${hm} | sed 's/-[0-9]*$//g'))
+ node_index=($(echo ${hm} | awk -F"-" '{print $NF}'))
+ member_offset=1
if [ -z $PEER_ODL_CLUSTER ]; then
echo "This is a local cluster"
- node_list="${node_name}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}";
+ node_list="${node}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}";
for ((i=1;i<${SDNC_REPLICAS};i++));
do
- node_list="${node_list} ${node_name}-$i.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"
+ node_list="${node_list} ${node}-$i.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"
done
/opt/opendaylight/current/bin/configure_cluster.sh $((node_index+1)) ${node_list}
else
@@ -70,6 +70,7 @@ function enable_odl_cluster(){
ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
+CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
SLEEP_TIME=${SLEEP_TIME:-120}
MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
@@ -95,6 +96,7 @@ then
echo "Installing SDN-C keyStore"
${SDNC_HOME}/bin/addSdncKeyStore.sh
echo "Starting OpenDaylight"
+ ${CCSDK_HOME}/bin/installOdlHostKey.sh
${ODL_HOME}/bin/start
echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
sleep ${SLEEP_TIME}