diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/all-nodes-config.yaml | 4 | ||||
-rw-r--r-- | puppet/ceph-storage-post-puppet.yaml | 2 | ||||
-rw-r--r-- | puppet/ceph-storage-puppet.yaml | 17 | ||||
-rw-r--r-- | puppet/cinder-storage-post.yaml | 4 | ||||
-rw-r--r-- | puppet/cinder-storage-puppet.yaml | 17 | ||||
-rw-r--r-- | puppet/compute-puppet.yaml | 6 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 54 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 12 | ||||
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 6 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 113 | ||||
-rw-r--r-- | puppet/swift-devices-and-proxy-config.yaml | 9 | ||||
-rw-r--r-- | puppet/swift-storage-post.yaml | 4 | ||||
-rw-r--r-- | puppet/swift-storage-puppet.yaml | 17 |
13 files changed, 218 insertions, 47 deletions
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 4d7af033..7a4df796 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -62,6 +62,10 @@ resources: list_join: - ',' - {get_param: controller_ips} + redis_node_ips: + list_join: + - ',' + - {get_param: controller_ips} outputs: config_id: diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml index 5e1c42fa..53ecbe1f 100644 --- a/puppet/ceph-storage-post-puppet.yaml +++ b/puppet/ceph-storage-post-puppet.yaml @@ -1,7 +1,7 @@ heat_template_version: 2014-10-16 description: > - OpenStack Ceph Storage node post deployment for Puppet. + OpenStack ceph storage node post deployment for Puppet parameters: servers: diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index 1599a323..660ea30a 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -1,5 +1,5 @@ heat_template_version: 2014-10-16 -description: 'Common Ceph Storage Configuration for Puppet' +description: 'OpenStack ceph storage node configured by Puppet' parameters: Flavor: description: Flavor for the Ceph Storage node. @@ -40,6 +40,20 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG + user_data: {get_resource: NodeUserData} + + NodeUserData: + type: OS::TripleO::NodeUserData + + NetworkConfig: + type: OS::TripleO::CephStorage::Net::SoftwareConfig + + NetworkDeployment: + type: OS::TripleO::SoftwareDeployment + properties: + config: {get_attr: [NetworkConfig, config_id]} + server: {get_resource: CephStorage} + CephStorageDeployment: type: OS::Heat::StructuredDeployment properties: @@ -52,6 +66,7 @@ resources: params: server: {get_param: NtpServer} enable_package_install: {get_param: EnablePackageInstall} + CephStorageConfig: type: OS::Heat::StructuredConfig properties: diff --git a/puppet/cinder-storage-post.yaml b/puppet/cinder-storage-post.yaml index 28e87800..e11493c4 100644 --- a/puppet/cinder-storage-post.yaml +++ b/puppet/cinder-storage-post.yaml @@ -1,7 +1,5 @@ heat_template_version: 2014-10-16 -description: 'Common Block Storage Post Deployment' -# NOTE: this is a noop for os-apply-config style deployments because -# post deployment ordering is controlled by tripleo-image-elements +description: 'OpenStack cinder storage post deployment for Puppet' parameters: servers: diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index f99bd4da..de96809a 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -1,5 +1,5 @@ heat_template_version: 2014-10-16 -description: 'Block Storage Configuration w/ Puppet' +description: 'OpenStack cinder storage configured by Puppet' parameters: Image: default: overcloud-cinder-volume @@ -115,9 +115,22 @@ resources: {get_param: Image} flavor: {get_param: Flavor} key_name: {get_param: KeyName} - user_data_format: SOFTWARE_CONFIG networks: - network: ctlplane + user_data_format: SOFTWARE_CONFIG + user_data: {get_resource: NodeUserData} + + NodeUserData: + type: OS::TripleO::NodeUserData + + NetworkConfig: + type: OS::TripleO::BlockStorage::Net::SoftwareConfig + + NetworkDeployment: + type: OS::TripleO::SoftwareDeployment + properties: + config: {get_attr: [NetworkConfig, config_id]} + server: {get_resource: BlockStorage} BlockStorageDeployment: type: OS::Heat::StructuredDeployment diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 7352b0e1..a31ea858 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -262,9 +262,13 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG + user_data: {get_resource: NodeUserData} + + NodeUserData: + type: OS::TripleO::NodeUserData NetworkConfig: - type: OS::TripleO::Net::SoftwareConfig + type: OS::TripleO::Compute::Net::SoftwareConfig NetworkDeployment: type: OS::TripleO::SoftwareDeployment diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 7f832931..4e04eb0e 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -63,6 +63,23 @@ parameters: default: '' description: Set to True to enable debugging on all services. type: string + EnableGalera: + default: true + description: Whether to use Galera instead of regular MariaDB. + type: boolean + EnablePacemaker: + default: false + description: If enabled services will be monitored by Pacemaker; it + will manage VIPs as well, in place of Keepalived. + type: boolean + EnableCephStorage: + default: false + description: Whether to deploy Ceph Storage (OSD) on the Controller + type: boolean + EnableSwiftStorage: + default: true + description: Whether to enable Swift Storage on the Controller + type: boolean ExtraConfig: default: {} description: | @@ -302,6 +319,9 @@ parameters: NtpServer: type: string default: '' + PcsdPassword: + type: string + description: The password for the 'pcsd' user. PublicVirtualInterface: default: 'br-ex' description: > @@ -405,9 +425,13 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG + user_data: {get_resource: NodeUserData} + + NodeUserData: + type: OS::TripleO::NodeUserData NetworkConfig: - type: OS::TripleO::Net::SoftwareConfig + type: OS::TripleO::Controller::Net::SoftwareConfig NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -507,6 +531,10 @@ resources: - - 'http://' - {get_param: VirtualIP} - ':5000/v2.0/' + enable_galera: {get_param: EnableGalera} + enable_pacemaker: {get_param: EnablePacemaker} + enable_ceph_storage: {get_param: EnableCephStorage} + enable_swift_storage: {get_param: EnableSwiftStorage} mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize} mysql_root_password: {get_param: MysqlRootPassword} mysql_cluster_name: @@ -551,12 +579,6 @@ resources: - ':35357/v2.0' ceilometer_metering_secret: {get_param: CeilometerMeteringSecret} ceilometer_password: {get_param: CeilometerPassword} - ceilometer_dsn: - list_join: - - '' - - - 'mysql://ceilometer:unset@' - - {get_param: VirtualIP} - - '/ceilometer' snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName} snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword} nova_password: {get_param: NovaPassword} @@ -566,6 +588,7 @@ resources: - - 'mysql://nova:unset@' - {get_param: VirtualIP} - '/nova' + pcsd_password: {get_param: PcsdPassword} rabbit_hosts: str_replace: template: '["host"]' @@ -623,6 +646,10 @@ resources: bootstack_nodeid: {get_input: bootstack_nodeid} controller_host: {get_input: controller_host} #local-ipv4 + # Pacemaker + enable_pacemaker: {get_input: enable_pacemaker} + hacluster_pwd: {get_input: pcsd_password} + # Swift swift::proxy::proxy_local_net_ip: {get_input: controller_host} swift::proxy::authtoken::auth_uri: {get_input: keystone_auth_uri} @@ -714,9 +741,13 @@ resources: keystone::public_bind_host: {get_input: controller_host} keystone::admin_bind_host: {get_input: controller_host} keystone::debug: {get_input: debug} - + # MongoDB + mongodb::server::bind_ip: {get_input: controller_host} # MySQL admin_password: {get_input: admin_password} + enable_galera: {get_input: enable_galera} + enable_ceph_storage: {get_input: enable_ceph_storage} + enable_swift_storage: {get_input: enable_swift_storage} mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size} mysql::server::root_password: {get_input: mysql_root_password} mysql_cluster_name: {get_input: mysql_cluster_name} @@ -767,7 +798,6 @@ resources: ceilometer::api::keystone_password: {get_input: ceilometer_password} ceilometer::api::keystone_auth_uri: {get_input: keystone_auth_uri} ceilometer::api::keystone_identity_uri: {get_input: keystone_identity_uri} - ceilometer::db::database_connection: {get_input: ceilometer_dsn} ceilometer::agent::auth::auth_password: {get_input: ceilometer_password} snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} @@ -789,10 +819,14 @@ resources: nova::network::neutron::neutron_admin_password: {get_input: neutron_password} nova::network::neutron::neutron_url: {get_input: neutron_url} nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url} + # Rabbit + rabbitmq::node_ip_address: {get_input: controller_host} rabbitmq::erlang_cookie: {get_input: rabbit_cookie} - + # Redis + redis::bind: {get_input: controller_host} # Misc + memcached::listen_ip: {get_input: controller_host} neutron_public_interface_ip: {get_input: neutron_public_interface_ip} ntp::servers: {get_input: ntp_servers} control_virtual_interface: {get_input: control_virtual_interface} diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index 47f358a9..5cf9f350 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -11,6 +11,13 @@ rabbitmq::port: '5672' rabbitmq::package_source: undef rabbitmq::repos_ensure: false +mongodb::server::replset: tripleo + +redis::port: 6379 +redis::sentinel::master_name: "%{hiera('bootstrap_nodeid')}" +redis::sentinel::redis_host: "%{hiera('bootstrap_nodeid_ip')}" +redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh' + # service tenant nova::api::admin_tenant_name: 'service' glance::api::keystone_tenant: 'service' @@ -70,6 +77,10 @@ heat::engine::heat_stack_user_role: '' heat::engine::configure_delegated_roles: false heat::engine::trusts_delegated_roles: [] +# pacemaker +pacemaker::corosync::cluster_name: 'tripleo_cluster' +pacemaker::corosync::manage_fw: false + mysql::server::manage_config_file: true tripleo::loadbalancer::keystone_admin: true @@ -84,6 +95,7 @@ tripleo::loadbalancer::nova_metadata: true tripleo::loadbalancer::nova_novncproxy: true tripleo::loadbalancer::mysql: true tripleo::loadbalancer::rabbitmq: true +tripleo::loadbalancer::redis: true tripleo::loadbalancer::swift_proxy_server: true tripleo::loadbalancer::ceilometer: true tripleo::loadbalancer::heat_api: true diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index 58834039..ffa55cdb 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -52,7 +52,11 @@ nova_config { $nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false) if $nova_enable_rbd_backend { include ::ceph::profile::client - include ::nova::compute::rbd + + $client_keys = hiera('ceph::profile::params::client_keys') + class { '::nova::compute::rbd': + libvirt_rbd_secret_key => $client_keys['client.openstack']['secret'], + } } include ::nova::compute::libvirt diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 2b637b37..b1ccf3d7 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -26,11 +26,36 @@ if !str2bool(hiera('enable_package_install', 'false')) { if hiera('step') >= 1 { - $controller_node_ips = split(downcase(hiera('controller_node_ips')), ',') + $controller_node_ips = split(hiera('controller_node_ips'), ',') + $enable_pacemaker = str2bool(hiera('enable_pacemaker')) + $enable_keepalived = !$enable_pacemaker + class { '::tripleo::loadbalancer' : controller_hosts => $controller_node_ips, } + if $enable_pacemaker { + $pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G') + if $::hostname == downcase(hiera('bootstrap_nodeid')) { + $pacemaker_master = true + } else { + $pacemaker_master = false + } + user { 'hacluster': + ensure => present, + } -> + class { '::pacemaker': + hacluster_pwd => hiera('hacluster_pwd'), + } -> + class { '::pacemaker::corosync': + cluster_members => $pacemaker_cluster_members, + setup_cluster => $pacemaker_master, + } + class { '::pacemaker::stonith': + disable => true, + } + } + } if hiera('step') >= 2 { @@ -39,8 +64,50 @@ if hiera('step') >= 2 { include ::ntp } + # MongoDB + include ::mongodb::globals + include ::mongodb::server + $mongo_node_ips = split(hiera('mongo_node_ips'), ',') + $mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017') + $mongo_node_string = join($mongo_node_ips_with_port, ',') + + $mongodb_replset = hiera('mongodb::server::replset') + $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}" + if downcase(hiera('bootstrap_nodeid')) == $::hostname { + mongodb_replset { $mongodb_replset : + members => $mongo_node_ips_with_port, + } + } + + # Redis + $redis_node_ips = split(hiera('redis_node_ips'), ',') + $redis_master_hostname = downcase(hiera('bootstrap_nodeid')) + + if $redis_master_hostname == $::hostname { + $slaveof = undef + } else { + $slaveof = "${redis_master_hostname} 6379" + } + class {'::redis' : + slaveof => $slaveof, + } + + if count($redis_node_ips) > 1 { + Class['::tripleo::redis_notification'] -> Service['redis-sentinel'] + include ::redis::sentinel + class {'::tripleo::redis_notification' : + haproxy_monitor_ip => hiera('tripleo::loadbalancer::controller_virtual_ip'), + } + } + + if str2bool(hiera('enable_galera', 'true')) { + $mysql_config_file = '/etc/my.cnf.d/galera.cnf' + } else { + $mysql_config_file = '/etc/my.cnf.d/server.cnf' + } # TODO Galara class { 'mysql::server': + config_file => $mysql_config_file, override_options => { 'mysqld' => { 'bind-address' => hiera('controller_host') @@ -100,14 +167,6 @@ if hiera('step') >= 2 { dbname => $heat_dsn[6], allowed_hosts => $allowed_hosts, } - $ceilometer_dsn = split(hiera('ceilometer::db::database_connection'), '[@:/?]') - class { 'ceilometer::db::mysql': - user => $ceilometer_dsn[3], - password => $ceilometer_dsn[4], - host => $ceilometer_dsn[5], - dbname => $ceilometer_dsn[6], - allowed_hosts => $allowed_hosts, - } $rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',') if count($rabbit_nodes) > 1 { @@ -147,6 +206,11 @@ if hiera('step') >= 2 { include ::ceph::profile::mon } + if str2bool(hiera('enable_ceph_storage', 'false')) { + include ::ceph::profile::client + include ::ceph::profile::osd + } + } #END STEP 2 if hiera('step') >= 3 { @@ -186,6 +250,7 @@ if hiera('step') >= 3 { } # TODO: notifications, scrubber, etc. + include ::glance include ::glance::api include ::glance::registry include ::glance::backend::swift @@ -302,31 +367,35 @@ if hiera('step') >= 3 { include ::swift::proxy::formpost # swift storage - class {'swift::storage::all': - mount_check => str2bool(hiera('swift_mount_check')) - } - if(!defined(File['/srv/node'])) { - file { '/srv/node': - ensure => directory, - owner => 'swift', - group => 'swift', - require => Package['openstack-swift'], + if str2bool(hiera('enable_swift_storage', 'true')) { + class {'swift::storage::all': + mount_check => str2bool(hiera('swift_mount_check')) } + if(!defined(File['/srv/node'])) { + file { '/srv/node': + ensure => directory, + owner => 'swift', + group => 'swift', + require => Package['openstack-swift'], + } + } + $swift_components = ['account', 'container', 'object'] + swift::storage::filter::recon { $swift_components : } + swift::storage::filter::healthcheck { $swift_components : } } - $swift_components = ['account', 'container', 'object'] - swift::storage::filter::recon { $swift_components : } - swift::storage::filter::healthcheck { $swift_components : } # Ceilometer include ::ceilometer include ::ceilometer::api - include ::ceilometer::db include ::ceilometer::agent::notification include ::ceilometer::agent::central include ::ceilometer::alarm::notifier include ::ceilometer::alarm::evaluator include ::ceilometer::expirer include ::ceilometer::collector + class { '::ceilometer::db' : + database_connection => $ceilometer_mongodb_conn_string, + } class { 'ceilometer::agent::auth': auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']), } diff --git a/puppet/swift-devices-and-proxy-config.yaml b/puppet/swift-devices-and-proxy-config.yaml index 1cb897ee..731f69a1 100644 --- a/puppet/swift-devices-and-proxy-config.yaml +++ b/puppet/swift-devices-and-proxy-config.yaml @@ -6,7 +6,6 @@ parameters: type: comma_delimited_list object_store_swift_devices: type: comma_delimited_list - # TODO: add support for puppet swift proxy memcache configuration controller_swift_proxy_memcaches: type: comma_delimited_list @@ -30,6 +29,14 @@ resources: - list_join: - ", " - {get_param: object_store_swift_devices} + swift::proxy::cache::memcache_servers: + str_replace: + template: "['SERVERS_LIST']" + params: + SERVERS_LIST: + list_join: + - "','" + - {get_param: controller_swift_proxy_memcaches} outputs: config_id: diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml index 3f069319..edceba97 100644 --- a/puppet/swift-storage-post.yaml +++ b/puppet/swift-storage-post.yaml @@ -1,7 +1,5 @@ heat_template_version: 2014-10-16 -description: 'Swift Storage Post Deployment' -# NOTE: this is a noop for os-apply-config style deployments because -# post deployment ordering is controlled by tripleo-image-elements +description: 'OpenStack swift storage node post deployment for Puppet' parameters: servers: diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index 6d446b00..c3eb9536 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -1,5 +1,5 @@ heat_template_version: 2014-10-16 -description: 'Common Swift Storage Configuration' +description: 'OpenStack swift storage node configured by Puppet' parameters: Flavor: description: Flavor for Swift storage nodes to request when deploying. @@ -60,9 +60,22 @@ resources: image: {get_param: Image} flavor: {get_param: Flavor} key_name: {get_param: KeyName} - user_data_format: SOFTWARE_CONFIG networks: - network: ctlplane + user_data_format: SOFTWARE_CONFIG + user_data: {get_resource: NodeUserData} + + NodeUserData: + type: OS::TripleO::NodeUserData + + NetworkConfig: + type: OS::TripleO::ObjectStorage::Net::SoftwareConfig + + NetworkDeployment: + type: OS::TripleO::SoftwareDeployment + properties: + config: {get_attr: [NetworkConfig, config_id]} + server: {get_resource: SwiftStorage} SwiftStorageHieraConfig: type: OS::Heat::StructuredConfig |