Replace port 35357 with 5000

Now that the v2.0 API has been removed, we don't have a reason to
include deployment instructions for two separate applications on
different ports.

Change-Id: Ifb06f5f66db45312c87b07aa77195c77d9a2668c
This commit is contained in:
zhulingjie 2018-05-29 11:43:04 -04:00 committed by Tobias Urdin
parent 4afabd9b25
commit d4479c1bd2
18 changed files with 39 additions and 39 deletions

View File

@ -63,7 +63,7 @@ class { 'keystone::roles::admin':
# Installs the service user endpoint.
class { 'keystone::endpoint':
public_url => 'http://10.16.0.101:5000/v2.0',
admin_url => 'http://10.16.1.101:35357/v2.0',
admin_url => 'http://10.16.1.101:5000/v2.0',
internal_url => 'http://10.16.2.101:5000/v2.0',
region => 'example-1',
}

View File

@ -37,7 +37,7 @@ class { '::keystone::roles::admin':
}
class { '::keystone::endpoint':
public_url => "https://${::fqdn}:5000/",
admin_url => "https://${::fqdn}:35357/",
admin_url => "https://${::fqdn}:5000/",
}
keystone_config { 'ssl/enable': value => true }

View File

@ -56,7 +56,7 @@ class { '::keystone::roles::admin':
class { '::keystone::endpoint':
public_url => "https://${::fqdn}:5000/",
admin_url => "https://${::fqdn}:35357/",
admin_url => "https://${::fqdn}:5000/",
}
keystone_config { 'ssl/enable': value => true }

View File

@ -15,7 +15,7 @@
# $ export OS_PASSWORD=ChangeMe
# $ export OS_PROJECT_NAME=admin
# $ export OS_PROJECT_DOMAIN_NAME=admin_domain
# $ export OS_AUTH_URL=http://keystone.local:35357/v3
# $ export OS_AUTH_URL=http://keystone.local:5000/v3
# $ openstack user list
#
@ -42,5 +42,5 @@ class { '::keystone::roles::admin':
}
class { '::keystone::endpoint':
public_url => 'http://127.0.0.1:5000/',
admin_url => 'http://127.0.0.1:35357/',
admin_url => 'http://127.0.0.1:5000/',
}

View File

@ -23,7 +23,7 @@ class { '::keystone::roles::admin':
}
class { '::keystone::endpoint':
public_url => 'http://192.168.1.1:5000/',
admin_url => 'http://192.168.1.1:35357/',
admin_url => 'http://192.168.1.1:5000/',
}
# Creates the /etc/keystone/domains/keystone.my_domain.conf file and

View File

@ -35,7 +35,7 @@ end
puts `puppet apply -e "package {curl: ensure => present }"`
get_token = %(curl -d '{"auth":{"passwordCredentials":{"username": "#{username}", "password": "#{password}"}}}' -H "Content-type: application/json" http://localhost:35357/v2.0/tokens)
get_token = %(curl -d '{"auth":{"passwordCredentials":{"username": "#{username}", "password": "#{password}"}}}' -H "Content-type: application/json" http://localhost:5000/v2.0/tokens)
token = nil
puts "Running auth command: #{get_token}"
@ -44,12 +44,12 @@ token = PSON.load(run_command(get_token))["access"]["token"]["id"]
if token
puts "We were able to retrieve a token"
puts token
verify_token = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:35357/v2.0/tokens/#{token}"
verify_token = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:5000/v2.0/tokens/#{token}"
puts 'verifying token'
run_command(verify_token)
['endpoints', 'tenants', 'users'].each do |x|
puts "getting #{x}"
get_keystone_data = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:35357/v2.0/#{x}"
get_keystone_data = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:5000/v2.0/#{x}"
run_command(get_keystone_data)
end
end

View File

@ -38,7 +38,7 @@ def run_command(cmd)
end
puts `puppet apply -e "package {curl: ensure => present }"`
get_token = %(curl -D - -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"#{user_domain}"},"name":"#{username}","password": "#{password}"}}},"scope":{"project":{"domain":{"name":"#{project_domain}"},"name": "#{project}"}}}}' -H "Content-type: application/json" http://localhost:35357/v3/auth/tokens)
get_token = %(curl -D - -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"#{user_domain}"},"name":"#{username}","password": "#{password}"}}},"scope":{"project":{"domain":{"name":"#{project_domain}"},"name": "#{project}"}}}}' -H "Content-type: application/json" http://localhost:5000/v3/auth/tokens)
token = nil
puts "Running auth command: #{get_token}"
@ -53,12 +53,12 @@ end
if token
puts "We were able to retrieve a token"
puts token
verify_token = "curl -H 'X-Auth-Token: #{service_token}' 'X-Subject-Token: #{token}' http://localhost:35357/v3/auth/tokens"
verify_token = "curl -H 'X-Auth-Token: #{service_token}' 'X-Subject-Token: #{token}' http://localhost:5000/v3/auth/tokens"
puts 'verifying token'
run_command(verify_token)
['endpoints', 'projects', 'users'].each do |x|
puts "getting #{x}"
get_keystone_data = "curl -H 'X-Auth-Token: #{token}' http://localhost:35357/v3/#{x}"
get_keystone_data = "curl -H 'X-Auth-Token: #{token}' http://localhost:5000/v3/#{x}"
pp PSON.load(run_command(get_keystone_data))
end
end

View File

@ -175,7 +175,7 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack
if url = get_section('DEFAULT', 'admin_endpoint')
endpoint = url.chomp('/')
else
admin_port = get_section('DEFAULT', 'admin_port') || '35357'
admin_port = get_section('DEFAULT', 'admin_port') || '5000'
host = clean_host(get_section('DEFAULT', 'admin_bind_host'))
protocol = ssl? ? 'https' : 'http'
endpoint = "#{protocol}://#{host}:#{admin_port}"

View File

@ -16,7 +16,7 @@
#
# [*admin_url*]
# (optional) Admin url for keystone endpoint.
# Defaults to 'http://127.0.0.1:35357'
# Defaults to 'http://127.0.0.1:5000'
# This url should *not* contain any version or trailing '/'.
#
# [*region*]
@ -48,13 +48,13 @@
# class { 'keystone::endpoint':
# public_url => 'https://154.10.10.23:5000',
# internal_url => 'https://11.0.1.7:5000',
# admin_url => 'https://10.0.1.7:35357',
# admin_url => 'https://10.0.1.7:5000',
# }
#
class keystone::endpoint (
$public_url = 'http://127.0.0.1:5000',
$internal_url = undef,
$admin_url = 'http://127.0.0.1:35357',
$admin_url = 'http://127.0.0.1:5000',
$region = 'RegionOne',
$user_domain = undef,
$project_domain = undef,

View File

@ -317,7 +317,7 @@
# advertised to clients (NOTE: this does NOT affect how keystone listens
# for connections) (string value)
# If set to false, no admin_endpoint will be defined in keystone.conf.
# Sample value: 'http://localhost:35357/'
# Sample value: 'http://localhost:5000/'
# Defaults to $::os_service_default
#
# [*enable_ssl*]

View File

@ -38,7 +38,7 @@
#
# [*admin_endpoint*]
# (optional) The admin endpont to use for validation
# Defaults to 'http://localhost:35357/v2.0'
# Defaults to 'http://localhost:5000/v2.0'
#
# [*retries*]
# (optional) Number of times to retry validation
@ -67,7 +67,7 @@ class keystone::service(
$hasrestart = true,
$validate = false,
$admin_token = undef,
$admin_endpoint = 'http://localhost:35357/v2.0',
$admin_endpoint = 'http://localhost:5000/v2.0',
$retries = 10,
$delay = 2,
$insecure = false,

View File

@ -11,7 +11,7 @@ describe 'keystone::endpoint' do
it { is_expected.to contain_keystone_endpoint('RegionOne/keystone::identity').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:5000',
:admin_url => 'http://127.0.0.1:35357',
:admin_url => 'http://127.0.0.1:5000',
:internal_url => 'http://127.0.0.1:5000',
:region => 'RegionOne'
)}
@ -45,7 +45,7 @@ describe 'keystone::endpoint' do
it { is_expected.to contain_keystone_endpoint('RegionOne/keystone::identity').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:5000/v2.0',
:admin_url => 'http://127.0.0.1:35357/v2.0',
:admin_url => 'http://127.0.0.1:5000/v2.0',
:internal_url => 'http://127.0.0.1:5000/v2.0'
)}
end

View File

@ -88,7 +88,7 @@ describe 'keystone' do
'revoke_driver' => 'kvs',
'revoke_by_id' => false,
'public_endpoint' => 'https://localhost:5000/v2.0/',
'admin_endpoint' => 'https://localhost:35357/v2.0/',
'admin_endpoint' => 'https://localhost:5000/v2.0/',
'enable_ssl' => true,
'ssl_certfile' => '/etc/keystone/ssl/certs/keystone.pem',
'ssl_keyfile' => '/etc/keystone/ssl/private/keystonekey.pem',
@ -710,7 +710,7 @@ describe 'keystone' do
'admin_token' => 'service_token',
'enable_ssl' => true,
'public_endpoint' => 'https://localhost:5000/v2.0/',
'admin_endpoint' => 'https://localhost:35357/v2.0/',
'admin_endpoint' => 'https://localhost:5000/v2.0/',
}
end
it {is_expected.to contain_keystone_config('ssl/enable').with_value(true)}
@ -720,7 +720,7 @@ describe 'keystone' do
it {is_expected.to contain_keystone_config('ssl/ca_key').with_value('/etc/keystone/ssl/private/cakey.pem')}
it {is_expected.to contain_keystone_config('ssl/cert_subject').with_value('/C=US/ST=Unset/L=Unset/O=Unset/CN=localhost')}
it {is_expected.to contain_keystone_config('DEFAULT/public_endpoint').with_value('https://localhost:5000/v2.0/')}
it {is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('https://localhost:35357/v2.0/')}
it {is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('https://localhost:5000/v2.0/')}
end
describe 'when disabling SSL' do
let :params do
@ -868,15 +868,15 @@ describe 'keystone' do
{
:admin_token => 'service_token',
:validate_service => true,
:validate_auth_url => 'http://some.host:35357/v2.0',
:admin_endpoint => 'http://some.host:35357'
:validate_auth_url => 'http://some.host:5000/v2.0',
:admin_endpoint => 'http://some.host:5000'
}
end
it { is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('http://some.host:35357') }
it { is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('http://some.host:5000') }
it { is_expected.to contain_class('keystone::service').with(
'validate' => true,
'admin_endpoint' => 'http://some.host:35357/v2.0'
'admin_endpoint' => 'http://some.host:5000/v2.0'
)}
end
@ -885,13 +885,13 @@ describe 'keystone' do
{
:admin_token => 'service_token',
:validate_service => true,
:admin_endpoint => 'http://some.host:35357'
:admin_endpoint => 'http://some.host:5000'
}
end
it { is_expected.to contain_class('keystone::service').with(
'validate' => true,
'admin_endpoint' => 'http://some.host:35357'
'admin_endpoint' => 'http://some.host:5000'
)}
end

View File

@ -7,7 +7,7 @@ describe 'keystone::resource::authtoken' do
let :params do
{ :username => 'keystone',
:password => 'secret',
:auth_url => 'http://127.0.0.1:35357',
:auth_url => 'http://127.0.0.1:5000',
:project_name => 'services' }
end
@ -57,7 +57,7 @@ describe 'keystone::resource::authtoken' do
params.merge! ({
:username => 'username',
:password => 'hardpassword',
:auth_url => 'http://127.1.1.127:35357/',
:auth_url => 'http://127.1.1.127:5000/',
:project_name => 'NoProject',
:user_domain_name => 'MyDomain',
:project_domain_name => 'OurDomain',

View File

@ -10,7 +10,7 @@ describe Puppet::Type.type(:keystone_domain).provider(:openstack) do
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v2.0'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v2.0'
end
describe 'when managing a domain' do

View File

@ -16,7 +16,7 @@ describe Puppet::Provider::Keystone do
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3'
end
let(:another_class) do
@ -98,7 +98,7 @@ id="newid"
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3'
end
before(:each) do
@ -130,7 +130,7 @@ id="the_project_id"
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3'
end
before(:each) do

View File

@ -55,7 +55,7 @@ describe provider_class do
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3'
end
before(:each) do

View File

@ -17,7 +17,7 @@ node 'keystone_sqlite' {
}
class { '::keystone::endpoint':
public_url => "http://${::fqdn}:5000/",
admin_url => "http://${::fqdn}:35357/",
admin_url => "http://${::fqdn}:5000/",
}
}
@ -56,7 +56,7 @@ node 'keystone' {
}
class { '::keystone::endpoint':
public_url => "http://${::fqdn}:5000/",
admin_url => "http://${::fqdn}:35357/",
admin_url => "http://${::fqdn}:5000/",
}
}