Software upgrade (Release THREE)

From OSM Public Wiki
Jump to: navigation, search

Software upgrade (source code)

OSM is being upgraded periodically to fix bugs that are being reported. Last version corresponds with the tag v2.0.1. These guidelines show you how to upgrade the different components.

Note: The SW upgrade procedure does not include restoring/migrating configuration state in the upgraded OSM platform.

UI upgrade source code

Note: It is recommended to upgrade both SO and UI modules together.

Execute at UI container ("lxc exec SO-ub bash" to enter into the container, "exit" to exit)

cd /root/UI
git pull --rebase
git checkout tags/v2.0.1
make clean && make -j16 && make install

Follow SO upgrade to upgrade SO and restart launchpad.

SO upgrade source code

Execute at SO container ("lxc exec SO-ub bash" to enter into the container, "exit" to exit)

cd /root/SO
git pull --rebase
git checkout tags/v2.0.1
make clean  # Clean the previous installation
./BUILD.sh   # Install the new version

Exit from SO-container and restart SO-ub container and Launchpad

lxc restart SO-ub
# lxc exec SO-ub -- nohup sudo -b -H /usr/rift/rift-shell -r -i /usr/rift -a /usr/rift/.artifacts -- ./demos/launchpad.py --use-xml-mode

RO upgrade source code

First, enter into the RO container ("lxc exec RO bash" to enter, "exit" to exit). If it is installed by source folders /root/RO and /opt/openmano exist. If not it has been installed by binary.

Upgrading from OSM version v2.0.X

# cp /etc/osm/openmanod.cfg openmanod.cfg.bck     # Optional: create a backup of the config file if you made changes
cd RO
git pull --rebase
git checkout <VERSION>  # last stable  <VERSION> is 'tags/v3.0.1'
./scripts/install-openmano-service.sh --uninstall
./scripts/install-openmano.sh --noclone --updatedb -q 
# cp openmanod.cfg.bck /etc/osm/openmanod.cfg     # Optional: replace the config file again
# service osm-ro restart                          # Optional: if you replaced the config file, you need to restart the service

Upgrading from OSM version v3.0.X

cd /opt/openmano
git pull --rebase
git checkout <VERSION>    # last stable <VERSION> is 'tags/v3.0.1'
service osm-ro stop
./database_utils/migrate_mano_db.sh
service osm-ro start


Software upgrade (binaries)

UI upgrade binary code

Under elaboration

SO upgrade binary code

Under elaboration

RO upgrade binary code

First, enter into the RO container ("lxc exec RO bash" to enter, "exit" to exit).

Upgrading to a stable version from OSM v2.0.X

Under elaboration

Upgrading to a stable version from OSM v3.0.X

# Check that it is installed by binary and obtain installation folder. 
RO_PATH=`python -c 'import osm_ro; print osm_ro.__path__[0]'` 
echo $RO_PATH   # must contain something as /usr/lib/python2.7/dist-packages/osm_ro. Do not continue with these steps if empty.

apt update
apt install python-osm-ro

# Upgrade database
service osm-ro stop
${RO_PATH}/database_utils/migrate_mano_db.sh
service osm-ro start

Upgrading to a non stable version from OSM v3.0.x

# Check that it is installed by binary and obtain installation folder. 
OSMRO_PATH=`python -c 'import osm_ro; print osm_ro.__path__[0]`
echo $OSMRO_PATH   # must contain something as /usr/lib/python2.7/dist-packages/osm_ro. Do not continue with these steps if empty.
OSMLIBOVIM_PATH=`python -c 'import lib_osm_openvim; print lib_osm_openvim.__path__[0]'
echo $OSMLIBOVIM_PATH   # must contain something as /usr/lib/python2.7/dist-packages/lib_osm_openvim. Do not continue with these steps if empty.

wget http://osm1.etsi.org:8081/.../<python-osm-ro_XXX.deb> # Use the concrete desired version
dpkg -i <python-osm-ro_XXX.deb>

# Upgrade database
service osm-ro stop
${OSMLIBOVIM_PATH}/database_utils/migrate_vim_db.sh
${OSMRO_PATH}/database_utils/migrate_mano_db.sh
service osm-ro start