2024-08-20 09:25:15 +00:00
|
|
|
# Configure the SUNET CDN l4lb service
|
|
|
|
class cdn::l4lb(
|
2024-10-22 13:23:03 +00:00
|
|
|
Boolean $cilium_enabled = false,
|
2024-08-20 09:25:15 +00:00
|
|
|
String $cilium_version = 'v1.16.1',
|
|
|
|
String $cilium_devices = 'enp129s0f1np1',
|
|
|
|
)
|
|
|
|
{
|
2024-10-22 13:20:09 +00:00
|
|
|
if $cilium_enabled {
|
|
|
|
sunet::docker_compose { 'sunet-cdn-l4lb':
|
|
|
|
content => template('cdn/l4lb/docker-compose.yml.erb'),
|
|
|
|
service_name => 'cdn-l4lb',
|
|
|
|
compose_dir => '/opt/sunet-cdn/compose/l4lb',
|
|
|
|
compose_filename => 'docker-compose.yml',
|
|
|
|
description => 'SUNET CDN l4lb',
|
|
|
|
}
|
2024-08-20 09:25:15 +00:00
|
|
|
}
|
2024-10-22 15:06:29 +00:00
|
|
|
|
|
|
|
file { '/etc/sunet-l4lb':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0640',
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/sunet-l4lb/netns.json':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
content => template('cdn/l4lb/netns.json.erb'),
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/usr/local/bin/sunet-l4lb-namespace':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0755',
|
|
|
|
content => file('cdn/l4lb/sunet-l4lb-namespace'),
|
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/systemd/system/sunet-l4lb-namespace.service':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
content => template('cdn/l4lb/sunet-l4lb-namespace.service.erb'),
|
|
|
|
}
|
2024-08-20 09:25:15 +00:00
|
|
|
}
|