summaryrefslogtreecommitdiffstats
path: root/ci/generate-admin-rc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/generate-admin-rc.sh')
-rwxr-xr-xci/generate-admin-rc.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/ci/generate-admin-rc.sh b/ci/generate-admin-rc.sh
new file mode 100755
index 0000000..6c5b162
--- /dev/null
+++ b/ci/generate-admin-rc.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+cd `dirname $0`
+
+# TODO: Switch based on installer type, for now this is hard coded to JOID only
+
+if [ ! -d job ]
+then
+ mkdir job
+fi
+
+export OS_AUTH_URL=http://`juju status keystone | grep public | awk '{print $2}'`:5000/v2.0
+export OS_USERNAME=admin
+export OS_PASSWORD=openstack
+export OS_TENANT_ID=`openstack project list|awk '/admin/ {print $2}'`
+
+cat << EOF > job/admin.rc
+OS_AUTH_URL=$OS_AUTH_URL
+OS_USERNAME=$OS_USERNAME
+OS_PASSWORD=$OS_PASSWORD
+OS_TENANT_ID=$OS_TENANT_ID
+OS_TENANT_NAME=admin
+OS_PROJECT_NAME=admin
+OS_REGION_NAME=RegionOne
+EOF
+