summaryrefslogtreecommitdiff
path: root/puppet/modules/haproxy/manifests/balancermember.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-02-23 11:42:47 +0100
committervarac <varacanero@zeromail.org>2017-03-15 19:22:50 +0100
commitcce9af1fce42c29bf062cccfc46ef356d83a6328 (patch)
treeb7f6a7de0f11e9381eb833a09f1cc1175dbce9ca /puppet/modules/haproxy/manifests/balancermember.pp
parentbb4dd153bbf1174a95017d0046ea9e1320fd81a9 (diff)
[8144] Remove Haproxy
We used haproxy because we had multiple bigcouch nodes but now with a single couchdb node this is not needed anymore. - Resolves: #8144
Diffstat (limited to 'puppet/modules/haproxy/manifests/balancermember.pp')
-rw-r--r--puppet/modules/haproxy/manifests/balancermember.pp95
1 files changed, 0 insertions, 95 deletions
diff --git a/puppet/modules/haproxy/manifests/balancermember.pp b/puppet/modules/haproxy/manifests/balancermember.pp
deleted file mode 100644
index a0e27539..00000000
--- a/puppet/modules/haproxy/manifests/balancermember.pp
+++ /dev/null
@@ -1,95 +0,0 @@
-# == Define Resource Type: haproxy::balancermember
-#
-# This type will setup a balancer member inside a listening service
-# configuration block in /etc/haproxy/haproxy.cfg on the load balancer.
-# currently it only has the ability to specify the instance name,
-# ip address, port, and whether or not it is a backup. More features
-# can be added as needed. The best way to implement this is to export
-# this resource for all haproxy balancer member servers, and then collect
-# them on the main haproxy load balancer.
-#
-# === Requirement/Dependencies:
-#
-# Currently requires the ripienaar/concat module on the Puppet Forge and
-# uses storeconfigs on the Puppet Master to export/collect resources
-# from all balancer members.
-#
-# === Parameters
-#
-# [*name*]
-# The title of the resource is arbitrary and only utilized in the concat
-# fragment name.
-#
-# [*listening_service*]
-# The haproxy service's instance name (or, the title of the
-# haproxy::listen resource). This must match up with a declared
-# haproxy::listen resource.
-#
-# [*ports*]
-# An array or commas-separated list of ports for which the balancer member
-# will accept connections from the load balancer. Note that cookie values
-# aren't yet supported, but shouldn't be difficult to add to the
-# configuration. If you use an array in server_names and ipaddresses, the
-# same port is used for all balancermembers.
-#
-# [*server_names*]
-# The name of the balancer member server as known to haproxy in the
-# listening service's configuration block. This defaults to the
-# hostname. Can be an array of the same length as ipaddresses,
-# in which case a balancermember is created for each pair of
-# server_names and ipaddresses (in lockstep).
-#
-# [*ipaddresses*]
-# The ip address used to contact the balancer member server.
-# Can be an array, see documentation to server_names.
-#
-# [*options*]
-# An array of options to be specified after the server declaration
-# in the listening service's configuration block.
-#
-#
-# === Examples
-#
-# Exporting the resource for a balancer member:
-#
-# @@haproxy::balancermember { 'haproxy':
-# listening_service => 'puppet00',
-# ports => '8140',
-# server_names => $::hostname,
-# ipaddresses => $::ipaddress,
-# options => 'check',
-# }
-#
-#
-# Collecting the resource on a load balancer
-#
-# Haproxy::Balancermember <<| listening_service == 'puppet00' |>>
-#
-# Creating the resource for multiple balancer members at once
-# (for single-pass installation of haproxy without requiring a first
-# pass to export the resources if you know the members in advance):
-#
-# haproxy::balancermember { 'haproxy':
-# listening_service => 'puppet00',
-# ports => '8140',
-# server_names => ['server01', 'server02'],
-# ipaddresses => ['192.168.56.200', '192.168.56.201'],
-# options => 'check',
-# }
-#
-# (this resource can be declared anywhere)
-#
-define haproxy::balancermember (
- $listening_service,
- $ports,
- $server_names = $::hostname,
- $ipaddresses = $::ipaddress,
- $options = ''
-) {
- # Template uses $ipaddresses, $server_name, $ports, $option
- concat::fragment { "${listening_service}_balancermember_${name}":
- order => "20-${listening_service}-${name}",
- target => '/etc/haproxy/haproxy.cfg',
- content => template('haproxy/haproxy_balancermember.erb'),
- }
-}