aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ceph-storage-post.yaml12
-rw-r--r--ceph-storage.yaml19
-rw-r--r--cinder-storage-post.yaml10
-rw-r--r--cinder-storage.yaml22
-rw-r--r--compute-post.yaml11
-rw-r--r--compute.yaml12
-rw-r--r--controller-post.yaml9
-rw-r--r--controller.yaml36
-rw-r--r--deprecated/overcloud-source.yaml16
-rw-r--r--extraconfig/post_deploy/default.yaml5
-rw-r--r--extraconfig/post_deploy/example.yaml27
-rw-r--r--firstboot/userdata_default.yaml20
-rw-r--r--firstboot/userdata_example.yaml60
-rw-r--r--nagios3.yaml7
-rw-r--r--overcloud-resource-registry-puppet.yaml8
-rw-r--r--overcloud-resource-registry.yaml8
-rw-r--r--overcloud-without-mergepy.yaml34
-rw-r--r--puppet/all-nodes-config.yaml8
-rw-r--r--puppet/ceph-storage-post-puppet.yaml11
-rw-r--r--puppet/ceph-storage-puppet.yaml19
-rw-r--r--puppet/cinder-storage-post.yaml4
-rw-r--r--puppet/cinder-storage-puppet.yaml23
-rw-r--r--puppet/compute-post-puppet.yaml9
-rw-r--r--puppet/compute-puppet.yaml14
-rw-r--r--puppet/controller-post-puppet.yaml9
-rw-r--r--puppet/controller-puppet.yaml61
-rw-r--r--puppet/hieradata/common.yaml2
-rw-r--r--puppet/hieradata/controller.yaml12
-rw-r--r--puppet/manifests/overcloud_compute.pp6
-rw-r--r--puppet/manifests/overcloud_controller.pp206
-rw-r--r--puppet/swift-devices-and-proxy-config.yaml9
-rw-r--r--puppet/swift-storage-post.yaml13
-rw-r--r--puppet/swift-storage-puppet.yaml19
-rw-r--r--swift-storage-post.yaml10
-rw-r--r--swift-storage.yaml18
35 files changed, 656 insertions, 113 deletions
diff --git a/ceph-storage-post.yaml b/ceph-storage-post.yaml
index 2a0fa043..12d03f18 100644
--- a/ceph-storage-post.yaml
+++ b/ceph-storage-post.yaml
@@ -5,4 +5,14 @@ description: 'Ceph Storage Post Deployment'
parameters:
servers:
- type: json \ No newline at end of file
+ type: json
+
+resources:
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/ceph-storage.yaml b/ceph-storage.yaml
index d047488b..07d7f568 100644
--- a/ceph-storage.yaml
+++ b/ceph-storage.yaml
@@ -28,6 +28,7 @@ parameters:
default: ''
description: The list of ip/names to use as Ceph monitors
type: json
+
resources:
CephStorage:
type: OS::Nova::Server
@@ -36,9 +37,23 @@ resources:
{get_param: Image}
flavor: {get_param: OvercloudCephStorageFlavor}
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::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:
@@ -99,7 +114,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/cinder-storage-post.yaml b/cinder-storage-post.yaml
index 0331685a..08818381 100644
--- a/cinder-storage-post.yaml
+++ b/cinder-storage-post.yaml
@@ -6,3 +6,13 @@ description: 'Common Block Storage Post Deployment'
parameters:
servers:
type: json
+
+resources:
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/cinder-storage.yaml b/cinder-storage.yaml
index 7eab89a6..7d44094f 100644
--- a/cinder-storage.yaml
+++ b/cinder-storage.yaml
@@ -71,10 +71,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
@@ -103,9 +103,23 @@ 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
properties:
@@ -145,7 +159,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/compute-post.yaml b/compute-post.yaml
index 8c49709f..bd7639c5 100644
--- a/compute-post.yaml
+++ b/compute-post.yaml
@@ -6,3 +6,14 @@ description: 'Compute Post Deployment'
parameters:
servers:
type: json
+
+resources:
+
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/compute.yaml b/compute.yaml
index 3723169c..672687ca 100644
--- a/compute.yaml
+++ b/compute.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:
@@ -259,9 +259,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
@@ -423,7 +427,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/controller-post.yaml b/controller-post.yaml
index 31a3062a..e630c221 100644
--- a/controller-post.yaml
+++ b/controller-post.yaml
@@ -6,3 +6,12 @@ description: 'Controller Post Deployment'
parameters:
servers:
type: json
+
+resources:
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
diff --git a/controller.yaml b/controller.yaml
index 33286d19..71b8a04e 100644
--- a/controller.yaml
+++ b/controller.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.
@@ -63,6 +67,23 @@ parameters:
default: ''
description: Set to True to enable debugging on all services.
type: string
+ EnableGalera:
+ default: true
+ description: Whether to use Galera instead of regular MariaDB.
+ type: boolean
+ EnablePacemaker:
+ default: false
+ description: If enabled services will be monitored by Pacemaker; it
+ will manage VIPs as well, in place of Keepalived.
+ type: boolean
+ EnableCephStorage:
+ default: false
+ description: Whether to deploy Ceph Storage (OSD) on the Controller
+ type: boolean
+ EnableSwiftStorage:
+ default: true
+ description: Whether to enable Swift Storage on the Controller
+ type: boolean
ExtraConfig:
default: {}
description: |
@@ -204,7 +225,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.
@@ -240,7 +261,7 @@ parameters:
default: "True"
NeutronFlatNetworks:
type: string
- default: ''
+ default: 'datacentre'
description: If set, flat networks to configure in neutron plugins.
NeutronNetworkType:
default: 'gre'
@@ -298,6 +319,9 @@ parameters:
NtpServer:
type: string
default: ''
+ PcsdPassword:
+ type: string
+ description: The password for the 'pcsd' user.
PublicVirtualInterface:
default: 'br-ex'
description: >
@@ -398,9 +422,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
@@ -898,7 +926,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/deprecated/overcloud-source.yaml b/deprecated/overcloud-source.yaml
index 82fe6755..d355c4df 100644
--- a/deprecated/overcloud-source.yaml
+++ b/deprecated/overcloud-source.yaml
@@ -877,10 +877,6 @@ resources:
- ' '
- - {get_attr: [NovaCompute0, networks, ctlplane, 0]}
- {get_attr: [NovaCompute0, name]}
- - Fn::Join:
- - '.'
- - - {get_attr: [NovaCompute0, name]}
- - 'novalocal'
- Fn::Join:
- "\n"
- Merge::Map:
@@ -889,10 +885,6 @@ resources:
- ' '
- - {get_attr: [BlockStorage0, networks, ctlplane, 0]}
- {get_attr: [BlockStorage0, name]}
- - Fn::Join:
- - '.'
- - - {get_attr: [BlockStorage0, name]}
- - 'novalocal'
- Fn::Join:
- "\n"
- Merge::Map:
@@ -901,10 +893,6 @@ resources:
- ' '
- - {get_attr: [SwiftStorage0, networks, ctlplane, 0]}
- {get_attr: [SwiftStorage0, name]}
- - Fn::Join:
- - '.'
- - - {get_attr: [SwiftStorage0, name]}
- - 'novalocal'
- Fn::Join:
- "\n"
- Merge::Map:
@@ -913,10 +901,6 @@ resources:
- ' '
- - {get_attr: [controller0, networks, ctlplane, 0]}
- {get_attr: [controller0, name]}
- - Fn::Join:
- - '.'
- - - {get_attr: [controller0, name]}
- - 'novalocal'
- {get_param: CloudName}
rabbit:
nodes:
diff --git a/extraconfig/post_deploy/default.yaml b/extraconfig/post_deploy/default.yaml
new file mode 100644
index 00000000..ddfe0243
--- /dev/null
+++ b/extraconfig/post_deploy/default.yaml
@@ -0,0 +1,5 @@
+heat_template_version: 2014-10-16
+description: 'Extra Post Deployment Config'
+parameters:
+ servers:
+ type: json
diff --git a/extraconfig/post_deploy/example.yaml b/extraconfig/post_deploy/example.yaml
new file mode 100644
index 00000000..6b816d40
--- /dev/null
+++ b/extraconfig/post_deploy/example.yaml
@@ -0,0 +1,27 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Example extra config for post-deployment
+
+# Note extra parameters can be defined, then passed data via the
+# environment parameter_defaults, without modifying the parent template
+parameters:
+ servers:
+ type: json
+
+resources:
+
+ ExtraConfig:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config: |
+ #!/bin/sh
+ echo "extra" > /root/extra
+
+ ExtraDeployments:
+ type: OS::Heat::StructuredDeployments
+ properties:
+ servers: {get_param: servers}
+ config: {get_resource: ExtraConfig}
+ actions: ['CREATE'] # Only do this on CREATE
diff --git a/firstboot/userdata_default.yaml b/firstboot/userdata_default.yaml
new file mode 100644
index 00000000..140d2bf8
--- /dev/null
+++ b/firstboot/userdata_default.yaml
@@ -0,0 +1,20 @@
+heat_template_version: 2014-10-16
+
+description: >
+ This is a default no-op template which provides empty user-data
+ which can be passed to the OS::Nova::Server resources.
+ This template can be replaced with a different implementation via
+ the resource registry, such that deployers may customize their
+ first-boot configuration.
+
+resources:
+ userdata:
+ type: OS::Heat::MultipartMime
+
+outputs:
+ # This means get_resource from the parent template will get the userdata, see:
+ # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
+ # Note this is new-for-kilo, an alternative is returning a value then using
+ # get_attr in the parent template instead.
+ OS::stack_id:
+ value: {get_resource: userdata}
diff --git a/firstboot/userdata_example.yaml b/firstboot/userdata_example.yaml
new file mode 100644
index 00000000..a0d8c7ac
--- /dev/null
+++ b/firstboot/userdata_example.yaml
@@ -0,0 +1,60 @@
+heat_template_version: 2014-10-16
+
+# NOTE: You don't need to pass the parameter explicitly from the
+# parent template, it can be specified via the parameter_defaults
+# in the resource_registry instead, if you want to override the default
+# and/or share values with other templates in the tree.
+parameters:
+ extra_username:
+ type: string
+ default: extrauser
+
+description: >
+ This is an example showing how you can do firstboot configuration
+ of the nodes via cloud-init. To enable this, replace the default
+ mapping of OS::TripleO::NodeUserData in ../overcloud_resource_registry*
+
+resources:
+ userdata:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: {get_resource: user_config}
+ - config: {get_resource: ssh_config}
+
+ # Get cloud-init to create an extra user, in addition to the default for the
+ # distro. Note there are various options, including configuring ssh keys,
+ # but atm I can only see how to specify the keys explicitly, not via metadata
+ user_config:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ users:
+ - default
+ - name: {get_param: extra_username}
+
+ # Setup ssh key for the extra user to match the key installed for the default
+ # user, e.g that provided via the nova keypair on instance boot
+ ssh_config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ config:
+ str_replace:
+ template: |
+ #!/bin/bash
+ curl http://169.254.169.254/openstack/2012-08-10/meta_data.json -o /root/meta_data.json
+ mkdir -p /home/$user/.ssh
+ chmod 700 /home/$user/.ssh
+ cat /root/meta_data.json | jq -r ".keys[0].data" > /home/$user/.ssh/authorized_keys
+ chmod 600 /home/$user/.ssh/authorized_keys
+ chown -R $user:$user /home/$user/.ssh
+ params:
+ $user: {get_param: extra_username}
+
+outputs:
+ # This means get_resource from the parent template will get the userdata, see:
+ # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
+ # Note this is new-for-kilo, an alternative is returning a value then using
+ # get_attr in the parent template instead.
+ OS::stack_id:
+ value: {get_resource: userdata}
diff --git a/nagios3.yaml b/nagios3.yaml
index 0db22b8b..e2ba8ccf 100644
--- a/nagios3.yaml
+++ b/nagios3.yaml
@@ -105,10 +105,15 @@ resources:
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
- user_data_format: SOFTWARE_CONFIG
networks:
- network: { get_param: server_network }
port: { get_resource: nagios_net_port }
+ user_data_format: SOFTWARE_CONFIG
+ user_data: {get_resource: NodeUserData}
+
+ NodeUserData:
+ type: OS::TripleO::NodeUserData
+
nagios_floating_ip:
type: OS::Neutron::FloatingIP
properties:
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
index c64cb494..2b9da710 100644
--- a/overcloud-resource-registry-puppet.yaml
+++ b/overcloud-resource-registry-puppet.yaml
@@ -1,11 +1,15 @@
resource_registry:
OS::TripleO::BlockStorage: puppet/cinder-storage-puppet.yaml
+ OS::TripleO::BlockStorage::Net::SoftwareConfig: net-config-noop.yaml
OS::TripleO::Compute: puppet/compute-puppet.yaml
+ OS::TripleO::Compute::Net::SoftwareConfig: net-config-bridge.yaml
OS::TripleO::SoftwareDeployment: OS::Heat::StructuredDeployment
OS::TripleO::Controller: puppet/controller-puppet.yaml
+ OS::TripleO::Controller::Net::SoftwareConfig: net-config-bridge.yaml
OS::TripleO::ObjectStorage: puppet/swift-storage-puppet.yaml
- OS::TripleO::Net::SoftwareConfig: net-config-bridge.yaml
+ OS::TripleO::ObjectStorage::Net::SoftwareConfig: net-config-noop.yaml
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
OS::TripleO::ComputePostDeployment: puppet/compute-post-puppet.yaml
OS::TripleO::ObjectStoragePostDeployment: puppet/swift-storage-post.yaml
@@ -15,6 +19,8 @@ resource_registry:
OS::TripleO::CephClusterConfig::SoftwareConfig: puppet/ceph-cluster-config.yaml
OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml
+ OS::TripleO::NodeUserData: firstboot/userdata_default.yaml
+ OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml
parameter_defaults:
EnablePackageInstall: false
diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml
index d4f75e07..69266405 100644
--- a/overcloud-resource-registry.yaml
+++ b/overcloud-resource-registry.yaml
@@ -1,11 +1,15 @@
resource_registry:
OS::TripleO::BlockStorage: cinder-storage.yaml
+ OS::TripleO::BlockStorage::Net::SoftwareConfig: net-config-noop.yaml
OS::TripleO::Compute: compute.yaml
+ OS::TripleO::Compute::Net::SoftwareConfig: net-config-noop.yaml
OS::TripleO::SoftwareDeployment: OS::Heat::StructuredDeployment
OS::TripleO::Controller: controller.yaml
+ OS::TripleO::Controller::Net::SoftwareConfig: net-config-noop.yaml
OS::TripleO::ObjectStorage: swift-storage.yaml
- OS::TripleO::Net::SoftwareConfig: net-config-noop.yaml
+ OS::TripleO::ObjectStorage::Net::SoftwareConfig: net-config-noop.yaml
OS::TripleO::CephStorage: ceph-storage.yaml
+ OS::TripleO::CephStorage::Net::SoftwareConfig: net-config-noop.yaml
OS::TripleO::ControllerPostDeployment: controller-post.yaml
OS::TripleO::ComputePostDeployment: compute-post.yaml
OS::TripleO::ObjectStoragePostDeployment: swift-storage-post.yaml
@@ -15,3 +19,5 @@ resource_registry:
OS::TripleO::CephClusterConfig::SoftwareConfig: ceph-cluster-config.yaml
OS::TripleO::AllNodes::SoftwareConfig: all-nodes-config.yaml
OS::TripleO::BootstrapNode::SoftwareConfig: bootstrap-config.yaml
+ OS::TripleO::NodeUserData: firstboot/userdata_default.yaml
+ OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml
diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml
index e0280eba..834dda2b 100644
--- a/overcloud-without-mergepy.yaml
+++ b/overcloud-without-mergepy.yaml
@@ -15,6 +15,10 @@ parameters:
description: The password for the keystone admin account, used for monitoring, querying neutron etc.
type: string
hidden: true
+ CeilometerBackend:
+ default: 'mongodb'
+ description: The ceilometer backend type.
+ type: string
CeilometerMeteringSecret:
default: unset
description: Secret shared by the ceilometer services.
@@ -259,6 +263,23 @@ parameters:
default: 'br-ex'
description: Interface where virtual ip will be assigned.
type: string
+ EnableGalera:
+ default: true
+ description: Whether to use Galera instead of regular MariaDB.
+ type: boolean
+ EnablePacemaker:
+ default: false
+ description: If enabled services will be monitored by Pacemaker; it
+ will manage VIPs as well, in place of Keepalived.
+ type: boolean
+ ControllerEnableCephStorage:
+ default: false
+ description: Whether to deploy Ceph Storage (OSD) on the Controller
+ type: boolean
+ ControllerEnableSwiftStorage:
+ default: true
+ description: Whether to enable Swift Storage on the Controller
+ type: boolean
ExtraConfig:
default: {}
description: |
@@ -512,6 +533,11 @@ resources:
HeatAuthEncryptionKey:
type: OS::Heat::RandomString
+ PcsdPassword:
+ type: OS::Heat::RandomString
+ properties:
+ length: 16
+
Controller:
type: OS::Heat::ResourceGroup
properties:
@@ -521,6 +547,7 @@ resources:
properties:
AdminPassword: {get_param: AdminPassword}
AdminToken: {get_param: AdminToken}
+ CeilometerBackend: {get_param: CeilometerBackend}
CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret}
CeilometerPassword: {get_param: CeilometerPassword}
CinderLVMLoopDeviceSize: {get_param: CinderLVMLoopDeviceSize}
@@ -532,6 +559,10 @@ resources:
ControlVirtualInterface: {get_param: ControlVirtualInterface}
ControllerExtraConfig: {get_param: controllerExtraConfig}
Debug: {get_param: Debug}
+ EnableGalera: {get_param: EnableGalera}
+ EnablePacemaker: {get_param: EnablePacemaker}
+ EnableCephStorage: {get_param: ControllerEnableCephStorage}
+ EnableSwiftStorage: {get_param: ControllerEnableSwiftStorage}
ExtraConfig: {get_param: ExtraConfig}
Flavor: {get_param: OvercloudControlFlavor}
GlancePort: {get_param: GlancePort}
@@ -572,6 +603,7 @@ resources:
NeutronTunnelTypes: {get_param: NeutronTunnelTypes}
NovaPassword: {get_param: NovaPassword}
NtpServer: {get_param: NtpServer}
+ PcsdPassword: {get_resource: PcsdPassword}
PublicVirtualInterface: {get_param: PublicVirtualInterface}
RabbitPassword: {get_param: RabbitPassword}
RabbitUserName: {get_param: RabbitUserName}
@@ -863,7 +895,7 @@ resources:
ComputeNodesPostDeployment:
type: OS::TripleO::ComputePostDeployment
- depends_on: ComputeAllNodesDeployment
+ depends_on: [ComputeAllNodesDeployment, ComputeCephDeployment]
properties:
servers: {get_attr: [Compute, attributes, nova_server_resource]}
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
index 4d7af033..9345e5c5 100644
--- a/puppet/all-nodes-config.yaml
+++ b/puppet/all-nodes-config.yaml
@@ -54,14 +54,18 @@ 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:
- ','
- {get_param: controller_ips}
+ redis_node_ips:
+ list_join:
+ - ','
+ - {get_param: controller_ips}
outputs:
config_id:
diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml
index 5e1c42fa..93cc8d1d 100644
--- a/puppet/ceph-storage-post-puppet.yaml
+++ b/puppet/ceph-storage-post-puppet.yaml
@@ -1,7 +1,7 @@
heat_template_version: 2014-10-16
description: >
- OpenStack Ceph Storage node post deployment for Puppet.
+ OpenStack ceph storage node post deployment for Puppet
parameters:
servers:
@@ -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 1599a323..bc9b4b5a 100644
--- a/puppet/ceph-storage-puppet.yaml
+++ b/puppet/ceph-storage-puppet.yaml
@@ -1,5 +1,5 @@
heat_template_version: 2014-10-16
-description: 'Common Ceph Storage Configuration for Puppet'
+description: 'OpenStack ceph storage node configured by Puppet'
parameters:
Flavor:
description: Flavor for the Ceph Storage node.
@@ -40,6 +40,20 @@ resources:
networks:
- network: ctlplane
user_data_format: SOFTWARE_CONFIG
+ user_data: {get_resource: NodeUserData}
+
+ NodeUserData:
+ type: OS::TripleO::NodeUserData
+
+ NetworkConfig:
+ type: OS::TripleO::CephStorage::Net::SoftwareConfig
+
+ NetworkDeployment:
+ type: OS::TripleO::SoftwareDeployment
+ properties:
+ config: {get_attr: [NetworkConfig, config_id]}
+ server: {get_resource: CephStorage}
+
CephStorageDeployment:
type: OS::Heat::StructuredDeployment
properties:
@@ -52,6 +66,7 @@ resources:
params:
server: {get_param: NtpServer}
enable_package_install: {get_param: EnablePackageInstall}
+
CephStorageConfig:
type: OS::Heat::StructuredConfig
properties:
@@ -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-post.yaml b/puppet/cinder-storage-post.yaml
index 28e87800..e11493c4 100644
--- a/puppet/cinder-storage-post.yaml
+++ b/puppet/cinder-storage-post.yaml
@@ -1,7 +1,5 @@
heat_template_version: 2014-10-16
-description: 'Common Block Storage Post Deployment'
-# NOTE: this is a noop for os-apply-config style deployments because
-# post deployment ordering is controlled by tripleo-image-elements
+description: 'OpenStack cinder storage post deployment for Puppet'
parameters:
servers:
diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml
index c7fd2ca0..708f6a9b 100644
--- a/puppet/cinder-storage-puppet.yaml
+++ b/puppet/cinder-storage-puppet.yaml
@@ -1,5 +1,5 @@
heat_template_version: 2014-10-16
-description: 'Block Storage Configuration w/ Puppet'
+description: 'OpenStack cinder storage configured by Puppet'
parameters:
Image:
default: overcloud-cinder-volume
@@ -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 18fd5cba..80b790d5 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.
@@ -63,6 +67,23 @@ parameters:
default: ''
description: Set to True to enable debugging on all services.
type: string
+ EnableGalera:
+ default: true
+ description: Whether to use Galera instead of regular MariaDB.
+ type: boolean
+ EnablePacemaker:
+ default: false
+ description: If enabled services will be monitored by Pacemaker; it
+ will manage VIPs as well, in place of Keepalived.
+ type: boolean
+ EnableCephStorage:
+ default: false
+ description: Whether to deploy Ceph Storage (OSD) on the Controller
+ type: boolean
+ EnableSwiftStorage:
+ default: true
+ description: Whether to enable Swift Storage on the Controller
+ type: boolean
ExtraConfig:
default: {}
description: |
@@ -204,7 +225,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.
@@ -240,7 +261,7 @@ parameters:
default: "True"
NeutronFlatNetworks:
type: string
- default: ''
+ default: 'datacentre'
description: If set, flat networks to configure in neutron plugins.
NeutronL3HA:
default: 'False'
@@ -302,6 +323,9 @@ parameters:
NtpServer:
type: string
default: ''
+ PcsdPassword:
+ type: string
+ description: The password for the 'pcsd' user.
PublicVirtualInterface:
default: 'br-ex'
description: >
@@ -405,9 +429,13 @@ resources:
networks:
- network: ctlplane
user_data_format: SOFTWARE_CONFIG
+ user_data: {get_resource: NodeUserData}
+
+ NodeUserData:
+ type: OS::TripleO::NodeUserData
NetworkConfig:
- type: OS::TripleO::Net::SoftwareConfig
+ type: OS::TripleO::Controller::Net::SoftwareConfig
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
@@ -507,6 +535,10 @@ resources:
- - 'http://'
- {get_param: VirtualIP}
- ':5000/v2.0/'
+ enable_galera: {get_param: EnableGalera}
+ enable_pacemaker: {get_param: EnablePacemaker}
+ enable_ceph_storage: {get_param: EnableCephStorage}
+ enable_swift_storage: {get_param: EnableSwiftStorage}
mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
mysql_root_password: {get_param: MysqlRootPassword}
mysql_cluster_name:
@@ -549,6 +581,7 @@ 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:
@@ -566,6 +599,7 @@ resources:
- - 'mysql://nova:unset@'
- {get_param: VirtualIP}
- '/nova'
+ pcsd_password: {get_param: PcsdPassword}
rabbit_hosts:
str_replace:
template: '["host"]'
@@ -623,6 +657,10 @@ resources:
bootstack_nodeid: {get_input: bootstack_nodeid}
controller_host: {get_input: controller_host} #local-ipv4
+ # Pacemaker
+ enable_pacemaker: {get_input: enable_pacemaker}
+ hacluster_pwd: {get_input: pcsd_password}
+
# Swift
swift::proxy::proxy_local_net_ip: {get_input: controller_host}
swift::proxy::authtoken::auth_uri: {get_input: keystone_auth_uri}
@@ -719,9 +757,13 @@ resources:
keystone::public_bind_host: {get_input: controller_host}
keystone::admin_bind_host: {get_input: controller_host}
keystone::debug: {get_input: debug}
-
+ # MongoDB
+ mongodb::server::bind_ip: {get_input: controller_host}
# MySQL
admin_password: {get_input: admin_password}
+ enable_galera: {get_input: enable_galera}
+ enable_ceph_storage: {get_input: enable_ceph_storage}
+ enable_swift_storage: {get_input: enable_swift_storage}
mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size}
mysql::server::root_password: {get_input: mysql_root_password}
mysql_cluster_name: {get_input: mysql_cluster_name}
@@ -761,6 +803,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}
@@ -772,7 +816,6 @@ resources:
ceilometer::api::keystone_password: {get_input: ceilometer_password}
ceilometer::api::keystone_auth_uri: {get_input: keystone_auth_uri}
ceilometer::api::keystone_identity_uri: {get_input: keystone_identity_uri}
- ceilometer::db::database_connection: {get_input: ceilometer_dsn}
ceilometer::agent::auth::auth_password: {get_input: ceilometer_password}
snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
@@ -794,10 +837,14 @@ resources:
nova::network::neutron::neutron_admin_password: {get_input: neutron_password}
nova::network::neutron::neutron_url: {get_input: neutron_url}
nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url}
+
# Rabbit
+ rabbitmq::node_ip_address: {get_input: controller_host}
rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
-
+ # Redis
+ redis::bind: {get_input: controller_host}
# Misc
+ memcached::listen_ip: {get_input: controller_host}
neutron_public_interface_ip: {get_input: neutron_public_interface_ip}
ntp::servers: {get_input: ntp_servers}
control_virtual_interface: {get_input: control_virtual_interface}
@@ -829,7 +876,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/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 1a74e0a8..421bbdfb 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -15,6 +15,13 @@ rabbitmq::port: '5672'
rabbitmq::package_source: undef
rabbitmq::repos_ensure: false
+mongodb::server::replset: tripleo
+
+redis::port: 6379
+redis::sentinel::master_name: "%{hiera('bootstrap_nodeid')}"
+redis::sentinel::redis_host: "%{hiera('bootstrap_nodeid_ip')}"
+redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
+
# service tenant
nova::api::admin_tenant_name: 'service'
glance::api::keystone_tenant: 'service'
@@ -78,6 +85,10 @@ 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
+
mysql::server::manage_config_file: true
tripleo::loadbalancer::keystone_admin: true
@@ -92,6 +103,7 @@ tripleo::loadbalancer::nova_metadata: true
tripleo::loadbalancer::nova_novncproxy: true
tripleo::loadbalancer::mysql: true
tripleo::loadbalancer::rabbitmq: true
+tripleo::loadbalancer::redis: true
tripleo::loadbalancer::swift_proxy_server: true
tripleo::loadbalancer::ceilometer: true
tripleo::loadbalancer::heat_api: true
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
index 58834039..ffa55cdb 100644
--- a/puppet/manifests/overcloud_compute.pp
+++ b/puppet/manifests/overcloud_compute.pp
@@ -52,7 +52,11 @@ nova_config {
$nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false)
if $nova_enable_rbd_backend {
include ::ceph::profile::client
- include ::nova::compute::rbd
+
+ $client_keys = hiera('ceph::profile::params::client_keys')
+ class { '::nova::compute::rbd':
+ libvirt_rbd_secret_key => $client_keys['client.openstack']['secret'],
+ }
}
include ::nova::compute::libvirt
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 5a63456c..9f385a1d 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -24,11 +24,51 @@ 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(downcase(hiera('controller_node_ips')), ',')
+ $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,
+ }
+ }
}
}
@@ -39,8 +79,52 @@ if hiera('step') >= 2 {
include ::ntp
}
+ # 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')
+ $mongo_node_string = join($mongo_node_ips_with_port, ',')
+
+ $mongodb_replset = hiera('mongodb::server::replset')
+ $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
+ if downcase(hiera('bootstrap_nodeid')) == $::hostname {
+ mongodb_replset { $mongodb_replset :
+ members => $mongo_node_ips_with_port,
+ }
+ }
+ }
+
+ # Redis
+ $redis_node_ips = split(hiera('redis_node_ips'), ',')
+ $redis_master_hostname = downcase(hiera('bootstrap_nodeid'))
+
+ if $redis_master_hostname == $::hostname {
+ $slaveof = undef
+ } else {
+ $slaveof = "${redis_master_hostname} 6379"
+ }
+ class {'::redis' :
+ slaveof => $slaveof,
+ }
+
+ if count($redis_node_ips) > 1 {
+ Class['::tripleo::redis_notification'] -> Service['redis-sentinel']
+ include ::redis::sentinel
+ class {'::tripleo::redis_notification' :
+ haproxy_monitor_ip => hiera('tripleo::loadbalancer::controller_virtual_ip'),
+ }
+ }
+
+ if str2bool(hiera('enable_galera', 'true')) {
+ $mysql_config_file = '/etc/my.cnf.d/galera.cnf'
+ } else {
+ $mysql_config_file = '/etc/my.cnf.d/server.cnf'
+ }
# TODO Galara
class { 'mysql::server':
+ config_file => $mysql_config_file,
override_options => {
'mysqld' => {
'bind-address' => hiera('controller_host')
@@ -100,38 +184,57 @@ if hiera('step') >= 2 {
dbname => $heat_dsn[6],
allowed_hosts => $allowed_hosts,
}
- $ceilometer_dsn = split(hiera('ceilometer::db::database_connection'), '[@:/?]')
- class { 'ceilometer::db::mysql':
- user => $ceilometer_dsn[3],
- password => $ceilometer_dsn[4],
- host => $ceilometer_dsn[5],
- dbname => $ceilometer_dsn[6],
- allowed_hosts => $allowed_hosts,
+ 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,
+ }
}
- $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 $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
@@ -147,6 +250,11 @@ if hiera('step') >= 2 {
include ::ceph::profile::mon
}
+ if str2bool(hiera('enable_ceph_storage', 'false')) {
+ include ::ceph::profile::client
+ include ::ceph::profile::osd
+ }
+
} #END STEP 2
if hiera('step') >= 3 {
@@ -187,6 +295,7 @@ if hiera('step') >= 3 {
}
# TODO: notifications, scrubber, etc.
+ include ::glance
include ::glance::api
include ::glance::registry
include ::glance::backend::swift
@@ -303,31 +412,44 @@ if hiera('step') >= 3 {
include ::swift::proxy::formpost
# swift storage
- class {'swift::storage::all':
- mount_check => str2bool(hiera('swift_mount_check'))
- }
- if(!defined(File['/srv/node'])) {
- file { '/srv/node':
- ensure => directory,
- owner => 'swift',
- group => 'swift',
- require => Package['openstack-swift'],
+ if str2bool(hiera('enable_swift_storage', 'true')) {
+ class {'swift::storage::all':
+ mount_check => str2bool(hiera('swift_mount_check'))
+ }
+ if(!defined(File['/srv/node'])) {
+ file { '/srv/node':
+ ensure => directory,
+ owner => 'swift',
+ group => 'swift',
+ require => Package['openstack-swift'],
+ }
}
+ $swift_components = ['account', 'container', 'object']
+ swift::storage::filter::recon { $swift_components : }
+ swift::storage::filter::healthcheck { $swift_components : }
}
- $swift_components = ['account', 'container', 'object']
- swift::storage::filter::recon { $swift_components : }
- swift::storage::filter::healthcheck { $swift_components : }
# Ceilometer
+ $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::db
include ::ceilometer::agent::notification
include ::ceilometer::agent::central
include ::ceilometer::alarm::notifier
include ::ceilometer::alarm::evaluator
include ::ceilometer::expirer
include ::ceilometer::collector
+ class { '::ceilometer::db' :
+ database_connection => $ceilometer_database_connection,
+ }
class { 'ceilometer::agent::auth':
auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']),
}
diff --git a/puppet/swift-devices-and-proxy-config.yaml b/puppet/swift-devices-and-proxy-config.yaml
index 1cb897ee..731f69a1 100644
--- a/puppet/swift-devices-and-proxy-config.yaml
+++ b/puppet/swift-devices-and-proxy-config.yaml
@@ -6,7 +6,6 @@ parameters:
type: comma_delimited_list
object_store_swift_devices:
type: comma_delimited_list
- # TODO: add support for puppet swift proxy memcache configuration
controller_swift_proxy_memcaches:
type: comma_delimited_list
@@ -30,6 +29,14 @@ resources:
- list_join:
- ", "
- {get_param: object_store_swift_devices}
+ swift::proxy::cache::memcache_servers:
+ str_replace:
+ template: "['SERVERS_LIST']"
+ params:
+ SERVERS_LIST:
+ list_join:
+ - "','"
+ - {get_param: controller_swift_proxy_memcaches}
outputs:
config_id:
diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml
index 3f069319..3e01fe77 100644
--- a/puppet/swift-storage-post.yaml
+++ b/puppet/swift-storage-post.yaml
@@ -1,7 +1,5 @@
heat_template_version: 2014-10-16
-description: 'Swift Storage Post Deployment'
-# NOTE: this is a noop for os-apply-config style deployments because
-# post deployment ordering is controlled by tripleo-image-elements
+description: 'OpenStack swift storage node post deployment for Puppet'
parameters:
servers:
@@ -39,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 6d446b00..45922436 100644
--- a/puppet/swift-storage-puppet.yaml
+++ b/puppet/swift-storage-puppet.yaml
@@ -1,5 +1,5 @@
heat_template_version: 2014-10-16
-description: 'Common Swift Storage Configuration'
+description: 'OpenStack swift storage node configured by Puppet'
parameters:
Flavor:
description: Flavor for Swift storage nodes to request when deploying.
@@ -60,9 +60,22 @@ resources:
image: {get_param: Image}
flavor: {get_param: Flavor}
key_name: {get_param: KeyName}
- user_data_format: SOFTWARE_CONFIG
networks:
- network: ctlplane
+ user_data_format: SOFTWARE_CONFIG
+ user_data: {get_resource: NodeUserData}
+
+ NodeUserData:
+ type: OS::TripleO::NodeUserData
+
+ NetworkConfig:
+ type: OS::TripleO::ObjectStorage::Net::SoftwareConfig
+
+ NetworkDeployment:
+ type: OS::TripleO::SoftwareDeployment
+ properties:
+ config: {get_attr: [NetworkConfig, config_id]}
+ server: {get_resource: SwiftStorage}
SwiftStorageHieraConfig:
type: OS::Heat::StructuredConfig
@@ -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]}
diff --git a/swift-storage-post.yaml b/swift-storage-post.yaml
index dfac4b2a..dd51af0e 100644
--- a/swift-storage-post.yaml
+++ b/swift-storage-post.yaml
@@ -6,3 +6,13 @@ description: 'Swift Storage Post Deployment'
parameters:
servers:
type: json
+
+resources:
+
+ # Note, this should come last, so use depends_on to ensure
+ # this is created after any other resources.
+ ExtraConfig:
+ type: OS::TripleO::NodeExtraConfigPost
+ properties:
+ servers: {get_param: servers}
+
diff --git a/swift-storage.yaml b/swift-storage.yaml
index 42a78666..42c591d2 100644
--- a/swift-storage.yaml
+++ b/swift-storage.yaml
@@ -108,9 +108,23 @@ 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}
+
SwiftStorageDeploy:
type: OS::Heat::StructuredDeployment
properties:
@@ -131,7 +145,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]}