diff --git a/modules/rhizo_base/files/SysmoBTS/maint.sh b/modules/rhizo_base/files/SysmoBTS/maint.sh
index c102410..5c0dc64 100644
--- a/modules/rhizo_base/files/SysmoBTS/maint.sh
+++ b/modules/rhizo_base/files/SysmoBTS/maint.sh
@@ -3,6 +3,8 @@
# This script should be updated from time to time
# with nightly tasks for the BTS
+#exit
+
# Consider when making modifications that
# running the script more than once is expected to be safe.
@@ -11,16 +13,26 @@ if [ "$PWD" != "/var/SysmoBTS" ]; then
cd /var/SysmoBTS
fi
-SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
+SSH_OPTS="-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
. /home/rhizomatica/bin/vars.sh
# Ensure BTS has access to public internet.
+echo "Check Masquerading.."
/var/SysmoBTS/chk_masq
for bts in "${!BTS[@]}" ; do
+ _model=${MODEL[$bts]}
+ echo -e "---- Config: BTS $bts is a $_model ----\n"
+
+ if [ "$_model" == "UmSite" ] || [ "$_model" == "UmSite1" ] || [ "$_model" == "" ] || [ "$_model" == "2100" ] || \
+ [ "$_model" == "DUG20" ] || [ "$_model" == "rbs2000" ] || [ "$_model" == "Fake" ] ; then
+ echo -e "Do nothing for this BTS Model\n"
+ continue
+ fi
+
#scp $SSH_OPTS authorized_keys root@${BTS[$bts]}:/home/root/.ssh/
- echo -e "Set Date\n"
+ echo -n "Set Date --> "
ssh $SSH_OPTS root@${BTS[$bts]} "date -s '$(date)'"
if [ "$?" != "0" ] ; then
echo "No ssh access to BTS?"
@@ -28,14 +40,17 @@ for bts in "${!BTS[@]}" ; do
fi
# Commands to run on all BTS:
- #scp $SSH_OPTS ca-fix.sh root@${BTS[$bts]}:/home/root/
- #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /home/root/ca-fix.sh"
+ #echo "Checking if BTS can access OPKG REPOS."
+ #ssh $SSH_OPTS root@${BTS[$bts]} "echo nameserver 1.1.1.1 > /etc/resolv.conf; echo nameserver 9.9.9.9 >> /etc/resolv.conf"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "wget https://downloads.sysmocom.de -O /dev/null"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg clean; opkg update"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg list-upgradable"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg upgrade sysmobts-util osmo-bts osmo-pcu gps-utils gpsdate gpsd-conf gpsd-udev gpsd gpsd-gpsctl"
_modelNR=$(ssh $SSH_OPTS ${BTS[$bts]} sysmobts-util model-nr)
- continue
if [ "$?" == "127" ]; then
- echo "No sysmobts-util?"
+ echo -e "\n---- No sysmobts-util? ----\n"
continue
fi
@@ -46,52 +61,66 @@ for bts in "${!BTS[@]}" ; do
continue
fi
- if [ "$_modelNR" == "1020" ] && [ "$_trxNR" == "255" ] ; then
- echo "Looks like a SysmoBTS"
- ssh $SSH_OPTS root@${BTS[$bts]} "opkg update ; opkg install osmo-bts osmo-pcu"
- # Nothing to do
- fi
+ #ssh $SSH_OPTS root@${BTS[$bts]} "mkdir -p /etc/profile.d"
+ #scp $SSH_OPTS alias.sh root@${BTS[$bts]}:/etc/profile.d/alias.sh
+ #scp $SSH_OPTS osmo-pcu_$bts.cfg root@${BTS[$bts]}:/etc/osmocom/osmo-pcu.cfg
+ #scp $SSH_OPTS pcu bts mgr txp /usr/local/bin/vty root@${BTS[$bts]}:/bin/
+ #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pcu /bin/bts /bin/mgr /bin/txp /bin/vty"
- if [ "$_modelNR" == "65536" ] && [ "$_trxNR" == "255" ] ; then
- echo "Looks like a SysmoBTS 1002? (65536)"
- ssh $SSH_OPTS root@${BTS[$bts]} "opkg update ; opkg install osmo-bts osmo-pcu"
- # Nothing to do
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg list-upgradable | cut -f 1 -d ' ' | grep gps | xargs -r opkg upgrade"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg list-installed | grep kernel-module-ipt | xargs -r opkg remove --force-removal-of-dependent-package --force-remove"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg list-installed | grep kernel-module-nf | xargs -r opkg remove --force-removal-of-dependent-package --force-remove"
+
+ if [ "$_modelNR" == "65535" ] || [ "$_modelNR" == "1020" ] && [ "$_trxNR" == "255" ] ; then
+ echo "Looks like a SysmoBTS ($_modelNR)"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop osmo-pcu"
+ #scp $SSH_OPTS osmo-pcu.1.2.0.70-697f root@${BTS[$bts]}:/usr/bin/osmo-pcu
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl start osmo-pcu"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "echo '$SITE-$bts' > /etc/hostname"
+ #scp $SSH_OPTS master/ntp.conf root@${BTS[$bts]}:/etc/ntp.conf
+ #scp $SSH_OPTS osmo-pcu_$bts.cfg root@${BTS[$bts]}:/etc/osmocom/osmo-pcu.cfg
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop gpsd.socket ; systemctl disable gspd.socket; systemctl restart gpsd"
+ #scp $SSH_OPTS osmo-bts_$bts.cfg root@${BTS[$bts]}:/etc/osmocom/osmo-bts-sysmo.cfg
+ #scp $SSH_OPTS bts pcu /usr/local/bin/vty root@${BTS[$bts]}:/bin/
+ #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/txp"
+ #scp $SSH_OPTS gpsdate.service root@${BTS[$bts]}:/lib/systemd/system
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg list-upgradable | cut -f 1 -d ' ' | grep libosmoabis | xargs -r opkg upgrade"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg upgrade sysmobts-util"
fi
if [ "$_modelNR" == "2050" ] && [ "$_trxNR" == "0" ] ; then
# Master Verified.
echo "BTS is a 2050 Master"
- ssh $SSH_OPTS root@${BTS[$bts]} "opkg update"
- ssh $SSH_OPTS root@${BTS[$bts]} "opkg install osmo-bts osmo-pcu"
- #scp $SSH_OPTS pcu-ns root@${BTS[$bts]}:/bin/
- #scp $SSH_OPTS tgl-s root@${BTS[$bts]}:/bin/tgl
- #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pcu-ns /bin/tgl"
- #gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr
- #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr"
- #scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/
- #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 755 /usr/bin/sysmobts-mgr ; systemctl restart sysmobts-mgr"
- # things to do
+ #ssh $SSH_OPTS root@${BTS[$bts]} "echo '$SITE-Master-$bts' > /etc/hostname"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop gpsd.socket ; systemctl disable gspd.socket; systemctl restart gpsd"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop osmo-pcu"
+ #scp $SSH_OPTS osmo-pcu.1.2.0.70-697f root@${BTS[$bts]}:/usr/bin/osmo-pcu
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl start osmo-pcu"
+ #scp $SSH_OPTS osmo-bts_$bts.cfg root@${BTS[$bts]}:/etc/osmocom/osmo-bts-sysmo.cfg
+ #scp $SSH_OPTS bts pcu /usr/local/bin/vty root@${BTS[$bts]}:/bin/
#scp $SSH_OPTS rc.local root@${BTS[$bts]}:/etc/rc.local
- #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /etc/rc.local"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg list-upgradable | cut -f 1 -d ' ' | grep gps | xargs -r opkg upgrade"
fi
if [ "$_trxNR" == "1" ] ; then
# Slave Verified.
echo "BTS is a 2050 Slave"
- ssh $SSH_OPTS root@${BTS[$bts]} "opkg update"
- ssh $SSH_OPTS root@${BTS[$bts]} "opkg install osmo-bts osmo-pcu"
- #ssh $SSH_OPTS root@${BTS[$bts]} "/home/root/ca-fix.sh"
-
- #scp $SSH_OPTS pcu-ns root@${BTS[$bts]}:/bin/
- #scp $SSH_OPTS tgl-m root@${BTS[$bts]}:/bin/tgl
- #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pcu-ns /bin/tgl"
- # Nothing to do.
+ #scp $SSH_OPTS slave/gpsdate root@${BTS[$bts]}:/etc/default/gpsdate
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop osmo-pcu"
+ #scp $SSH_OPTS osmo-pcu.1.2.0.70-697f root@${BTS[$bts]}:/usr/bin/osmo-pcu
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl start osmo-pcu"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "echo '$SITE-Slave-$bts' > /etc/hostname"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl enable osmo-pcu; systemctl start osmo-pcu"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop gpsd.socket ; systemctl disable gspd.socket; systemctl stop gpsd ; systemctl disable gpsd"
+ #scp $SSH_OPTS osmo-pcu_$bts.cfg root@${BTS[$bts]}:/etc/osmocom/osmo-pcu.cfg
+ #scp $SSH_OPTS osmo-bts_$bts.cfg root@${BTS[$bts]}:/etc/osmocom/osmo-bts-sysmo.cfg
+ #scp $SSH_OPTS bts pcu /usr/local/bin/vty root@${BTS[$bts]}:/bin/
+ #ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/txp"
+ #ssh $SSH_OPTS root@${BTS[$bts]} "opkg upgrade sysmobts-util osmo-bts osmo-pcu"
fi
-
+ echo -e "----\n"
done
-#/var/SysmoBTS/opkg-1.sh
-
if [ "$OLDPWD" != "" ]; then
cd $OLDPWD
fi
diff --git a/modules/rhizo_base/files/collectd-hack b/modules/rhizo_base/files/collectd-hack
index e318947..0cac96e 100644
--- a/modules/rhizo_base/files/collectd-hack
+++ b/modules/rhizo_base/files/collectd-hack
@@ -91,14 +91,14 @@ once() {
done
done
- for item in oml_connected chanloadavg chan_ccch_sdcch4 chan_sdcch8 chan_tch_h chan_osmo_dyn lchan_borken; do
+ for item in oml_connected chanloadavg chan_ccch_sdcch4 chan_sdcch8 chan_tch_h chan_tch_f chan_osmo_dyn lchan_borken; do
rm -rf $item-*
for bts in "${!BTS[@]}" ; do
category_bts_g $item $bts
done
done
- rm -rf BTS_uptime-* EGPRS_* BYTES-* PCU_RACH-* PDCH-* MS_PRESENT-*
+ rm -rf BTS_uptime-* EGPRS_* BYTES-* PCU_RACH-* PDCH-* MS_PRESENT-* SUBS-VLR
for bts in "${!BTS[@]}" ; do
@@ -152,11 +152,12 @@ once() {
ln -s $f MS-`echo $f | awk -F'.' '{print $6"."$7}'`.rrd
done
cd ..
-
-
-
done
+ mkdir SUBS-VLR || exit
+ cd SUBS-VLR
+ ln -s ../statsd/gauge-vlr.0.subscribers.rrd Connected-Count.rrd
+
find -name chreq-total.rrd -type l -delete
find -name cm_serv_rej-rrd.rrd -type l -delete
}
diff --git a/modules/rhizo_base/files/ports.conf b/modules/rhizo_base/files/ports.conf
new file mode 100644
index 0000000..ac28387
--- /dev/null
+++ b/modules/rhizo_base/files/ports.conf
@@ -0,0 +1,16 @@
+# If you just change the port or add more ports here, you will likely also
+# have to change the VirtualHost statement in
+# /etc/apache2/sites-enabled/000-default.conf
+
+Listen 80
+Listen 81
+
+
+ Listen 443
+
+
+
+ Listen 443
+
+
+# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
diff --git a/modules/rhizo_base/files/stack b/modules/rhizo_base/files/stack
index 59de419..3c35946 100644
--- a/modules/rhizo_base/files/stack
+++ b/modules/rhizo_base/files/stack
@@ -4,4 +4,9 @@ if [ "$1" == "" ] ; then
else
_cmd=$1
fi
+if [ "$_cmd" == "policy" ] ; then
+ apt policy osmo-stp osmo-bsc osmo-msc osmo-hlr osmo-mgw osmo-sgsn osmo-sip-connector 2>/dev/null| grep '^osmo-\|Installed\|Candidate'
+ exit
+fi
+
systemctl $_cmd osmo-stp osmo-bsc osmo-msc osmo-hlr osmo-mgw osmo-sgsn osmo-sip-connector
diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp
index b9670b8..7499681 100644
--- a/modules/rhizo_base/manifests/init.pp
+++ b/modules/rhizo_base/manifests/init.pp
@@ -27,6 +27,7 @@ class rhizo_base {
$charge_scheme = hiera('rhizo::charge_scheme', 'normal')
$test_playback = hiera('rhizo::test_playback', 'tone_stream://%(4000,250,440);loops=-1')
$sip_calling_url = hiera('rhizo::sip_calling_url', '')
+ $sms_shortcodes = hiera('rhizo::sms_shortcodes', '')
# database
$pgsql_db = hiera('rhizo::pgsql_db')
@@ -115,6 +116,7 @@ class rhizo_base {
$sms_destination_unauthorized = hiera('rhizo::sms_destination_unauthorized')
$free_numbers = hiera('rhizo::free_numbers', '[]')
$welcome_sms = hiera('rhizo::welcome_sms', '')
+ $currencies = hiera('rhizo::currencies', '{}')
$rai_admin_user = hiera('rhizo::rai_admin_user')
$rai_admin_pwd = hiera('rhizo::rai_admin_pwd')
@@ -238,7 +240,7 @@ schedule { 'weekly':
}
schedule { 'offpeak':
- range => '1 - 4.30',
+ range => '0:15 - 3:30',
}
schedule { 'repod':
diff --git a/modules/rhizo_base/manifests/osmocom.pp b/modules/rhizo_base/manifests/osmocom.pp
index 961f54c..3a05745 100644
--- a/modules/rhizo_base/manifests/osmocom.pp
+++ b/modules/rhizo_base/manifests/osmocom.pp
@@ -20,25 +20,44 @@ class rhizo_base::osmocom::buster inherits rhizo_base::osmocom::common {
ensure => 'installed'
}
- package { [ 'libosmoabis10' ]:
- ensure => '1.4.1'
+ package { [ 'libosmoabis13', 'libosmotrau2' ]:
+ ensure => '1.5.2'
+ }
+
+ package { [ 'libosmonetif11' ]:
+ ensure => '1.4.0'
+ }
+
+ package { [ 'libosmo-ranap7' ]:
+ ensure => '1.5.1'
}
package { [ 'libosmocore' ]:
- ensure => '1.8.0'
+ ensure => '1.9.2'
}
package { [ 'osmo-bsc', 'osmo-bsc-meas-utils' ]:
- ensure => '1.9.0+rhizo3b',
+ schedule => 'offpeak',
+ ensure => '1.11.0.2.6c6ca~rhizomatica.production',
require => Class['rhizo_base::apt'],
notify => Exec['notify-osmo-restart'],
}
package { [ 'osmo-msc' ]:
+ schedule => 'offpeak',
require => Class['rhizo_base::apt'],
- ensure => '1.10.0.77.11e4b~rhizomatica.production',
+ ensure => '1.9.0.92.a021a~rhizomatica.production',
}
- package { [ 'osmo-sgsn', 'libgtp6' ]:
- ensure => "$repo" ? { "latest" => '1.10.1', "nightly" => "installed" },
+ package { [ 'osmo-mgw', 'libosmo-mgcp-client12' ]:
+ schedule => 'offpeak',
+ require => Class['rhizo_base::apt'],
+ ensure => '1.12.2.8.78a93~rhizomatica.production',
+ }
+ package { [ 'osmo-sgsn' ]:
+ ensure => "$repo" ? { "latest" => '1.11.1.2.01c5~rhizomatica.production', "nightly" => "installed" },
+ require => Class['rhizo_base::apt'],
+ }
+ package { [ 'libgtp6' ]:
+ ensure => "$repo" ? { "latest" => '1.11.0', "nightly" => "installed" },
require => Class['rhizo_base::apt'],
}
package { [ 'osmo-sip-connector' ]:
@@ -47,9 +66,15 @@ class rhizo_base::osmocom::buster inherits rhizo_base::osmocom::common {
}
package { [ 'osmo-hlr', 'libosmo-mslookup1', 'osmo-mslookup-utils',
'libosmo-gsup-client0' ]:
- ensure => '1.6.0.19.80b2~rhizomatica.production',
+ schedule => 'offpeak',
+ ensure => '1.7.0.10.6784~rhizomatica.production',
require => Class['rhizo_base::apt'],
}
+ package { [ 'osmo-stp' ]:
+ ensure => '1.8.1',
+ require => Class['rhizo_base::apt'],
+ }
+
}
class rhizo_base::osmocom::common {
@@ -82,7 +107,8 @@ class rhizo_base::osmocom::common {
$mgw_num_ep = hiera('rhizo::mgw_num_ep', $bts.size * 24)
$osmo_local_bin = hiera('rhizo::osmo_local_bin', [])
- package { "osmocom-nitb":
+ package { [ "osmocom-nitb", 'libosmo-sigtran7',
+ 'libosmo-mgcp-client9', 'libosmonetif8' ]:
ensure => 'absent'
}
@@ -91,15 +117,11 @@ class rhizo_base::osmocom::common {
ensure => 'installed',
}
- package { [ 'libsmpp1', 'libosmo-sigtran7',
- 'libosmo-mgcp-client9',
- 'libosmonetif8', 'libosmotrau2',
- 'osmo-stp', 'osmo-mgw' ]:
+ package { [ 'libsmpp1', 'libosmo-sigtran9' ]:
ensure => 'installed',
require => Class['rhizo_base::apt']
}
-
$ts0_phys_chan = { "unknown" => "CCCH",
"1002" => "CCCH+SDCCH4",
"1020" => "CCCH+SDCCH4",
diff --git a/modules/rhizo_base/manifests/wifi.pp b/modules/rhizo_base/manifests/wifi.pp
index e81730b..b26e437 100644
--- a/modules/rhizo_base/manifests/wifi.pp
+++ b/modules/rhizo_base/manifests/wifi.pp
@@ -41,6 +41,20 @@ class rhizo_base::wifi {
notify => Service['apache2']
}
+ file { '/etc/apache2/ports.conf':
+ ensure => present,
+ source => 'puppet:///modules/rhizo_base/ports.conf',
+ require => Package['apache2'],
+ notify => Service['apache2']
+ }
+
+ file { '/etc/apache2/mods-enabled/rewrite.load':
+ ensure => link,
+ target => '../mods-available/rewrite.load',
+ require => Package['apache2'],
+ notify => Service['apache2']
+ }
+
firewall { '000 accept DHCP (udp port 67)':
proto => 'udp',
iniface => $wifi_if,
diff --git a/modules/rhizo_base/templates/config_values.py.erb b/modules/rhizo_base/templates/config_values.py.erb
index f8b8942..d4e9f89 100644
--- a/modules/rhizo_base/templates/config_values.py.erb
+++ b/modules/rhizo_base/templates/config_values.py.erb
@@ -26,7 +26,7 @@ pgsql_db = '<%= @pgsql_db %>'
pgsql_user = '<%= @pgsql_user %>'
pgsql_pwd = '<%= @pgsql_pwd %>'
pgsql_host = '<%= @pgsql_host %>'
-db_revision = 18
+db_revision = 19
# SITE
site_name = "<%= @site_name %>"
@@ -49,6 +49,10 @@ site_routing = [
<%= @site_routing %>
]
+sms_shortcodes = [
+<%= @sms_shortcodes %>
+]
+
# SITE settings
# rate type can be "call" or "min"
limit_local_calls = "<%= @limit_local_calls %>"
@@ -64,6 +68,7 @@ charge_inbound_rate = "<%= @charge_inbound_rate %>"
charge_inbound_rate_type = "<%= @charge_inbound_rate_type %>"
charge_outbound_rate_type = "<%= @charge_outbound_rate_type %>"
free_numbers = <%= @free_numbers %>
+currencies = <%= @currencies %>
smsc_shortcode = "<%= @smsc_shortcode %>"
sms_sender_unauthorized = '<%= @sms_sender_unauthorized %>'
diff --git a/modules/rhizo_base/templates/osmo-mgw.cfg.erb b/modules/rhizo_base/templates/osmo-mgw.cfg.erb
index b35f219..db32b30 100644
--- a/modules/rhizo_base/templates/osmo-mgw.cfg.erb
+++ b/modules/rhizo_base/templates/osmo-mgw.cfg.erb
@@ -55,7 +55,6 @@ mgcp
sdp audio-payload send-name
loop 0
number endpoints <%= @mgw_num_ep %>
- no allow-transcoding
osmux off
<% if @bts[0]["model"] == "rbs2000" -%>
trunk 0
diff --git a/modules/rhizo_base/templates/osmo-pcu.cfg.erb b/modules/rhizo_base/templates/osmo-pcu.cfg.erb
index 361a57a..59b39e1 100644
--- a/modules/rhizo_base/templates/osmo-pcu.cfg.erb
+++ b/modules/rhizo_base/templates/osmo-pcu.cfg.erb
@@ -13,4 +13,3 @@ pcu
cs 4
alloc-algorithm dynamic
gamma 0
- neighbor resolution 172.16.0.1 4248
diff --git a/modules/rhizo_base/templates/portal.conf.erb b/modules/rhizo_base/templates/portal.conf.erb
index 5b8efe2..a06d05f 100644
--- a/modules/rhizo_base/templates/portal.conf.erb
+++ b/modules/rhizo_base/templates/portal.conf.erb
@@ -10,6 +10,7 @@
:81>
#ServerName www.example.com
+ ServerName <%= @wifi_ip %>
ServerAdmin webmaster@localhost
DocumentRoot /var/rhizomatica/portal