Decouple swift-proxy from ceilometer
authorDan Prince <dprince@redhat.com>
Sat, 10 Dec 2016 13:17:10 +0000 (08:17 -0500)
committerDan Prince <dprince@redhat.com>
Mon, 12 Dec 2016 01:30:09 +0000 (20:30 -0500)
This patch updates the swift-proxy base profile so that
we now explicitly set the rabbit_port. This allows us
to remove the use of puppet-ceilometer default settings
in the puppet-tripleo modules change ID here:
I8d9f69f5e9160543b372bd9886800f16f625fdc6

It also adds a new boolean parameter that allows the
end user to disable the swift ceilometer pipeline
by setting SwiftCeilometerPipelineEnabled to false.

This two settings allow Swift to once again be installed
on a machine without configuring Ceilometer.

Depends-On: Id1584df5e5bb90f8087ae25eecc4834179b6fc21

Change-Id: Ief5399d7ea4d26e96ce54903a69d660fa4fe3ce9
Related-bug: #1648736

ci/environments/scenario002-multinode.yaml
ci/environments/scenario003-multinode.yaml
ci/environments/scenario004-multinode.yaml
puppet/services/swift-proxy.yaml

index 97fec24..7875ef4 100644 (file)
@@ -49,3 +49,4 @@ parameter_defaults:
     nova::compute::libvirt::services::libvirt_virt_type: qemu
     nova::compute::libvirt::libvirt_virt_type: qemu
   Debug: true
+  SwiftCeilometerPipelineEnabled: false
index 092426c..26f94d0 100644 (file)
@@ -50,3 +50,4 @@ parameter_defaults:
   # we don't deploy Swift so we switch to file backend.
   GlanceBackend: 'file'
   KeystoneTokenProvider: 'fernet'
+  SwiftCeilometerPipelineEnabled: false
index 4aa1870..0d94cea 100644 (file)
@@ -60,3 +60,4 @@ parameter_defaults:
   CephMonKey: 'AQC+Ox1VmEr3BxAALZejqeHj50Nj6wJDvs96OQ=='
   CephAdminKey: 'AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ=='
   CephClientKey: 'AQC+vYNXgDAgAhAAc8UoYt+OTz5uhV7ItLdwUw=='
+  SwiftCeilometerPipelineEnabled: false
index ba184ab..94db9e4 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2016-04-08
+heat_template_version: 2016-10-14
 
 description: >
   OpenStack Swift Proxy service configured with Puppet
@@ -49,6 +49,18 @@ parameters:
     default: guest
     description: The username for RabbitMQ
     type: string
+  SwiftCeilometerPipelineEnabled:
+    description: Set to False to disable the swift proxy ceilometer pipeline.
+    default: True
+    type: boolean
+  RabbitClientPort:
+    default: 5672
+    description: Set rabbit subscriber port, change this if using SSL
+    type: number
+
+conditions:
+
+  ceilometer_pipeline_enabled: {equals : [{get_param: SwiftCeilometerPipelineEnabled}, True]}
 
 resources:
   SwiftBase:
@@ -78,6 +90,8 @@ outputs:
             swift::proxy::ceilometer::rabbit_password: {get_param: RabbitPassword}
             swift::proxy::staticweb::url_base: {get_param: [EndpointMap, SwiftPublic, uri_no_suffix]}
             swift::proxy::ceilometer::nonblocking_notify: true
+            tripleo::profile::base::swift::proxy::rabbit_port: {get_param: RabbitClientPort}
+            tripleo::profile::base::swift::proxy::ceilometer_enabled: {get_param: SwiftCeilometerPipelineEnabled}
             tripleo.swift_proxy.firewall_rules:
               '122 swift proxy':
                 dport:
@@ -89,26 +103,34 @@ outputs:
               - ResellerAdmin
             swift::proxy::versioned_writes::allow_versioned_writes: true
             swift::proxy::pipeline:
-              - 'catch_errors'
-              - 'healthcheck'
-              - 'proxy-logging'
-              - 'cache'
-              - 'ratelimit'
-              - 'bulk'
-              - 'tempurl'
-              - 'formpost'
-              - 'authtoken'
-              - 'keystone'
-              - 'staticweb'
-              - 'copy'
-              - 'container-quotas'
-              - 'account-quotas'
-              - 'slo'
-              - 'dlo'
-              - 'versioned_writes'
-              - 'ceilometer'
-              - 'proxy-logging'
-              - 'proxy-server'
+              yaql:
+                expression: $.data.pipeline.where($ != '')
+                data:
+                  pipeline:
+                  - 'catch_errors'
+                  - 'healthcheck'
+                  - 'proxy-logging'
+                  - 'cache'
+                  - 'ratelimit'
+                  - 'bulk'
+                  - 'tempurl'
+                  - 'formpost'
+                  - 'authtoken'
+                  - 'keystone'
+                  - 'staticweb'
+                  - 'copy'
+                  - 'container-quotas'
+                  - 'account-quotas'
+                  - 'slo'
+                  - 'dlo'
+                  - 'versioned_writes'
+                  -
+                    if:
+                    - ceilometer_pipeline_enabled
+                    - 'ceilometer'
+                    - ''
+                  - 'proxy-logging'
+                  - 'proxy-server'
             swift::proxy::account_autocreate: true
             # NOTE: bind IP is found in Heat replacing the network name with the
             # local node IP for the given network; replacement examples