diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/all-nodes-config.yaml | 4 | ||||
-rw-r--r-- | puppet/ceph-cluster-config.yaml | 3 | ||||
-rw-r--r-- | puppet/ceph-storage-post-puppet.yaml | 9 | ||||
-rw-r--r-- | puppet/ceph-storage-puppet.yaml | 17 | ||||
-rw-r--r-- | puppet/cinder-storage-puppet.yaml | 21 | ||||
-rw-r--r-- | puppet/compute-post-puppet.yaml | 9 | ||||
-rw-r--r-- | puppet/compute-puppet.yaml | 14 | ||||
-rw-r--r-- | puppet/controller-post-puppet.yaml | 9 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 34 | ||||
-rw-r--r-- | puppet/hieradata/ceph.yaml | 2 | ||||
-rw-r--r-- | puppet/hieradata/common.yaml | 2 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 4 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 147 | ||||
-rw-r--r-- | puppet/swift-storage-post.yaml | 9 | ||||
-rw-r--r-- | puppet/swift-storage-puppet.yaml | 17 |
15 files changed, 235 insertions, 66 deletions
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 09882c14..35bd4196 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -54,10 +54,10 @@ resources: list_join: - ',' - {get_param: controller_ips} - rabbit_node_names: + rabbit_node_ips: list_join: - ',' - - {get_param: controller_names} + - {get_param: controller_ips} mongo_node_ips: list_join: - ',' diff --git a/puppet/ceph-cluster-config.yaml b/puppet/ceph-cluster-config.yaml index e01bd19d..e5be5c9d 100644 --- a/puppet/ceph-cluster-config.yaml +++ b/puppet/ceph-cluster-config.yaml @@ -36,7 +36,6 @@ resources: - {get_param: ceph_mon_ips} ceph::profile::params::fsid: {get_param: ceph_fsid} ceph::profile::params::mon_key: {get_param: ceph_mon_key} - ceph::profile::params::osds: "{/srv/data: {}}" # We should use a separated key for the non-admin clients ceph::profile::params::client_keys: str_replace: @@ -57,7 +56,7 @@ resources: secret: 'ADMIN_KEY', mode: '0644', cap_mon: 'allow r', - cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms' + cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images' } }" params: diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml index 53ecbe1f..93cc8d1d 100644 --- a/puppet/ceph-storage-post-puppet.yaml +++ b/puppet/ceph-storage-post-puppet.yaml @@ -22,3 +22,12 @@ resources: properties: servers: {get_param: servers} config: {get_resource: CephStoragePuppetConfig} + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: CephStorageDeployment_Step1 + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index e9f82c2e..bc9b4b5a 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -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: @@ -79,7 +94,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [CephStorage, networks, ctlplane, 0]} HOST: {get_attr: [CephStorage, name]} diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index ecea763b..708f6a9b 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -75,10 +75,10 @@ parameters: description: Name of an existing EC2 KeyPair to enable SSH access to the instances type: string RabbitPassword: - default: '' + default: 'guest' type: string RabbitUserName: - default: '' + default: 'guest' type: string RabbitClientUseSSL: default: false @@ -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 @@ -193,7 +206,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [BlockStorage, networks, ctlplane, 0]} HOST: {get_attr: [BlockStorage, name]} diff --git a/puppet/compute-post-puppet.yaml b/puppet/compute-post-puppet.yaml index 9b7eb0cf..26c1a979 100644 --- a/puppet/compute-post-puppet.yaml +++ b/puppet/compute-post-puppet.yaml @@ -23,3 +23,12 @@ resources: properties: servers: {get_param: servers} config: {get_resource: ComputePuppetConfig} + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: ComputePuppetDeployment + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 382a6b53..367bc405 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -110,13 +110,13 @@ parameters: network) - if changing this either use different post-install network scripts or be sure to keep 'datacentre' as a mapping network name. type: string - default: "" + default: "datacentre:br-ex" NeutronEnableTunnelling: type: string default: "True" NeutronFlatNetworks: type: string - default: '' + default: 'datacentre' description: > If set, flat networks to configure in neutron plugins. NeutronHost: @@ -139,7 +139,7 @@ parameters: type: string hidden: true NeutronPhysicalBridge: - default: '' + default: 'br-ex' description: An OVS bridge to create for accessing external networks. type: string NeutronPublicInterface: @@ -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 @@ -442,7 +446,7 @@ outputs: Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [NovaCompute, networks, ctlplane, 0]} HOST: {get_attr: [NovaCompute, name]} diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml index 009a10ae..debd7154 100644 --- a/puppet/controller-post-puppet.yaml +++ b/puppet/controller-post-puppet.yaml @@ -71,3 +71,12 @@ resources: config: {get_resource: ControllerPuppetConfig} input_values: step: 3 + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: ControllerDeploymentOvercloudServices_Step4 + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 64b1a923..64e7fc72 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -14,6 +14,10 @@ parameters: description: The keystone auth secret. type: string hidden: true + CeilometerBackend: + default: 'mongodb' + description: The ceilometer backend type. + type: string CeilometerMeteringSecret: default: unset description: Secret shared by the ceilometer services. @@ -144,6 +148,13 @@ parameters: default: http description: Protocol to use when connecting to glance, set to https for SSL. type: string + GlanceBackend: + default: swift + description: The short name of the Glance backend to use. Should be one + of swift, rbd, or file + type: string + constraints: + - allowed_values: ['swift', 'file', 'rbd'] HeatPassword: default: unset description: The password for the Heat service account, used by the Heat services. @@ -224,7 +235,7 @@ parameters: network) - if changing this either use different post-install network scripts or be sure to keep 'datacentre' as a mapping network name. type: string - default: "" + default: "datacentre:br-ex" NeutronDnsmasqOptions: default: 'dhcp-option-force=26,1400' description: Dnsmasq options for neutron-dhcp-agent. The default value here forces MTU to be set to 1400 to account for the gre tunnel overhead. @@ -260,7 +271,7 @@ parameters: default: "True" NeutronFlatNetworks: type: string - default: '' + default: 'datacentre' description: If set, flat networks to configure in neutron plugins. NeutronL3HA: default: 'False' @@ -428,9 +439,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 @@ -491,6 +506,7 @@ resources: glance_port: {get_param: GlancePort} glance_protocol: {get_param: GlanceProtocol} glance_password: {get_param: GlancePassword} + glance_backend: {get_param: GlanceBackend} glance_swift_store_auth_address: {list_join: ['', ['http://', {get_param: VirtualIP} , ':5000/v2.0']]} glance_notifier_strategy: {get_param: GlanceNotifierStrategy} glance_log_file: {get_param: GlanceLogFile} @@ -577,8 +593,15 @@ resources: - - 'http://' - {get_param: VirtualIP} - ':35357/v2.0' + ceilometer_backend: {get_param: CeilometerBackend} 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} @@ -708,6 +731,7 @@ resources: glance::backend::swift::swift_store_auth_address: {get_input: glance_swift_store_auth_address} glance::backend::swift::swift_store_user: service:glance glance::backend::swift::swift_store_key: {get_input: glance_password} + glance_backend: {get_input: glance_backend} # Heat heat_stack_domain_admin_password: {get_input: heat_stack_domain_admin_password} @@ -787,6 +811,8 @@ resources: neutron_dsn: {get_input: neutron_dsn} # Ceilometer + ceilometer_backend: {get_input: ceilometer_backend} + ceilometer_mysql_conn_string: {get_input: ceilometer_dsn} ceilometer::metering_secret: {get_input: ceilometer_metering_secret} ceilometer::rabbit_hosts: {get_input: rabbit_hosts} ceilometer::rabbit_userid: {get_input: rabbit_username} @@ -864,7 +890,7 @@ outputs: Server's IP address and hostname in the /etc/hosts format value: str_replace: - template: IP HOST HOST.novalocal CLOUDNAME + template: IP HOST CLOUDNAME params: IP: {get_attr: [Controller, networks, ctlplane, 0]} HOST: {get_attr: [Controller, name]} diff --git a/puppet/hieradata/ceph.yaml b/puppet/hieradata/ceph.yaml index e43b0da5..280457df 100644 --- a/puppet/hieradata/ceph.yaml +++ b/puppet/hieradata/ceph.yaml @@ -3,9 +3,11 @@ ceph::profile::params::osd_pool_default_pg_num: 128 ceph::profile::params::osd_pool_default_pgp_num: 128 ceph::profile::params::osd_pool_default_size: 3 ceph::profile::params::osd_pool_default_min_size: 1 +ceph::profile::params::osds: {/srv/data: {}} ceph::profile::params::manage_repo: false ceph::profile::params::authentication_type: cephx ceph_pools: - volumes - vms + - images diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 14ba97e2..b7fb84ab 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -11,4 +11,4 @@ nova::network::neutron::neutron_admin_tenant_name: 'service' nova::network::neutron::neutron_admin_username: 'neutron' nova::network::neutron::vif_plugging_is_fatal: false nova::network::neutron::vif_plugging_timeout: 30 - +nova::network::neutron::dhcp_domain: '' diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index e4ddf65b..76488457 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -48,12 +48,10 @@ swift::proxy::account_autocreate: true # glance glance::api::pipeline: 'keystone' -glance::api::known_stores: - - glance.store.filesystem.Store - - glance.store.swift.Store glance::registry::pipeline: 'keystone' glance::registry::manage_service: true glance::backend::swift::swift_store_create_container_on_put: true +glance::backend::rbd::rbd_store_user: 'openstack' # neutron neutron::core_plugin: 'ml2' diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index ad10cd33..7628f0a6 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -24,23 +24,25 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } +$enable_pacemaker = str2bool(hiera('enable_pacemaker')) +$enable_keepalived = !$enable_pacemaker +if $::hostname == downcase(hiera('bootstrap_nodeid')) { + $pacemaker_master = true +} else { + $pacemaker_master = false +} + if hiera('step') >= 1 { $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, + manage_vip => $enable_keepalived, } 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, } -> @@ -54,6 +56,19 @@ if hiera('step') >= 1 { class { '::pacemaker::stonith': disable => true, } + if $pacemaker_master { + $control_vip = hiera('tripleo::loadbalancer::controller_virtual_ip') + pacemaker::resource::ip { 'control_vip': + ip_address => $control_vip, + } + $public_vip = hiera('tripleo::loadbalancer::public_virtual_ip') + pacemaker::resource::ip { 'public_vip': + ip_address => $public_vip, + } + pacemaker::resource::systemd { 'haproxy': + clone => true, + } + } } } @@ -65,17 +80,19 @@ if hiera('step') >= 2 { } # 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, + if downcase(hiera('ceilometer_backend')) == '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, + } } } @@ -167,30 +184,57 @@ if hiera('step') >= 2 { dbname => $heat_dsn[6], allowed_hosts => $allowed_hosts, } - - $rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',') - if count($rabbit_nodes) > 1 { - $rabbit_cluster = true - } - else { - $rabbit_cluster = false - } - class { 'rabbitmq': - config_cluster => $rabbit_cluster, - cluster_nodes => $rabbit_nodes, - node_ip_address => hiera('controller_host'), + if downcase(hiera('ceilometer_backend')) == 'mysql' { + $ceilometer_dsn = split(hiera('ceilometer_mysql_conn_string'), '[@:/?]') + class { 'ceilometer::db::mysql': + user => $ceilometer_dsn[3], + password => $ceilometer_dsn[4], + host => $ceilometer_dsn[5], + dbname => $ceilometer_dsn[6], + allowed_hosts => $allowed_hosts, + } } - if $rabbit_cluster { - rabbitmq_policy { 'ha-all@/': - pattern => '^(?!amq\.).*', - definition => { - 'ha-mode' => 'all', - 'ha-sync-mode' => 'automatic', + + if $enable_pacemaker { + # the module ignores erlang_cookie if cluster_config is false + file { '/var/lib/rabbitmq/.erlang.cookie': + ensure => 'present', + owner => 'rabbitmq', + group => 'rabbitmq', + mode => '0400', + content => hiera('rabbitmq::erlang_cookie'), + replace => true, + } -> + class { '::rabbitmq': + service_manage => false, + environment_variables => { + 'RABBITMQ_NODENAME' => "rabbit@$::hostname", }, } - } - rabbitmq_vhost { '/': - provider => 'rabbitmqctl', + if $pacemaker_master { + pacemaker::resource::ocf { 'rabbitmq': + resource_name => 'heartbeat:rabbitmq-cluster', + options => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'', + clone => true, + require => Class['::rabbitmq'], + } + } + } else { + $rabbit_nodes = split(hiera('rabbit_node_ips'), ',') + if count($rabbit_nodes) > 1 { + class { '::rabbitmq': + config_cluster => true, + cluster_nodes => $rabbit_nodes, + } + rabbitmq_policy { 'ha-all@/': + pattern => '^(?!amq\.).*', + definition => { + 'ha-mode' => 'all', + }, + } + } else { + include ::rabbitmq + } } # pre-install swift here so we can build rings @@ -249,11 +293,21 @@ if hiera('step') >= 3 { require => File['/etc/keystone/ssl/certs'], } + $glance_backend = downcase(hiera('glance_backend', 'swift')) + case $glance_backend { + swift: { $glance_store = 'glance.store.swift.Store' } + file: { $glance_store = 'glance.store.filesystem.Store' } + rbd: { $glance_store = 'glance.store.rbd.Store' } + default: { fail('Unrecognized glance_backend parameter.') } + } + # TODO: notifications, scrubber, etc. include ::glance - include ::glance::api + class { 'glance::api': + known_stores => [$glance_store] + } include ::glance::registry - include ::glance::backend::swift + include join(['::glance::backend::', $glance_backend]) class { 'nova': glance_api_servers => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]), @@ -385,6 +439,15 @@ if hiera('step') >= 3 { } # Ceilometer + $ceilometer_backend = downcase(hiera('ceilometer_backend')) + case $ceilometer_backend { + /mysql/ : { + $ceilometer_database_connection = hiera('ceilometer_mysql_conn_string') + } + default : { + $ceilometer_database_connection = $ceilometer_mongodb_conn_string + } + } include ::ceilometer include ::ceilometer::api include ::ceilometer::agent::notification @@ -394,7 +457,7 @@ if hiera('step') >= 3 { include ::ceilometer::expirer include ::ceilometer::collector class { '::ceilometer::db' : - database_connection => $ceilometer_mongodb_conn_string, + database_connection => $ceilometer_database_connection, } class { 'ceilometer::agent::auth': auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']), diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml index edceba97..3e01fe77 100644 --- a/puppet/swift-storage-post.yaml +++ b/puppet/swift-storage-post.yaml @@ -37,3 +37,12 @@ resources: properties: servers: {get_param: servers} config: {get_resource: StorageRingbuilderPuppetConfig} + + # Note, this should come last, so use depends_on to ensure + # this is created after any other resources. + ExtraConfig: + depends_on: StorageRingbuilderDeployment_Step2 + type: OS::TripleO::NodeExtraConfigPost + properties: + servers: {get_param: servers} + diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index eba44e6c..45922436 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -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 @@ -123,7 +136,7 @@ outputs: hosts_entry: value: str_replace: - template: "IP HOST HOST.novalocal" + template: "IP HOST" params: IP: {get_attr: [SwiftStorage, networks, ctlplane, 0]} HOST: {get_attr: [SwiftStorage, name]} |