summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2016-05-23 17:05:18 +0100
committerGiulio Fidente <gfidente@redhat.com>2016-05-31 10:59:42 +0200
commite3cc44579c0e632eb72c3ea9f58f2ab2bc27a251 (patch)
tree6e327cdb172432207f997e5632c7c9330843ba51 /puppet
parentd372a3b76faf6860c241b34734d58a3a4c9855fd (diff)
Fix inconsistency with ringbuilder/storage steps
Currently when deploying swift on the Controller nodes, we do the ringbuilder config during step3 and the swift-storage config during step 4, but this order is reversed on the ObjectStorage nodes. Also, we include the base swift class inconsistently during step2 on controller nodes, and via the overcloud-object manifest on ObjectStorage nodes. So fix this inconsistency as a precursor to conversion to composable services interfaces for the ObjectStorage role, we rework the post config so we apply the ObjectStorage config in steps 2, 3 and 4, which should hopefully get us much closer to the process used on the controller role, thus be easier to decompose in a compatible way. Partially-Implements: blueprint composable-services-within-roles Change-Id: Ic9d0ed8584a12d681a8f4d4742d39b96c15e531a
Diffstat (limited to 'puppet')
-rw-r--r--puppet/manifests/overcloud_controller.pp3
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp3
-rw-r--r--puppet/manifests/overcloud_object.pp64
-rw-r--r--puppet/manifests/ringbuilder.pp5
-rw-r--r--puppet/swift-storage-post.yaml48
5 files changed, 65 insertions, 58 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 2884ad76..8263ec56 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -117,9 +117,6 @@ if hiera('step') >= 2 {
include ::aodh::db::mysql
}
- # pre-install swift here so we can build rings
- include ::swift
-
$enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
if $enable_ceph {
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index cee3b3f9..b9bd6b1d 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -318,9 +318,6 @@ if hiera('step') >= 2 {
}
}
- # pre-install swift here so we can build rings
- include ::swift
-
# Ceph
$enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
diff --git a/puppet/manifests/overcloud_object.pp b/puppet/manifests/overcloud_object.pp
index ae074589..3585c993 100644
--- a/puppet/manifests/overcloud_object.pp
+++ b/puppet/manifests/overcloud_object.pp
@@ -16,42 +16,46 @@
include ::tripleo::packages
include ::tripleo::firewall
-create_resources(kmod::load, hiera('kernel_modules'), {})
-create_resources(sysctl::value, hiera('sysctl_settings'), {})
-Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
+if hiera('step') >= 1 {
+ create_resources(kmod::load, hiera('kernel_modules'), {})
+ create_resources(sysctl::value, hiera('sysctl_settings'), {})
+ Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
-if count(hiera('ntp::servers')) > 0 {
- include ::ntp
-}
-
-include ::timezone
+ include ::timezone
-include ::swift
-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 count(hiera('ntp::servers')) > 0 {
+ include ::ntp
}
}
-$swift_components = ['account', 'container', 'object']
-swift::storage::filter::recon { $swift_components : }
-swift::storage::filter::healthcheck { $swift_components : }
+if hiera('step') >= 4 {
+ 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 : }
-$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(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
+ $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(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
+ }
+
+ hiera_include('object_classes')
}
-hiera_include('object_classes')
package_manifest{'/var/lib/tripleo/installed-packages/overcloud_object': ensure => present}
diff --git a/puppet/manifests/ringbuilder.pp b/puppet/manifests/ringbuilder.pp
index a623da29..2411ff84 100644
--- a/puppet/manifests/ringbuilder.pp
+++ b/puppet/manifests/ringbuilder.pp
@@ -89,6 +89,11 @@ class tripleo::ringbuilder (
}
}
+if hiera('step') >= 2 {
+ # pre-install swift here so we can build rings
+ include ::swift
+}
+
if hiera('step') >= 3 {
include ::tripleo::ringbuilder
}
diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml
index b262f947..2b652443 100644
--- a/puppet/swift-storage-post.yaml
+++ b/puppet/swift-storage-post.yaml
@@ -31,51 +31,55 @@ resources:
group: puppet
options:
enable_debug: {get_param: ConfigDebug}
+ enable_hiera: True
+ enable_facter: False
+ inputs:
+ - name: step
outputs:
- name: result
config:
- get_file: manifests/overcloud_object.pp
+ list_join:
+ - ''
+ - - get_file: manifests/overcloud_object.pp
+ - get_file: manifests/ringbuilder.pp
- StorageDeployment_Step1:
+ StorageRingbuilderDeployment_Step2:
type: OS::Heat::StructuredDeployments
depends_on: StorageArtifactsDeploy
properties:
- name: StorageDeployment_Step1
+ name: StorageRingbuilderDeployment_Step2
servers: {get_param: servers}
config: {get_resource: StoragePuppetConfig}
input_values:
+ step: 2
update_identifier: {get_param: NodeConfigIdentifiers}
- StorageRingbuilderPuppetConfig:
- type: OS::Heat::SoftwareConfig
+ StorageRingbuilderDeployment_Step3:
+ type: OS::Heat::StructuredDeployments
+ depends_on: StorageRingbuilderDeployment_Step2
properties:
- group: puppet
- options:
- enable_debug: {get_param: ConfigDebug}
- enable_hiera: True
- enable_facter: False
- inputs:
- - name: step
- outputs:
- - name: result
- config:
- get_file: manifests/ringbuilder.pp
+ name: StorageRingbuilderDeployment_Step3
+ servers: {get_param: servers}
+ config: {get_resource: StoragePuppetConfig}
+ input_values:
+ step: 3
+ update_identifier: {get_param: NodeConfigIdentifiers}
- StorageRingbuilderDeployment_Step2:
+ StorageDeployment_Step4:
type: OS::Heat::StructuredDeployments
- depends_on: StorageDeployment_Step1
+ depends_on: StorageRingbuilderDeployment_Step3
properties:
- name: StorageRingbuilderDeployment_Step2
+ name: StorageDeployment_Step4
servers: {get_param: servers}
- config: {get_resource: StorageRingbuilderPuppetConfig}
+ config: {get_resource: StoragePuppetConfig}
input_values:
- step: 3 # Note ringbuilder.pp expects >=3
+ step: 4
update_identifier: {get_param: NodeConfigIdentifiers}
# Note, this should come last, so use depends_on to ensure
# this is created after any other resources.
ExtraConfig:
- depends_on: StorageRingbuilderDeployment_Step2
+ depends_on: StorageDeployment_Step4
type: OS::TripleO::NodeExtraConfigPost
properties:
servers: {get_param: servers}