Fixing up to be in sync with latest devstack.
This commit is contained in:
parent
f402f69347
commit
e06e0ce626
@ -2,6 +2,9 @@
|
||||
# We allow simple comments (lines starting with a hash symbol)
|
||||
{
|
||||
"ubuntu-oneiric": {
|
||||
"iso8601": {
|
||||
"version": "0.1.4"
|
||||
}
|
||||
},
|
||||
"rhel-6": {
|
||||
"SQLAlchemy": {
|
||||
@ -10,6 +13,7 @@
|
||||
"Routes": {
|
||||
"version": "1.12.3"
|
||||
},
|
||||
|
||||
#the base is 2.0, need to upgrade
|
||||
"pycrypto": {
|
||||
"version": "2.5",
|
||||
@ -20,6 +24,9 @@
|
||||
#https://answers.launchpad.net/nova/+question/174160
|
||||
"PasteDeploy": {
|
||||
"version": "1.5"
|
||||
},
|
||||
"iso8601": {
|
||||
"version": "0.1.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
# We allow simple comments (lines starting with a hash symbol)
|
||||
{
|
||||
"ubuntu-oneiric": {
|
||||
"iso8601": {
|
||||
"version": "0.1.4"
|
||||
}
|
||||
},
|
||||
"rhel-6": {
|
||||
"SQLAlchemy": {
|
||||
@ -28,6 +31,9 @@
|
||||
#https://answers.launchpad.net/nova/+question/174160
|
||||
"PasteDeploy": {
|
||||
"version": "1.5"
|
||||
},
|
||||
"iso8601": {
|
||||
"version": "0.1.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,4 @@
|
||||
# Based off of horizon_settings.py from commit 30439a6dc4
|
||||
# With a change to allow OPENSTACK_HOST to come in from
|
||||
# the new script instead of being fixed. Also
|
||||
# QUANTUM_ENABLED was made a param.
|
||||
# Based off of horizon_settings.py from commit 7bd3087e73c0683acf5df40d1eed51709d865c06
|
||||
|
||||
import os
|
||||
|
||||
@ -54,13 +51,6 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
|
||||
|
||||
SWIFT_PAGINATE_LIMIT = 100
|
||||
|
||||
# Configure quantum connection details for networking
|
||||
QUANTUM_ENABLED = %QUANTUM_ENABLED%
|
||||
QUANTUM_URL = '%s' % OPENSTACK_HOST
|
||||
QUANTUM_PORT = '9696'
|
||||
QUANTUM_TENANT = '1234'
|
||||
QUANTUM_CLIENT_VERSION='0.1'
|
||||
|
||||
# If you have external monitoring links, eg:
|
||||
# EXTERNAL_MONITORING = [
|
||||
# ['Nagios','http://foo.com'],
|
||||
|
@ -1,4 +1,4 @@
|
||||
# From devstack commit 6a3f607272 with no modifications
|
||||
# From devstack commit 5f9473e8b9bdc15f42db597d5d1e766b760f764e with no modifications
|
||||
|
||||
# config for TemplatedCatalog, using camelCase because I don't want to do
|
||||
# translations for legacy compat
|
||||
@ -8,12 +8,18 @@ catalog.RegionOne.identity.internalURL = http://%SERVICE_HOST%:$(public_port)s/v
|
||||
catalog.RegionOne.identity.name = 'Identity Service'
|
||||
|
||||
|
||||
catalog.RegionOne.compute.publicURL = http://%SERVICE_HOST%:8774/v1.1/$(tenant_id)s
|
||||
catalog.RegionOne.compute.adminURL = http://%SERVICE_HOST%:8774/v1.1/$(tenant_id)s
|
||||
catalog.RegionOne.compute.internalURL = http://%SERVICE_HOST%:8774/v1.1/$(tenant_id)s
|
||||
catalog.RegionOne.compute.publicURL = http://%SERVICE_HOST%:8774/v2/$(tenant_id)s
|
||||
catalog.RegionOne.compute.adminURL = http://%SERVICE_HOST%:8774/v2/$(tenant_id)s
|
||||
catalog.RegionOne.compute.internalURL = http://%SERVICE_HOST%:8774/v2/$(tenant_id)s
|
||||
catalog.RegionOne.compute.name = 'Compute Service'
|
||||
|
||||
|
||||
catalog.RegionOne.volume.publicURL = http://%SERVICE_HOST%:8776/v1/$(tenant_id)s
|
||||
catalog.RegionOne.volume.adminURL = http://%SERVICE_HOST%:8776/v1/$(tenant_id)s
|
||||
catalog.RegionOne.volume.internalURL = http://%SERVICE_HOST%:8776/v1/$(tenant_id)s
|
||||
catalog.RegionOne.volume.name = 'Volume Service'
|
||||
|
||||
|
||||
catalog.RegionOne.ec2.publicURL = http://%SERVICE_HOST%:8773/services/Cloud
|
||||
catalog.RegionOne.ec2.adminURL = http://%SERVICE_HOST%:8773/services/Admin
|
||||
catalog.RegionOne.ec2.internalURL = http://%SERVICE_HOST%:8773/services/Cloud
|
||||
@ -25,8 +31,4 @@ catalog.RegionOne.image.adminURL = http://%SERVICE_HOST%:9292/v1
|
||||
catalog.RegionOne.image.internalURL = http://%SERVICE_HOST%:9292/v1
|
||||
catalog.RegionOne.image.name = 'Image Service'
|
||||
|
||||
|
||||
catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s
|
||||
catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/
|
||||
catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s
|
||||
catalog.RegionOne.object_store.name = 'Swift Service'
|
||||
# More might be added in (in code)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# From devstack commit bd13b708f2 with some modifications
|
||||
# From devstack commit 5f9473e8b9bdc15f42db597d5d1e766b760f764e with some modifications
|
||||
set -o errexit
|
||||
|
||||
# These are used by keystone commands below
|
||||
@ -41,6 +41,15 @@ DEMO_USER=`get_id keystone user-create \
|
||||
--pass="$ADMIN_PASSWORD" \
|
||||
--email=$DUMMY_EMAIL`
|
||||
|
||||
# Detect if the keystone cli binary has the command names changed
|
||||
# in https://review.openstack.org/4375
|
||||
# FIXME(dtroyer): Remove the keystone client command checking
|
||||
# after a suitable transition period. add-user-role
|
||||
# and ec2-create-credentials were renamed
|
||||
if keystone help | grep -q user-role-add; then
|
||||
KEYSTONE_COMMAND_4375=1
|
||||
fi
|
||||
|
||||
# Roles
|
||||
ADMIN_ROLE=`get_id keystone role-create --name=$ADMIN_USERNAME`
|
||||
MEMBER_ROLE=`get_id keystone role-create --name=$MEMBER_ROLE_NAME`
|
||||
@ -51,17 +60,33 @@ NETADMIN_ROLE=`get_id keystone role-create --name=$NETADMIN_ROLE_NAME`
|
||||
|
||||
# Added 2>&1 >/dev/null to all (NOT IN ORIGINAL)
|
||||
|
||||
# Add Roles to Users in Tenants
|
||||
keystone add-user-role $ADMIN_USER $ADMIN_ROLE $ADMIN_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $MEMBER_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $SYSADMIN_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $NETADMIN_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $MEMBER_ROLE $INVIS_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $ADMIN_USER $ADMIN_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
if [[ -n "$KEYSTONE_COMMAND_4375" ]]; then
|
||||
# Add Roles to Users in Tenants
|
||||
keystone user-role-add --user $ADMIN_USER --role $ADMIN_ROLE --tenant_id $ADMIN_TENANT 2>&1 >/dev/null
|
||||
keystone user-role-add --user $DEMO_USER --role $MEMBER_ROLE --tenant_id $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone user-role-add --user $DEMO_USER --role $SYSADMIN_ROLE --tenant_id $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone user-role-add --user $DEMO_USER --role $NETADMIN_ROLE --tenant_id $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone user-role-add --user $DEMO_USER --role $MEMBER_ROLE --tenant_id $INVIS_TENANT 2>&1 >/dev/null
|
||||
keystone user-role-add --user $ADMIN_USER --role $ADMIN_ROLE --tenant_id $DEMO_TENANT 2>&1 >/dev/null
|
||||
|
||||
# TODO(termie): these two might be dubious
|
||||
keystone add-user-role $ADMIN_USER $KEYSTONEADMIN_ROLE $ADMIN_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $ADMIN_USER $KEYSTONESERVICE_ROLE $ADMIN_TENANT 2>&1 >/dev/null
|
||||
# TODO(termie): these two might be dubious
|
||||
keystone user-role-add --user $ADMIN_USER --role $KEYSTONEADMIN_ROLE --tenant_id $ADMIN_TENANT 2>&1 >/dev/null
|
||||
keystone user-role-add --user $ADMIN_USER --role $KEYSTONESERVICE_ROLE --tenant_id $ADMIN_TENANT 2>&1 >/dev/null
|
||||
else
|
||||
### compat
|
||||
# Add Roles to Users in Tenants
|
||||
keystone add-user-role $ADMIN_USER $ADMIN_ROLE $ADMIN_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $MEMBER_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $SYSADMIN_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $NETADMIN_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $DEMO_USER $MEMBER_ROLE $INVIS_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $ADMIN_USER $ADMIN_ROLE $DEMO_TENANT 2>&1 >/dev/null
|
||||
|
||||
# TODO(termie): these two might be dubious
|
||||
keystone add-user-role $ADMIN_USER $KEYSTONEADMIN_ROLE $ADMIN_TENANT 2>&1 >/dev/null
|
||||
keystone add-user-role $ADMIN_USER $KEYSTONESERVICE_ROLE $ADMIN_TENANT 2>&1 >/dev/null
|
||||
###
|
||||
fi
|
||||
|
||||
# Services
|
||||
keystone service-create \
|
||||
@ -84,19 +109,44 @@ keystone service-create \
|
||||
--type=identity \
|
||||
--description="Keystone Identity Service" 2>&1 >/dev/null
|
||||
|
||||
|
||||
if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then
|
||||
keystone service-create \
|
||||
--name="nova-volume" \
|
||||
--type=volume \
|
||||
--description="Nova Volume Service" 2>&1 >/dev/null
|
||||
fi
|
||||
|
||||
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
|
||||
keystone service-create \
|
||||
--name=swift \
|
||||
--type="object-store" \
|
||||
--description="Swift Service" 2>&1 >/dev/null
|
||||
fi
|
||||
|
||||
# Create ec2 creds and parse the secret and access key returned
|
||||
RESULT=`keystone ec2-create-credentials --tenant_id=$ADMIN_TENANT --user_id=$ADMIN_USER`
|
||||
if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
|
||||
keystone service-create \
|
||||
--name=quantum \
|
||||
--type=network \
|
||||
--description="Quantum Service" 2>&1 >/dev/null
|
||||
fi
|
||||
|
||||
|
||||
# create ec2 creds and parse the secret and access key returned
|
||||
if [[ -n "$KEYSTONE_COMMAND_4375" ]]; then
|
||||
RESULT=`keystone ec2-credentials-create --tenant_id=$ADMIN_TENANT --user=$ADMIN_USER`
|
||||
else
|
||||
RESULT=`keystone ec2-create-credentials --tenant_id=$ADMIN_TENANT --user_id=$ADMIN_USER`
|
||||
fi
|
||||
echo `$@ | grep id | awk '{print $4}'`
|
||||
ADMIN_ACCESS=`echo "$RESULT" | grep access | awk '{print $4}'`
|
||||
ADMIN_SECRET=`echo "$RESULT" | grep secret | awk '{print $4}'`
|
||||
RESULT=`keystone ec2-create-credentials --tenant_id=$DEMO_TENANT --user_id=$DEMO_USER`
|
||||
|
||||
|
||||
if [[ -n "$KEYSTONE_COMMAND_4375" ]]; then
|
||||
RESULT=`keystone ec2-credentials-create --tenant_id=$DEMO_TENANT --user=$DEMO_USER`
|
||||
else
|
||||
RESULT=`keystone ec2-create-credentials --tenant_id=$DEMO_TENANT --user_id=$DEMO_USER`
|
||||
fi
|
||||
DEMO_ACCESS=`echo "$RESULT" | grep access | awk '{print $4}'`
|
||||
DEMO_SECRET=`echo "$RESULT" | grep secret | awk '{print $4}'`
|
||||
|
||||
|
@ -77,6 +77,21 @@ WAIT_ONLINE_TO = settings.WAIT_ALIVE_SECS
|
||||
#config keys we warm up so u won't be prompted later
|
||||
WARMUP_PWS = ['horizon_keystone_admin', 'service_token']
|
||||
|
||||
#swift template additions
|
||||
SWIFT_TEMPL_ADDS = ['catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s',
|
||||
'catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s',
|
||||
'catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/',
|
||||
'catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_$(tenant_id)s',
|
||||
"catalog.RegionOne.object_store.name = 'Swift Service'",
|
||||
'', '']
|
||||
|
||||
#quantum template additions
|
||||
QUANTUM_TEMPL_ADDS = ['catalog.RegionOne.network.publicURL = http://%SERVICE_HOST%:9696/',
|
||||
'catalog.RegionOne.network.adminURL = http://%SERVICE_HOST%:9696/',
|
||||
'catalog.RegionOne.network.internalURL = http://%SERVICE_HOST%:9696/',
|
||||
"catalog.RegionOne.network.name = 'Quantum Service'",
|
||||
'', '']
|
||||
|
||||
|
||||
class KeystoneUninstaller(comp.PythonUninstallComponent):
|
||||
def __init__(self, *args, **kargs):
|
||||
@ -163,6 +178,16 @@ class KeystoneInstaller(comp.PythonInstallComponent):
|
||||
self.tracewriter.file_touched(log_filename)
|
||||
#we might need to handle more in the future...
|
||||
#nothing modified so just return the original
|
||||
elif name == CATALOG_CONF:
|
||||
nlines = list()
|
||||
if settings.SWIFT in self.instances or not self.instances:
|
||||
nlines.extend(SWIFT_TEMPL_ADDS)
|
||||
if settings.QUANTUM in self.instances or not self.instances:
|
||||
nlines.extend(QUANTUM_TEMPL_ADDS)
|
||||
if nlines:
|
||||
nlines.insert(0, "")
|
||||
nlines.insert(0, contents)
|
||||
contents = cfg.add_header(name, utils.joinlinesep(*nlines))
|
||||
return contents
|
||||
|
||||
def _get_source_config(self, config_fn):
|
||||
|
Loading…
x
Reference in New Issue
Block a user