Merge "Add support for Packstack to configure the new Nova requirements"
This commit is contained in:
@@ -328,7 +328,7 @@ def create_api_manifest(config, messages):
|
|||||||
fw_details[key]['host'] = "ALL"
|
fw_details[key]['host'] = "ALL"
|
||||||
fw_details[key]['service_name'] = "nova api"
|
fw_details[key]['service_name'] = "nova api"
|
||||||
fw_details[key]['chain'] = "INPUT"
|
fw_details[key]['chain'] = "INPUT"
|
||||||
fw_details[key]['ports'] = ['8773', '8774', '8775']
|
fw_details[key]['ports'] = ['8773', '8774', '8775', '8778']
|
||||||
fw_details[key]['proto'] = "tcp"
|
fw_details[key]['proto'] = "tcp"
|
||||||
config['FIREWALL_NOVA_API_RULES'] = fw_details
|
config['FIREWALL_NOVA_API_RULES'] = fw_details
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ class packstack::keystone::nova ()
|
|||||||
$nova_protocol = 'http'
|
$nova_protocol = 'http'
|
||||||
$nova_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
$nova_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
||||||
$nova_port = '8774'
|
$nova_port = '8774'
|
||||||
$nova_url = "${nova_protocol}://${nova_host}:$nova_port/v2.1/%(tenant_id)s"
|
$nova_placement_port = '8778'
|
||||||
|
$nova_url = "${nova_protocol}://${nova_host}:${nova_port}/v2.1/%(tenant_id)s"
|
||||||
|
$nova_placement_url = "${nova_protocol}://${nova_host}:${nova_placement_port}/placement"
|
||||||
|
|
||||||
class { '::nova::keystone::auth':
|
class { '::nova::keystone::auth':
|
||||||
region => hiera('CONFIG_KEYSTONE_REGION'),
|
region => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
@@ -12,4 +14,12 @@ class packstack::keystone::nova ()
|
|||||||
admin_url => $nova_url,
|
admin_url => $nova_url,
|
||||||
internal_url => $nova_url,
|
internal_url => $nova_url,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class { '::nova::keystone::auth_placement':
|
||||||
|
region => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
|
password => hiera('CONFIG_NOVA_KS_PW'),
|
||||||
|
public_url => $nova_placement_url,
|
||||||
|
admin_url => $nova_placement_url,
|
||||||
|
internal_url => $nova_placement_url,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,6 +101,12 @@ class packstack::mariadb::services ()
|
|||||||
allowed_hosts => '%',
|
allowed_hosts => '%',
|
||||||
charset => 'utf8',
|
charset => 'utf8',
|
||||||
}
|
}
|
||||||
|
class { '::nova::db::mysql_placement':
|
||||||
|
password => hiera('CONFIG_NOVA_DB_PW'),
|
||||||
|
host => '%',
|
||||||
|
allowed_hosts => '%',
|
||||||
|
charset => 'utf8',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if hiera('CONFIG_PANKO_INSTALL') == 'y' and
|
if hiera('CONFIG_PANKO_INSTALL') == 'y' and
|
||||||
|
|||||||
@@ -368,6 +368,80 @@ class packstack::mariadb::services_remote () {
|
|||||||
provider => 'mysql',
|
provider => 'mysql',
|
||||||
require => Remote_database_user['nova@%'],
|
require => Remote_database_user['nova@%'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remote_database { 'nova_api':
|
||||||
|
ensure => 'present',
|
||||||
|
charset => 'utf8',
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database_user { 'nova_api@%':
|
||||||
|
password_hash => mysql_password($mariadb_nova_noinstall_db_pw),
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
require => Remote_database['nova_api'],
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database_grant { 'nova_api@%/nova_api':
|
||||||
|
privileges => 'all',
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
require => Remote_database_user['nova_api@%'],
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database { 'nova_placement':
|
||||||
|
ensure => 'present',
|
||||||
|
charset => 'utf8',
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database_user { 'nova_placement@%':
|
||||||
|
password_hash => mysql_password($mariadb_nova_noinstall_db_pw),
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
require => Remote_database['nova_placement'],
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database_grant { 'nova_placement@%/nova_placement':
|
||||||
|
privileges => 'all',
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
require => Remote_database_user['nova_placement@%'],
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database { 'nova_cell0':
|
||||||
|
ensure => 'present',
|
||||||
|
charset => 'utf8',
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_database_grant { 'nova@%/nova_cell0':
|
||||||
|
privileges => 'all',
|
||||||
|
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||||
|
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||||
|
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||||
|
provider => 'mysql',
|
||||||
|
require => [ Remote_database_user['nova@%'],
|
||||||
|
Remote_database['nova_cell0'] ],
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if hiera('CONFIG_SAHARA_INSTALL') == 'y' {
|
if hiera('CONFIG_SAHARA_INSTALL') == 'y' {
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class packstack::nova ()
|
|||||||
notify_on_state_change => $notify_on_state_change,
|
notify_on_state_change => $notify_on_state_change,
|
||||||
database_connection => "mysql+pymysql://nova:${nova_db_pw}@${nova_mariadb_host}/nova",
|
database_connection => "mysql+pymysql://nova:${nova_db_pw}@${nova_mariadb_host}/nova",
|
||||||
api_database_connection => "mysql+pymysql://nova_api:${nova_db_pw}@${nova_mariadb_host}/nova_api",
|
api_database_connection => "mysql+pymysql://nova_api:${nova_db_pw}@${nova_mariadb_host}/nova_api",
|
||||||
|
placement_database_connection => "mysql+pymysql://nova_placement:${nova_db_pw}@${nova_mariadb_host}/nova_placement",
|
||||||
cpu_allocation_ratio => hiera('CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO'),
|
cpu_allocation_ratio => hiera('CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO'),
|
||||||
ram_allocation_ratio => hiera('CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO'),
|
ram_allocation_ratio => hiera('CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO'),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,24 @@ class packstack::nova::api ()
|
|||||||
metadata_workers => hiera('CONFIG_SERVICE_WORKERS'),
|
metadata_workers => hiera('CONFIG_SERVICE_WORKERS'),
|
||||||
}
|
}
|
||||||
|
|
||||||
Package<| title == 'nova-common' |> -> Class['nova::api']
|
class { '::nova::wsgi::apache_placement':
|
||||||
|
bind_host => $bind_host,
|
||||||
|
api_port => '8778',
|
||||||
|
ssl => false,
|
||||||
|
workers => hiera('CONFIG_SERVICE_WORKERS'),
|
||||||
|
} ->
|
||||||
|
# TODO(jpena): remove the sample file from the package, then remove this workaround
|
||||||
|
# https://review.rdoproject.org/r/4721
|
||||||
|
file { '/etc/httpd/conf.d/00-nova-placement-api.conf':
|
||||||
|
ensure => absent,
|
||||||
|
before => Service['httpd'],
|
||||||
|
}
|
||||||
|
|
||||||
|
class { '::nova::placement':
|
||||||
|
auth_url => $auth_uri,
|
||||||
|
password => $admin_password,
|
||||||
|
os_region_name => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
|
}
|
||||||
|
|
||||||
$db_purge = hiera('CONFIG_NOVA_DB_PURGE_ENABLE')
|
$db_purge = hiera('CONFIG_NOVA_DB_PURGE_ENABLE')
|
||||||
if $db_purge {
|
if $db_purge {
|
||||||
|
|||||||
@@ -59,6 +59,16 @@ class packstack::nova::compute ()
|
|||||||
instance_usage_audit_period => $instance_usage_audit_period,
|
instance_usage_audit_period => $instance_usage_audit_period,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class { '::nova::placement':
|
||||||
|
auth_url => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
|
||||||
|
password => hiera('CONFIG_NOVA_KS_PW'),
|
||||||
|
os_region_name => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
|
}
|
||||||
|
|
||||||
|
include ::nova::cell_v2::discover_hosts
|
||||||
|
|
||||||
|
Class['nova::compute'] ~> Class['nova::cell_v2::discover_hosts']
|
||||||
|
|
||||||
# Tune the host with a virtual hosts profile
|
# Tune the host with a virtual hosts profile
|
||||||
ensure_packages(['tuned'], {'ensure' => 'present'})
|
ensure_packages(['tuned'], {'ensure' => 'present'})
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Packstack now installs and configures the Nova Placement API which is
|
||||||
|
required from Ocata onwards.
|
||||||
Reference in New Issue
Block a user