diff options
author | Ruan HE <ruan.he@orange.com> | 2016-06-09 08:12:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-06-09 08:12:34 +0000 |
commit | 4bc079a2664f9a407e332291f34d174625a9d5ea (patch) | |
tree | 7481cd5d0a9b3ce37c44c797a1e0d39881221cbe /keystone-moon/tools/sample_data.sh | |
parent | 2f179c5790fbbf6144205d3c6e5089e6eb5f048a (diff) | |
parent | 2e7b4f2027a1147ca28301e4f88adf8274b39a1f (diff) |
Merge "Update Keystone core to Mitaka."
Diffstat (limited to 'keystone-moon/tools/sample_data.sh')
-rwxr-xr-x | keystone-moon/tools/sample_data.sh | 49 |
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) |