aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/aks/post-install/bootstrap
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/aks/post-install/bootstrap
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/aks/post-install/bootstrap')
-rwxr-xr-xdeployment/aks/post-install/bootstrap/create_cloud_site.sh10
1 files changed, 6 insertions, 4 deletions
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'"