summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/common/templates/_repository.tpl1
-rwxr-xr-xkubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties76
-rwxr-xr-xkubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties45
-rw-r--r--kubernetes/dmaap/charts/message-router/templates/deployment.yaml3
-rw-r--r--kubernetes/dmaap/charts/message-router/values.yaml4
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh123
-rwxr-xr-xkubernetes/helm/plugins/undeploy/undeploy.sh2
-rw-r--r--kubernetes/onap/values.yaml8
8 files changed, 178 insertions, 84 deletions
diff --git a/kubernetes/common/common/templates/_repository.tpl b/kubernetes/common/common/templates/_repository.tpl
index 364ba7dc4c..272db42125 100644
--- a/kubernetes/common/common/templates/_repository.tpl
+++ b/kubernetes/common/common/templates/_repository.tpl
@@ -41,6 +41,7 @@
*/}}
{{- define "common.repository.secret" -}}
{{- $repo := include "common.repository" . }}
+ {{- $repo := default "nexus3.onap.org:10001" $repo }}
{{- $cred := .Values.global.repositoryCred }}
{{- $mail := default "@" $cred.mail }}
{{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
diff --git a/kubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties
index 4015e941a6..9d1febe27d 100755
--- a/kubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties
+++ b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties
@@ -1,17 +1,24 @@
-# Copyright © 2017 Amdocs, Bell Canada, AT&T
-#
-# 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
+###############################################################################
+# ============LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 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=========================================================
#
-# 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.
-
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+###############################################################################
###############################################################################
##
## Cambria API Server config
@@ -19,7 +26,7 @@
## - Default values are shown as commented settings.
##
-##############################################################################
+###############################################################################
##
## HTTP service
##
@@ -29,7 +36,9 @@
##
## Both Cambria and Kafka make use of Zookeeper.
##
+#config.zk.servers=172.18.1.1
config.zk.servers={{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}
+#config.zk.root=/fe3c/cambria/config
###############################################################################
@@ -39,17 +48,22 @@ config.zk.servers={{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}
## Items below are passed through to Kafka's producer and consumer
## configurations (after removing "kafka.")
## if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
kafka.metadata.broker.list={{.Values.kafka.name}}:{{.Values.kafka.port}}
##kafka.request.required.acks=-1
#kafka.client.zookeeper=${config.zk.servers}
consumer.timeout.ms=100
zookeeper.connection.timeout.ms=6000
-zookeeper.session.timeout.ms=6000
+zookeeper.session.timeout.ms=20000
zookeeper.sync.time.ms=2000
auto.commit.interval.ms=1000
fetch.message.max.bytes =1000000
auto.commit.enable=false
+#(backoff*retries > zksessiontimeout)
+kafka.rebalance.backoff.ms=10000
+kafka.rebalance.max.retries=6
+
###############################################################################
##
@@ -86,7 +100,7 @@ authentication.adminSecret=fe3cCompound
## which would substantially impact a high volume consumer's performance.
##
## This complicates Cambria server failover, because we often need server
-## A to close its connection before server B brings up the replacement.
+## A to close its connection before server B brings up the replacement.
##
## The consumer cache is normally enabled.
@@ -96,8 +110,8 @@ authentication.adminSecret=fe3cCompound
## consumers every sweepFreqSeconds and will clean up any connections that are
## dormant for touchFreqMs.
#cambria.consumer.cache.sweepFreqSeconds=15
-#cambria.consumer.cache.touchFreqMs=120000
-
+cambria.consumer.cache.touchFreqMs=120000
+##stickforallconsumerrequests=false
## The cache is managed through ZK. The default value for the ZK connection
## string is the same as config.zk.servers.
#cambria.consumer.cache.zkConnect=${config.zk.servers}
@@ -110,6 +124,9 @@ authentication.adminSecret=fe3cCompound
##
#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+#cambria.rateLimit.maxEmptyPollsPerMinute=30
+#cambria.rateLimitActual.delay.ms=10
+
###############################################################################
##
## Metrics Reporting
@@ -117,7 +134,7 @@ authentication.adminSecret=fe3cCompound
## This server can report its metrics periodically on a topic.
##
#metrics.send.cambria.enabled=true
-#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
+#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
#metrics.send.cambria.sendEverySeconds=60
cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
@@ -129,18 +146,23 @@ maxcontentlength=10000
##############################################################################
#AAF Properties
-msgRtr.namespace.aaf=org.openecomp.dcae.dmaap.mtnje2.mr.topic
-msgRtr.topicfactory.aaf=org.openecomp.dcae.dmaap.topicFactory|:org.openecomp.dcae.dmaap.mtnje2.mr.topic:
-enforced.topic.name.AAF=org.openecomp
+msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
+msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+enforced.topic.name.AAF=org.onap
forceAAF=false
transidUEBtopicreqd=false
-defaultNSforUEB=org.openecomp.dmaap.mr.ueb
+defaultNSforUEB=org.onap.dmaap.mr
##############################################################################
#Mirror Maker Agent
-msgRtr.mirrormakeradmin.aaf=org.openecomp.dmaap.mr.dev.mirrormaker|*|admin
-msgRtr.mirrormakeruser.aaf=org.openecomp.dmaap.mr.dev.mirrormaker|*|user
-msgRtr.mirrormakeruser.aaf.create=org.openecomp.dmaap.mr.dev.topicFactory|:org.openecomp.dmaap.mr.dev.topic:
+msgRtr.mirrormakeradmin.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=com.onap.dmaap.mr.dev.topicFactory|:com.onap.dmaap.mr.dev.topic:
msgRtr.mirrormaker.timeout=15000
-msgRtr.mirrormaker.topic=org.openecomp.dmaap.mr.prod.mm.agent
+msgRtr.mirrormaker.topic=com.onap.dmaap.mr.prod.mm.agent
msgRtr.mirrormaker.consumergroup=mmagentserver
msgRtr.mirrormaker.consumerid=1
+
+kafka.max.poll.interval.ms=300000
+kafka.heartbeat.interval.ms=60000
+kafka.session.timeout.ms=240000
+kafka.max.poll.records=1000 \ No newline at end of file
diff --git a/kubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties
index 9079794517..a79bb8d40a 100755
--- a/kubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties
+++ b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties
@@ -1,35 +1,20 @@
-# Copyright © 2017 Amdocs, Bell Canada, AT&T
-#
-# 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.
+aaf_locate_url=https://aaf-onap-test.osaaf.org:8095
+aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.1
+aaf_env=DEV
+aaf_lur=org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm
-basic_realm=openecomp.org
-basic_warn=TRUE
+cadi_truststore=/appl/dmaapMR1/etc/truststoreONAPall.jks
+cadi_truststore_password=changeit
-cadi_loglevel=DEBUG
-#cadi_keyfile=target/swm/package/nix/dist_files/appl/${artifactId}/etc/keyfile2
-cadi_keyfile=/appl/dmaapMR1/etc/keyfile
-# Configure AAF
-aaf_url=https://DME2RESOLVE/service=org.openecomp.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE
+cadi_keyfile=/appl/dmaapMR1/etc/keyfilenew
-aaf_id=dgl@openecomp.org
-aaf_password=enc:f2u5br1mh29M02-
-aaf_timeout=5000
-aaf_clean_interval=1200000
-aaf_user_expires=60000
-aaf_high_count=1000000
+cadi_alias=dmaapmr@mr.dmaap.onap.org
+cadi_keystore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.p12
+cadi_keystore_password=Messaging for All
+cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US
-# The following properties are being set by the AJSC Container and should NOT need to be set here.
-AFT_LATITUDE=33.823589
-AFT_LONGITUDE=-84.366982
-AFT_ENVIRONMENT=AFTUAT
+cadi_loglevel=INFO
+cadi_protocols=TLSv1.1,TLSv1.2
+cadi_latitude=37.78187
+cadi_longitude=-122.26147 \ No newline at end of file
diff --git a/kubernetes/dmaap/charts/message-router/templates/deployment.yaml b/kubernetes/dmaap/charts/message-router/templates/deployment.yaml
index 1798092eb4..4e12ded493 100644
--- a/kubernetes/dmaap/charts/message-router/templates/deployment.yaml
+++ b/kubernetes/dmaap/charts/message-router/templates/deployment.yaml
@@ -66,6 +66,9 @@ spec:
port: {{ .Values.service.externalPort }}
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: enableCadi
+ value: "false"
volumeMounts:
- mountPath: /etc/localtime
name: localtime
diff --git a/kubernetes/dmaap/charts/message-router/values.yaml b/kubernetes/dmaap/charts/message-router/values.yaml
index aef8862e7f..9ba34884da 100644
--- a/kubernetes/dmaap/charts/message-router/values.yaml
+++ b/kubernetes/dmaap/charts/message-router/values.yaml
@@ -53,14 +53,14 @@ affinity: {}
# probe configuration parameters
liveness:
- initialDelaySeconds: 10
+ initialDelaySeconds: 120
periodSeconds: 10
# necessary to disable liveness probe when setting breakpoints
# in debugger so K8s doesn't restart unresponsive container
enabled: true
readiness:
- initialDelaySeconds: 10
+ initialDelaySeconds: 120
periodSeconds: 10
service:
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index 07455d7db4..9d9d1d208c 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -38,6 +38,7 @@ Flags:
--set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
-f, --values valueFiles specify values in a YAML file or a URL(can specify multiple) (default [])
+ --verbose enables full helm install/upgrade output during deploy
EOF
}
@@ -66,18 +67,45 @@ generate_overrides() {
if [[ $START == "global:" ]]; then
echo "global:" > $GLOBAL_OVERRIDES
cat $COMPUTED_OVERRIDES | sed '/common:/,/consul:/d' \
- | sed -n '/'"$START"'/,/'log:'/p' | sed '1d;$d' >> $GLOBAL_OVERRIDES
+ | sed -n '/'"$START"'/,/'log:'/p' | sed '1d;$d' >> $GLOBAL_OVERRIDES
else
SUBCHART_DIR="$CACHE_SUBCHART_DIR/$(cut -d':' -f1 <<<"$START")"
if [[ -d "$SUBCHART_DIR" ]]; then
- cat $COMPUTED_OVERRIDES | sed -n '/'"$START"'/,/'"$END"'/p' \
+ cat $COMPUTED_OVERRIDES | sed -n '/^'"$START"'/,/^'"$END"'/p' \
| sed '1d;$d' | cut -c3- > $SUBCHART_DIR/subchart-overrides.yaml
fi
fi
done
}
+resolve_deploy_flags() {
+ DEPLOY_FLAGS=$1
+ for flag in -f --values --set --set-string
+ do
+ while true ; do
+ # extract value of flag
+ length=${#flag}
+ length=$((length+1))
+ FLAG_VALUE="$(echo $DEPLOY_FLAGS | sed -n 's/.*\('$flag'\).\s*/\1/p' | cut -c$length- | cut -d' ' -f1)"
+
+ # purge flag and value from
+ DEPLOY_FLAGS="${DEPLOY_FLAGS//$flag $FLAG_VALUE/}"
+ DEPLOY_FLAGS=$(echo $DEPLOY_FLAGS | awk '{$1=$1};1')
+ if [ -z "$FLAG_VALUE" ] ; then
+ break
+ fi
+ done
+ done
+ echo "$DEPLOY_FLAGS"
+}
+
deploy() {
+ # validate params
+ if [[ -z "$1" || -z "$2" ]]; then
+ usage
+ exit 0
+ fi
+
RELEASE=$1
CHART_URL=$2
FLAGS=${@:3}
@@ -86,23 +114,54 @@ deploy() {
CACHE_DIR=~/.helm/plugins/deploy/cache
CHART_DIR=$CACHE_DIR/$CHART_NAME
CACHE_SUBCHART_DIR=$CHART_DIR-subcharts
+ LOG_DIR=$CHART_DIR/logs
+
+ # determine if verbose output is enabled
+ VERBOSE="false"
+ if [[ $FLAGS = *"--verbose"* ]]; then
+ FLAGS="$(echo $FLAGS| sed -n 's/--verbose//p')"
+ VERBOSE="true"
+ fi
+ if [[ $FLAGS = *"--dry-run"* ]]; then
+ VERBOSE="true"
+ FLAGS="$FLAGS --debug"
+ fi
+
# should pass all flags instead
- NAMESPACE="$(echo $FLAGS | sed -n 's/.*\(namespace\).\s*/\1/p' | cut -c10-)"
-
+ NAMESPACE="$(echo $FLAGS | sed -n 's/.*\(namespace\).\s*/\1/p' | cut -c10- | cut -d' ' -f1)"
+
+ # Remove all override values passed in as arguments. These will be used during dry run
+ # to resolve computed override values. Remaining flags will be passed on during
+ # actual upgrade/install of parent and subcharts.
+ DEPLOY_FLAGS=$(resolve_deploy_flags "$FLAGS")
+
+ # determine if upgrading individual subchart or entire parent + subcharts
+ SUBCHART_RELEASE="$(cut -d'-' -f2 <<<"$RELEASE")"
+ if [[ ! -d "$CACHE_SUBCHART_DIR/$SUBCHART_RELEASE" ]]; then
+ SUBCHART_RELEASE=
+ else
+ # update specified subchart without parent
+ RELEASE="$(cut -d'-' -f1 <<<"$RELEASE")"
+ fi
+
# clear previously cached charts
rm -rf $CACHE_DIR
+ # create log driectory
+ mkdir -p $LOG_DIR
+
# fetch umbrella chart (parent chart containing subcharts)
if [[ -d "$CHART_URL" ]]; then
mkdir -p $CHART_DIR
cp -R $CHART_URL/* $CHART_DIR/
- cd $CHART_DIR/charts/
- for subchart in * ; do
- tar xzf ${subchart}
+ charts=$CHART_DIR/charts/*
+ for subchart in $charts ; do
+ tar xzf ${subchart} -C $CHART_DIR/charts/
done
- rm -rf *.tgz
+ rm -rf $CHART_DIR/charts/*.tgz
else
+ echo "fetching $CHART_URL"
helm fetch $CHART_URL --untar --untardir $CACHE_DIR
fi
@@ -126,29 +185,57 @@ deploy() {
generate_overrides $COMPUTED_OVERRIDES $GLOBAL_OVERRIDES
# upgrade/install parent chart first
- helm upgrade -i $RELEASE $CHART_DIR --namespace $NAMESPACE -f $COMPUTED_OVERRIDES
+ if [[ -z "$SUBCHART_RELEASE" ]]; then
+ LOG_FILE=$LOG_DIR/${RELEASE}.log
+ :> $LOG_FILE
+
+ helm upgrade -i $RELEASE $CHART_DIR $DEPLOY_FLAGS -f $COMPUTED_OVERRIDES \
+ > $LOG_FILE.log 2>&1
+
+ if [[ $VERBOSE == "true" ]]; then
+ cat $LOG_FILE
+ else
+ echo "release $RELEASE deployed"
+ fi
+ fi
# parse computed overrides - will use to determine if a subchart is "enabled"
eval $(parse_yaml $COMPUTED_OVERRIDES "computed_")
# upgrade/install each "enabled" subchart
- cd $CACHE_SUBCHART_DIR
+ cd $CACHE_SUBCHART_DIR/
for subchart in * ; do
VAR="computed_${subchart}_enabled"
COMMAND="$"$VAR
eval "SUBCHART_ENABLED=$COMMAND"
if [[ $SUBCHART_ENABLED == "true" ]]; then
- SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
- helm upgrade -i "${RELEASE}-${subchart}" $CACHE_SUBCHART_DIR/$subchart \
- --namespace $NAMESPACE -f $GLOBAL_OVERRIDES -f $SUBCHART_OVERRIDES
+ if [[ -z "$SUBCHART_RELEASE" || $SUBCHART_RELEASE == "$subchart" ]]; then
+ LOG_FILE=$LOG_DIR/"${RELEASE}-${subchart}".log
+ :> $LOG_FILE
+
+ SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
+ helm upgrade -i "${RELEASE}-${subchart}" $CACHE_SUBCHART_DIR/$subchart \
+ $DEPLOY_FLAGS -f $GLOBAL_OVERRIDES -f $SUBCHART_OVERRIDES \
+ > $LOG_FILE 2>&1
+
+ if [[ $VERBOSE == "true" ]]; then
+ cat $LOG_FILE
+ else
+ echo "release ${RELEASE}-${subchart} deployed"
+ fi
+ fi
+ else
+ array=($(helm ls -q | grep "${RELEASE}-${subchart}"))
+ n=${#array[*]}
+ for (( i = n-1; i >= 0; i-- )); do
+ helm del "${array[i]}" --purge
+ done
fi
done
-}
-if [[ $# < 2 ]]; then
- usage
- exit 0
-fi
+ # report on success/failures of installs/upgrades
+ helm ls | grep FAILED | grep $RELEASE
+}
case "${1:-"help"}" in
"help")
diff --git a/kubernetes/helm/plugins/undeploy/undeploy.sh b/kubernetes/helm/plugins/undeploy/undeploy.sh
index 02b5d34c65..8191174314 100755
--- a/kubernetes/helm/plugins/undeploy/undeploy.sh
+++ b/kubernetes/helm/plugins/undeploy/undeploy.sh
@@ -21,7 +21,7 @@ undeploy() {
RELEASE=$1
FLAGS=$2
- array=($(helm ls -q | grep $RELEASE))
+ array=($(helm ls -q --all | grep $RELEASE))
n=${#array[*]}
for (( i = n-1; i >= 0; i-- ))
do
diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml
index 545a7bd73e..190a9ec67d 100644
--- a/kubernetes/onap/values.yaml
+++ b/kubernetes/onap/values.yaml
@@ -47,15 +47,11 @@ global:
persistence:
mountPath: /dockerdata-nfs
- # flag to enable debugging - application support required
- debugEnabled: false
-
# override default resource limit flavor for all charts
flavor: unlimited
-# Repository for creation of nexus3.onap.org secret
-repository: nexus3.onap.org:10001
-
+ # flag to enable debugging - application support required
+ debugEnabled: false
#################################################################
# Enable/disable and configure helm charts (ie. applications)