Fix up SGSN config on nitb systems

This commit is contained in:
Monocots 2022-07-20 16:36:58 +00:00
parent 58b73ef6b8
commit 1dee5b6ea4
3 changed files with 53 additions and 50 deletions

View file

@ -32,6 +32,7 @@ class rhizo_base::openbsc {
$ggsn_ip_address = hiera('rhizo::ggsn_ip_address')
$repo = hiera('rhizo::osmo_repo', 'latest')
$bts = hiera('rhizo::bts')
$pgsql_pwd = $rhizo_base::pgsql_pwd
$nitb_version = $repo ? {
'latest' => 'present',
@ -122,56 +123,55 @@ class rhizo_base::openbsc {
require => Package['osmo-sip-connector'],
}
if ($gprs != "disabled") {
file { '/etc/osmocom/make_sgsn_acl_config':
content => template('rhizo_base/make_sgsn_acl_config.erb'),
mode => "0750",
}
systemd::dropin_file { 'override.conf':
unit => 'osmo-sgsn.service',
source => 'puppet:///modules/rhizo_base/systemd/coredump.override'
file { '/etc/osmocom/make_sgsn_acl_config':
content => template('rhizo_base/make_sgsn_acl_config.erb'),
mode => "0750",
notify => Exec['osmo-sgsn.cfg']
}
$sgsn_version = $repo ? {
'latest' => 'latest',
'nightly' => 'latest',
default => 'installed',
}
file { '/etc/osmocom/osmo-sgsn.cfg':
content => template("rhizo_base/osmo-sgsn.cfg.erb"),
mode => "0750",
notify => Service['osmo-sgsn'],
}
package { [ 'osmo-sgsn' ]:
ensure => $sgsn_version,
require => Class['rhizo_base::apt'],
}
$libgtp_version = $repo ? {
'latest' => 'installed',
'nightly' => 'latest',
default => '1.8.0',
}
package { [ 'libgtp6' ]:
ensure => $libgtp_version,
require => Class['rhizo_base::apt'],
}
package { [ 'libosmo-gsup-client0' ]:
ensure => 'latest',
require => Class['rhizo_base::apt'],
}
package { [ 'libosmocore' ]:
ensure => 'latest',
require => Class['rhizo_base::apt'],
}
systemd::dropin_file { 'override.conf':
unit => 'osmo-sgsn.service',
source => 'puppet:///modules/rhizo_base/systemd/coredump.override'
}
$sgsn_version = $repo ? {
'latest' => 'latest',
'nightly' => 'latest',
default => 'installed',
}
package { [ 'osmo-sgsn' ]:
ensure => $sgsn_version,
require => Class['rhizo_base::apt'],
}
$libgtp_version = $repo ? {
'latest' => 'installed',
'nightly' => 'latest',
default => '1.8.0',
}
package { [ 'libgtp6' ]:
ensure => $libgtp_version,
require => Class['rhizo_base::apt'],
}
package { [ 'libosmo-gsup-client0' ]:
ensure => 'latest',
require => Class['rhizo_base::apt'],
}
package { [ 'libosmocore' ]:
ensure => 'latest',
require => Class['rhizo_base::apt'],
}
exec { 'osmo-sgsn.cfg':
command =>
'/etc/osmocom/make_sgsn_acl_config > /etc/osmocom/osmo-sgsn.cfg',
require => File['/etc/osmocom/make_sgsn_acl_config'],
refreshonly => true,
}
exec { 'hlr_pragma_wal':
command =>
'/usr/bin/sqlite3 /var/lib/osmocom/hlr.sqlite3 "PRAGMA journal_mode=wal;"',