aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-08-05 01:31:07 -0400
committerbaigk <baiguoku@huawei.com>2015-08-05 05:36:31 +0000
commit974a3c3bf5b71cd6b07c1b4b51044bc535ff4456 (patch)
tree3047960616cf8e797d86c4bd19cdca06738b122a /deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh
parentd05b5f04c92034eae1675dc8102247a3cc3315f7 (diff)
support deployment openstack juno with ansible for compass in ubuntu 14.04
JIRA: COMPASS-4 Change-Id: I7adc565325c2a0cbf878b2aea022b31d118748dd Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh')
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh
new file mode 100644
index 00000000..0ec61b64
--- /dev/null
+++ b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder_init.sh
@@ -0,0 +1,6 @@
+keystone --os-token={{ ADMIN_TOKEN }} --os-endpoint=http://{{ HA_VIP }}:35357/v2.0 user-create --name=cinder --pass={{ CINDER_PASS }} --email=cinder@example.com
+keystone --os-token={{ ADMIN_TOKEN }} --os-endpoint=http://{{ HA_VIP }}:35357/v2.0 user-role-add --user=cinder --tenant=service --role=admin
+
+keystone --os-token={{ ADMIN_TOKEN }} --os-endpoint=http://{{ HA_VIP }}:35357/v2.0 service-create --name=cinder --type=volume --description="OpenStack Block Storage"
+keystone --os-token={{ ADMIN_TOKEN }} --os-endpoint=http://{{ HA_VIP }}:35357/v2.0 endpoint-create --service-id=$(keystone --os-token={{ ADMIN_TOKEN }} --os-endpoint=http://{{ HA_VIP }}:35357/v2.0 service-list | awk '/ volume / {print $2}') --publicurl=http://{{ HA_VIP }}:8776/v1/%\(tenant_id\)s --internalurl=http://{{ HA_VIP }}:8776/v1/%\(tenant_id\)s --adminurl=http://{{ HA_VIP }}:8776/v1/%\(tenant_id\)s
+