summaryrefslogtreecommitdiffstats
path: root/keystone-moon/tools/sample_data.sh
diff options
context:
space:
mode:
authorDUVAL Thomas <thomas.duval@orange.com>2016-06-09 09:11:50 +0200
committerDUVAL Thomas <thomas.duval@orange.com>2016-06-09 09:11:50 +0200
commit2e7b4f2027a1147ca28301e4f88adf8274b39a1f (patch)
tree8b8d94001ebe6cc34106cf813b538911a8d66d9a /keystone-moon/tools/sample_data.sh
parenta33bdcb627102a01244630a54cb4b5066b385a6a (diff)
Update Keystone core to Mitaka.
Change-Id: Ia10d6add16f4a9d25d1f42d420661c46332e69db
Diffstat (limited to 'keystone-moon/tools/sample_data.sh')
-rwxr-xr-xkeystone-moon/tools/sample_data.sh49
1 files changed, 39 insertions, 10 deletions
diff --git a/keystone-moon/tools/sample_data.sh b/keystone-moon/tools/sample_data.sh
index bb1eada8..ce407431 100755
--- a/keystone-moon/tools/sample_data.sh
+++ b/keystone-moon/tools/sample_data.sh
@@ -32,10 +32,11 @@
# Tenant User Roles
# -------------------------------------------------------
# demo admin admin
-# service glance admin
-# service nova admin
-# service ec2 admin
-# service swift admin
+# service glance service
+# service nova service
+# service ec2 service
+# service swift service
+# service neutron service
# By default, passwords used are those in the OpenStack Install and Deploy Manual.
# One can override these (publicly known, and hence, insecure) passwords by setting the appropriate
@@ -53,6 +54,7 @@ NOVA_PASSWORD=${NOVA_PASSWORD:-${SERVICE_PASSWORD:-nova}}
GLANCE_PASSWORD=${GLANCE_PASSWORD:-${SERVICE_PASSWORD:-glance}}
EC2_PASSWORD=${EC2_PASSWORD:-${SERVICE_PASSWORD:-ec2}}
SWIFT_PASSWORD=${SWIFT_PASSWORD:-${SERVICE_PASSWORD:-swiftpass}}
+NEUTRON_PASSWORD=${NEUTRON_PASSWORD:-${SERVICE_PASSWORD:-neutron}}
CONTROLLER_PUBLIC_ADDRESS=${CONTROLLER_PUBLIC_ADDRESS:-localhost}
CONTROLLER_ADMIN_ADDRESS=${CONTROLLER_ADMIN_ADDRESS:-localhost}
@@ -99,6 +101,14 @@ function get_id () {
}
#
+# Roles
+#
+
+openstack role create admin
+
+openstack role create service
+
+#
# Default tenant
#
openstack project create demo \
@@ -107,8 +117,6 @@ openstack project create demo \
openstack user create admin --project demo \
--password "${ADMIN_PASSWORD}"
-openstack role create admin
-
openstack role add --user admin \
--project demo\
admin
@@ -124,28 +132,35 @@ openstack user create glance --project service\
openstack role add --user glance \
--project service \
- admin
+ service
openstack user create nova --project service\
--password "${NOVA_PASSWORD}"
openstack role add --user nova \
--project service \
- admin
+ service
openstack user create ec2 --project service \
--password "${EC2_PASSWORD}"
openstack role add --user ec2 \
--project service \
- admin
+ service
openstack user create swift --project service \
--password "${SWIFT_PASSWORD}" \
openstack role add --user swift \
--project service \
- admin
+ service
+
+openstack user create neutron --project service \
+ --password "${NEUTRON_PASSWORD}" \
+
+openstack role add --user neutron \
+ --project service \
+ service
#
# Keystone service
@@ -231,6 +246,20 @@ if [[ -z "$DISABLE_ENDPOINTS" ]]; then
swift
fi
+#
+# Neutron service
+#
+openstack service create --name=neutron \
+ --description="Neutron Network Service" \
+ network
+if [[ -z "$DISABLE_ENDPOINTS" ]]; then
+ openstack endpoint create --region RegionOne \
+ --publicurl "http://$CONTROLLER_PUBLIC_ADDRESS:9696" \
+ --adminurl "http://$CONTROLLER_ADMIN_ADDRESS:9696" \
+ --internalurl "http://$CONTROLLER_INTERNAL_ADDRESS:9696" \
+ neutron
+fi
+
# create ec2 creds and parse the secret and access key returned
ADMIN_USER=$(get_id openstack user show admin)
RESULT=$(openstack ec2 credentials create --project service --user $ADMIN_USER)