aboutsummaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2020-04-21 15:28:13 -0700
committerBrian Freeman <bf1936@att.com>2020-04-23 12:28:48 +0000
commitd5d74c7ce5f071d2e0417cc3b4b86073fd9b41cc (patch)
tree7f58554dcf13054bc8a6f35d90aac68cd3a480b5 /deployment
parent906480b1b28446660b4a65f249ddf6722fc8b7e6 (diff)
[INT] updating aks install w/ master pass
- Also updating openstack cli to py3 to fix import issues Issue-ID: INT-1557 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: I99cbc68614e0fcc8fd0572fd7c44c7cd431b215b
Diffstat (limited to 'deployment')
-rw-r--r--deployment/aks/cloud.conf2
-rw-r--r--deployment/aks/cloud.conf.example1
-rwxr-xr-xdeployment/aks/cloud.sh7
-rwxr-xr-xdeployment/aks/create_onap.sh7
-rwxr-xr-xdeployment/aks/post-install/bootstrap/create_cloud_site.sh10
-rwxr-xr-xdeployment/aks/util/create_integration_override.sh3
-rwxr-xr-xdeployment/aks/util/create_openstack_cli.sh8
-rwxr-xr-xdeployment/aks/util/create_robot_config.sh3
-rw-r--r--deployment/aks/util/integration_override.template1
9 files changed, 28 insertions, 14 deletions
diff --git a/deployment/aks/cloud.conf b/deployment/aks/cloud.conf
index d37da0e9d..6223670e5 100644
--- a/deployment/aks/cloud.conf
+++ b/deployment/aks/cloud.conf
@@ -84,3 +84,5 @@ OOM_BRANCH=
CHART_VERSION=
OOM_OVERRIDES=
DOCKER_REPOSITORY=
+MASTER_PASSWORD=
+
diff --git a/deployment/aks/cloud.conf.example b/deployment/aks/cloud.conf.example
index 3172be1d9..71bc7bf03 100644
--- a/deployment/aks/cloud.conf.example
+++ b/deployment/aks/cloud.conf.example
@@ -84,3 +84,4 @@ OOM_BRANCH="master"
CHART_VERSION="5.0.0"
OOM_OVERRIDES=""
DOCKER_REPOSITORY="nexus3.onap.org:10001"
+MASTER_PASSWORD=test123
diff --git a/deployment/aks/cloud.sh b/deployment/aks/cloud.sh
index b99865145..a1cbfe888 100755
--- a/deployment/aks/cloud.sh
+++ b/deployment/aks/cloud.sh
@@ -159,6 +159,7 @@ OOM_BRANCH = "$OOM_BRANCH"
CHART_VERSION = "$CHART_VERSION"
OOM_OVERRIDES = "$OOM_OVERRIDES"
DOCKER_REPOSITORY = "$DOCKER_REPOSITORY"
+MASTER_PASSWORD = "$MASTER_PASSWORD"
EOF
@@ -347,7 +348,8 @@ $DIR/util/create_integration_override.sh "$BUILD_DIR" \
"$DOCKER_REPOSITORY" \
"$NFS_PRIVATE_IP" \
"$AKS_PUBLIC_IP_ADDRESS" \
- "$BUILD_DIR/kubeconfig"
+ "$BUILD_DIR/kubeconfig" \
+ "$MASTER_PASSWORD"
fi
@@ -361,7 +363,8 @@ $DIR/create_onap.sh "$BUILD" \
"$OOM_BRANCH" \
"$BUILD_DIR" \
"$CHART_VERSION" \
- "$OOM_OVERRIDES"
+ "$OOM_OVERRIDES" \
+ "$MASTER_PASSWORD"
fi
diff --git a/deployment/aks/create_onap.sh b/deployment/aks/create_onap.sh
index 9a494df2c..958874403 100755
--- a/deployment/aks/create_onap.sh
+++ b/deployment/aks/create_onap.sh
@@ -21,6 +21,7 @@ OOM_BRANCH=$3
BUILD_DIR=$4
CHART_VERSION=$5
OOM_OVERRIDES=$6
+MASTER_PASSWORD=$7
pushd .
@@ -73,13 +74,13 @@ helm repo add stable "https://kubernetes-charts.storage.googleapis.com/"
cp -R helm/plugins/ ~/.helm
-make all
+make all -e SKIP_LINT=TRUE
if [ $? -ne 0 ]; then
echo "Failed building helm charts, exiting..."
exit 1
fi
-make onap
+make onap -e SKIP_LINT=TRUE
if [ $? -ne 0 ]; then
echo "Failed building helm charts, exiting..."
exit 1
@@ -92,7 +93,7 @@ fi
helm repo remove stable
build_name=`echo "$BUILD_NAME" | tr '[:upper:]' '[:lower:]'`
-helm deploy "$build_name" local/onap --version v"$CHART_VERSION" "$OOM_OVERRIDES" --namespace onap "$TEMPLATE_OVERRIDES"
+helm deploy "$build_name" local/onap --version v"$CHART_VERSION" --set "global.masterPassword=$MASTER_PASSWORD" "$OOM_OVERRIDES" --namespace onap "$TEMPLATE_OVERRIDES"
kubectl get pods --namespace onap
diff --git a/deployment/aks/post-install/bootstrap/create_cloud_site.sh b/deployment/aks/post-install/bootstrap/create_cloud_site.sh
index 0253b0e16..daa4dc21d 100755
--- a/deployment/aks/post-install/bootstrap/create_cloud_site.sh
+++ b/deployment/aks/post-install/bootstrap/create_cloud_site.sh
@@ -31,7 +31,7 @@ popd
echo $SO_ENCRYPTED_KEY
-MARIADBPOD_STATUS=`kubectl -n onap get pods | grep mariadb-galera-mariadb-galera | head -1 | awk '{print $3}'`
+MARIADBPOD_STATUS=`kubectl -n onap get pods | grep mariadb-galera | head -1 | awk '{print $3}'`
COUNTER=0
until [ "$MARIADBPOD_STATUS" = "Running" ] || [ $COUNTER -gt 120 ]; do
@@ -40,11 +40,13 @@ COUNTER=$((COUNTER +1))
sleep 10
done
-MARIADBPOD=`kubectl -n onap get pods | grep mariadb-galera-mariadb-galera | head -1 | awk '{print $1}'`
+MARIADBPOD=`kubectl -n onap get pods | grep mariadb-galera | head -1 | awk '{print $1}'`
+MARIADBSECRET=`kubectl -n onap get secrets | grep mariadb-galera-db-root-password | head -1 | awk '{print $1}'`
+MARIADBPASSWORD=`kubectl -n onap get secret $MARIADBSECRET -o jsonpath="{.data.password}" | base64 -d`
COMMAND="INSERT INTO identity_services (id, identity_url, mso_id, mso_pass, admin_tenant, member_role, tenant_metadata, identity_server_type, identity_authentication_type, project_domain_name, user_domain_name) VALUES (\"$OS_ID\", \"http://$OPENSTACK_IP/identity/v3\", \"$OPENSTACK_USER\", \"$SO_ENCRYPTED_KEY\", \"$OPENSTACK_TENANT\", \"$OS_TENANT_ROLE\", 0, \"$OS_KEYSTONE\", \"USERNAME_PASSWORD\", \"default\", \"default\");"
-kubectl -n onap exec -it $MARIADBPOD -- bash -c "mysql -u root --password=secretpassword --database=catalogdb --execute='$COMMAND'"
+kubectl -n onap exec -it $MARIADBPOD -- bash -c "mysql -u root --password='$MARIADBPASSWORD' --database=catalogdb --execute='$COMMAND'"
COMMAND="INSERT INTO cloud_sites (id, region_id, identity_service_id, cloud_version, clli) VALUES (\"$CLOUD_REGION\", \"$OPENSTACK_REGION\", \"$OS_ID\", \"2.5\", \"$CLOUD_REGION\");"
-kubectl -n onap exec -it $MARIADBPOD -- bash -c "mysql -u root --password=secretpassword --database=catalogdb --execute='$COMMAND'"
+kubectl -n onap exec -it $MARIADBPOD -- bash -c "mysql -u root --password='$MARIADBPASSWORD' --database=catalogdb --execute='$COMMAND'"
diff --git a/deployment/aks/util/create_integration_override.sh b/deployment/aks/util/create_integration_override.sh
index 15d853918..88c6f9f3b 100755
--- a/deployment/aks/util/create_integration_override.sh
+++ b/deployment/aks/util/create_integration_override.sh
@@ -22,6 +22,7 @@ DOCKER_REPOSITORY=$4
NFS_IP_ADDR=$5
K8S_01_VM_IP=$6
KUBECONFIG=$7
+MASTER_PASSWORD=$8
. $OPENSTACK_RC
@@ -72,4 +73,4 @@ OS_PROJECT_ID=`kubectl exec $OPENSTACK_CLI_POD -- sh -lc "openstack project show
echo "export OS_PROJECT_ID=$OS_PROJECT_ID" >> "$OPENSTACK_RC"
-$DIR/create_robot_config.sh "$OPENSTACK_RC" "$BUILD_DIR/openstack_params.conf" "$BUILD_DIR" "$DIR/integration_override.template"
+$DIR/create_robot_config.sh "$OPENSTACK_RC" "$BUILD_DIR/openstack_params.conf" "$BUILD_DIR" "$DIR/integration_override.template" "$MASTER_PASSWORD"
diff --git a/deployment/aks/util/create_openstack_cli.sh b/deployment/aks/util/create_openstack_cli.sh
index 01ae88673..8f3f331b3 100755
--- a/deployment/aks/util/create_openstack_cli.sh
+++ b/deployment/aks/util/create_openstack_cli.sh
@@ -39,14 +39,14 @@ spec:
args:
- -c
- apk update && \
- apk add python && \
- apk add py-pip && \
- apk add python-dev && \
+ apk add python3 && \
+ apk add py3-pip && \
+ apk add python3-dev && \
apk add gcc && \
apk add musl-dev && \
apk add libffi-dev && \
apk add openssl-dev && \
- pip install python-openstackclient && \
+ pip3 install python-openstackclient && \
sh -c 'echo ". /openstack/openstack_rc" >> /root/.profile; while true; do sleep 60; done;'
restartPolicy: Never
volumes:
diff --git a/deployment/aks/util/create_robot_config.sh b/deployment/aks/util/create_robot_config.sh
index dea67b858..9c1e15e1b 100755
--- a/deployment/aks/util/create_robot_config.sh
+++ b/deployment/aks/util/create_robot_config.sh
@@ -17,6 +17,7 @@ OPENSTACK_RC=$1
OPENSTACK_PARAM=$2
BUILD_DIR=$3
INTEGRATION_TEMPLATE=$4
+MASTER_PASSWORD=$5
if [ "$OPENSTACK_RC" == "" ]
then
@@ -71,6 +72,8 @@ sed -ir -e "s/__sec_group__/$OS_SEC_GROUP/" $template
sed -ir -e "s/\${OS_UBUNTU_14_IMAGE}/$OS_UBUNTU_14_IMAGE/" $template
sed -ir -e "s/\${OS_UBUNTU_16_IMAGE}/$OS_UBUNTU_16_IMAGE/" $template
+sed -ir -e "s/\${MASTER_PASSWORD}/$MASTER_PASSWORD/" $template
+
sed -ir -e "s/__nfs_ip_addr__/$NFS_IP_ADDR/" $template
sed -ir -e "s/__k8s_01_vm_ip__/$K8S_01_VM_IP/" $template
diff --git a/deployment/aks/util/integration_override.template b/deployment/aks/util/integration_override.template
index 5f24824a3..108357d6d 100644
--- a/deployment/aks/util/integration_override.template
+++ b/deployment/aks/util/integration_override.template
@@ -1,6 +1,7 @@
global:
repository: __docker_proxy__
pullPolicy: IfNotPresent
+ masterPassword: "${MASTER_PASSWORD}"
robot:
enabled: true
flavor: large