Remove Support for osmo-nitb

This commit is contained in:
Keith Whyte 2022-12-06 23:06:29 +01:00
parent fe03832b59
commit 1cd5263e40
14 changed files with 11 additions and 968 deletions

View file

@ -163,13 +163,6 @@ class rhizo_base::freeswitch::common {
require => Package['freeswitch']
}
unless ($rhizo_base::osmo_stack == "split") {
file { '/usr/lib/libfreeswitch.so.1.0.0':
source => "puppet:///modules/rhizo_base/usr/lib/libfreeswitch_dyn-98-${fs_lib_version}-${lsbdistcodename}.so",
require => Package['freeswitch'],
}
}
file { '/etc/freeswitch':
ensure => directory,
source => 'puppet:///modules/rhizo_base/etc/freeswitch',

View file

@ -38,20 +38,11 @@ class rhizo_base {
$postcode = hiera('rhizo::postcode')
$pbxcode = hiera('rhizo::pbxcode')
# Network Stack
$osmo_stack = hiera('rhizo::osmo_stack', 'nitb')
$hlr_db = $osmo_stack ? {
'split' => '/var/lib/osmocom/hlr.db',
default => hiera('rhizo::hlr_db', '/var/lib/osmocom/hlr.db'),
}
$sms_db = $osmo_stack ? {
'split' => hiera('rhizo::sms_db', '/var/lib/osmocom/sms.db'),
default => hiera('rhizo::sms_db', '/var/lib/osmocom/hlr.sqlite3'),
}
$hlr_db = '/var/lib/osmocom/hlr.db'
$sms_db = '/var/lib/osmocom/sms.db'
# network name
$network_name = hiera('rhizo::network_name')
$auth_policy = hiera('rhizo::auth_policy')
$gprs = hiera('rhizo::gprs', 'egprs')
$mcc = hiera('rhizo::mcc', '334')
$mnc = hiera('rhizo::mnc', '07')
@ -70,10 +61,8 @@ class rhizo_base {
$upstream_codec = hiera('rhizo::upstream_codec', 'G729')
$dids = hiera('rhizo::dids', '')
$lcls = $osmo_stack ? {
'split' => '0',
default => hiera('rhizo::lcls', '0')
}
$lcls = hiera('rhizo::lcls', '0')
$jb_in = hiera('rhizo::jb_in', '')
$jb_out = hiera('rhizo::jb_out', '')
$jb_bts = hiera('rhizo::jb_bts', '100')
@ -197,14 +186,7 @@ class rhizo_base {
include rhizo_base::postgresql
include rhizo_base::freeswitch
include rhizo_base::runit
unless $osmo_stack == "split" {
include rhizo_base::openbsc
$use_nitb_osmo_stack = 'True'
}
if $osmo_stack == "split" {
include rhizo_base::osmocom
$use_nitb_osmo_stack = 'False'
}
include rhizo_base::osmocom
include rhizo_base::sudo
include rhizo_base::kiwi

View file

@ -1,193 +0,0 @@
# Class: rhizo_base::openbsc
#
# This module manages the OpenBSC system
#
# Parameters: none
#
# Actions:
#
# Requires: see Modulefile
#
# Sample Usage:
#
class rhizo_base::openbsc {
include systemd
$network_name = $rhizo_base::network_name
$auth_policy = $rhizo_base::auth_policy
$lac = $rhizo_base::lac
$ms_max_power = $rhizo_base::ms_max_power
$max_power_red = $rhizo_base::max_power_red
$gsm_band = $rhizo_base::gsm_band
$mcc = $rhizo_base::mcc
$mnc = $rhizo_base::mnc
$smsc_password = $rhizo_base::smsc_password
$smpp_password = $rhizo_base::smpp_password
$mncc_codec = $rhizo_base::mncc_codec
$gprs = $rhizo_base::gprs
$mncc_ip_address = $rhizo_base::mncc_ip_address
$vpn_ip_address = hiera('rhizo::vpn_ip_address')
$sgsn_ip_address = hiera('rhizo::sgsn_ip_address')
$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',
'nightly' => 'present',
default => 'present',
}
package { [ 'osmocom-nitb' ]:
ensure => $nitb_version,
require => Class['rhizo_base::apt'],
notify => [ Exec['hlr_pragma_wal'],
Exec['notify-nitb'] ],
}
package { [ 'osmo-sip-connector' ]:
ensure => '1.3.0-0rhizo1',
require => Class['rhizo_base::apt'],
}
$utils_version = $repo ? {
'latest' => 'installed',
'nightly' => 'latest',
default => '1.7.2',
}
package { [ 'osmo-bsc-meas-utils' ]:
ensure => $utils_version,
}
package { [ 'libosmocore-utils' ]:
ensure => 'installed',
}
if $mncc_codec == "AMR" {
$phys_chan = "TCH/H"
} else {
$phys_chan = "TCH/F"
}
service { 'osmocom-nitb':
enable => false,
ensure => 'stopped',
require => Package['osmocom-nitb'],
}
service { 'osmo-nitb':
enable => false,
ensure => 'stopped',
require => Package['osmocom-nitb'],
}
service { 'osmo-sip-connector':
enable => false,
ensure => stopped,
require => Package['osmo-sip-connector'],
}
service { 'osmo-sgsn':
enable => true,
ensure => running,
require => Package['osmo-sgsn'],
}
file { '/usr/local/bin/vty':
source => 'puppet:///modules/rhizo_base/vty',
owner => 'root',
mode => '0755',
}
file { '/etc/default/osmocom-nitb':
source => 'puppet:///modules/rhizo_base/etc/default/osmocom-nitb',
require => Package['osmocom-nitb'],
}
unless hiera('rhizo::local_bsc_cfg') == "1" {
file { '/etc/osmocom/osmo-nitb.cfg':
content => template(
'rhizo_base/osmo-nitb-head.erb',
'rhizo_base/osmo-nitb-bts.erb',
'rhizo_base/osmo-nitb-tail.erb'),
require => Package['osmocom-nitb'],
notify => Exec['notify-nitb'],
}
}
file { '/etc/osmocom/osmo-sip-connector.cfg':
content => template('rhizo_base/osmo-sip-connector.cfg.erb'),
require => Package['osmo-sip-connector'],
}
file { '/etc/osmocom/make_sgsn_acl_config':
content => template('rhizo_base/make_sgsn_acl_config.erb'),
mode => "0750",
notify => Exec['osmo-sgsn.cfg']
}
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;"',
require => Class['rhizo_base::packages'],
refreshonly => true,
}
exec { 'notify-nitb':
command => '/bin/echo 1 > /tmp/OSMO-dirty',
refreshonly => true,
}
exec { 'restart-nitb':
command => '/usr/bin/sv restart osmo-nitb',
require => Class['rhizo_base::packages'],
refreshonly => true,
}
}

View file

@ -12,8 +12,6 @@
#
class rhizo_base::runit {
$osmo_stack = $rhizo_base::osmo_stack
file { '/lib/systemd/system/runit.service':
ensure => present,
source => 'puppet:///modules/rhizo_base/systemd/runit.service',
@ -56,25 +54,8 @@ class rhizo_base::runit {
require => [ File['/etc/sv'] ],
}
$_runit_svc = $osmo_stack ? {
'split' => absent,
'nitb' => link
}
$_req = $osmo_stack ? {
'split' => File['/etc/sv'],
'nitb' => [ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
default => [ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
}
file { '/etc/service/osmo-nitb':
ensure => $_runit_svc,
target => '/etc/sv/osmo-nitb',
require => $_req,
}
file { '/etc/service/osmo-sip-connector':
ensure => $_runit_svc,
ensure => absent,
target => '/etc/sv/osmo-sip-connector',
require => [ File['/etc/sv'] ],
}