Software upgrade (Release THREE): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
 
Line 77: Line 77:
  # Check that the current OSM debian repository is the stable Release THREE repo:
  # Check that the current OSM debian repository is the stable Release THREE repo:
  grep -h ^deb /etc/apt/sources.list /etc/apt/sources.list.d/* |grep osm-download
  grep -h ^deb /etc/apt/sources.list /etc/apt/sources.list.d/* |grep osm-download
     deb [arch=amd64] http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable osmclient   # should be similar to this
    # the output should be similar to this:
     deb [arch=amd64] http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable osmclient
   
   
  # Upgrade python-osm-ro and its dependencies
  # Upgrade python-osm-ro and its dependencies
Line 86: Line 87:
  service osm-ro stop
  service osm-ro stop
  ${OSMLIBOVIM_PATH}/database_utils/migrate_vim_db.sh
  ${OSMLIBOVIM_PATH}/database_utils/migrate_vim_db.sh
# by default database name: 'mano_vim_db'; user: 'mano'; password: 'manopw'
  ${OSMRO_PATH}/database_utils/migrate_mano_db.sh
  ${OSMRO_PATH}/database_utils/migrate_mano_db.sh
# by default database name: 'mano_db'; user: 'mano'; password: 'manopw'
  service osm-ro start
  service osm-ro start



Latest revision as of 09:11, 7 May 2018

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 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

# Check that the current OSM debian repository is the stable Release THREE repo:
grep -h ^deb /etc/apt/sources.list /etc/apt/sources.list.d/* |grep osm-download
   # the output should be similar to this:
   deb [arch=amd64] http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable osmclient

# Upgrade python-osm-ro and its dependencies
apt update
apt install python-osm-ro

# Upgrade databases
service osm-ro stop
${OSMLIBOVIM_PATH}/database_utils/migrate_vim_db.sh
# by default database name: 'mano_vim_db'; user: 'mano'; password: 'manopw'
${OSMRO_PATH}/database_utils/migrate_mano_db.sh
# by default database name: 'mano_db'; user: 'mano'; password: 'manopw'
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>
# Do the same if needed or desired for package dependencies as python-lib-osm-openvim or python-osm-im

# Upgrade databases
service osm-ro stop
${OSMLIBOVIM_PATH}/database_utils/migrate_vim_db.sh  # default database/user/password is  mano_vim_db/mano/manopw
${OSMRO_PATH}/database_utils/migrate_mano_db.sh   # default database/user/password is  mano_db/mano/manopw
service osm-ro start

Upgrading to a stable version from OSM version older than v3.0.0

# Remove openmano service used at old versions. (Ignore errors if service does not exist, depending on your version)
systemctl disable openmano.service
service openmano stop
service osm-ro stop
 
# Check that the current OSM debian repository is the stable Release THREE repo:
grep -h ^deb /etc/apt/sources.list /etc/apt/sources.list.d/* |grep osm-download
   deb [arch=amd64] http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable osmclient    # should be similar to this
# if missing, add repository with:
apt update && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable SO UI RO IM osmclient openvim"
curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE/OSM%20ETSI%20Release%20Key.gpg" | apt-key add -

# Upgrade python-osm-ro and its dependencies
apt update
apt install python-osm-ro

# Check it is installed properly and get 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

# Install/Upgrade databases
service osm-ro stop
DEBIAN_FRONTEND=noninteractive ${OSMRO_PATH}/database_utils/install-db-server.sh --updatedb
DEBIAN_FRONTEND=noninteractive ${OSMLIBOVIM_PATH}/database_utils/install-db-server.sh -u mano -p manopw -d mano_vim_db --updatedb
service osm-ro start