Use proper default port, set paste config, service creds

The old default port, 9999, was being set in a few places.

In novajoin-install, the standalone installer, a few things
were not being configure.

- The join api_paste_config option wasn't being set
- The service credentials section was incomplete

Change-Id: I3169c68d29be11edea52c74535ae43b75884fb66
This commit is contained in:
Rob Crittenden 2017-02-27 21:41:57 +00:00
parent ab784a4029
commit 552eb7c2ee
4 changed files with 18 additions and 6 deletions

View File

@ -94,7 +94,7 @@ novajoin REST service and enable notifications in
/etc/nova/nova.conf:
vendordata_providers = StaticJSON, DynamicJSON
vendordata_dynamic_targets = 'join@http://127.0.0.1:9999/v1/'
vendordata_dynamic_targets = 'join@http://127.0.0.1:9090/v1/'
vendordata_dynamic_connect_timeout = 5
vendordata_dynamic_read_timeout = 30
vendordata_jsonfile_path = /etc/nova/cloud-config-novajoin.json
@ -145,7 +145,7 @@ Metadata REST Service Configuration
The REST service is configured in /etc/nova/join.conf in the DEFAULT
section. It provides the following options:
- join_listen_port: The TCP port to listen on. Defaults to 9999.
- join_listen_port: The TCP port to listen on. Defaults to 9090.
- api_paste_config: The paste configuration file to use.
- debug: Enable additional debugging output. Default is False.
- auth_strategy: The authentication strategy to use

View File

@ -9,7 +9,7 @@ DEFAULT
join_listen_port
~~~~~~~~~~~~~~~~
Port that the REST service listens on. Default 9999.
Port that the REST service listens on. Default 9090.
api_paste_config
~~~~~~~~~~~~~~~~

View File

@ -30,7 +30,7 @@ configures the keystone client to handle Openstack tokens.
The DEFAULT section options are:
\fRjoin_listen_port\fB = \fI9999\fR
\fRjoin_listen_port\fB = \fI9090\fR
Port the service listens \fIon\fR
.TP
\fRapi_paste_config\fB = \fI/etc/nova/join-api-paste.ini\fR

View File

@ -99,7 +99,7 @@ def install(opts):
novajoin = configure_ipa.NovajoinRole(user=opts.user)
if not opts.no_kinit:
novajoin.kinit(opts.principal, opts.password)
novajoin.kinit(opts.principal, api.env.realm, opts.password)
try:
api.Backend.rpcclient.connect()
@ -111,8 +111,20 @@ def install(opts):
config = SafeConfigParser()
config.read(JOINCONF)
config.set('DEFAULT', 'domain', api.env.domain) # pylint: disable=no-member
config.set('DEFAULT',
'api_paste_config',
'/etc/nova/join-api-paste.ini')
if not config.has_section('service_credentials'):
config.add_section('service_credentials')
config.set('service_credentials', 'auth_url', opts.keystone_auth_url)
config.set('service_credentials', 'password', opts.nova_password)
config.set('service_credentials', 'username', 'nova')
config.set('service_credentials', 'auth_type', 'password')
config.set('service_credentials', 'project_domain_name', 'default')
config.set('service_credentials', 'project_name', 'service')
config.set('service_credentials', 'user_domain_id', 'default')
with open(JOINCONF, 'w') as f:
config.write(f)
@ -136,7 +148,7 @@ def install(opts):
config.set('DEFAULT',
'vendordata_dynamic_targets',
'join@http://127.0.0.1:9999/v1/')
'join@http://127.0.0.1:9090/v1/')
# Notifications
config.set('DEFAULT',