$sync_db = false
}
+# When to start and enable services which haven't been Pacemakerized
+# FIXME: remove when we start all OpenStack services using Pacemaker
+# (occurences of this variable will be gradually replaced with false)
+$non_pcmk_start = hiera('step') >= 4
+
if hiera('step') >= 1 {
create_resources(sysctl::value, hiera('sysctl_settings'), {})
}
$galera_nodes = downcase(hiera('galera_node_names', $::hostname))
$galera_nodes_count = count(split($galera_nodes, ','))
- $clustercheck_password = hiera('mysql_clustercheck_password')
- $mysql_root_password = hiera('mysql::server::root_password')
$mysqld_options = {
'mysqld' => {
$mongodb_cluster_ready_command = join(suffix(prefix($mongo_node_ips, '/bin/nc -w1 '), ' 27017 < /dev/null'), ' && ')
exec { 'mongodb-ready' :
command => $mongodb_cluster_ready_command,
- timeout => 600,
- tries => 60,
+ timeout => 30,
+ tries => 180,
try_sleep => 10,
}
mongodb_replset { $mongodb_replset :
}
exec { 'galera-ready' :
- command => '/bin/mysql -e "SHOW GLOBAL VARIABLES LIKE \'read_only\'" | /bin/grep -i off',
- timeout => 600,
- tries => 60,
+ command => '/usr/bin/clustercheck >/dev/null',
+ timeout => 30,
+ tries => 180,
try_sleep => 10,
- environment => 'HOME=/root',
+ environment => ["AVAILABLE_WHEN_READONLY=0"],
+ require => File['/etc/sysconfig/clustercheck'],
}
file { '/etc/sysconfig/clustercheck' :
ensure => file,
- content => "MYSQL_USERNAME=clustercheckuser\n
-MYSQL_PASSWORD=${clustercheck_password}\n
+ content => "MYSQL_USERNAME=root\n
+MYSQL_PASSWORD=''\n
MYSQL_HOST=localhost\n",
- require => Exec['galera-ready'],
}
xinetd::service { 'galera-monitor' :
} #END STEP 2
-if (hiera('step') >= 3 and $pacemaker_master) or hiera('step') >= 4 {
+if hiera('step') >= 3 {
class { '::keystone':
sync_db => $sync_db,
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
}
#TODO: need a cleanup-keystone-tokens.sh solution here
# TODO: notifications, scrubber, etc.
include ::glance
class { 'glance::api':
- known_stores => [$glance_store]
+ known_stores => [$glance_store],
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
}
class { '::glance::registry' :
sync_db => $sync_db,
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
}
include join(['::glance::backend::', $glance_backend])
class { '::nova::api' :
sync_db => $sync_db,
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::nova::cert' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::nova::conductor' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::nova::consoleauth' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::nova::vncproxy' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::nova::scheduler' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
}
- include ::nova::cert
- include ::nova::conductor
- include ::nova::consoleauth
include ::nova::network::neutron
- include ::nova::vncproxy
- include ::nova::scheduler
include ::neutron
class { '::neutron::server' :
sync_db => $sync_db,
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::neutron::agents::dhcp' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::neutron::agents::l3' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
}
- include ::neutron::agents::dhcp
- include ::neutron::agents::l3
file { '/etc/neutron/dnsmasq-neutron.conf':
content => hiera('neutron_dnsmasq_options'),
}
class { 'neutron::agents::ml2::ovs':
+ # manage_service => $non_pcmk_start, -- not implemented
+ enabled => $non_pcmk_start,
bridge_mappings => split(hiera('neutron_bridge_mappings'), ','),
tunnel_types => split(hiera('neutron_tunnel_types'), ','),
}
class { 'neutron::agents::metadata':
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
auth_url => join(['http://', hiera('controller_virtual_ip'), ':35357/v2.0']),
}
include ::cinder
class { '::cinder::api':
sync_db => $sync_db,
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::cinder::scheduler' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::cinder::volume' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
}
include ::cinder::glance
- include ::cinder::scheduler
- include ::cinder::volume
class {'cinder::setup_test_volume':
size => join([hiera('cinder_lvm_loop_device_size'), 'M']),
}
}
# swift proxy
- include ::swift::proxy
+ class { '::swift::proxy' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
include ::swift::proxy::proxy_logging
include ::swift::proxy::healthcheck
include ::swift::proxy::cache
# swift storage
if str2bool(hiera('enable_swift_storage', 'true')) {
- class {'swift::storage::all':
+ class {'::swift::storage::all':
mount_check => str2bool(hiera('swift_mount_check'))
}
+ class {'::swift::storage::account':
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class {'::swift::storage::container':
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class {'::swift::storage::object':
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
if(!defined(File['/srv/node'])) {
file { '/srv/node':
ensure => directory,
}
}
include ::ceilometer
- include ::ceilometer::api
- include ::ceilometer::agent::notification
- include ::ceilometer::agent::central
- include ::ceilometer::alarm::notifier
- include ::ceilometer::alarm::evaluator
+ class { '::ceilometer::api' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::ceilometer::agent::notification' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::ceilometer::agent::central' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::ceilometer::alarm::notifier' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::ceilometer::alarm::evaluator' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::ceilometer::collector' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
include ::ceilometer::expirer
- include ::ceilometer::collector
class { '::ceilometer::db' :
database_connection => $ceilometer_database_connection,
sync_db => $sync_db,
class { '::heat' :
sync_db => $sync_db,
}
- include ::heat::api
- include ::heat::api_cfn
- include ::heat::api_cloudwatch
- include ::heat::engine
+ class { '::heat::api' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::heat::api_cfn' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::heat::api_cloudwatch' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
+ class { '::heat::engine' :
+ manage_service => $non_pcmk_start,
+ enabled => $non_pcmk_start,
+ }
# Horizon
$vhost_params = { add_listen => false }
snmpd_config => [ join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
}
-} #END STEP 3/4
+} #END STEP 3
+
+if hiera('step') >= 4 {
+ # TODO: pacemaker::resource::service for OpenStack services go here
+} #END STEP 4