Added Redis cluster and fronentd configurations.

This commit is contained in:
Maria Haider 2018-06-11 15:14:52 +02:00
parent 3e1efec1c9
commit d03d9572f0
Signed by: mariah
GPG key ID: 7414A760CA747E57
3 changed files with 39 additions and 0 deletions

View file

@ -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

View file

@ -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:

View file

@ -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"
}
}