summaryrefslogtreecommitdiffstats
path: root/ci/onos/juju-deployer/scripts/openstack.sh
diff options
context:
space:
mode:
authorzhangyuanyou <zhangyuanyou@huawei.com>2015-12-31 12:02:15 +0800
committerzhangyuanyou <zhangyuanyou@huawei.com>2016-01-02 16:55:55 +0800
commit9d5ca8b6a6c9e33a5f8318483ad940eb9918819d (patch)
treee0b626560f05fcc354dcf5704a8d121de39975b1 /ci/onos/juju-deployer/scripts/openstack.sh
parent5a6b66ee8cb3522d3858249f090448cf6d47c326 (diff)
JOID-18 Juju integration with ONOSFW.
Change-Id: Iaffdb78ceb5a4c1a57fce3459289c65d6b6a4f42
Diffstat (limited to 'ci/onos/juju-deployer/scripts/openstack.sh')
-rw-r--r--ci/onos/juju-deployer/scripts/openstack.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/ci/onos/juju-deployer/scripts/openstack.sh b/ci/onos/juju-deployer/scripts/openstack.sh
new file mode 100644
index 00000000..77f97723
--- /dev/null
+++ b/ci/onos/juju-deployer/scripts/openstack.sh
@@ -0,0 +1,44 @@
+#!/bin/sh -ex
+
+configOpenrc()
+{
+ cat <<-EOF
+ export OS_USERNAME=$1
+ export OS_PASSWORD=$2
+ export OS_TENANT_NAME=$3
+ export OS_AUTH_URL=$4
+ export OS_REGION_NAME=$5
+ EOF
+}
+
+unitAddress()
+{
+ juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"public-address\"]" 2> /dev/null
+}
+
+unitMachine()
+{
+ juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"machine\"]" 2> /dev/null
+}
+
+<<<<<<< HEAD
+juju run --service ceph 'sudo ceph osd pool set cinder-ceph size 1'
+juju run --service ceph 'sudo ceph osd pool set cinder-ceph min_size 1'
+=======
+#juju run --service ceph 'sudo ceph osd pool set cinder-ceph size 1'
+#juju run --service ceph 'sudo ceph osd pool set cinder-ceph min_size 1'
+>>>>>>> 69227d1... modified the bundle to include the ceph and cinder changes.
+
+mkdir -m 0700 -p cloud
+controller_address=$(unitAddress keystone 0)
+configOpenrc admin openstack admin http://$controller_address:5000/v2.0 Canonical > cloud/admin-openrc
+chmod 0600 cloud/admin-openrc
+
+machine=$(unitMachine glance 0)
+juju scp glance.sh cloud/admin-openrc $machine:
+juju run --machine $machine ./glance.sh
+
+machine=$(unitMachine nova-cloud-controller 0)
+juju scp cloud-setup.sh cloud/admin-openrc ~/.ssh/id_rsa.pub $machine:
+juju run --machine $machine ./cloud-setup.sh
+