diff options
54 files changed, 1361 insertions, 190 deletions
diff --git a/all-nodes-config.yaml b/all-nodes-config.yaml index 7fa27c5d..9687dafc 100644 --- a/all-nodes-config.yaml +++ b/all-nodes-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'All Nodes Config' parameters: diff --git a/bootstrap-config.yaml b/bootstrap-config.yaml index 14da8265..6082dbce 100644 --- a/bootstrap-config.yaml +++ b/bootstrap-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Bootstrap Config' parameters: diff --git a/ceph-cluster-config.yaml b/ceph-cluster-config.yaml index 6cc170ce..f44e27c1 100644 --- a/ceph-cluster-config.yaml +++ b/ceph-cluster-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Ceph Cluster config data' parameters: diff --git a/ceph-storage-post.yaml b/ceph-storage-post.yaml index 12d03f18..06c2a291 100644 --- a/ceph-storage-post.yaml +++ b/ceph-storage-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Ceph Storage Post Deployment' # NOTE: this is a noop for os-apply-config style deployments because # post deployment ordering is controlled by tripleo-image-elements diff --git a/ceph-storage.yaml b/ceph-storage.yaml index 07d7f568..ecb47f26 100644 --- a/ceph-storage.yaml +++ b/ceph-storage.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Common Ceph Storage Configuration' parameters: Image: diff --git a/cinder-storage-post.yaml b/cinder-storage-post.yaml index 08818381..8943c502 100644 --- a/cinder-storage-post.yaml +++ b/cinder-storage-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 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 diff --git a/cinder-storage.yaml b/cinder-storage.yaml index 7d44094f..dfbd520e 100644 --- a/cinder-storage.yaml +++ b/cinder-storage.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Common Block Storage Configuration' parameters: Image: diff --git a/compute-post.yaml b/compute-post.yaml index bd7639c5..e568a5a6 100644 --- a/compute-post.yaml +++ b/compute-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Compute Post Deployment' # NOTE: this is a noop for os-apply-config style deployments because # post deployment ordering is controlled by tripleo-image-elements diff --git a/compute.yaml b/compute.yaml index 672687ca..81d275cc 100644 --- a/compute.yaml +++ b/compute.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack hypervisor node. Can be wrapped in a ResourceGroup for scaling. diff --git a/controller-post.yaml b/controller-post.yaml index e630c221..926adeae 100644 --- a/controller-post.yaml +++ b/controller-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Controller Post Deployment' # NOTE: this is a noop for os-apply-config style deployments because # post deployment ordering is controlled by tripleo-image-elements diff --git a/controller.yaml b/controller.yaml index 71b8a04e..d5d63cd8 100644 --- a/controller.yaml +++ b/controller.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack control plane node. Can be wrapped in a ResourceGroup for scaling. @@ -148,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. @@ -161,6 +168,9 @@ parameters: HeatAuthEncryptionKey: description: Auth encryption key for heat-engine type: string + HorizonSecret: + description: Secret key for Django + type: string Image: type: string default: overcloud-control diff --git a/environments/README.md b/environments/README.md new file mode 100644 index 00000000..4111f7ed --- /dev/null +++ b/environments/README.md @@ -0,0 +1,13 @@ +This directory contains Heat environment file snippets which can +be used to enable features in the Overcloud. + +Configuration +------------- + +These can be enabled using the -e [path to environment yaml] option with +heatclient. + +Below is an example of how to enable the Ceph template using +devtest\_overcloud.sh: + + export OVERCLOUD\_CUSTOM\_HEAT\_ENV=$TRIPLEO\_ROOT/tripleo-heat-templates/environments/ceph_devel.yaml diff --git a/environments/puppet-ceph-devel.yaml b/environments/puppet-ceph-devel.yaml new file mode 100644 index 00000000..d782e8d8 --- /dev/null +++ b/environments/puppet-ceph-devel.yaml @@ -0,0 +1,16 @@ +# A Heat environment file which can be used to enable a Ceph +# storage cluster using the controller and 2 ceph nodes. +# Rbd backends are enabled for Cinder, Glance, and Nova. +parameters: + CephStorageCount: 2 + #NOTE: These ID's and keys should be regenerated for + # a production deployment. What is here is suitable for + # developer and CI testing only. + CephClusterFSID: '4b5c8c0a-ff60-454b-a1b4-9747aa737d19' + CephMonKey: 'AQC+Ox1VmEr3BxAALZejqeHj50Nj6wJDvs96OQ==' + CephAdminKey: 'AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ==' + NovaEnableRbdBackend: true + CinderEnableRbdBackend: true + GlanceBackend: rbd + CinderEnableIscsiBackend: false + ControllerEnableCephStorage: true diff --git a/environments/puppet-pacemaker.yaml b/environments/puppet-pacemaker.yaml new file mode 100644 index 00000000..f235cf8f --- /dev/null +++ b/environments/puppet-pacemaker.yaml @@ -0,0 +1,4 @@ +# An environment which enables configuration of an +# Overcloud controller with Pacemaker. +resource_registry: + OS::TripleO::ControllerConfig: ../puppet/controller-config-pacemaker.yaml diff --git a/net-config-bond.yaml b/net-config-bond.yaml index 3518dbae..dc4683f1 100644 --- a/net-config-bond.yaml +++ b/net-config-bond.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > Software Config to drive os-net-config with 2 bonded nics on a bridge. diff --git a/net-config-bridge.yaml b/net-config-bridge.yaml index d1faa5df..61090022 100644 --- a/net-config-bridge.yaml +++ b/net-config-bridge.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > Software Config to drive os-net-config for a simple bridge. diff --git a/net-config-noop.yaml b/net-config-noop.yaml index a3b1d1af..35cfecc4 100644 --- a/net-config-noop.yaml +++ b/net-config-noop.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > Software Config to no-op for os-net-config. Using this will allow you diff --git a/network/external.yaml b/network/external.yaml new file mode 100644 index 00000000..e9aa5b32 --- /dev/null +++ b/network/external.yaml @@ -0,0 +1,58 @@ +heat_template_version: 2015-04-30 + +description: > + External network. Public traffic, Neutron l3router for floating IPs/SNAT, etc. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + ExternalNetCidr: + default: '10.0.0.0/24' + description: Cidr for the external network. + type: string + ExternalNetValueSpecs: + default: {'provider:physical_network': 'external', 'provider:network_type': 'flat'} + description: Value specs for the external network. + type: string + ExternalNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + ExternalNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + ExternalNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + ExternalNetName: + default: external + description: The name of the external network. + type: string + ExternalSubnetName: + default: external_subnet + description: The name of the external subnet in Neutron. + type: string + + +resources: + ExternalNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: ExternalNetAdminStateUp} + name: {get_param: ExternalNetName} + shared: {get_param: ExternalNetShared} + value_specs: {get_param: ExternalNetValueSpecs} + + ExternalSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: ExternalNetCidr} + enable_dhcp: {get_param: ExternalNetEnableDHCP} + name: {get_param: ExternalSubnetName} + network: {get_resource: ExternalNetwork} + +outputs: + OS::stack_id: + description: Neutron external network + value: {get_resource: ExternalNetwork} diff --git a/network/internal_api.yaml b/network/internal_api.yaml new file mode 100644 index 00000000..5abfb117 --- /dev/null +++ b/network/internal_api.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2015-04-30 + +description: > + Internal API network. Used for most APIs, Database, RPC. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + InternalApiNetCidr: + default: '172.16.2.0/24' + description: Cidr for the internal API network. + type: string + InternalApiNetValueSpecs: + default: {'provider:physical_network': 'internal_api', 'provider:network_type': 'flat'} + description: Value specs for the internal API network. + type: string + InternalApiNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + InternalApiNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + InternalApiNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + InternalApiNetName: + default: internal_api + description: The name of the internal API network. + type: string + InternalApiSubnetName: + default: internal_api_subnet + description: The name of the internal API subnet in Neutron. + type: string + +resources: + InternalApiNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: InternalApiNetAdminStateUp} + name: {get_param: InternalApiNetName} + shared: {get_param: InternalApiNetShared} + value_specs: {get_param: InternalApiNetValueSpecs} + + InternalApiSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: InternalApiNetCidr} + enable_dhcp: {get_param: InternalApiNetEnableDHCP} + name: {get_param: InternalApiSubnetName} + network: {get_resource: InternalApiNetwork} + +outputs: + OS::stack_id: + description: Neutron internal network + value: {get_resource: InternalApiNetwork} diff --git a/network/networks.yaml b/network/networks.yaml new file mode 100644 index 00000000..6618af38 --- /dev/null +++ b/network/networks.yaml @@ -0,0 +1,20 @@ +heat_template_version: 2015-04-30 + +description: Create networks to split out Overcloud traffic + +resources: + + ExternalNetwork: + type: OS::TripleO::Network::External + + InternalNetwork: + type: OS::TripleO::Network::InternalApi + + StorageMgmtNetwork: + type: OS::TripleO::Network::StorageMgmt + + StorageNetwork: + type: OS::TripleO::Network::Storage + + TenantNetwork: + type: OS::TripleO::Network::Tenant diff --git a/network/noop.yaml b/network/noop.yaml new file mode 100644 index 00000000..0963d2ce --- /dev/null +++ b/network/noop.yaml @@ -0,0 +1,3 @@ +heat_template_version: 2015-04-30 + +description: A stack which creates no network(s). diff --git a/network/storage.yaml b/network/storage.yaml new file mode 100644 index 00000000..1f60adf4 --- /dev/null +++ b/network/storage.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2015-04-30 + +description: > + Storage network. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + StorageNetCidr: + default: '172.16.1.0/24' + description: Cidr for the storage network. + type: string + StorageNetValueSpecs: + default: {'provider:physical_network': 'storage', 'provider:network_type': 'flat'} + description: Value specs for the storage network. + type: string + StorageNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + StorageNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + StorageNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + StorageNetName: + default: storage + description: The name of the storage network. + type: string + StorageSubnetName: + default: storage_subnet + description: The name of the storage subnet in Neutron. + type: string + +resources: + StorageNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: StorageNetAdminStateUp} + name: {get_param: StorageNetName} + shared: {get_param: StorageNetShared} + value_specs: {get_param: StorageNetValueSpecs} + + StorageSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: StorageNetCidr} + enable_dhcp: {get_param: StorageNetEnableDHCP} + name: {get_param: StorageSubnetName} + network: {get_resource: StorageNetwork} + +outputs: + OS::stack_id: + description: Neutron storage network + value: {get_resource: StorageNetwork} diff --git a/network/storage_mgmt.yaml b/network/storage_mgmt.yaml new file mode 100644 index 00000000..e97d4364 --- /dev/null +++ b/network/storage_mgmt.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2015-04-30 + +description: > + Storage management network. Storage replication, etc. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + StorageMgmtNetCidr: + default: '172.16.3.0/24' + description: Cidr for the storage management network. + type: string + StorageMgmtNetValueSpecs: + default: {'provider:physical_network': 'storage_mgmt', 'provider:network_type': 'flat'} + description: Value specs for the storage_mgmt network. + type: string + StorageMgmtNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + StorageMgmtNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + StorageMgmtNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + StorageMgmtNetName: + default: storage_mgmt + description: The name of the Storage management network. + type: string + StorageMgmtSubnetName: + default: storage_mgmt_subnet + description: The name of the Storage management subnet in Neutron. + type: string + +resources: + StorageMgmtNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: StorageMgmtNetAdminStateUp} + name: {get_param: StorageMgmtNetName} + shared: {get_param: StorageMgmtNetShared} + value_specs: {get_param: StorageMgmtNetValueSpecs} + + StorageMgmtSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: StorageMgmtNetCidr} + enable_dhcp: {get_param: StorageMgmtNetEnableDHCP} + name: {get_param: StorageMgmtSubnetName} + network: {get_resource: StorageMgmtNetwork} + +outputs: + OS::stack_id: + description: Neutron storage management network + value: {get_resource: StorageMgmtNetwork} diff --git a/network/tenant.yaml b/network/tenant.yaml new file mode 100644 index 00000000..db7f99f3 --- /dev/null +++ b/network/tenant.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2015-04-30 + +description: > + Tenant network. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + TenantNetCidr: + default: '172.16.0.0/24' + description: Cidr for the tenant network. + type: string + TenantNetValueSpecs: + default: {'provider:physical_network': 'tenant', 'provider:network_type': 'flat'} + description: Value specs for the tenant network. + type: string + TenantNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + TenantNetEnableDHCP: + default: false + description: Whether to enable DHCP on the associated subnet. + type: boolean + TenantNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + TenantNetName: + default: tenant + description: The name of the tenant network. + type: string + TenantSubnetName: + default: tenant_subnet + description: The name of the tenant subnet in Neutron. + type: string + +resources: + TenantNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: TenantNetAdminStateUp} + name: {get_param: TenantNetName} + shared: {get_param: TenantNetShared} + value_specs: {get_param: TenantNetValueSpecs} + + TenantSubnet: + type: OS::Neutron::Subnet + properties: + cidr: {get_param: TenantNetCidr} + enable_dhcp: {get_param: TenantNetEnableDHCP} + name: {get_param: TenantSubnetName} + network: {get_resource: TenantNetwork} + +outputs: + OS::stack_id: + description: Neutron tenant network + value: {get_resource: TenantNetwork} diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 2b9da710..744e115f 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -11,6 +11,8 @@ resource_registry: OS::TripleO::CephStorage: puppet/ceph-storage-puppet.yaml OS::TripleO::CephStorage::Net::SoftwareConfig: net-config-noop.yaml OS::TripleO::ControllerPostDeployment: puppet/controller-post-puppet.yaml + # set to controller-config-pacemaker.yaml to enable pacemaker + OS::TripleO::ControllerConfig: puppet/controller-config.yaml OS::TripleO::ComputePostDeployment: puppet/compute-post-puppet.yaml OS::TripleO::ObjectStoragePostDeployment: puppet/swift-storage-post.yaml OS::TripleO::BlockStoragePostDeployment: puppet/cinder-storage-post.yaml diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 834dda2b..50176968 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL @@ -331,15 +331,22 @@ parameters: description: The password for the glance service account, used by the glance services. type: string hidden: true + 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. type: string hidden: true HeatStackDomainAdminPassword: - default: unset - description: Password for heat_stack_domain_admin user. + description: Password for heat_domain_admin user. type: string + default: '' hidden: true KeystoneCACertificate: default: '' @@ -538,6 +545,11 @@ resources: properties: length: 16 + HorizonSecret: + type: OS::Heat::RandomString + properties: + length: 10 + Controller: type: OS::Heat::ResourceGroup properties: @@ -568,11 +580,13 @@ resources: GlancePort: {get_param: GlancePort} GlanceProtocol: {get_param: GlanceProtocol} GlancePassword: {get_param: GlancePassword} + GlanceBackend: {get_param: GlanceBackend} GlanceNotifierStrategy: {get_param: GlanceNotifierStrategy} GlanceLogFile: {get_param: GlanceLogFile} HeatPassword: {get_param: HeatPassword} HeatStackDomainAdminPassword: {get_param: HeatStackDomainAdminPassword} HeatAuthEncryptionKey: {get_resource: HeatAuthEncryptionKey} + HorizonSecret: {get_resource: HorizonSecret} Image: {get_param: controllerImage} ImageUpdatePolicy: {get_param: ImageUpdatePolicy} KeyName: {get_param: KeyName} diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 9345e5c5..963835e9 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'All Nodes Config for Puppet' parameters: @@ -42,10 +42,6 @@ resources: - list_join: - "\n" - {get_param: ceph_storage_hosts} - sysctl: - net.ipv4.tcp_keepalive_time: 5 - net.ipv4.tcp_keepalive_probes: 5 - net.ipv4.tcp_keepalive_intvl: 1 hiera: datafiles: all_nodes: @@ -54,10 +50,22 @@ resources: list_join: - ',' - {get_param: controller_ips} - rabbit_node_ips: + controller_node_names: list_join: - ',' - - {get_param: controller_ips} + - {get_param: controller_names} + galera_node_names: + list_join: + - ',' + - {get_param: controller_names} + rabbit_node_ips: &rabbit_nodes_array + str_replace: + template: "['SERVERS_LIST']" + params: + SERVERS_LIST: + list_join: + - "','" + - {get_param: controller_ips} mongo_node_ips: list_join: - ',' @@ -66,6 +74,17 @@ resources: list_join: - ',' - {get_param: controller_ips} + memcache_node_ips: + list_join: + - ',' + - {get_param: controller_ips} + # NOTE(gfidente): interpolation with %{} in the + # hieradata file can't be used as it returns string + ceilometer::rabbit_hosts: *rabbit_nodes_array + cinder::rabbit_hosts: *rabbit_nodes_array + heat::rabbit_hosts: *rabbit_nodes_array + neutron::rabbit_hosts: *rabbit_nodes_array + nova::rabbit_hosts: *rabbit_nodes_array outputs: config_id: diff --git a/puppet/bootstrap-config.yaml b/puppet/bootstrap-config.yaml index a8eb7585..c88ed408 100644 --- a/puppet/bootstrap-config.yaml +++ b/puppet/bootstrap-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Bootstrap Config Puppet' parameters: diff --git a/puppet/ceph-cluster-config.yaml b/puppet/ceph-cluster-config.yaml index e01bd19d..33b18574 100644 --- a/puppet/ceph-cluster-config.yaml +++ b/puppet/ceph-cluster-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Ceph Cluster config data for Puppet' parameters: @@ -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 93cc8d1d..eb62ba1e 100644 --- a/puppet/ceph-storage-post-puppet.yaml +++ b/puppet/ceph-storage-post-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack ceph storage node post deployment for Puppet diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index bc9b4b5a..e3d623fd 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'OpenStack ceph storage node configured by Puppet' parameters: Flavor: diff --git a/puppet/cinder-storage-post.yaml b/puppet/cinder-storage-post.yaml index e11493c4..f17a1567 100644 --- a/puppet/cinder-storage-post.yaml +++ b/puppet/cinder-storage-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'OpenStack cinder storage post deployment for Puppet' parameters: diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index 708f6a9b..e373c928 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'OpenStack cinder storage configured by Puppet' parameters: Image: @@ -149,11 +149,6 @@ resources: size: {get_param: CinderLVMLoopDeviceSize} cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend} cinder_iscsi_helper: {get_param: CinderISCSIHelper} - rabbit_hosts: - str_replace: - template: '["host"]' - params: - host: {get_param: VirtualIP} rabbit_username: {get_param: RabbitUserName} rabbit_password: {get_param: RabbitPassword} rabbit_client_use_ssl: {get_param: RabbitClientUseSSL} @@ -176,6 +171,7 @@ resources: hierarchy: - heat_config_%{::deploy_config_name} - volume + - all_nodes # provided by allNodesConfig - '"%{::osfamily}"' - common datafiles: @@ -191,7 +187,6 @@ resources: cinder::setup_test_volume::size: {get_input: cinder_lvm_loop_device_size} cinder_iscsi_helper: {get_input: cinder_iscsi_helper} cinder::database_connection: {get_input: cinder_dsn} - cinder::rabbit_hosts: {get_input: rabbit_hosts} cinder::rabbit_userid: {get_input: rabbit_username} cinder::rabbit_password: {get_input: rabbit_password} cinder::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} diff --git a/puppet/compute-post-puppet.yaml b/puppet/compute-post-puppet.yaml index 26c1a979..ca5eb649 100644 --- a/puppet/compute-post-puppet.yaml +++ b/puppet/compute-post-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack compute node post deployment for Puppet. diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 367bc405..b9106e60 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack hypervisor node configured via Puppet. @@ -291,6 +291,7 @@ resources: - compute - ceph_cluster # provided by CephClusterConfig - ceph + - all_nodes # provided by allNodesConfig - '"%{::osfamily}"' - common datafiles: @@ -304,7 +305,6 @@ resources: nova::compute::vncserver_proxyclient_address: local-ipv4 mapped_data: nova::debug: {get_input: debug} - nova::rabbit_hosts: {get_input: rabbit_hosts} nova::rabbit_userid: {get_input: rabbit_username} nova::rabbit_password: {get_input: rabbit_password} nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -316,7 +316,6 @@ resources: nova_enable_rbd_backend: {get_input: nova_enable_rbd_backend} nova_password: {get_input: nova_password} ceilometer::debug: {get_input: debug} - ceilometer::rabbit_hosts: {get_input: rabbit_hosts} ceilometer::rabbit_userid: {get_input: rabbit_username} ceilometer::rabbit_password: {get_input: rabbit_password} ceilometer::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -329,7 +328,6 @@ resources: snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} nova::glance_api_servers: {get_input: glance_api_servers} neutron::debug: {get_input: debug} - neutron::rabbit_hosts: {get_input: rabbit_hosts} neutron::rabbit_password: {get_input: rabbit_password} neutron::rabbit_user: {get_input: rabbit_user} neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -418,11 +416,6 @@ resources: - {get_param: NeutronHost} - ':35357/v2.0' admin_password: {get_param: AdminPassword} - rabbit_hosts: - str_replace: - template: '["host"]' - params: - host: {get_param: RabbitHost} rabbit_username: {get_param: RabbitUserName} rabbit_password: {get_param: RabbitPassword} rabbit_client_use_ssl: {get_param: RabbitClientUseSSL} diff --git a/puppet/controller-config-pacemaker.yaml b/puppet/controller-config-pacemaker.yaml new file mode 100644 index 00000000..38161cd7 --- /dev/null +++ b/puppet/controller-config-pacemaker.yaml @@ -0,0 +1,23 @@ +heat_template_version: 2015-04-30 + +description: > + A software config which runs manifests/overcloud_controller_pacemaker.pp + +resources: + + ControllerPuppetConfigImpl: + type: OS::Heat::SoftwareConfig + properties: + group: puppet + options: + enable_hiera: True + enable_facter: False + outputs: + - name: result + config: + get_file: manifests/overcloud_controller_pacemaker.pp + +outputs: + OS::stack_id: + description: The software config which runs overcloud_controller_pacemaker.pp + value: {get_resource: ControllerPuppetConfigImpl} diff --git a/puppet/controller-config.yaml b/puppet/controller-config.yaml new file mode 100644 index 00000000..4135ffac --- /dev/null +++ b/puppet/controller-config.yaml @@ -0,0 +1,23 @@ +heat_template_version: 2015-04-30 + +description: > + A software config which runs manifests/overcloud_controller.pp + +resources: + + ControllerPuppetConfigImpl: + type: OS::Heat::SoftwareConfig + properties: + group: puppet + options: + enable_hiera: True + enable_facter: False + outputs: + - name: result + config: + get_file: manifests/overcloud_controller.pp + +outputs: + OS::stack_id: + description: The software config which runs overcloud_controller.pp + value: {get_resource: ControllerPuppetConfigImpl} diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml index debd7154..373daba2 100644 --- a/puppet/controller-post-puppet.yaml +++ b/puppet/controller-post-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack controller node post deployment for Puppet. @@ -10,21 +10,13 @@ parameters: resources: ControllerPuppetConfig: - type: OS::Heat::SoftwareConfig - properties: - group: puppet - options: - enable_hiera: True - enable_facter: False - outputs: - - name: result - config: - get_file: manifests/overcloud_controller.pp + type: OS::TripleO::ControllerConfig # Step through a series of Puppet runs using the same manifest. - # NOTE(dprince): Heat breakpoints would make for a really cool way to step - # through breakpoints in a controlled manner across the entire cluster - ControllerDeploymentLoadBalancer_Step1: + # NOTE: To enable stepping through the deployments via heat hooks, + # you must observe the glob naming defined in overcloud-steps.yaml + # e.g all Deployment resources should have a *Deployment_StepN suffix + ControllerLoadBalancerDeployment_Step1: type: OS::Heat::StructuredDeployments properties: servers: {get_param: servers} @@ -33,9 +25,9 @@ resources: step: 1 actions: ['CREATE'] # no need for two passes on an UPDATE - ControllerDeploymentServicesBase_Step2: + ControllerServicesBaseDeployment_Step2: type: OS::Heat::StructuredDeployments - depends_on: ControllerDeploymentLoadBalancer_Step1 + depends_on: ControllerLoadBalancerDeployment_Step1 properties: servers: {get_param: servers} config: {get_resource: ControllerPuppetConfig} @@ -58,12 +50,12 @@ resources: ControllerRingbuilderDeployment_Step3: type: OS::Heat::StructuredDeployments - depends_on: ControllerDeploymentServicesBase_Step2 + depends_on: ControllerServicesBaseDeployment_Step2 properties: servers: {get_param: servers} config: {get_resource: ControllerRingbuilderPuppetConfig} - ControllerDeploymentOvercloudServices_Step4: + ControllerOvercloudServicesDeployment_Step4: type: OS::Heat::StructuredDeployments depends_on: ControllerRingbuilderDeployment_Step3 properties: @@ -72,11 +64,19 @@ resources: input_values: step: 3 + ControllerOvercloudServicesDeployment_Step5: + type: OS::Heat::StructuredDeployments + depends_on: ControllerOvercloudServicesDeployment_Step4 + properties: + servers: {get_param: servers} + config: {get_resource: ControllerPuppetConfig} + input_values: + step: 4 + # Note, this should come last, so use depends_on to ensure # this is created after any other resources. ExtraConfig: - depends_on: ControllerDeploymentOvercloudServices_Step4 + depends_on: ControllerOvercloudServicesDeployment_Step5 type: OS::TripleO::NodeExtraConfigPost properties: servers: {get_param: servers} - diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 80b790d5..bcbaf56e 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: > OpenStack controller node configured by Puppet. @@ -148,19 +148,29 @@ 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. type: string hidden: true HeatStackDomainAdminPassword: - default: unset - description: Password for heat_stack_domain_admin user. + description: Password for heat_domain_admin user. type: string + default: '' hidden: true HeatAuthEncryptionKey: description: Auth encryption key for heat-engine type: string + HorizonSecret: + description: Secret key for Django + type: string Image: type: string default: overcloud-control @@ -477,6 +487,7 @@ resources: - {get_param: VirtualIP} - ':8000/v1/waitcondition' heat_auth_encryption_key: {get_param: HeatAuthEncryptionKey} + horizon_secret: {get_param: HorizonSecret} admin_password: {get_param: AdminPassword} admin_token: {get_param: AdminToken} neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP} @@ -495,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} @@ -536,7 +548,6 @@ resources: - {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} @@ -600,11 +611,6 @@ resources: - {get_param: VirtualIP} - '/nova' pcsd_password: {get_param: PcsdPassword} - rabbit_hosts: - str_replace: - template: '["host"]' - params: - host: {get_param: VirtualIP} rabbit_username: {get_param: RabbitUserName} rabbit_password: {get_param: RabbitPassword} rabbit_cookie: {get_param: RabbitCookie} @@ -658,7 +664,6 @@ resources: controller_host: {get_input: controller_host} #local-ipv4 # Pacemaker - enable_pacemaker: {get_input: enable_pacemaker} hacluster_pwd: {get_input: pcsd_password} # Swift @@ -687,7 +692,6 @@ resources: cinder::api::auth_uri: {get_input: keystone_auth_uri} cinder::api::identity_uri: {get_input: keystone_identity_uri} cinder::api::bind_host: {get_input: controller_host} - cinder::rabbit_hosts: {get_input: rabbit_hosts} cinder::rabbit_userid: {get_input: rabbit_username} cinder::rabbit_password: {get_input: rabbit_password} cinder::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -719,6 +723,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} @@ -726,7 +731,6 @@ resources: heat::engine::heat_metadata_server_url: {get_input: heat.metadata_server_url} heat::engine::heat_waitcondition_server_url: {get_input: heat.waitcondition_server_url} heat::engine::auth_encryption_key: {get_input: heat_auth_encryption_key} - heat::rabbit_hosts: {get_input: rabbit_hosts} heat::rabbit_userid: {get_input: rabbit_username} heat::rabbit_password: {get_input: rabbit_password} heat::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -740,13 +744,8 @@ resources: heat::database_connection: {get_input: heat_dsn} heat::instance_user: heat-admin heat::debug: {get_input: debug} - # TO-DO: Remove this class as soon as Keystone v3 will be fully functional - heat::keystone::domain::auth_url: {list_join: ['', ['http://', {get_param: VirtualIP} , ':35357/v2.0']]} - heat::keystone::domain::keystone_password: {get_input: admin_password} - heat::keystone::domain::domain_password: {get_input: heat_stack_domain_admin_password} # Keystone - keystone::roles::admin::password: {get_input: admin_password} keystone::admin_token: {get_input: admin_token} keystone_ca_certificate: {get_input: keystone_ca_certificate} keystone_signing_key: {get_input: keystone_signing_key} @@ -770,7 +769,6 @@ resources: # Neutron neutron::bind_host: {get_input: controller_host} - neutron::rabbit_hosts: {get_input: rabbit_hosts} neutron::rabbit_password: {get_input: rabbit_password} neutron::rabbit_user: {get_input: rabbit_user} neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -806,7 +804,6 @@ resources: 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} ceilometer::rabbit_password: {get_input: rabbit_password} ceilometer::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -821,7 +818,6 @@ resources: snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} # Nova - nova::rabbit_hosts: {get_input: rabbit_hosts} nova::rabbit_userid: {get_input: rabbit_username} nova::rabbit_password: {get_input: rabbit_password} nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} @@ -838,6 +834,12 @@ resources: nova::network::neutron::neutron_url: {get_input: neutron_url} nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url} + # Horizon + horizon::django_debug: {get_input: debug} + horizon::secret_key: {get_input: horizon_secret} + horizon::bind_address: {get_input: controller_host} + horizon::keystone_url: {get_input: keystone_auth_uri} + # Rabbit rabbitmq::node_ip_address: {get_input: controller_host} rabbitmq::erlang_cookie: {get_input: rabbit_cookie} 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 b7fb84ab..c15d43ea 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -12,3 +12,11 @@ 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: '' + +sysctl_settings: + net.ipv4.tcp_keepalive_intvl: + value: 1 + net.ipv4.tcp_keepalive_probes: + value: 5 + net.ipv4.tcp_keepalive_time: + value: 5
\ No newline at end of file diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index 421bbdfb..4f46c7fb 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -1,19 +1,25 @@ - # Hiera data here applies to all controller nodes -keystone::roles::admin::email: 'root@localhost' -keystone::roles::admin::admin_tenant: 'admin' - nova::api::enabled: true nova::conductor::enabled: true nova::consoleauth::enabled: true nova::vncproxy::enabled: true nova::scheduler::enabled: true +# rabbitmq rabbitmq::delete_guest_user: false rabbitmq::wipe_db_on_cookie_change: true rabbitmq::port: '5672' rabbitmq::package_source: undef rabbitmq::repos_ensure: false +rabbitmq_environment: + RABBITMQ_NODENAME: "rabbit@%{::hostname}" + RABBITMQ_SERVER_ERL_ARGS: '"+K true +A30 +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"' +rabbitmq_kernel_variables: + inet_dist_listen_min: '35672' + inet_dist_listen_max: '35672' +rabbitmq_config_variables: + tcp_listen_options: '[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]' + cluster_partition_handling: 'pause_minority' mongodb::server::replset: tripleo @@ -52,12 +58,9 @@ 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' @@ -80,17 +83,20 @@ cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterSch heat::engine::heat_stack_user_role: '' heat::engine::configure_delegated_roles: false heat::engine::trusts_delegated_roles: [] -heat::keystone::domain::keystone_admin: 'admin' -heat::keystone::domain::keystone_tenant: 'admin' -heat::keystone::domain::domain_name: 'heat_stack' -heat::keystone::domain::domain_admin: 'heat_stack_domain_admin' # pacemaker pacemaker::corosync::cluster_name: 'tripleo_cluster' pacemaker::corosync::manage_fw: false +# horizon +horizon::allowed_hosts: '*' + mysql::server::manage_config_file: true + +tripleo::loadbalancer::galera_master_ip: "%{hiera('bootstrap_nodeid_ip')}" +tripleo::loadbalancer::galera_master_hostname: "%{hiera('bootstrap_nodeid')}" + tripleo::loadbalancer::keystone_admin: true tripleo::loadbalancer::keystone_public: true tripleo::loadbalancer::neutron: true @@ -102,7 +108,6 @@ tripleo::loadbalancer::nova_osapi: true 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 diff --git a/puppet/manifests/overcloud_cephstorage.pp b/puppet/manifests/overcloud_cephstorage.pp index ce2ab3af..b645f9fe 100644 --- a/puppet/manifests/overcloud_cephstorage.pp +++ b/puppet/manifests/overcloud_cephstorage.pp @@ -24,6 +24,8 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } +create_resources(sysctl::value, hiera('sysctl_settings'), {}) + if count(hiera('ntp::servers')) > 0 { include ::ntp } diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index ffa55cdb..caca89a8 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -24,6 +24,8 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } +create_resources(sysctl::value, hiera('sysctl_settings'), {}) + if count(hiera('ntp::servers')) > 0 { include ::ntp } diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 9f385a1d..27272643 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -24,51 +24,15 @@ 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 { + create_resources(sysctl::value, hiera('sysctl_settings'), {}) + $controller_node_ips = split(hiera('controller_node_ips'), ',') class { '::tripleo::loadbalancer' : controller_hosts => $controller_node_ips, - manage_vip => $enable_keepalived, - } - - if $enable_pacemaker { - $pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G') - 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 $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, - } - } + manage_vip => true, } } @@ -82,6 +46,7 @@ if hiera('step') >= 2 { # MongoDB 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') @@ -127,8 +92,10 @@ if hiera('step') >= 2 { config_file => $mysql_config_file, override_options => { 'mysqld' => { - 'bind-address' => hiera('controller_host') - } + 'bind-address' => hiera('controller_host'), + 'max_connections' => '1024', + 'open_files_limit' => '-1', + }, } } @@ -195,46 +162,24 @@ if hiera('step') >= 2 { } } - 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, - } -> + $rabbit_nodes = hiera('rabbit_node_ips') + if count($rabbit_nodes) > 1 { class { '::rabbitmq': - service_manage => false, - environment_variables => { - 'RABBITMQ_NODENAME' => "rabbit@$::hostname", - }, + config_cluster => true, + cluster_nodes => $rabbit_nodes, + tcp_keepalive => false, + config_kernel_variables => hiera('rabbitmq_kernel_variables'), + config_variables => hiera('rabbitmq_config_variables'), + environment_variables => hiera('rabbitmq_environment'), } - 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'], - } + rabbitmq_policy { 'ha-all@/': + pattern => '^(?!amq\.).*', + definition => { + 'ha-mode' => 'all', + }, } } 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 - } + include ::rabbitmq } # pre-install swift here so we can build rings @@ -260,7 +205,6 @@ if hiera('step') >= 2 { if hiera('step') >= 3 { include ::keystone - include ::keystone::roles::admin #TODO: need a cleanup-keystone-tokens.sh solution here keystone_config { @@ -294,11 +238,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')]), @@ -462,9 +416,13 @@ if hiera('step') >= 3 { include ::heat::api_cfn include ::heat::api_cloudwatch include ::heat::engine - # TO-DO: Remove this class as soon as Keystone v3 will be fully functional - include ::heat::keystone::domain - Service['keystone'] -> Class['::keystone::roles::admin'] -> Exec['heat_domain_create'] + + # Horizon + $vhost_params = { add_listen => false } + class { 'horizon': + cache_server_ip => split(hiera('memcache_node_ips', '127.0.0.1'), ','), + vhost_extra_params => $vhost_params, + } $snmpd_user = hiera('snmpd_readonly_user_name') snmp::snmpv3_user { $snmpd_user: diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp new file mode 100644 index 00000000..99344532 --- /dev/null +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -0,0 +1,768 @@ +# Copyright 2015 Red Hat, Inc. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +Pcmk_resource <| |> { + tries => 10, + try_sleep => 3, +} + +if !str2bool(hiera('enable_package_install', 'false')) { + case $::osfamily { + 'RedHat': { + Package { provider => 'norpm' } # provided by tripleo-puppet + } + default: { + warning('enable_package_install option not supported.') + } + } +} + +if $::hostname == downcase(hiera('bootstrap_nodeid')) { + $pacemaker_master = true + $sync_db = true +} else { + $pacemaker_master = false + $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'), {}) + + if count(hiera('ntp::servers')) > 0 { + include ::ntp + } + + $controller_node_ips = split(hiera('controller_node_ips'), ',') + $controller_node_names = split(downcase(hiera('controller_node_names')), ',') + class { '::tripleo::loadbalancer' : + controller_hosts => $controller_node_ips, + controller_hosts_names => $controller_node_names, + manage_vip => false, + haproxy_service_manage => false, + } + + $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G')) + 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, + } + + # Only configure RabbitMQ in this step, don't start it yet to + # avoid races where non-master nodes attempt to start without + # config (eg. binding on 0.0.0.0) + # The module ignores erlang_cookie if cluster_config is false + class { '::rabbitmq': + service_manage => false, + tcp_keepalive => false, + config_kernel_variables => hiera('rabbitmq_kernel_variables'), + config_variables => hiera('rabbitmq_config_variables'), + environment_variables => hiera('rabbitmq_environment'), + } -> + file { '/var/lib/rabbitmq/.erlang.cookie': + ensure => 'present', + owner => 'rabbitmq', + group => 'rabbitmq', + mode => '0400', + content => hiera('rabbitmq::erlang_cookie'), + replace => true, + } + + # MongoDB + include ::mongodb::globals + + # FIXME: replace with service_manage => false on ::mongodb::server + # when this is merged: https://github.com/puppetlabs/pupp etlabs-mongodb/pull/198 + class { '::mongodb::server' : + service_ensure => undef, + service_enable => false, + } + + # Galera + 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' + } + $galera_nodes = downcase(hiera('galera_node_names', $::hostname)) + $galera_nodes_count = count(split($galera_nodes, ',')) + + $mysqld_options = { + 'mysqld' => { + 'skip-name-resolve' => '1', + 'binlog_format' => 'ROW', + 'default-storage-engine' => 'innodb', + 'innodb_autoinc_lock_mode' => '2', + 'innodb_locks_unsafe_for_binlog'=> '1', + 'query_cache_size' => '0', + 'query_cache_type' => '0', + 'bind-address' => hiera('controller_host'), + 'max_connections' => '1024', + 'open_files_limit' => '-1', + 'wsrep_provider' => '/usr/lib64/galera/libgalera_smm.so', + 'wsrep_cluster_name' => 'galera_cluster', + 'wsrep_slave_threads' => '1', + 'wsrep_certify_nonPK' => '1', + 'wsrep_max_ws_rows' => '131072', + 'wsrep_max_ws_size' => '1073741824', + 'wsrep_debug' => '0', + 'wsrep_convert_LOCK_to_trx' => '0', + 'wsrep_retry_autocommit' => '1', + 'wsrep_auto_increment_control' => '1', + 'wsrep_drupal_282555_workaround'=> '0', + 'wsrep_causal_reads' => '0', + 'wsrep_notify_cmd' => '', + 'wsrep_sst_method' => 'rsync', + } + } + + class { '::mysql::server': + create_root_user => false, + create_root_my_cnf => false, + config_file => $mysql_config_file, + override_options => $mysqld_options, + service_manage => false, + } + +} + +if hiera('step') >= 2 { + + 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::service { 'haproxy': + clone_params => true, + } + + pacemaker::resource::ocf { 'rabbitmq': + ocf_agent_name => 'heartbeat:rabbitmq-cluster', + resource_params => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'', + clone_params => 'ordered=true interleave=true', + require => Class['::rabbitmq'], + } + + if downcase(hiera('ceilometer_backend')) == 'mongodb' { + pacemaker::resource::service { $::mongodb::params::service_name : + op_params => 'start timeout=120s', + clone_params => true, + require => Class['::mongodb::server'], + before => Exec['mongodb-ready'], + } + # NOTE (spredzy) : The replset can only be run + # once all the nodes have joined the cluster. + $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') + $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 => 30, + tries => 180, + try_sleep => 10, + } + mongodb_replset { $mongodb_replset : + members => $mongo_node_ips_with_port, + require => Exec['mongodb-ready'], + } + } + + pacemaker::resource::ocf { 'galera' : + ocf_agent_name => 'heartbeat:galera', + op_params => 'promote timeout=300s on-fail=block --master', + meta_params => "master-max=${galera_nodes_count} ordered=true", + resource_params => "additional_parameters='--open-files-limit=16384' enable_creation=true wsrep_cluster_address='gcomm://${galera_nodes}'", + require => Class['::mysql::server'], + before => Exec['galera-ready'], + } + mysql_user { 'clustercheckuser@localhost' : + password_hash => mysql_password($clustercheck_password), + require => Exec['galera-ready'], + } + } + + # 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'), + } + } + + exec { 'galera-ready' : + command => '/usr/bin/clustercheck >/dev/null', + timeout => 30, + tries => 180, + try_sleep => 10, + environment => ["AVAILABLE_WHEN_READONLY=0"], + require => File['/etc/sysconfig/clustercheck'], + } + + file { '/etc/sysconfig/clustercheck' : + ensure => file, + content => "MYSQL_USERNAME=root\n +MYSQL_PASSWORD=''\n +MYSQL_HOST=localhost\n", + } + + xinetd::service { 'galera-monitor' : + port => '9200', + server => '/usr/bin/clustercheck', + per_source => 'UNLIMITED', + log_on_success => '', + log_on_failure => 'HOST', + flags => 'REUSE', + service_type => 'UNLISTED', + user => 'root', + group => 'root', + require => File['/etc/sysconfig/clustercheck'], + } + + # Create all the database schemas + # Example DSN format: mysql://user:password@host/dbname + if $sync_db { + $allowed_hosts = ['%',hiera('controller_host')] + $keystone_dsn = split(hiera('keystone::database_connection'), '[@:/?]') + class { 'keystone::db::mysql': + user => $keystone_dsn[3], + password => $keystone_dsn[4], + host => $keystone_dsn[5], + dbname => $keystone_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $glance_dsn = split(hiera('glance::api::database_connection'), '[@:/?]') + class { 'glance::db::mysql': + user => $glance_dsn[3], + password => $glance_dsn[4], + host => $glance_dsn[5], + dbname => $glance_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $nova_dsn = split(hiera('nova::database_connection'), '[@:/?]') + class { 'nova::db::mysql': + user => $nova_dsn[3], + password => $nova_dsn[4], + host => $nova_dsn[5], + dbname => $nova_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $neutron_dsn = split(hiera('neutron::server::database_connection'), '[@:/?]') + class { 'neutron::db::mysql': + user => $neutron_dsn[3], + password => $neutron_dsn[4], + host => $neutron_dsn[5], + dbname => $neutron_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $cinder_dsn = split(hiera('cinder::database_connection'), '[@:/?]') + class { 'cinder::db::mysql': + user => $cinder_dsn[3], + password => $cinder_dsn[4], + host => $cinder_dsn[5], + dbname => $cinder_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + $heat_dsn = split(hiera('heat::database_connection'), '[@:/?]') + class { 'heat::db::mysql': + user => $heat_dsn[3], + password => $heat_dsn[4], + host => $heat_dsn[5], + dbname => $heat_dsn[6], + allowed_hosts => $allowed_hosts, + require => Exec['galera-ready'], + } + 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, + require => Exec['galera-ready'], + } + } + } + + # pre-install swift here so we can build rings + include ::swift + + # Ceph + $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false) + $enable_ceph = $cinder_enable_rbd_backend + + if $enable_ceph { + class { 'ceph::profile::params': + mon_initial_members => downcase(hiera('ceph_mon_initial_members')) + } + include ::ceph::profile::mon + } + + if str2bool(hiera('enable_ceph_storage', 'false')) { + include ::ceph::profile::client + include ::ceph::profile::osd + } + + # Memcached + include ::memcached + +} #END STEP 2 + +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 + keystone_config { + 'ec2/driver': value => 'keystone.contrib.ec2.backends.sql.Ec2'; + } + file { [ '/etc/keystone/ssl', '/etc/keystone/ssl/certs', '/etc/keystone/ssl/private' ]: + ensure => 'directory', + owner => 'keystone', + group => 'keystone', + require => Package['keystone'], + } + file { '/etc/keystone/ssl/certs/signing_cert.pem': + content => hiera('keystone_signing_certificate'), + owner => 'keystone', + group => 'keystone', + notify => Service['keystone'], + require => File['/etc/keystone/ssl/certs'], + } + file { '/etc/keystone/ssl/private/signing_key.pem': + content => hiera('keystone_signing_key'), + owner => 'keystone', + group => 'keystone', + notify => Service['keystone'], + require => File['/etc/keystone/ssl/private'], + } + file { '/etc/keystone/ssl/certs/ca.pem': + content => hiera('keystone_ca_certificate'), + owner => 'keystone', + group => 'keystone', + notify => Service['keystone'], + 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 + class { 'glance::api': + known_stores => [$glance_store], + manage_service => false, + enabled => false, + } + class { '::glance::registry' : + sync_db => $sync_db, + manage_service => false, + enabled => false, + } + include join(['::glance::backend::', $glance_backend]) + + class { 'nova': + glance_api_servers => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]), + } + + 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::network::neutron + + 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, + } + + file { '/etc/neutron/dnsmasq-neutron.conf': + content => hiera('neutron_dnsmasq_options'), + owner => 'neutron', + group => 'neutron', + notify => Service['neutron-dhcp-service'], + require => Package['neutron'], + } + + class { 'neutron::plugins::ml2': + flat_networks => split(hiera('neutron_flat_networks'), ','), + tenant_network_types => [hiera('neutron_tenant_network_type')], + type_drivers => [hiera('neutron_tenant_network_type')], + } + + 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']), + } + + Service['neutron-server'] -> Service['neutron-dhcp-service'] + Service['neutron-server'] -> Service['neutron-l3'] + Service['neutron-server'] -> Service['neutron-ovs-agent-service'] + Service['neutron-server'] -> Service['neutron-metadata'] + + include ::cinder + class { '::cinder::api': + sync_db => $sync_db, + manage_service => false, + enabled => false, + } + class { '::cinder::scheduler' : + manage_service => false, + enabled => false, + } + class { '::cinder::volume' : + manage_service => false, + enabled => false, + } + include ::cinder::glance + class {'cinder::setup_test_volume': + size => join([hiera('cinder_lvm_loop_device_size'), 'M']), + } + + $cinder_enable_iscsi = hiera('cinder_enable_iscsi_backend', true) + if $cinder_enable_iscsi { + $cinder_iscsi_backend = 'tripleo_iscsi' + + cinder::backend::iscsi { $cinder_iscsi_backend : + iscsi_ip_address => hiera('cinder_iscsi_ip_address'), + iscsi_helper => hiera('cinder_iscsi_helper'), + } + } + + if $enable_ceph { + + Ceph_pool { + pg_num => hiera('ceph::profile::params::osd_pool_default_pg_num'), + pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'), + size => hiera('ceph::profile::params::osd_pool_default_size'), + } + + $ceph_pools = hiera('ceph_pools') + ceph::pool { $ceph_pools : } + } + + if $cinder_enable_rbd_backend { + $cinder_rbd_backend = 'tripleo_ceph' + + cinder_config { + "${cinder_rbd_backend}/host": value => 'hostgroup'; + } + + cinder::backend::rbd { $cinder_rbd_backend : + rbd_pool => 'volumes', + rbd_user => 'openstack', + rbd_secret_uuid => hiera('ceph::profile::params::fsid'), + require => Ceph::Pool['volumes'], + } + } + + $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend]) + class { '::cinder::backends' : + enabled_backends => $cinder_enabled_backends, + } + + # 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 + include ::swift::proxy::keystone + include ::swift::proxy::authtoken + include ::swift::proxy::staticweb + include ::swift::proxy::ceilometer + include ::swift::proxy::ratelimit + include ::swift::proxy::catch_errors + include ::swift::proxy::tempurl + include ::swift::proxy::formpost + + # swift storage + if str2bool(hiera('enable_swift_storage', 'true')) { + 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, + 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 : } + } + + # Ceilometer + $ceilometer_backend = downcase(hiera('ceilometer_backend')) + case $ceilometer_backend { + /mysql/ : { + $ceilometer_database_connection = hiera('ceilometer_mysql_conn_string') + } + default : { + $ceilometer_database_connection = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}" + } + } + include ::ceilometer + 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 + class { '::ceilometer::db' : + database_connection => $ceilometer_database_connection, + sync_db => $sync_db, + } + class { 'ceilometer::agent::auth': + auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']), + } + + Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" } + + # Heat + class { '::heat' : + sync_db => $sync_db, + } + 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 } + class { 'horizon': + cache_server_ip => split(hiera('memcache_node_ips', '127.0.0.1'), ','), + vhost_extra_params => $vhost_params, + } + + $snmpd_user = hiera('snmpd_readonly_user_name') + snmp::snmpv3_user { $snmpd_user: + authtype => 'MD5', + authpass => hiera('snmpd_readonly_user_password'), + } + class { 'snmp': + agentaddress => ['udp:161','udp6:[::1]:161'], + 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 + +if hiera('step') >= 4 { + if $pacemaker_master { + + # Cinder + pacemaker::resource::service { $::cinder::params::api_service : + clone_params => "interleave=true", + } + pacemaker::resource::service { $::cinder::params::scheduler_service : + clone_params => "interleave=true", + } + pacemaker::resource::service { $::cinder::params::volume_service : } + + pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint': + constraint_type => "order", + first_resource => "${::cinder::params::api_service}-clone", + second_resource => "${::cinder::params::scheduler_service}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::cinder::params::api_service], + Pacemaker::Resource::Service[$::cinder::params::scheduler_service]], + } + pacemaker::constraint::colocation { 'cinder-scheduler-with-cinder-api-colocation': + source => "${::cinder::params::scheduler_service}-clone", + target => "${::cinder::params::api_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::cinder::params::api_service], + Pacemaker::Resource::Service[$::cinder::params::scheduler_service]], + } + pacemaker::constraint::base { 'cinder-scheduler-then-cinder-volume-constraint': + constraint_type => "order", + first_resource => "${::cinder::params::scheduler_service}-clone", + second_resource => "${::cinder::params::volume_service}", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service], + Pacemaker::Resource::Service[$::cinder::params::volume_service]], + } + pacemaker::constraint::colocation { 'cinder-volume-with-cinder-scheduler-colocation': + source => "${::cinder::params::volume_service}", + target => "${::cinder::params::scheduler_service}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::cinder::params::scheduler_service], + Pacemaker::Resource::Service[$::cinder::params::volume_service]], + } + + } + + # Glance + pacemaker::resource::service { $::glance::params::registry_service_name : + clone_params => "interleave=true", + } + pacemaker::resource::service { $::glance::params::api_service_name : + clone_params => "interleave=true", + } + + pacemaker::constraint::base { 'glance-registry-then-glance-api-constraint': + constraint_type => "order", + first_resource => "${::glance::params::registry_service_name}-clone", + second_resource => "${::glance::params::api_service_name}-clone", + first_action => "start", + second_action => "start", + require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], + Pacemaker::Resource::Service[$::glance::params::api_service_name]], + } + pacemaker::constraint::colocation { 'glance-registry-with-glance-api-colocation': + source => "${::glance::params::registry_service_name}-clone", + target => "${::glance::params::api_service_name}-clone", + score => "INFINITY", + require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], + Pacemaker::Resource::Service[$::glance::params::api_service_name]], + } + +} #END STEP 4 diff --git a/puppet/manifests/overcloud_object.pp b/puppet/manifests/overcloud_object.pp index 8d0ad783..24799c8c 100644 --- a/puppet/manifests/overcloud_object.pp +++ b/puppet/manifests/overcloud_object.pp @@ -24,6 +24,8 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } +create_resources(sysctl::value, hiera('sysctl_settings'), {}) + if count(hiera('ntp::servers')) > 0 { include ::ntp } diff --git a/puppet/manifests/overcloud_volume.pp b/puppet/manifests/overcloud_volume.pp index 3d7cb490..80cf6a21 100644 --- a/puppet/manifests/overcloud_volume.pp +++ b/puppet/manifests/overcloud_volume.pp @@ -24,6 +24,8 @@ if str2bool(hiera('disable_package_install', 'false')) { } } +create_resources(sysctl::value, hiera('sysctl_settings'), {}) + if count(hiera('ntp::servers')) > 0 { include ::ntp } diff --git a/puppet/swift-devices-and-proxy-config.yaml b/puppet/swift-devices-and-proxy-config.yaml index 731f69a1..92ef5c1c 100644 --- a/puppet/swift-devices-and-proxy-config.yaml +++ b/puppet/swift-devices-and-proxy-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Swift Devices and Proxy Config for Puppet' parameters: diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml index 3e01fe77..7a3c1abb 100644 --- a/puppet/swift-storage-post.yaml +++ b/puppet/swift-storage-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'OpenStack swift storage node post deployment for Puppet' parameters: diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index 45922436..b1c4f238 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'OpenStack swift storage node configured by Puppet' parameters: Flavor: diff --git a/swift-devices-and-proxy-config.yaml b/swift-devices-and-proxy-config.yaml index d422a3ef..4f01dbea 100644 --- a/swift-devices-and-proxy-config.yaml +++ b/swift-devices-and-proxy-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Swift Devices and Proxy Config' parameters: diff --git a/swift-storage-post.yaml b/swift-storage-post.yaml index dd51af0e..53490d71 100644 --- a/swift-storage-post.yaml +++ b/swift-storage-post.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 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 diff --git a/swift-storage.yaml b/swift-storage.yaml index 42c591d2..ea288649 100644 --- a/swift-storage.yaml +++ b/swift-storage.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: 2015-04-30 description: 'Common Swift Storage Configuration' parameters: ExtraConfig: |