summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authormarios <marios@redhat.com>2016-05-05 14:10:02 +0300
committermarios <marios@redhat.com>2016-05-20 10:16:08 +0300
commit565f0c509d2650ee283ad72bc5b280aca4e07144 (patch)
tree9e00496cc41fa49eee4989310cc7eb8cdd4a8793 /puppet
parent19cdce68aea14abc98b56b7de3fe5f2e48f1aa3d (diff)
Adds memcached as a composable service
Implements: blueprint composable-services-within-roles Depends-On: Icd504aef7dda144582c286c56c925a78566af72c Change-Id: I8802c2a0cf1e5fa1a6d1fab5e87f6014bea2f517
Diffstat (limited to 'puppet')
-rw-r--r--puppet/manifests/overcloud_controller.pp1
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp19
-rw-r--r--puppet/services/memcached.yaml23
-rw-r--r--puppet/services/pacemaker/memcached.yaml31
4 files changed, 54 insertions, 20 deletions
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 833a3e01..9a2249d7 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -452,7 +452,6 @@ if hiera('step') >= 4 {
}
# swift proxy
- include ::memcached
include ::swift::proxy
include ::swift::proxy::proxy_logging
include ::swift::proxy::healthcheck
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 91593662..f24c94f6 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -110,11 +110,6 @@ if hiera('step') >= 1 {
}
}
- # Memcached
- class {'::memcached' :
- service_manage => false,
- }
-
# Redis
class { '::redis' :
service_manage => false,
@@ -206,11 +201,6 @@ if hiera('step') >= 2 {
clone_params => true,
}
- pacemaker::resource::service { $::memcached::params::service_name :
- clone_params => 'interleave=true',
- require => Class['::memcached'],
- }
-
if downcase(hiera('ceilometer_backend')) == 'mongodb' {
pacemaker::resource::service { $::mongodb::params::service_name :
op_params => 'start timeout=370s stop timeout=200s',
@@ -916,15 +906,6 @@ if hiera('step') >= 5 {
require => [Pacemaker::Resource::Service[$::apache::params::service_name],
Pacemaker::Resource::Ocf['openstack-core']],
}
- pacemaker::constraint::base { 'memcached-then-openstack-core-constraint':
- constraint_type => 'order',
- first_resource => 'memcached-clone',
- second_resource => 'openstack-core-clone',
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service['memcached'],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
pacemaker::constraint::base { 'galera-then-openstack-core-constraint':
constraint_type => 'order',
first_resource => 'galera-master',
diff --git a/puppet/services/memcached.yaml b/puppet/services/memcached.yaml
new file mode 100644
index 00000000..1833fbff
--- /dev/null
+++ b/puppet/services/memcached.yaml
@@ -0,0 +1,23 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Memcached service configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+outputs:
+ role_data:
+ description: Role data for the Memcached role.
+ value:
+ config_settings:
+ step_config: |
+ include ::tripleo::profile::base::memcached
+
diff --git a/puppet/services/pacemaker/memcached.yaml b/puppet/services/pacemaker/memcached.yaml
new file mode 100644
index 00000000..306f805e
--- /dev/null
+++ b/puppet/services/pacemaker/memcached.yaml
@@ -0,0 +1,31 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Mecached service with Pacemaker configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+resources:
+
+ MemcachedServiceBase:
+ type: ../memcached.yaml
+
+outputs:
+ role_data:
+ description: Role data for the Memcached pacemaker role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [MemcachedServiceBase, role_data, config_settings]
+ - memcached::service_manage: false
+ step_config: |
+ include ::tripleo::profile::pacemaker::memcached
+