From 6e1a341bd8185cf69b16541f36f2a366d5cf111d Mon Sep 17 00:00:00 2001 From: Zhe Huang Date: Wed, 22 Apr 2020 21:40:57 -0400 Subject: [PATCH] Fix bugs in AUX deployment This patch fixes bugs in ONAP portal and AAF. Signed-off-by: Zhe Huang Change-Id: Ic626e84eba05fcaac14e8f15ba4c95b8a1eac61e --- bin/deploy-ric-aux | 2 +- ric-aux/RECIPE_EXAMPLE/example_recipe.yaml | 4 +- ric-aux/bin/install | 98 ++++++++++++++++++++++ .../charts/aaf-sshsm-distcenter/templates/job.yaml | 2 +- .../charts/aaf-sshsm-testca/templates/job.yaml | 8 +- ric-aux/helm/infrastructure/requirements.yaml | 4 + .../subcharts/kong/templates/deployment.yaml | 40 +++++++++ .../charts/portal-app/templates/deployment.yaml | 2 +- .../resources/config/mariadb/oom_updates.sql | 2 - ric-dep | 2 +- 10 files changed, 152 insertions(+), 12 deletions(-) diff --git a/bin/deploy-ric-aux b/bin/deploy-ric-aux index 1d8ba538..3816f7e3 100755 --- a/bin/deploy-ric-aux +++ b/bin/deploy-ric-aux @@ -65,7 +65,7 @@ cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $HELM_HOME/repository/local/ AUX_COMMON_CHART_VERSION=$(cat $ROOT_DIR/../ric-common/Common-Template/helm/aux-common/Chart.yaml | grep version | awk '{print $2}') helm package -d /tmp $ROOT_DIR/../ric-common/Common-Template/helm/aux-common -cp /tmp/aux-common-$COMMON_CHART_VERSION.tgz $HELM_HOME/repository/local/ +cp /tmp/aux-common-$AUX_COMMON_CHART_VERSION.tgz $HELM_HOME/repository/local/ helm repo index $HELM_HOME/repository/local/ diff --git a/ric-aux/RECIPE_EXAMPLE/example_recipe.yaml b/ric-aux/RECIPE_EXAMPLE/example_recipe.yaml index 81c9d3a1..cda2d987 100644 --- a/ric-aux/RECIPE_EXAMPLE/example_recipe.yaml +++ b/ric-aux/RECIPE_EXAMPLE/example_recipe.yaml @@ -19,7 +19,7 @@ #------------------------------------------------------------------------- common: - releasePrefix: r3 + releasePrefix: r4 # If a local docker registry is used, please specify it using the following option # localregistry: nexus3.o-ran-sc.org:10004 @@ -60,7 +60,7 @@ dashboard: image: registry: nexus3.o-ran-sc.org:10004/o-ran-sc name: ric-dashboard - tag: 2.0.0 + tag: 2.0.1 cipher: enc: key: AGLDdG4D04BKm2IxIWEr8o== diff --git a/ric-aux/bin/install b/ric-aux/bin/install index 360b32be..da9bc362 100755 --- a/ric-aux/bin/install +++ b/ric-aux/bin/install @@ -133,6 +133,28 @@ if [ -z "$FOUND_STORAGECLASS" ] && $LABELFOUND; then fi +LABELFOUND=false +for f in $NODENAME; do + LABEL=$(kubectl describe node $f | grep "portal-storage=enable") + if [ ! -z "$LABEL" ]; then + LABELFOUND=true + fi +done + +if ! $LABELFOUND; then + echo "***********************************************************************************************" + echo "* ERROR!!!!!!!!!!!!! *" + echo "***********************************************************************************************" + echo "* Nodes label \"portal-storage=enable\" is not found in any of the cluster node. *" + echo "* Please pick a node and label it using the following command. i *" + echo "* kubectl label --overwrite nodes portal-storage=enable *" + echo "***********************************************************************************************" + + exit 1 +fi + + + if ! kubectl get ns ${AUXNAMESPACE:-ricaux}> /dev/null 2>&1; then kubectl create ns ${AUXNAMESPACE:-ricaux} fi @@ -143,9 +165,85 @@ if ! kubectl get ns onap > /dev/null 2>&1; then kubectl create ns onap fi +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"jobs.batch \"ricaux-portal-db-config\" is forbidden: User \"system:serviceaccount:ricaux:default\" cannot get resource \"jobs/status\" in API group \"batch\" in the namespace \"ricaux\"","reason":"Forbidden","details":{"name":"ricaux-portal-db-config","group":"batch","kind":"jobs"},"code":403} + + +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods is forbidden: User \"system:serviceaccount:onap:default\" cannot list resource \"pods\" in API group \"\" in the namespace \"onap\"","reason":"Forbidden","details":{"kind":"pods"},"code":403} + + + +echo Add cluster roles + cat >ricaux-role.yaml <