aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/dcaegen2
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/dcaegen2')
-rw-r--r--kubernetes/dcaegen2/Makefile2
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml3
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml2
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-input.yaml2
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml4
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml19
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml4
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml2
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml21
-rw-r--r--kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml11
-rwxr-xr-xkubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh19
-rw-r--r--kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml3
12 files changed, 77 insertions, 15 deletions
diff --git a/kubernetes/dcaegen2/Makefile b/kubernetes/dcaegen2/Makefile
new file mode 100644
index 0000000000..c16f23be28
--- /dev/null
+++ b/kubernetes/dcaegen2/Makefile
@@ -0,0 +1,2 @@
+make-dmaap:
+ cd charts && helm dep up dcae-bootstrap
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml
index d031e2e890..9f53d90c06 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml
@@ -20,3 +20,6 @@ dependencies:
- name: common
version: ~2.0.0
repository: '@local'
+ - name: postgres
+ version: ~2.0.0
+ repository: '@local'
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml
index 6205f1ed38..dac0ffa207 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml
@@ -23,6 +23,6 @@
"msb_hostname": "{{ .Values.config.address.msb_discovery }}.{{include "common.namespace" . }}",
"dcae_CL_publish_url": "http://{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}:3904/events/unauthenticated.DCAE_CL_OUTPUT",
"ves_fault_publish_url": "http://{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT",
- "pgaas_cluster_name" : "pgvm",
+ "pgaas_cluster_name" : "{{ .Values.postgres.service.name2 }}.{{include "common.namespace" . }}",
"database_name":"holmes"
}
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-input.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-input.yaml
index 75dbbf9805..1a808d4eb7 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-input.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-input.yaml
@@ -18,6 +18,6 @@
{
"msb_hostname": "{{ .Values.config.address.msb_discovery }}.{{include "common.namespace" . }}",
- "pgaas_cluster_name" : "pgvm",
+ "pgaas_cluster_name" : "{{ .Values.postgres.service.name2 }}.{{include "common.namespace" . }}",
"database_name":"holmes"
}
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
index 4e42b11208..8b5da2efe6 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
@@ -16,12 +16,12 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-sdc_config.address: '{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
+sdc_address: '{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
sdc_uri: 'https://{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
sdc_user: "dcae"
sdc_password: !!str Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
sdc_environment_name: "AUTO"
-sdc_msg_bus_config.address: '{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}'
+sdc_msg_bus_address: '{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}'
postgres_user_inventory: "postgres"
postgres_password_inventory: "onap123"
service_change_handler_image: {{ .Values.componentImages.service_change_handler }}
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml
new file mode 100644
index 0000000000..b201247136
--- /dev/null
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml
@@ -0,0 +1,19 @@
+#=================================================================================
+# 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=========================================================
+
+k8s_pgaas_instance_fqdn: {{ .Values.postgres.service.name2 }}.{{include "common.namespace" . }}
+k8s_initial_password: {{ .Values.postgres.config.pgRootPassword }}
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml
index 7dc66f40c3..f3a6ccaad8 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml
@@ -22,3 +22,7 @@ tca_image: {{ .Values.componentImages.tca }}
dmaap_host: {{ .Values.config.address.message_router }}.{{include "common.namespace" . }}
consul_host: {{ .Values.config.address.consul.host }}.{{include "common.namespace" . }}
cbs_host: config-binding-service
+enableRedisCaching: {{ .Values.config.redisCaching }}
+{{ if .Values.config.redisHosts }}
+redisHosts: {{ .Values.config.redisHosts }}
+{{ end }}
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml
index 5385d07dde..2e41d1c4b3 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml
@@ -19,7 +19,7 @@
{{ if .Values.componentImages.ves }}
tag_version: {{ .Values.componentImages.ves }}
{{ end }}
-external_port : "30280"
+external_port : "30235"
ves_other_publish_url: "http://{{ .Values.config.address.message_router }}:3904/events/unauthenticated.SEC_OTHER_OUTPUT/"
ves_heartbeat_publish_url: "http://{{ .Values.config.address.message_router }}:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/"
ves_fault_publish_url: "http://{{ .Values.config.address.message_router }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT/"
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
index fc89c6c459..6df05b1452 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
@@ -40,17 +40,34 @@ config:
msb_discovery: msb-discovery
policy_pdp: pdp
sdc: sdc-be
+ # redisCaching is a string not a boolean!
+ redisCaching: "false"
+
+# postgres values--overriding defaults in the postgres subchart
+postgres:
+ nameOverride: dcae-db
+ service:
+ name: dcae-postgres
+ name2: dcae-pg-primary
+ name3: dcae-pg-replica
+ container:
+ name:
+ primary: dcae-pg-primary
+ replica: dcae-pg-replica
+ config:
+ pgPrimaryPassword: onapdemodb
+ pgRootPassword: onapdemodb
# application image
repository: nexus3.onap.org:10001
-image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.1.5
+image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.1.8
# DCAE component images to be deployed via Cloudify Manager
# Use to override default setting in blueprints
componentImages:
#TODO for further investigation: input template expansion issues if we comment this out
- config_binding_service: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.1.4
+ config_binding_service: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.1.5
# deployment_handler: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.deployment-handler:2.1.1
# holmes_engine: nexus3.onap.org:10001//onap/holmes/engine-management:v1.0.0
# holmes_rules: nexus3.onap.org:10001/onap/holmes/rule-management:v1.0.0
diff --git a/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml b/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml
index c6b24ee22f..4b76523c57 100644
--- a/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml
@@ -63,4 +63,13 @@ spec:
type: ExternalName
externalName: {{ .Values.service.name }}.{{ include "common.namespace" . }}.svc.cluster.local
{{ end }}
-
+# Provide alternate name for consul in common namespace to support CM plugin discovery
+apiVersion: v1
+kind: Service
+metadata:
+ name: consul
+ namespace: {{ include "common.namespace" . }}
+spec:
+ type: ExternalName
+ externalName: {{ .Values.config.address.consul.host }}.{{ include "common.namespace" . }}.svc.cluster.local
+---
diff --git a/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh b/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
index 3431e7e6e7..f4547525c9 100755
--- a/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
+++ b/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
@@ -15,8 +15,9 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-
-if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
+(if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
+ echo "delay by 10 seconds for redis server starting"
+ sleep 10
NODES=""
echo "====> wait for all {{.Values.replicaCount}} redis pods up"
@@ -24,11 +25,16 @@ if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
do
echo "======> $(echo $NODES |wc -w) / {{.Values.replicaCount}} pods up"
sleep 5
- RESP=$(wget -vO- --ca-certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --header "Authorization: Bearer $(</var/run/secrets/kubernetes.io/serviceaccount/token)" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT/api/v1/namespaces/{{.Release.Namespace}}/pods?labelSelector=app={{.Chart.Name}})
+ RESP=$(wget -vO- --ca-certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --header "Authorization
+: Bearer $(</var/run/secrets/kubernetes.io/serviceaccount/token)" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT
+_443_TCP_PORT/api/v1/namespaces/{{.Release.Namespace}}/pods?labelSelector=app={{.Chart.Name}})
IPS=$(echo $RESP | jq -r '.items[].status.podIP')
+ IPS2=$(echo $IPS | sed -e 's/[a-zA-Z]*//g')
+ echo "======> IPs: ["$IPS2"]"
NODES=""
- for I in $IPS; do NODES="$NODES $I:{{.Values.service.externalPort}}"; done
+ for I in $IPS2; do NODES="$NODES $I:{{.Values.service.externalPort}}"; done
+ echo "======> nodes: ["$NODES"]"
done
echo "====> all {{.Values.replicaCount}} redis cluster pods are up. wait 10 seconds before the next step"; echo
sleep 10
@@ -36,6 +42,9 @@ if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
echo "====> Configure the cluster"
# $NODES w/o quotes
+ echo "======> nodes: [$(echo $NODES |paste -s)]"
redis-trib create --replicas 1 $(echo $NODES |paste -s)
+fi ) &
+
+redis-server /conf/redis.conf
-fi
diff --git a/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml b/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
index 472471416b..63d921aa8b 100644
--- a/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
@@ -41,8 +41,7 @@ spec:
- /bin/sh
- -c
- |
- /opt/scripts/redis-cluster-config.sh &
- /usr/local/bin/redis-server-config.sh
+ /opt/scripts/redis-cluster-config.sh
ports:
- containerPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.name }}