HA refacto: add haproxy resource agent

This resource agent will be used by Corosync to manage HAproxy in
active/active mode.

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
Change httpchk options for horizon

In order to have clean log in apache, we need to do
a GET call instead of the default OPTIONS call. Also we
specify a User Agent, for better filtering.

Related to #237
(cherry picked from commit 98ce1341751ecd320a3701e11e6fd07cd233a5c0)

Conflicts:
	manifests/loadbalancer.pp
Implement sticky/persistent session with HAProxy

This commit implements sticky/persisten session between
HAProxy and Horizon based on the leastconn fashion

Related to #237
(cherry picked from commit 1a64e535b7f1a13c6ccd6388a0c95131a91f77eb)

Conflicts:
	manifests/loadbalancer.pp
Revert "HA refacto: add haproxy resource agent"

This reverts commit 3d5f97e84ac854a0653841ec6e46cadeaa95aade.
loadbalancer/horizon: check real Horizon URL

On Red Hat and Debian, Horizon URL are not the same. HAproxy is now able
to check the real URL to get a HTTP 200 is Horizon is actually working.
loadbalancer: do not manage HAproxy service on BACKUP nodes

When a loadbalancer is in BACKUP mode, HAproxy can't bind the pools to
the VIP, since the VIP is not hosted. Puppet warns it when compiling in
the catalogue.
This patch ensure HAproxy is run where we Keepalived is in MASTER mode.

If a failover occurs and MASTER has changed, Keepalived & HAproxy are auto-migrated thanks to VRRP to another node. The worth case will only show warnings in Puppet catalog but HAproxy won't start anyway on the node.

Bug #237
loadbalancer: Collect Heat exported resources

Collect exported resources from cloud::orchestration::api to be able to
load-balance Heat CFN API and Heat Cloudwatch API correctly.

Bug #237
loadbalancing: internal pools support

If internal endpoints are enabled, create the HAproxy pools.

 Bug #237
load-balancer: binding refactorization

- remove the $*_internal parameters
- be able to specify multiple public VIPs in both $vip_public_ip and $vip_internal_ip
- allow the $*_api parameters to be either:
    true: listen on both public & internal VIPs
    false: don't listen at all
    one or more IP addresses: this service is bound specifically to these VIPs (check later that these VIPs are declared either in $vip_public_ip or $vip_internal_ip.)

Bug #237
loadbalancer/refacto: fix unit tests

bug #237
loadbalancer: do not manage HAproxy service on BACKUP nodes

When a loadbalancer is in BACKUP mode, HAproxy can't bind the pools to
the VIP, since the VIP is not hosted. Puppet warns it when compiling in
the catalogue.
This patch ensure HAproxy is run where we Keepalived is in MASTER mode.

If a failover occurs and MASTER has changed, Keepalived & HAproxy are auto-migrated thanks to VRRP to another node. The worth case will only show warnings in Puppet catalog but HAproxy won't start anyway on the node.

Bug #237
lb: fix unit tests after rebase
loadbalancer/heat: fix listening services

Collect exported resources with right name.
loadbalancer: use an array for default vip values
lb/bind: cleaner array merging
Merge pull request #451 from enovance/bug/237/emilienm

High Availability refactorization