Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iaas-ha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OCP-TOOLS
iaas-ha
Commits
adcfa171
Commit
adcfa171
authored
9 years ago
by
Riccardo Bucchi
Browse files
Options
Downloads
Patches
Plain Diff
profile haproxy variables adjustments
parent
2fffab0c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
manifests/params.pp
+2
-0
2 additions, 0 deletions
manifests/params.pp
manifests/profile/haproxy.pp
+13
-5
13 additions, 5 deletions
manifests/profile/haproxy.pp
manifests/role/rhmk.pp
+14
-11
14 additions, 11 deletions
manifests/role/rhmk.pp
with
29 additions
and
16 deletions
manifests/params.pp
+
2
−
0
View file @
adcfa171
class
iaas::params
(
$public_interface
=
'eth0'
,
$admin_interface
=
'eth1'
,
$public_address
=
'<public_VIP>'
,
$admin_address
=
'<admin_VIP>'
,
$dns_servers
=
[
'10.0.0.4'
,
'10.0.0.3'
],
$dns_searchdomain
=
'.openstacklocal'
,
){
...
...
This diff is collapsed.
Click to expand it.
manifests/profile/haproxy.pp
+
13
−
5
View file @
adcfa171
...
...
@@ -5,9 +5,11 @@ class iaas::profile::haproxy (
$stats_login
=
undef
,
$stats_password
=
undef
,
$stats_uri
=
undef
,
$percona_servers
=
undef
,
#
$percona_servers = undef,
$main_address
=
undef
,
$admin_address
=
undef
,
$percona_hosts
=
undef
,
$percona_ips
=
undef
,
$controller_hosts
=
undef
,
$controller_ips
=
undef
,
)
{
...
...
@@ -72,18 +74,24 @@ class iaas::profile::haproxy (
}
if
$percona_servers
!=
undef
{
$main_host
=
$percona_host
[
0
]
$main_ip
=
$percona_ips
[
0
]
$backup_hosts
=
$percona_hosts
delete_at
(
$backup_hosts
,
0
)
$backup_ips
=
$percona_ips
delete_at
(
$backup_ips
,
0
)
haproxy::balancermember
{
'percona_cluster_prior'
:
listening_service
=>
'percona_cluster'
,
ports
=>
'3307'
,
server_names
=>
$percona_
servers
[
priority_hostname
]
,
ipaddresses
=>
$percona_
servers
[
priority_
ip
]
,
server_names
=>
$percona_
host
,
ipaddresses
=>
$percona_ip
,
options
=>
'check port 9200'
,
}
haproxy::balancermember
{
'percona_cluster_secondaries'
:
listening_service
=>
'percona_cluster'
,
ports
=>
'3307'
,
server_names
=>
$
percona_servers
[
hostnames
]
,
ipaddresses
=>
$
percona_servers
[
ips
]
,
server_names
=>
$
backup_hosts
,
ipaddresses
=>
$
backup_
ips
,
options
=>
'check port 9200 backup'
,
}
}
...
...
This diff is collapsed.
Click to expand it.
manifests/role/rhmk.pp
+
14
−
11
View file @
adcfa171
...
...
@@ -12,6 +12,7 @@
class
iaas::role::rhmk
(
# GLOBAL
$hostnames
=
[
'<hostname1>'
,
'<hostnameN>'
],
$ips
=
[
'<ip1>'
,
'<ipN>'
],
# MYSQL
$percona_master
=
false
,
$mysql_root_pwd
=
undef
,
...
...
@@ -28,12 +29,13 @@ class iaas::role::rhmk(
$keepalived_priority
=
100
,
$keepalived_state
=
'BACKUP'
,
# HAPROXY
$haproxy_controller_hosts
=
undef
,
$haproxy_controller_ips
=
undef
,
$haproxy_controller_hosts
=
[
'<hostname1>'
,
'<hostnameN>'
]
,
$haproxy_controller_ips
=
[
'<ip1>'
,
'<ipN>'
]
,
# RABBITMQ
$rabbit_hostname
=
undef
,
$zookeeper_id
=
undef
,
)
{
# Base
class
{
'iaas::profile::base'
:
dns_servers
=>
$iaas::params::dns_servers
,
...
...
@@ -42,21 +44,22 @@ class iaas::role::rhmk(
class
{
'iaas::profile::database'
:
percona_master
=>
$percona_master
,
root_password
=>
$mysql_root_pwd
,
mysql_cluster_servers
=>
$
hostname
s
,
mysql_cluster_servers
=>
$
ip
s
,
keystone_pwd
=>
$keystone_pwd
,
glance_pwd
=>
$glance_pwd
,
nova_pwd
=>
$nova_pwd
,
cinder_pwd
=>
$cinder_pwd
,
neutron_pwd
=>
$neutron_pwd
,
heat_pwd
=>
$heat_pwd
,
}
#->
# class { 'iaas::profile::haproxy':
# percona_servers => $haproxy_percona_servers,
# controller_hosts => $haproxy_controller_hosts,
# controller_ips => $haproxy_controller_ips,
# main_address => $main_address,
# admin_address => $admin_address,
# }
}
->
class
{
'iaas::profile::haproxy'
:
percona_hosts
=>
$hostnames
,
percona_ips
=>
$ips
,
controller_hosts
=>
$haproxy_controller_hosts
,
controller_ips
=>
$haproxy_controller_ips
,
main_address
=>
$iaas::params::main_address
,
admin_address
=>
$iaas::params::admin_address
,
}
# class { 'iaas::profile::keepalived':
# state => $keepalived_state,
# priority => $keepalived_priority,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment