scenario002: switch Keystone/Glance/Ironic/Nova to SSL

* Deploy Self-Signed Certificates for both IPv6 & IPv4 deployments.
* Disable IPv6 for RabbitMQ now, for SSL reasons, will be enabled again
  later in a next iteration.
* Deploy Ironic API under WSGI instead of eventlet.
* Switch Glance API, Ironic API and Keystone to SSL.
* Configure Tempest with SSL endpoints when needed.
* Reduce the Ironic tests because of [1].

[1] https://bugs.launchpad.net/ironic/+bug/1554237

Note #1: puppet-swift, and puppet-cinder will require some work to support SSL, so it's not
implemented in this patch.
Note #2: we don't enable SSL for Neutron because of
https://bugs.launchpad.net/neutron/+bug/1514424

Change-Id: Ib2b5289b6f5e82f43cf60dee3152b2c2ddd5a014
This commit is contained in:
Emilien Macchi 2016-03-01 18:50:40 -05:00
parent 26b6cf114e
commit 3874255b9f
21 changed files with 253 additions and 91 deletions

18
files/ipv4.crt Normal file
View File

@ -0,0 +1,18 @@
-----BEGIN CERTIFICATE-----
MIIC+zCCAeOgAwIBAgIJALVl9IhMkdcmMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
BAMMCTEyNy4wLjAuMTAeFw0xNjAzMTExNTE2MTRaFw0yNjAzMDkxNTE2MTRaMBQx
EjAQBgNVBAMMCTEyNy4wLjAuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAJv5aTwsONF3PdTWoikEzndOxKqrS1RbgvBGjmqgDC/0JtVtJN1jmhBG0FyK
PJeLIFa8JAktgai0OPShBEwRadiZry35tvw4cNX3EQeLhd7n/YC4qhyobDwgCOCb
4r/WPGMAU/tsizymkcTwSw7h7u4vyGcmFj5aPW8Fd8zBk/V8CShpxjNby+teJnce
APzW+pPvXibKaCzdP6o9enRxjVCAAsqj1LkVhP40+GBWcoXGlTJivgQfUZeGQaZC
ggOOAf9D1lHV3u3OAdfz7gaoeCwzpi+AmRcg3TWmgbA6myoQJe0EGUoveRlY9n51
px/nXjzdgHxEmGoLGkAHNqrhNj8CAwEAAaNQME4wHQYDVR0OBBYEFHTK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kUZf4t
jR/CkmEUJF0ACDiEU2OQga9wF+K9B4cXnW8MVqVo2h+oT2MAT6Rn7rRBfQKBgQCO
ljT8vZyh5AnWkmct182Io/F5Y+9a0IghJY/QpZqND+SQ7iCq9XsFoUdz1OYquaIJ
knCBeYgUNMwRflqcauxEkg9tiEB0c8V6kBk1Mu2xl62/raHA/jTvMAZuVgjiHJn9
I4mC+o1grEaFy1ESqhU78tqBnT3vvtqt9PxBe/3I/QKBgQCxiTa8UVbCEsaeuZaU
v2Q/Ca6xaBPXNFG5zQzElyDT7xGqo1LrQcOZijiY39bGg4O+9jVlkWpu3nfdOYc6
LnM5U/5/2mNa4qmO/ntypQJBuAYHvEKwZnNp0jRB7XHiqenrkMCMfxABbPO1Yksj
NvVFs8W/3TAiZXoZVqKttZuE9g==
-----END PRIVATE KEY-----

View File

@ -35,7 +35,6 @@ case $::osfamily {
include ::openstack_integration
class { '::openstack_integration::config':
ssl => true,
ipv6 => true,
}
include ::openstack_integration::cacert
include ::openstack_integration::rabbitmq

View File

@ -1,13 +1,14 @@
class openstack_integration::cacert {
include ::openstack_integration::params
include ::openstack_integration::config
file { $::openstack_integration::params::cert_path:
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_integration/puppet_openstack.pem',
source => "puppet:///modules/openstack_integration/ipv${openstack_integration::config::ip_version}.crt",
selinux_ignore_defaults => true,
replace => true,
}

View File

@ -43,7 +43,8 @@ class openstack_integration::cinder (
}
class { '::cinder::api':
keystone_password => 'a_big_secret',
identity_uri => 'http://127.0.0.1:35357/',
auth_uri => $::openstack_integration::config::keystone_auth_uri,
identity_uri => $::openstack_integration::config::keystone_admin_uri,
default_volume_type => 'BACKEND_1',
service_workers => 2,
}
@ -55,7 +56,7 @@ class openstack_integration::cinder (
}
class { '::cinder::cron::db_purge': }
class { '::cinder::glance':
glance_api_servers => 'localhost:9292',
glance_api_servers => "${::openstack_integration::config::proto}://127.0.0.1:9292",
}
case $backend {
'iscsi': {

View File

@ -15,8 +15,10 @@ class openstack_integration::config (
if $ssl {
$rabbit_port = '5671'
$proto = 'https'
} else {
$rabbit_port = '5672'
$proto = 'http'
}
if $ipv6 {
@ -25,9 +27,14 @@ class openstack_integration::config (
'RABBITMQ_NODE_IP_ADDRESS' => '::1',
'RABBITMQ_SERVER_START_ARGS' => '"-proto_dist inet6_tcp"',
}
$ip_version = '6'
} else {
$rabbit_host = '127.0.0.1'
$rabbit_env = {}
$ip_version = '4'
}
$keystone_auth_uri = "${proto}://127.0.0.1:5000"
$keystone_admin_uri = "${proto}://127.0.0.1:35357"
}

View File

@ -10,6 +10,21 @@ class openstack_integration::glance (
) {
include ::openstack_integration::config
include ::openstack_integration::params
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'glance':
notify => [Service['glance-api'], Service['glance-registry']],
}
Package<| tag == 'glance-package' |> -> File['/etc/glance/ssl']
$key_file = "/etc/glance/ssl/private/${::fqdn}.pem"
$crt_file = $::openstack_integration::params::cert_path
Exec['update-ca-certificates'] ~> Service['glance-api']
Exec['update-ca-certificates'] ~> Service['glance-registry']
} else {
$key_file = undef
$crt_file = undef
}
rabbitmq_user { 'glance':
admin => true,
@ -31,6 +46,9 @@ class openstack_integration::glance (
include ::glance
include ::glance::client
class { '::glance::keystone::auth':
public_url => "${::openstack_integration::config::proto}://127.0.0.1:9292",
internal_url => "${::openstack_integration::config::proto}://127.0.0.1:9292",
admin_url => "${::openstack_integration::config::proto}://127.0.0.1:9292",
password => 'a_big_secret',
}
case $backend {
@ -54,6 +72,7 @@ class openstack_integration::glance (
swift_store_user => 'services:glance',
swift_store_key => 'a_big_secret',
swift_store_create_container_on_put => 'True',
swift_store_auth_address => "${::openstack_integration::config::proto}://127.0.0.1:5000/v2.0",
}
}
default: {
@ -70,6 +89,13 @@ class openstack_integration::glance (
workers => 2,
stores => $glance_stores,
default_store => $backend,
auth_uri => $::openstack_integration::config::keystone_auth_uri,
identity_uri => $::openstack_integration::config::keystone_admin_uri,
registry_client_protocol => $::openstack_integration::config::proto,
registry_client_cert_file => $crt_file,
registry_client_key_file => $key_file,
cert_file => $crt_file,
key_file => $key_file,
}
class { '::glance::registry':
debug => true,
@ -77,6 +103,10 @@ class openstack_integration::glance (
database_connection => 'mysql+pymysql://glance:glance@127.0.0.1/glance?charset=utf8',
keystone_password => 'a_big_secret',
workers => 2,
auth_uri => $::openstack_integration::config::keystone_auth_uri,
identity_uri => $::openstack_integration::config::keystone_admin_uri,
cert_file => $crt_file,
key_file => $key_file,
}
class { '::glance::notify::rabbitmq':
rabbit_userid => 'glance',

View File

@ -1,6 +1,15 @@
class openstack_integration::ironic {
include ::openstack_integration::config
include ::openstack_integration::params
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'ironic':
notify => Service['httpd'],
require => Package['ironic-common'],
}
Exec['update-ca-certificates'] ~> Service['httpd']
}
rabbitmq_user { 'ironic':
admin => true,
@ -31,12 +40,25 @@ class openstack_integration::ironic {
password => 'ironic',
}
class { '::ironic::keystone::auth':
public_url => "${::openstack_integration::config::proto}://127.0.0.1:6385",
internal_url => "${::openstack_integration::config::proto}://127.0.0.1:6385",
admin_url => "${::openstack_integration::config::proto}://127.0.0.1:6385",
password => 'a_big_secret',
}
class { '::ironic::client': }
class { '::ironic::api':
auth_uri => $::openstack_integration::config::keystone_auth_uri,
identity_uri => $::openstack_integration::config::keystone_admin_uri,
neutron_url => 'http://127.0.0.1:9696',
admin_password => 'a_big_secret',
workers => '2',
service_name => 'httpd',
}
include ::apache
class { '::ironic::wsgi::apache':
ssl => $::openstack_integration::config::ssl,
ssl_key => "/etc/ironic/ssl/private/${::fqdn}.pem",
ssl_cert => $::openstack_integration::params::cert_path,
workers => 2,
}
class { '::ironic::conductor': }
Rabbitmq_user_permissions['ironic@/'] -> Service<| tag == 'ironic-service' |>

View File

@ -16,6 +16,17 @@ class openstack_integration::keystone (
$using_domain_config = false,
) {
include ::openstack_integration::config
include ::openstack_integration::params
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'keystone':
notify => Service['httpd'],
require => Package['keystone'],
}
Exec['update-ca-certificates'] ~> Service['httpd']
}
class { '::keystone::client': }
class { '::keystone::cron::token_flush': }
class { '::keystone::db::mysql':
@ -30,10 +41,13 @@ class openstack_integration::keystone (
service_name => 'httpd',
default_domain => $default_domain,
using_domain_config => $using_domain_config,
enable_ssl => $::openstack_integration::config::ssl,
}
include ::apache
class { '::keystone::wsgi::apache':
ssl => false,
ssl => $::openstack_integration::config::ssl,
ssl_key => "/etc/keystone/ssl/private/${::fqdn}.pem",
ssl_cert => $::openstack_integration::params::cert_path,
workers => 2,
}
class { '::keystone::roles::admin':
@ -42,6 +56,8 @@ class openstack_integration::keystone (
}
class { '::keystone::endpoint':
default_domain => $default_domain,
public_url => $::openstack_integration::config::keystone_auth_uri,
admin_url => $::openstack_integration::config::keystone_admin_uri,
}
class { '::keystone::disable_admin_token_auth': }
@ -49,5 +65,6 @@ class openstack_integration::keystone (
password => 'a_big_secret',
project_domain => 'default',
user_domain => 'default',
auth_url => "${::openstack_integration::config::keystone_auth_uri}/v3/",
}
}

View File

@ -41,6 +41,8 @@ class openstack_integration::neutron {
sync_db => true,
api_workers => 2,
rpc_workers => 2,
auth_uri => $::openstack_integration::config::keystone_auth_uri,
auth_url => $::openstack_integration::config::keystone_admin_uri,
}
class { '::neutron::plugins::ml2':
type_drivers => ['vxlan'],
@ -54,9 +56,10 @@ class openstack_integration::neutron {
}
class { '::neutron::agents::metadata':
debug => true,
auth_password => 'a_big_secret',
shared_secret => 'a_big_secret',
metadata_workers => 2,
auth_url => "${::openstack_integration::config::keystone_admin_uri}/v2.0",
auth_password => 'a_big_secret',
}
class { '::neutron::agents::lbaas':
debug => true,
@ -71,6 +74,7 @@ class openstack_integration::neutron {
debug => true,
}
class { '::neutron::server::notifications':
auth_url => $::openstack_integration::config::keystone_admin_uri,
password => 'a_big_secret',
}
class { '::neutron::services::fwaas':

View File

@ -10,6 +10,15 @@ class openstack_integration::nova (
) {
include ::openstack_integration::config
include ::openstack_integration::params
if $::openstack_integration::config::ssl {
openstack_integration::ssl_key { 'nova':
notify => Service['httpd'],
require => Package['nova-common'],
}
Exec['update-ca-certificates'] ~> Service['httpd']
}
rabbitmq_user { 'nova':
admin => true,
@ -32,6 +41,12 @@ class openstack_integration::nova (
password => 'nova',
}
class { '::nova::keystone::auth':
public_url => "${::openstack_integration::config::proto}://127.0.0.1:8774/v2/%(tenant_id)s",
public_url_v3 => "${::openstack_integration::config::proto}://127.0.0.1:8774/v3/%(tenant_id)s",
internal_url => "${::openstack_integration::config::proto}://127.0.0.1:8774/v2/%(tenant_id)s",
internal_url_v3 => "${::openstack_integration::config::proto}://127.0.0.1:8774/v3/%(tenant_id)s",
admin_url => "${::openstack_integration::config::proto}://127.0.0.1:8774/v2/%(tenant_id)s",
admin_url_v3 => "${::openstack_integration::config::proto}://127.0.0.1:8774/v3/%(tenant_id)s",
password => 'a_big_secret',
}
class { '::nova':
@ -42,7 +57,7 @@ class openstack_integration::nova (
rabbit_userid => 'nova',
rabbit_password => 'an_even_bigger_secret',
rabbit_use_ssl => $::openstack_integration::config::ssl,
glance_api_servers => 'http://127.0.0.1:9292',
glance_api_servers => "${::openstack_integration::config::proto}://127.0.0.1:9292",
verbose => true,
debug => true,
notification_driver => 'messagingv2',
@ -50,7 +65,8 @@ class openstack_integration::nova (
}
class { '::nova::api':
admin_password => 'a_big_secret',
identity_uri => 'http://127.0.0.1:35357/',
auth_uri => $::openstack_integration::config::keystone_auth_uri,
identity_uri => $::openstack_integration::config::keystone_admin_uri,
osapi_v3 => true,
neutron_metadata_proxy_shared_secret => 'a_big_secret',
metadata_workers => 2,
@ -60,7 +76,9 @@ class openstack_integration::nova (
}
include ::apache
class { '::nova::wsgi::apache':
ssl => false,
ssl_key => "/etc/nova/ssl/private/${::fqdn}.pem",
ssl_cert => $::openstack_integration::params::cert_path,
ssl => $::openstack_integration::config::ssl,
workers => '2',
}
class { '::nova::client': }
@ -95,6 +113,7 @@ class openstack_integration::nova (
class { '::nova::vncproxy': }
class { '::nova::network::neutron':
neutron_auth_url => "${::openstack_integration::config::keystone_admin_uri}/v3",
neutron_password => 'a_big_secret',
}

View File

@ -2,14 +2,14 @@ class openstack_integration::params {
case $::osfamily {
'RedHat': {
$cacert_path = '/etc/ssl/certs/ca-bundle.crt'
$cert_path = '/etc/pki/ca-trust/source/anchors/puppet_openstack.crt'
$ca_bundle_cert_path = '/etc/ssl/certs/ca-bundle.crt'
$cert_path = '/etc/pki/ca-trust/source/anchors/puppet_openstack.pem'
$update_ca_certs_cmd = '/usr/bin/update-ca-trust force-enable && /usr/bin/update-ca-trust extract'
}
'Debian': {
$cacert_path = '/etc/ssl/certs/puppet_openstack.pem'
$ca_bundle_cert_path = '/etc/ssl/certs/puppet_openstack.pem'
$cert_path = '/usr/local/share/ca-certificates/puppet_openstack.crt'
$update_ca_certs_cmd = '/usr/sbin/update-ca-certificates'
$update_ca_certs_cmd = '/usr/sbin/update-ca-certificates -f'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")

View File

@ -2,7 +2,9 @@
class openstack_integration::provision {
$os_auth_options = '--os-username admin --os-password a_big_secret --os-tenant-name openstack --os-auth-url http://127.0.0.1:5000/v2.0'
include ::openstack_integration::config
$os_auth_options = "--os-username admin --os-password a_big_secret --os-tenant-name openstack --os-auth-url ${::openstack_integration::config::keystone_auth_uri}/v2.0"
exec { 'manage_m1.nano_nova_flavor':
path => '/usr/bin:/bin:/usr/sbin:/sbin',

View File

@ -25,7 +25,7 @@ class openstack_integration::rabbitmq {
}
openstack_integration::ssl_key { 'rabbitmq':
key_path => "/etc/rabbitmq/ssl/private/${::fqdn}.pem",
require => File['/etc/rabbitmq/ssl'],
require => File['/etc/rabbitmq/ssl/private'],
notify => Service['rabbitmq-server'],
}
class { '::rabbitmq':
@ -33,7 +33,7 @@ class openstack_integration::rabbitmq {
package_provider => $package_provider,
ssl => true,
ssl_only => true,
ssl_cacert => $::openstack_integration::params::cacert_path,
ssl_cacert => $::openstack_integration::params::ca_bundle_cert_path,
ssl_cert => $::openstack_integration::params::cert_path,
ssl_key => "/etc/rabbitmq/ssl/private/${::fqdn}.pem",
environment_variables => $::openstack_integration::config::rabbit_env,

View File

@ -7,6 +7,9 @@
define openstack_integration::ssl_key(
$key_path = undef,
) {
include ::openstack_integration::config
if $key_path == undef {
$_key_path = "/etc/${name}/ssl/private/${::fqdn}.pem"
} else {
@ -35,7 +38,7 @@ define openstack_integration::ssl_key(
file { $_key_path:
ensure => present,
owner => $name,
source => 'puppet:///modules/openstack_integration/puppet_openstack.pem',
source => "puppet:///modules/openstack_integration/ipv${openstack_integration::config::ip_version}.key",
selinux_ignore_defaults => true,
mode => '0600',
}

View File

@ -1,5 +1,7 @@
class openstack_integration::swift {
include ::openstack_integration::config
include ::memcached
class { '::swift':
swift_hash_suffix => 'secrete',
@ -20,8 +22,8 @@ class openstack_integration::swift {
include ::swift::proxy::tempurl
include ::swift::proxy::ratelimit
class { '::swift::proxy::authtoken':
auth_uri => 'http://127.0.0.1:5000/v2.0',
identity_uri => 'http://127.0.0.1:35357/',
auth_uri => "${::openstack_integration::config::keystone_auth_uri}/v2.0",
identity_uri => "${::openstack_integration::config::keystone_admin_uri}/",
admin_password => 'a_big_secret',
}
class { '::swift::proxy::keystone':

View File

@ -63,6 +63,9 @@ class openstack_integration::tempest (
$trove = false,
) {
include ::openstack_integration::config
include ::openstack_integration::params
class { '::tempest':
debug => true,
use_stderr => false,
@ -74,8 +77,8 @@ class openstack_integration::tempest (
tempest_config_file => '/tmp/openstack/tempest/etc/tempest.conf',
configure_images => true,
configure_networks => true,
identity_uri => 'http://127.0.0.1:5000/v2.0',
identity_uri_v3 => 'http://127.0.0.1:5000/v3',
identity_uri => "${::openstack_integration::config::keystone_auth_uri}/v2.0",
identity_uri_v3 => "${::openstack_integration::config::keystone_auth_uri}/v3",
admin_username => 'admin',
admin_tenant_name => 'openstack',
admin_password => 'a_big_secret',
@ -103,6 +106,7 @@ class openstack_integration::tempest (
image_alt_ssh_user => 'cirros',
img_file => 'cirros-0.3.4-x86_64-disk.img',
compute_build_interval => 10,
ca_certificates_file => $::openstack_integration::params::ca_bundle_cert_path,
# TODO(emilien) optimization by 1/ using Hiera to configure Glance image source
# and 2/ if running in the gate, use /home/jenkins/cache/files/ cirros image.
# img_dir => '/home/jenkins/cache/files',

View File

@ -115,11 +115,21 @@ wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -P /tmp
set +e
# Select what to test:
# - smoke suite
# - dashboard (horizon)
# - TelemetryAlarming (Aodh)
# - api.baremetal (Ironic)
cd /tmp/openstack/tempest; tox -eall -- --concurrency=2 smoke dashboard TelemetryAlarming api.baremetal
# Smoke suite
TESTS="smoke"
# Horizon
TESTS="${TESTS} dashbboard"
# Aodh
TESTS="${TESTS} TelemetryAlarming"
# Ironic
# Note: running all Ironic tests under SSL is not working
# https://bugs.launchpad.net/ironic/+bug/1554237
TESTS="${TESTS} api.baremetal.admin.test_drivers"
cd /tmp/openstack/tempest; tox -eall -- --concurrency=2 $TESTS
RESULT=$?
set -e
/tmp/openstack/tempest/.tox/all/bin/testr last --subunit > /tmp/openstack/tempest/testrepository.subunit