Corrected keystone bootstrapping command

- the original invocation of keystone-manage bootstrap was in the wrong recipe,
  so it needed to be moved to server-apache for resource ordering. restored the
  original flags used
- regen .rubocop_todo.yml to satisfy rubocop
- bumped revision in metadata

Closes-Bug: #1714510
Change-Id: I9d3916e7f306d4c0463ec93cad40d2e78bd7eed8
This commit is contained in:
Samuel Cassiba 2017-09-01 10:12:29 -04:00
parent 49504d3b51
commit b506a894c8
4 changed files with 31 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-08-01 10:39:17 -0400 using RuboCop version 0.47.1.
# on 2017-09-01 10:28:48 -0400 using RuboCop version 0.47.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@ -9,7 +9,7 @@
# Offense count: 20
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 408
Max: 395
# Offense count: 4
# Configuration parameters: EnforcedStyle, SupportedStyles.

View File

@ -4,7 +4,7 @@ maintainer_email 'openstack-dev@lists.openstack.org'
license 'Apache 2.0'
description 'The OpenStack Identity service Keystone.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '15.0.0'
version '15.0.1'
%w(ubuntu redhat centos).each do |os|
supports os

View File

@ -53,7 +53,10 @@ identity_internal_endpoint = internal_endpoint 'identity'
identity_public_endpoint = public_endpoint 'identity'
# define the credentials to use for the initial admin user
admin_project = node['openstack']['identity']['admin_project']
admin_user = node['openstack']['identity']['admin_user']
admin_pass = get_password 'user', node['openstack']['identity']['admin_user']
admin_role = node['openstack']['identity']['admin_role']
region = node['openstack']['identity']['region']
keystone_user = node['openstack']['identity']['user']
keystone_group = node['openstack']['identity']['group']
@ -270,9 +273,17 @@ execute 'keystone-manage db_sync' do
end
# bootstrap keystone after keystone.conf is generated
execute 'keystone bootstrap' do
user 'root'
command "keystone-manage bootstrap --bootstrap-password \"#{admin_pass}\" --bootstrap-region-id \"#{region}\" --bootstrap-admin-url #{identity_admin_endpoint} --bootstrap-public-url #{identity_public_endpoint} --bootstrap-internal-url #{identity_internal_endpoint}"
execute 'bootstrap_keystone' do
command "keystone-manage bootstrap \\
--bootstrap-password #{admin_pass} \\
--bootstrap-username #{admin_user} \\
--bootstrap-project-name #{admin_project} \\
--bootstrap-role-name #{admin_role} \\
--bootstrap-service-name keystone \\
--bootstrap-region-id #{region} \\
--bootstrap-admin-url #{identity_admin_endpoint} \\
--bootstrap-public-url #{identity_public_endpoint} \\
--bootstrap-internal-url #{identity_internal_endpoint}"
end
#### Start of Apache specific work

View File

@ -14,7 +14,11 @@ describe 'openstack-identity::server-apache' do
include Helpers
include_context 'identity_stubs'
service_name = 'keystone'
service_user = 'admin'
region = 'RegionOne'
project_name = 'admin'
role_name = 'admin'
password = 'admin'
admin_url = 'http://127.0.0.1:35357/v3'
public_url = 'http://127.0.0.1:5000/v3'
@ -47,7 +51,16 @@ describe 'openstack-identity::server-apache' do
end
it 'bootstrap with keystone-manage' do
expect(chef_run).to run_execute('keystone bootstrap').with(command: "keystone-manage bootstrap --bootstrap-password \"#{password}\" --bootstrap-region-id \"#{region}\" --bootstrap-admin-url #{admin_url} --bootstrap-public-url #{public_url} --bootstrap-internal-url #{internal_url}")
expect(chef_run).to run_execute('bootstrap_keystone').with(command: "keystone-manage bootstrap \\
--bootstrap-password #{password} \\
--bootstrap-username #{service_user} \\
--bootstrap-project-name #{project_name} \\
--bootstrap-role-name #{role_name} \\
--bootstrap-service-name #{service_name} \\
--bootstrap-region-id #{region} \\
--bootstrap-admin-url #{admin_url} \\
--bootstrap-public-url #{public_url} \\
--bootstrap-internal-url #{internal_url}")
end
describe '/etc/keystone' do