From 552eb7c2eefd4b1056c6181a432b8055bae306cb Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 27 Feb 2017 21:41:57 +0000 Subject: [PATCH] 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 --- README.md | 4 ++-- doc/source/configuration.rst | 2 +- man/novajoin-server.1 | 2 +- scripts/novajoin-install | 16 ++++++++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0fbd5e3..dab8a17 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 58dfacf..02e5839 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -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 ~~~~~~~~~~~~~~~~ diff --git a/man/novajoin-server.1 b/man/novajoin-server.1 index 97a6f67..1008453 100644 --- a/man/novajoin-server.1 +++ b/man/novajoin-server.1 @@ -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 diff --git a/scripts/novajoin-install b/scripts/novajoin-install index 7a16ad6..37508f1 100755 --- a/scripts/novajoin-install +++ b/scripts/novajoin-install @@ -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',