From 7f44ee9e40130b8f36aaaf49247ae1b5f9bb693c Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 9 Feb 2015 10:33:13 +0100 Subject: [PATCH] Add HA docs for pacemaker service provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch provides example HA configuration for some Openstack services with pacemaker provider related blueprint pacemaker-provider-for-openstack Change-Id: I11cd533f1cffc9e6f015f0434c7b7423ed0cfc68 Signed-off-by: Bogdan Dobrelya Co-author: Javier Peña --- README.md | 56 ++++++++++++++++++++++++++++++++++ manifests/pacemaker/service.pp | 1 + 2 files changed, 57 insertions(+) diff --git a/README.md b/README.md index 4a56eb702..c18905067 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,62 @@ Implementation openstack_extras is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers. +**HA configuration for Openstack services** + +This module allows to configure Openstack services in HA. Please refer to the [ha-guide](http://docs.openstack.org/high-availability-guide/content/index.html) for details. +If you have a Corosync with Pacemaker cluster with several nodes joined, you may want to use an HA service provider which allows you to create the pacemaker resources for Openstack services and run them in HA mode. +The example HA service configuration for keystone service: + +```puppet +openstack_extras::pacemaker::service { 'openstack-keystone' : + ensure => present, + metadata => {}, + ms_metadata => {}, + operations => {}, + parameters => {}, + primitive_class => 'systemd', + primitive_provider => false, + primitive_type => 'openstack-keystone', + use_handler => false, + clone => true, + require => Package['openstack-keystone'] +} +``` +This example will create a pacemaker clone resource named `p_openstack-keystone-clone` and will start it with the help of systemd. + +And this example will create a resource `p_cinder-api-clone` for Cinder API service with the given OCF script template from some `cluster` module: + +```puppet + $metadata = { + 'resource-stickiness' => '1' + } + $operations = { + 'monitor' => { + 'interval' => '20', + 'timeout' => '30', + }, + 'start' => { + 'timeout' => '60', + }, + 'stop' => { + 'timeout' => '60', + }, + } + $ms_metadata = { + 'interleave' => true, + } + + openstack_extras::pacemaker::service { 'cinder-api' : + primitive_type => 'cinder-api', + metadata => $metadata, + ms_metadata => $ms_metadata, + operations => $operations, + clone => true, + ocf_script_template => 'cluster/cinder_api.ocf.erb', + } + +``` + Limitations ----------- diff --git a/manifests/pacemaker/service.pp b/manifests/pacemaker/service.pp index de06e0e99..8e17b2a0d 100644 --- a/manifests/pacemaker/service.pp +++ b/manifests/pacemaker/service.pp @@ -105,6 +105,7 @@ # metadata => $metadata, # ms_metadata => $ms_metadata, # operations => $operations, +# clone => true, # ocf_script_template => 'some_module/some_api_service.ocf.erb', # } #