Add opkg credentials for BTS

This commit is contained in:
Keith Whyte 2020-05-09 05:53:05 +02:00
parent ed296b1dfb
commit 98648569aa
3 changed files with 6 additions and 1 deletions

View file

@ -13,7 +13,10 @@ SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
for bts in "${!BTS[@]}" ; do
if [ "$(ssh $SSH_OPTS ${BTS[$bts]} 'grep 201705 /etc/opkg/base-feeds.conf >/dev/null; echo $?')" == "0" ] ; then
grep OPKG_CREDS base-feeds-nightly.conf > /dev/null
if [ "$?" == "0" ]; then
sed -i s/OPKG_CREDS/$OPKG_CREDS/g base-feeds-nightly.conf
fi
scp $SSH_OPTS base-feeds-nightly.conf root@${BTS[$bts]}:/etc/opkg/base-feeds.conf
ssh $SSH_OPTS root@${BTS[$bts]} "opkg update; opkg install osmo-bts osmo-pcu sysmobts-util ntp"
ssh $SSH_OPTS root@${BTS[$bts]} "systemctl enable osmo-pcu; systemctl start osmo-pcu"

View file

@ -45,6 +45,7 @@ class rhizo_base {
$mnc = hiera('rhizo::mnc', '7')
#BTSs configuration
$opkg_creds = hiera('rhizo::bts_opkg_creds')
$bts = hiera('rhizo::bts')
$bts_pass = hiera('rhizo::bts_pass')
$bts_type = hiera('rhizo::bts_type')

View file

@ -20,6 +20,7 @@ BTS_MASTER[<%= index %>]=<%= bts["ip"] %>
<% end -%>
BTSPASS=<%= @bts_pass %>
OPKG_CREDS=<%= @opkg_creds %>
LATENCY_HOST=<%= @latency_check_address %>
LATENCY_TINC=<%= @latency_check_vpn %>