Added Redis cluster and fronentd configurations.
This commit is contained in:
parent
3e1efec1c9
commit
d03d9572f0
3 changed files with 39 additions and 0 deletions
|
@ -45,3 +45,8 @@ ssh_authorized_keys:
|
|||
Q=="
|
||||
type: 'ssh-rsa'
|
||||
user: 'root'
|
||||
|
||||
redis_client_ips:
|
||||
- 94.176.224.137
|
||||
redis_sentinel_ips:
|
||||
- 94.176.224.135
|
||||
|
|
|
@ -261,6 +261,16 @@ md-eu1.qa.komreg.net:
|
|||
- 'fe-tug-3.komreg.net'
|
||||
port: '443'
|
||||
|
||||
'^eidas-redis-fe-[0-9]\.sveidas\.se$':
|
||||
eid::dockerhost:
|
||||
autoupdate:
|
||||
redis_frontend_node:
|
||||
|
||||
'^eidas-redis-[0-9]\.sveidas\.se$':
|
||||
eid::dockerhost:
|
||||
autoupdate:
|
||||
redis_cluster_node:
|
||||
|
||||
'^eidas-node-[0-9]+\.qa\.sveidas\.se$':
|
||||
openstack_dockerhost:
|
||||
konsulter:
|
||||
|
|
|
@ -729,3 +729,27 @@ class nagios_monitor {
|
|||
# contact_groups => ['alerts']
|
||||
#}
|
||||
}
|
||||
|
||||
class redis_cluster_node {
|
||||
file { '/opt/redis': ensure => directory }
|
||||
sysctl { 'vm.overcommit_memory': value => '1' }
|
||||
sunet::redis::server {'redis-master':
|
||||
allow_clients => hiera_array('redis_client_ips', []),
|
||||
cluster_nodes => hiera_array('redis_sentinel_ips', []),
|
||||
}
|
||||
sunet::redis::server {'redis-sentinel':
|
||||
port => '26379',
|
||||
sentinel_config => 'yes',
|
||||
allow_clients => hiera_array('redis_client_ips', []),
|
||||
cluster_nodes => hiera_array('redis_sentinel_ips', []),
|
||||
}
|
||||
}
|
||||
|
||||
class redis_frontend_node ($hostname=undef,$ca="infra") {
|
||||
file { '/opt/redis': ensure => directory }
|
||||
sunet::redis::haproxy {'redis-haproxy':
|
||||
cluster_nodes => hiera_array('redis_sentinel_ips', []),
|
||||
client_ca => "/etc/ssl/certs/${ca}.crt",
|
||||
certificate => "/etc/ssl/private/${::fqdn}_${ca}.pem"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue