diff options
-rw-r--r-- | firstboot/userdata_dev_rsync.yaml | 49 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 1 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 92 |
3 files changed, 130 insertions, 12 deletions
diff --git a/firstboot/userdata_dev_rsync.yaml b/firstboot/userdata_dev_rsync.yaml new file mode 100644 index 00000000..7dc7bd4d --- /dev/null +++ b/firstboot/userdata_dev_rsync.yaml @@ -0,0 +1,49 @@ +heat_template_version: 2014-10-16 + +description: > + This is first boot configuration for development purposes. It allows + overriding contents of the deployed images via rsync before + configuration (e.g. Puppet) starts, speeding up the feedback loop + between making a change and seeing it applied. + + To prepare the host, put something like this to /etc/rsyncd.conf: + + [overcloudsync] + path = /root/overcloudsync + comment = overcloud pre-puppet customizations + + Then run `rsync --daemon`. + +parameters: + dev_rsync_host: + type: string + default: 192.168.122.1 + description: Host to sync contents from via rsync + dev_rsync_module: + type: string + default: overcloudsync + description: Name of the module defined in rsyncd.conf on rsync_host + +resources: + userdata: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: rsync_config} + subtype: 'x-shellscript' + + rsync_config: + type: OS::Heat::SoftwareConfig + properties: + config: + str_replace: + template: | + #!/bin/bash + rsync -avr rsync://RSYNC_HOST/RSYNC_MODULE / + params: + RSYNC_HOST: {get_param: dev_rsync_host} + RSYNC_MODULE: {get_param: dev_rsync_module} + +outputs: + OS::stack_id: + value: {get_resource: userdata} diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index 1748ccdb..4f46c7fb 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -59,7 +59,6 @@ swift::proxy::account_autocreate: true # glance glance::api::pipeline: 'keystone' 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' diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index ce8e81ee..99344532 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -411,13 +411,13 @@ if hiera('step') >= 3 { include ::glance class { 'glance::api': known_stores => [$glance_store], - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::glance::registry' : sync_db => $sync_db, - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } include join(['::glance::backend::', $glance_backend]) @@ -502,16 +502,16 @@ if hiera('step') >= 3 { include ::cinder class { '::cinder::api': sync_db => $sync_db, - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::cinder::scheduler' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } class { '::cinder::volume' : - manage_service => $non_pcmk_start, - enabled => $non_pcmk_start, + manage_service => false, + enabled => false, } include ::cinder::glance class {'cinder::setup_test_volume': @@ -694,5 +694,75 @@ if hiera('step') >= 3 { } #END STEP 3 if hiera('step') >= 4 { - # TODO: pacemaker::resource::service for OpenStack services go here + 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 |