Adding openrc and a script for updating a site 71/1971/1
authorGeorg Kunz <georg.kunz@ericsson.com>
Wed, 13 Nov 2019 19:10:55 +0000 (19:10 +0000)
committerGeorg Kunz <georg.kunz@ericsson.com>
Wed, 13 Nov 2019 19:10:55 +0000 (19:10 +0000)
For convenience, this patch includes the openrc file for use of the
OpenStack environment deployed by the blueprint. Additionally, it
includes a simple script which updates a site deployment based on a
given rendered site configuration (treasuremap.yaml).

Change-Id: I3912e3258b884aed871f8ce9e1bf5bb00a1c283a

tools/openrc [new file with mode: 0644]
tools/update_software.sh [new file with mode: 0755]

diff --git a/tools/openrc b/tools/openrc
new file mode 100644 (file)
index 0000000..7602b05
--- /dev/null
@@ -0,0 +1,8 @@
+OS_AUTH_URL='http://keystone.openstack.svc.cluster.local:80/v3'
+OS_PROJECT_DOMAIN_NAME=default
+OS_USER_DOMAIN_NAME=default
+OS_PROJECT_NAME=admin
+OS_REGION_NAME=RegionOne
+OS_USERNAME=admin
+OS_IDENTITY_API_VERSION=3
+OS_PASSWORD=password123
diff --git a/tools/update_software.sh b/tools/update_software.sh
new file mode 100755 (executable)
index 0000000..52d03bb
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -x
+TIMESTAMP=$(date +"%Y%m%d%H%M")
+LOGFILE=/var/log/update_software_$TIMESTAMP.log
+echo "logging to $LOGFILE"
+exec 1> >(tee -a $LOGFILE)
+exec 2>&1
+
+# Site specific variables
+export OS_AUTH_URL="http://iam-sw.vran.k2.ericsson.se:80/v3"
+export OS_USERNAME=shipyard
+export OS_PASSWORD=password123
+REGION_NAME=MTN3
+
+tools/airship shipyard create configdocs ${REGION_NAME} --directory=/target/configs/promenade
+
+tools/airship shipyard commit configdocs
+
+tools/airship shipyard create action update_software
+
+tools/airship shipyard get actions
+
+# Monitor the workflow
+#SHIPYARD_ACTION=$(tools/airship shipyard get actions | awk '/update_software/ {print $2};')
+#tools/airship shipyard describe $SHIPYARD_ACTION
+