Skip to content
Snippets Groups Projects
Commit 9e8e361b authored by Alessandro Costantini's avatar Alessandro Costantini
Browse files

Primo commit del branch origin/controller_ha

Descrizione delle modifiche fin qui fatte
- files/heat-keystone-setup-domain
-- fix dell'import di oslo.config
- manifests/profile/database-client.pp
-- classe per l'installazione del mysql-client in locale; in sostituzione della classe manifests/profile/database.pp
- manifests/profile/keystone.pp; manifests/resources/database.pp
-- modifiche al file keystone.conf

- Modifiche alle altre classi per staccare Rabbit-MQ, CEPH, Percona, HAproxy, keepalived dalla configurazione dell'infrastruttura.
parent 57bae380
No related branches found
No related tags found
1 merge request!9Development
Showing
with 339 additions and 203 deletions
......@@ -18,7 +18,9 @@ import sys
import keystoneclient.exceptions as kc_exception
from keystoneclient.v3 import client
from oslo_config import cfg
#Costa
#from oslo_config import cfg
from oslo.config import cfg
from heat import version
......
CONTROLLER HA
base.pp -> VLAN, NTP, Network commented
heat.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts; commented haproxy configuration
horizon.pp -> commented haproxy configuration
keystone.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts; commented $admin_bind_host; commented haproxy configuration
database-client.pp -> Refactoring: mysql server + mysql client
*cinder.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts; commented haproxy configuration; cinder:backup+ceph commented
*glance.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts; commented haproxy configuration; CEPH configuration
Ceilometer
common.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts
controller.pp -> commented haproxy configuration; coomented zookeeper installation and configuration
Neutron
common.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts
server.pp -> commented haproxy configuration
Nova
common.pp -> Added RabbitMQHosts, $rhosts; added $rabbit_hosts
controller.pp -> commented haproxy configuration
*CEPH-related classes
class iaas::profile::base (
$dns_servers,
$dns_searchdomain,
$ssh_public_key,
$ntp_servers,
# $dns_servers,
# $dns_searchdomain,
# $ssh_public_key,
# $ntp_servers,
) {
# Keep-alive values
sysctl { 'net.ipv4.tcp_keepalive_time': value => '5' }
......@@ -24,42 +24,42 @@ class iaas::profile::base (
lc_ctype => 'en_US.UTF-8'
}
# VLAN module
package { 'vlan': }
kmod::load {'8021q':
require => Package['vlan']
}
# # VLAN module
# package { 'vlan': }
# kmod::load {'8021q':
# require => Package['vlan']
# }
# NTP
class { '::ntp':
servers => $ntp_servers,
restrict => ['127.0.0.1'],
}
# # NTP
# class { '::ntp':
# servers => $ntp_servers,
# restrict => ['127.0.0.1'],
# }
# Network
class { 'resolv_conf':
nameservers => $dns_servers,
domainname => $dns_searchdomain,
}
# # Network
# class { 'resolv_conf':
# nameservers => $dns_servers,
# domainname => $dns_searchdomain,
# }
# SSH
class { 'ssh::server':
storeconfigs_enabled => false,
options => {
'PermitRootLogin' => 'yes',
'Port' => [22],
}
}
file { "/root/.ssh":
ensure => "directory",
owner => "root",
group => "root",
mode => 755,
}
file { '/root/.ssh/authorized_keys2':
owner => root,
group => root,
mode => 644,
content => $ssh_public_key
}
# class { 'ssh::server':
# storeconfigs_enabled => false,
# options => {
# 'PermitRootLogin' => 'yes',
# 'Port' => [22],
# }
# }
# file { "/root/.ssh":
# ensure => "directory",
# owner => "root",
# group => "root",
# mode => 755,
# }
# file { '/root/.ssh/authorized_keys2':
# owner => root,
# group => root,
# mode => 644,
# content => $ssh_public_key
# }
}
......@@ -4,12 +4,16 @@ class iaas::profile::ceilometer::common (
$password = hiera('iaas::profile::ceilometer::password', undef),
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
class { '::ceilometer':
metering_secret => $secret,
rabbit_hosts => [ $endpoint ],
#Costa - added rabbit_hosts
# rabbit_hosts => [ $endpoint ],
rabbit_hosts => $rhosts,
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
}
......
......@@ -11,12 +11,17 @@ class iaas::profile::ceilometer::controller (
$zookeeper_id = undef,
$zookeeper_max_connections = 128,
) {
include iaas::resources::connectors
iaas::resources::database { 'ceilometer': }
#Costa
# include iaas::resources::connectors
#Costa
# iaas::resources::database { 'ceilometer': }
include iaas::profile::ceilometer::common
$admin_ip = $::facts["ipaddress_${admin_interface}"]
#Costa
# $admin_ip = $::facts["ipaddress_${admin_interface}"]
$admin_ip = $ipaddress
class { '::ceilometer::keystone::auth':
password => $password,
......@@ -39,12 +44,13 @@ class iaas::profile::ceilometer::controller (
}
package { 'python-zake': }
class { 'zookeeper':
id => $zookeeper_id,
client_ip => $::facts["ipaddress_${admin_interface}"],
servers => $servers,
max_allowed_connections => $zookeeper_max_connections,
}
#Costa - config zookeeper
# class { 'zookeeper':
# id => $zookeeper_id,
# client_ip => $::facts["ipaddress_${admin_interface}"],
# servers => $servers,
# max_allowed_connections => $zookeeper_max_connections,
# }
class { '::ceilometer::agent::central':
coordination_url => "kazoo://${$admin_ip}:2181",
......@@ -62,11 +68,11 @@ class iaas::profile::ceilometer::controller (
class { '::ceilometer::collector': }
class { '::ceilometer::agent::notification': }
@@haproxy::balancermember { "ceilometer_api_${::fqdn}":
listening_service => 'ceilometer_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '8777',
options => 'check inter 2000 rise 2 fall 5',
}
# @@haproxy::balancermember { "ceilometer_api_${::fqdn}":
# listening_service => 'ceilometer_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '8777',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
......@@ -6,15 +6,21 @@ class iaas::profile::cinder (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
include iaas::resources::connectors
iaas::resources::database { 'cinder': }
#Costa
# include iaas::resources::connectors
#Costa
# iaas::resources::database { 'cinder': }
class { '::cinder':
database_connection => $iaas::resources::connectors::cinder,
rabbit_host => $endpoint,
#Costa - added rabbit_hosts
# rabbit_host => $endpoint,
rabbit_hosts => $rhosts,
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
mysql_module => '2.3',
......@@ -56,16 +62,17 @@ class iaas::profile::cinder (
rbd_secret_uuid => $secret,
}
class { '::cinder::backup': }
class { '::cinder::backup::ceph':
backup_ceph_user => 'cinder-backup',
}
#Costa
# class { '::cinder::backup': }
# class { '::cinder::backup::ceph':
# backup_ceph_user => 'cinder-backup',
# }
@@haproxy::balancermember { "cinder_api_${::fqdn}":
listening_service => 'cinder_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '8776',
options => 'check inter 2000 rise 2 fall 5',
}
# @@haproxy::balancermember { "cinder_api_${::fqdn}":
# listening_service => 'cinder_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '8776',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
class iaas::profile::database-client(
$servers = undef,
$main_address = undef,
$galera_password = undef,
$mysql_host = "localhost",
) {
# Install fake MySQL server
class { '::mysql::server':
root_password => $galera_password,
# host => $mysql_host,
} #-> service { "mysqld": ensure => "stopped";}
# Install MySQL client
class { 'mysql::client':
require => Class['::mysql::server'],
# host => $main_address,
# root_password => $galera_password,
} -> anchor { 'database-service': }
}
......@@ -15,11 +15,11 @@ class iaas::profile::database (
}
} -> Service['mysqld'] -> anchor { 'database-service': }
@@haproxy::balancermember { "galera_${::fqdn}":
listening_service => 'galera',
server_names => $::hostname,
ipaddresses => $::ipaddress,
ports => '3306',
options => 'check port 9200 inter 2000 rise 2 fall 5 backup',
}
# @@haproxy::balancermember { "galera_${::fqdn}":
# listening_service => 'galera',
# server_names => $::hostname,
# ipaddresses => $::ipaddress,
# ports => '3306',
# options => 'check port 9200 inter 2000 rise 2 fall 5 backup',
# }
}
......@@ -5,11 +5,16 @@ class iaas::profile::glance (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
include iaas::resources::connectors
#Costa
# include iaas::resources::connectors
#Costa
class { 'ceph::profile::client': } ->
class { 'ceph::keys': } ->
......@@ -20,7 +25,9 @@ class iaas::profile::glance (
keystone_tenant => 'services',
keystone_user => 'glance',
database_connection => $iaas::resources::connectors::glance,
registry_host => 'localhost',
#Costa - registry_host ???
# registry_host => 'localhost',
registry_host => $endpoint,
mysql_module => '2.3',
database_idle_timeout => 3,
os_region_name => $region,
......@@ -29,6 +36,7 @@ class iaas::profile::glance (
pipeline => 'keystone',
}
#Costa
class { '::glance::backend::rbd':
rbd_store_user => 'glance',
rbd_store_ceph_conf => '/etc/ceph/ceph.conf',
......@@ -49,10 +57,13 @@ class iaas::profile::glance (
class { '::glance::notify::rabbitmq':
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
rabbit_host => $endpoint,
#Costa - added rabbit_hosts
# rabbit_host => $endpoint,
rabbit_hosts => $rhosts,
}
iaas::resources::database { 'glance': }
#Costa
# iaas::resources::database { 'glance': }
class { '::glance::keystone::auth':
password => $password,
......@@ -62,18 +73,19 @@ class iaas::profile::glance (
region => $region,
}
@@haproxy::balancermember { "glance_registry_${::fqdn}":
listening_service => 'glance_registry_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${admin_interface}"],
ports => '9191',
options => 'check inter 2000 rise 2 fall 5',
}
@@haproxy::balancermember { "glance_api_${::fqdn}":
listening_service => 'glance_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '9292',
options => 'check inter 2000 rise 2 fall 5',
}
#Costa
# @@haproxy::balancermember { "glance_registry_${::fqdn}":
# listening_service => 'glance_registry_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${admin_interface}"],
# ports => '9191',
# options => 'check inter 2000 rise 2 fall 5',
# }
# @@haproxy::balancermember { "glance_api_${::fqdn}":
# listening_service => 'glance_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '9292',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
class iaas::profile::heat (
$password = undef,
$encryption_key = undef,
$encryption_key = hiera('iaas::profile::heat::encryption_key', undef),
$public_interface = hiera('iaas::public_interface', undef),
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
include iaas::resources::connectors
iaas::resources::database { 'heat': }
#Costa
# include iaas::resources::connectors
#Costa
# iaas::resources::database { 'heat': }
class { '::heat::keystone::auth':
password => $password,
......@@ -28,7 +33,9 @@ class iaas::profile::heat (
class { '::heat':
database_connection => $iaas::resources::connectors::heat,
rabbit_host => $endpoint,
#Costa - added rabbit_hosts
# rabbit_host => $endpoint,
rabbit_hosts => $rhosts,
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
auth_uri => "http://${endpoint}:5000/v2.0",
......@@ -63,27 +70,28 @@ class iaas::profile::heat (
domain_password => 'heat_admin',
}
@@haproxy::balancermember { "heat_api_${::fqdn}":
listening_service => 'heat_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '8004',
options => 'check inter 2000 rise 2 fall 5',
}
@@haproxy::balancermember { "heat_api_cfn_${::fqdn}":
listening_service => 'heat_api_cfn_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '8000',
options => 'check inter 2000 rise 2 fall 5',
}
@@haproxy::balancermember { "heat_api_cw_${::fqdn}":
listening_service => 'heat_api_cw_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '8003',
options => 'check inter 2000 rise 2 fall 5',
}
#Costa
# @@haproxy::balancermember { "heat_api_${::fqdn}":
# listening_service => 'heat_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '8004',
# options => 'check inter 2000 rise 2 fall 5',
# }
#
# @@haproxy::balancermember { "heat_api_cfn_${::fqdn}":
# listening_service => 'heat_api_cfn_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '8000',
# options => 'check inter 2000 rise 2 fall 5',
# }
#
# @@haproxy::balancermember { "heat_api_cw_${::fqdn}":
# listening_service => 'heat_api_cw_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '8003',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
......@@ -7,10 +7,15 @@ class iaas::profile::horizon (
$fqdn = hiera('iaas::role::endpoint::main_hostname', undef),
) {
class { '::horizon':
allowed_hosts => union([$fqdn, '127.0.0.1', $::facts["ipaddress_${public_interface}"]], $endpoint_servers),
server_aliases => union([$fqdn, '127.0.0.1', $::facts["ipaddress_${public_interface}"]], $endpoint_servers),
#Costa
# allowed_hosts => union([$fqdn, '127.0.0.1', $::facts["ipaddress_${public_interface}"]], $endpoint_servers),
# server_aliases => union([$fqdn, '127.0.0.1', $::facts["ipaddress_${public_interface}"]], $endpoint_servers),
allowed_hosts => union([$fqdn, $::ipaddress], $endpoint_servers),
server_aliases => union([$fqdn, $::ipaddress], $endpoint_servers),
secret_key => $secret,
cache_server_ip => $::facts["ipaddress_${admin_interface}"],
#Costa
# cache_server_ip => $::facts["ipaddress_${admin_interface}"],
cache_server_ip => $::ipaddress,
keystone_url => "http://${endpoint_address}:5000/v2.0",
cinder_options => {
'enable_backup' => true,
......@@ -22,10 +27,11 @@ class iaas::profile::horizon (
},
}
@@haproxy::balancermember { "horizon_${::fqdn}":
listening_service => 'horizon_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
options => 'check inter 2000 rise 2 fall 5',
}
# Costa
# @@haproxy::balancermember { "horizon_${::fqdn}":
# listening_service => 'horizon_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# options => 'check inter 2000 rise 2 fall 5',
# }
}
......@@ -10,16 +10,30 @@ class iaas::profile::keystone (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts, $rabbitmq_user, $rabbitmq_password
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
#Costa
iaas::resources::database { 'keystone': }
include iaas::resources::connectors
class { '::keystone':
admin_token => $admin_token,
database_connection => $iaas::resources::connectors::keystone,
admin_bind_host => '0.0.0.0',
#Costa
# admin_bind_host => '0.0.0.0',
admin_bind_host => $::facts["ipaddress_${admin_interface}"],
public_bind_host => $::facts["ipaddress_${admin_interface}"],
#Costa - added $rabbit_hosts, $rabbit_userid, $rabbit_password
# rabbit_host => $endpoint,
rabbit_hosts => $rhosts,
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
mysql_module => '2.3',
database_idle_timeout => 3,
database_idle_timeout => 3600,
}
class { 'keystone::endpoint':
......@@ -32,19 +46,20 @@ class iaas::profile::keystone (
create_resources('iaas::resources::tenant', $tenants)
create_resources('iaas::resources::user', $users)
@@haproxy::balancermember { "keystone_admin_cluster_${::fqdn}":
listening_service => 'keystone_admin_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${admin_interface}"],
ports => '35357',
options => 'check inter 2000 rise 2 fall 5',
}
@@haproxy::balancermember { "keystone_public_internal_cluster_${::fqdn}":
listening_service => 'keystone_public_internal_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '5000',
options => 'check inter 2000 rise 2 fall 5',
}
#Costa
# @@haproxy::balancermember { "keystone_admin_cluster_${::fqdn}":
# listening_service => 'keystone_admin_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${admin_interface}"],
# ports => '35357',
# options => 'check inter 2000 rise 2 fall 5',
# }
#
# @@haproxy::balancermember { "keystone_public_internal_cluster_${::fqdn}":
# listening_service => 'keystone_public_internal_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '5000',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
......@@ -4,18 +4,23 @@ class iaas::profile::neutron::common (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
file { 'etc_default_neutron-server':
path => '/etc/default/neutron-server',
ensure => 'present'
}
#Costa
# file { 'etc_default_neutron-server':
# path => '/etc/default/neutron-server',
# ensure => 'present'
# }
class { '::neutron':
core_plugin => $core_plugin,
allow_overlapping_ips => true,
rabbit_host => $endpoint,
#Costa - added rabbit_hosts
# rabbit_host => $endpoint,
rabbit_hosts => $rhosts,
rabbit_user => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
service_plugins => $service_plugins,
......
......@@ -66,7 +66,9 @@ class iaas::profile::neutron::router (
}
if $ipaddress_br_ex == '' {
$local_ip = $::facts["ipaddress_${public_interface}"]
#Costa
# $local_ip = $::facts["ipaddress_${public_interface}"]
$local_ip = $::ipaddress
} else {
$local_ip = $::ipaddress_br_ex
}
......@@ -76,11 +78,16 @@ class iaas::profile::neutron::router (
enabled => true,
tunnel_types => ['gre'],
bridge_mappings => ['external:br-ex'],
require => File['etc_default_neutron-server'],
#Costa
# require => File['etc_default_neutron-server'],
require => File['/etc/default/neutron-server'],
}
$_external_device = device_for_network($external_network)
if $_external_device != 'br_ex' {
#Costa
# $_external_device = device_for_network($external_network)
# if $_external_device != 'br_ex' {
$_external_device = 'br-ex'
if $_external_device != 'br-ex' {
# Store initial configuration from the public interface (assigned by DHCP) to restore on br-ex
$public_ipaddress = $::facts["ipaddress_${public_interface}"]
$public_netmask = $::facts["netmask_${public_interface}"]
......
......@@ -8,8 +8,10 @@ class iaas::profile::neutron::server (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
) {
include iaas::resources::connectors
iaas::resources::database { 'neutron': }
#Costa
# include iaas::resources::connectors
#Costa
# iaas::resources::database { 'neutron': }
include iaas::profile::neutron::common
......@@ -41,11 +43,12 @@ class iaas::profile::neutron::server (
nova_region_name => $region,
}
@@haproxy::balancermember { "neutron_api_${::fqdn}":
listening_service => 'neutron_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '9696',
options => 'check inter 2000 rise 2 fall 5',
}
#Costa
# @@haproxy::balancermember { "neutron_api_${::fqdn}":
# listening_service => 'neutron_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '9696',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
......@@ -7,6 +7,8 @@ class iaas::profile::nova::common (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
#Costa - added $rhosts
$rhosts = hiera('iaas::profile::rabbitmq::rhosts', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
......@@ -15,7 +17,9 @@ class iaas::profile::nova::common (
class { '::nova':
database_connection => $iaas::resources::connectors::nova,
glance_api_servers => [ "${endpoint}:9292" ],
rabbit_host => $endpoint,
#Costa - added rabbit_hosts
# rabbit_host => $endpoint,
rabbit_hosts => $rhosts,
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
mysql_module => '2.3',
......
......@@ -9,8 +9,10 @@ class iaas::profile::nova::controller (
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
) {
include iaas::resources::connectors
iaas::resources::database { 'nova': }
#Costa
# include iaas::resources::connectors
#Costa
# iaas::resources::database { 'nova': }
include iaas::profile::nova::common
......@@ -32,34 +34,36 @@ class iaas::profile::nova::controller (
class { '::nova::vncproxy':
enabled => true,
host => $::facts["ipaddress_${admin_interface}"],
#Costa
# host => $::facts["ipaddress_${admin_interface}"],
host => $::ipaddress,
}
class { [ 'nova::scheduler', 'nova::consoleauth', 'nova::conductor', 'nova::cert']:
enabled => true,
}
@@haproxy::balancermember { "nova_api_${::fqdn}":
listening_service => 'nova_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '8774',
options => 'check inter 2000 rise 2 fall 5',
}
@@haproxy::balancermember { "nova_metadata_api_${::fqdn}":
listening_service => 'nova_metadata_api_cluster',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${admin_interface}"],
ports => '8775',
options => 'check inter 2000 rise 2 fall 5',
}
@@haproxy::balancermember { "nova_novncproxy_${::fqdn}":
listening_service => 'nova_novncproxy',
server_names => $::hostname,
ipaddresses => $::facts["ipaddress_${public_interface}"],
ports => '6080',
options => 'check inter 2000 rise 2 fall 5',
}
# @@haproxy::balancermember { "nova_api_${::fqdn}":
# listening_service => 'nova_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '8774',
# options => 'check inter 2000 rise 2 fall 5',
# }
#
# @@haproxy::balancermember { "nova_metadata_api_${::fqdn}":
# listening_service => 'nova_metadata_api_cluster',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${admin_interface}"],
# ports => '8775',
# options => 'check inter 2000 rise 2 fall 5',
# }
#
# @@haproxy::balancermember { "nova_novncproxy_${::fqdn}":
# listening_service => 'nova_novncproxy',
# server_names => $::hostname,
# ipaddresses => $::facts["ipaddress_${public_interface}"],
# ports => '6080',
# options => 'check inter 2000 rise 2 fall 5',
# }
}
database.pp -> $host, database parameter
define iaas::resources::database (
$user = hiera("iaas::mysql::${title}::user", $title),
$password = hiera("iaas::mysql::${title}::password", $title),
#Costa
$host = hiera('iaas::role::endpoint::main_address'),
$allowed_hosts = hiera('iaas::mysql::allowed_hosts', ''),
) {
class { "::${title}::db::mysql":
user => $user,
password => $password,
dbname => $title,
host => "localhost",
allowed_hosts => $allowed_hosts,
mysql_module => '2.3',
require => Anchor['database-service'],
}
# class { "::${title}::db::mysql":
# user => $user,
# password => $password,
# dbname => $title,
#Costa
# host => "localhost",
# host => $host,
# allowed_hosts => $allowed_hosts,
# mysql_module => '2.3',
# require => Anchor['database-service'],
# }
}
controller.pp -> Classes modified to unplug database and rabbit; neutron router added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment