Back to top
 
 
 

Upgrade Guide for ConVirt Open Source

This document describes upgrading from previous versions of ConVirt Open Source version.

Contents

 

Overview

The ConVirt allows in-place upgrade of you management infrastructure. This does not involve shutting down your virtual machines and other components. Only management features would be not available during the upgrade.


Here are broad steps.

  • Download latest version of ConVirt software.
  • Shutdown ConVirt Management Server (CMS)
  • Backup your current environment.
    • Backup code
    • Bakcup ConVirt repository
    • Backup ConVirt configuration
  • Upgrade Code
  • Upgrade ConVirt repository
  • Upgrade ConVirt configuration
  • Insert Seed data
  • Miscellaneous
  • Start CMS
  • Login and refresh the browser

Upgrade 2.0-2.0.1

  • Initialize variables
 export FROM_VER=2.0
 export TO_VER=2.0.1
 export CONVIRT_BASE=~
 export CONVIRT_DIR=$CONVIRT_BASE/convirt
 NOTE Assumption is made that current version of ConVirt is in the home directory. If your 
      deployment is different, please adjust CONVIRT_BASE
  • Download latest version of ConVirt
 DOWNLOAD_DIR=~/downloads/
 cd $DOWNLOAD_DIR
 # If any old version move it out.
 mkdir -p save
 mv * save 
 # untar the tarball.
 tar -xzf convirt-$TO_VER-*.tar.gz

  • Shutdown CMS
 cd $CONVIRT_DIR
 ./convirt-ctl stop
  • Backup code
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
  • Backup repository
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root -p convirt  > "convirt_$FROM_VER`date`.sql"
  • Backup configuration
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
  • Upgrade code
Untar the NEW version of convirt over the existing directory. From parent directory of convirt,
 tar -xvf $DOWNLOAD_DIR/convirt-$TO_VER.tar.gz -C $CONVIRT_BASE
  • Upgrade ConVirt Repository
 Use the upgrade script provided to upgrade the ConVirt repository.
 Usage : upgrade_repository 2.0-2.0.1 mysql <dbname> <dbuser> <dbpasswd> 
cd $CONVIRT_DIR/upgrade ./upgrade_repository.sh 2.0-2.0.1 mysql convirt root convirt

 

  • Updating ConVirt configuration.
 # Save default configuration file from new version.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.$TO_VER.default
 # Restore working copy.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working $CONVIRT_DIR/src/convirt/web/convirt/development.ini

 

 # Upgrade configuration
 cd $CONVIRT_DIR/upgrade
 ./upgrade_config.sh 2.0-2.0.1

 

  • Populate new seed data
Validate that develoment.ini has following (add it if it is not there.)
update_from_version=2.0
cd $CONVIRT_DIR
source tg2env/bin/activate
paster setup-app src/convirt/web/convirt/development.ini
deactivate

 

  • Miscellaneous
ConVirt 2.0.1 allows for simultaneous migration in to the same KVM managed server. For this you need to open 8002-8012 TCP ports on EACH managed server. Please consult your platform documentation for exact instructions.
The new convirt uses a timeout script, This is copied from CMS server to managed server when the server is discovered. But for upgrade scenario, this needs to be copied to all managed servers.
e.g. scp $CONVIRT_DIR/common/scripts/bash_timepout.sh root@managed_server:/var/cache/convirt/common/scripts
  • Start CMS
 cd $CONVIRT_DIR
 ./convirt-ctl start
  • Refresh Browser
 Launch new browser.
 Login and Refresh the browser. (shift+F5, shift+ refresh)
 This is required so new versions of javascripts gets loaded
 Refresh once on the Login page, you should see the latest ConVirt version.
 Once you login, then you will have to Refresh again, this will refresh the javascripts and the header 
 to show the latest version.
  • Recovery in case of an error.
 Recover Code
 mv $CONVIRT_DIR $CONVIRT_DIR.upgrade_failed
 cp -r BACKUP_DIR/convirt $CONVIRT_BASE
 Recover Repository
 a. Drop the database convirt
 b. Restore it from backup
    mysql -u root -p convirt  < (sql file created in "Backup Repository" step)   
 File a support ticket with Convirture Support

Upgrade 2.0.1-2.0.2

  • Initialize variables
 export FROM_VER=2.0.1
 export TO_VER=2.0.2
 export CONVIRT_BASE=~
 export CONVIRT_DIR=$CONVIRT_BASE/convirt
 NOTE Assumption is made that current version of ConVirt is in the home directory. If your 
      deployment is different, please adjust CONVIRT_BASE
  • Download latest version of ConVirt
 DOWNLOAD_DIR=~/downloads/
 cd $DOWNLOAD_DIR
 # If any old version move it out.
 mkdir -p save
 mv * save 
 # untar the tarball.
 tar -xzf convirt-$TO_VER-*.tar.gz

  • Shutdown CMS
 cd $CONVIRT_DIR
 ./convirt-ctl stop
  • Backup code
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
  • Backup repository
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root -p convirt  > "convirt_$FROM_VER`date`.sql"
  • Backup configuration
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
  • Upgrade code
Untar the NEW version of convirt over the existing directory. From parent directory of convirt,
 tar -xvf $DOWNLOAD_DIR/convirt-$TO_VER.tar.gz -C $CONVIRT_BASE
  • Upgrade ConVirt Repository
 Use the upgrade script provided to upgrade the ConVirt repository.
 Usage : upgrade_repository 2.0-2.0.1 mysql <dbname> <dbuser> <dbpasswd> 
cd $CONVIRT_DIR/upgrade ./upgrade_repository.sh ${FROM_VER}-${TO_VER} mysql convirt root convirt

 

  • Updating ConVirt configuration.
 # Save default configuration file from new version.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.$TO_VER.default
 # Restore working copy.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working $CONVIRT_DIR/src/convirt/web/convirt/development.ini

 

 # Upgrade configuration
 cd $CONVIRT_DIR/upgrade
 ./upgrade_config.sh ${FROM_VER}-${TO_VER}

 

  • Populate new seed data
Validate that develoment.ini has following (add it if it is not there.)
update_from_version=2.0.1
cd $CONVIRT_DIR
source tg2env/bin/activate
paster setup-app src/convirt/web/convirt/development.ini
deactivate

 

  • Miscellaneous
 Not Applicable
  • Start CMS
 cd $CONVIRT_DIR
 ./convirt-ctl start
  • Refresh Browser
 Launch new browser.
 Login and Refresh the browser. (shift+F5, shift+ refresh)
 This is required so new versions of javascripts gets loaded
 Refresh once on the Login page, you should see the latest ConVirt version.
 Once you login, then you will have to Refresh again, this will refresh the javascripts and the header 
 to show the latest version.
  • Recovery in case of an error.
 Recover Code
 mv $CONVIRT_DIR $CONVIRT_DIR.upgrade_failed
 cp -r BACKUP_DIR/convirt $CONVIRT_BASE
 Recover Repository
 a. Drop the database convirt
 b. Restore it from backup
    mysql -u root -p convirt  < (sql file created in "Backup Repository" step)   
 File a support ticket with Convirture Support

Upgrade 2.0.2-2.1

  • Initialize variables
 export FROM_VER=2.0.2
 export TO_VER=2.1
 export CONVIRT_BASE=~
 export CONVIRT_DIR=$CONVIRT_BASE/convirt
 NOTE Assumption is made that current version of ConVirt is in the home directory. If your 
      deployment is different, please adjust CONVIRT_BASE
  • Download latest version of ConVirt
 DOWNLOAD_DIR=~/downloads/
 cd $DOWNLOAD_DIR
 # If any old version move it out.
 mkdir -p save
 mv * save 
 # untar the tarball.
 tar -xzf convirt-$TO_VER-*.tar.gz

  • Shutdown CMS
 cd $CONVIRT_DIR
 ./convirt-ctl stop
  • Backup code
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
  • Backup repository
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root -p convirt  > "convirt_$FROM_VER`date`.sql"
  • Backup configuration
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
  • Upgrade code
Untar the NEW version of convirt over the existing directory. From parent directory of convirt,
 tar -xvf $DOWNLOAD_DIR/convirt-$TO_VER.tar.gz -C $CONVIRT_BASE
  • Upgrade ConVirt Repository
 Use the upgrade script provided to upgrade the ConVirt repository.
 Usage : upgrade_repository 2.0.2-2.1 mysql <dbname> <dbuser> <dbpasswd> 
cd $CONVIRT_DIR/upgrade ./upgrade_repository.sh ${FROM_VER}-${TO_VER} mysql convirt root convirt

 

  • Updating ConVirt configuration.
 # Save default configuration file from new version.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.$TO_VER.default
 # Restore working copy.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working $CONVIRT_DIR/src/convirt/web/convirt/development.ini

 

 # Upgrade configuration
 cd $CONVIRT_DIR/upgrade
 ./upgrade_config.sh ${FROM_VER}-${TO_VER}

 

  • Populate new seed data
Validate that develoment.ini has following (add it if it is not there.)
update_from_version=2.0.2
cd $CONVIRT_DIR
source tg2env/bin/activate
paster setup-app src/convirt/web/convirt/development.ini
deactivate

 

  • Miscellaneous
 Not Applicable
  • Start CMS
 cd $CONVIRT_DIR
 ./convirt-ctl start
  • Refresh Browser
 Launch new browser.
 Login and Refresh the browser. (shift+F5, shift+ refresh)
 This is required so new versions of javascripts gets loaded
 Refresh once on the Login page, you should see the latest ConVirt version.
 Once you login, then you will have to Refresh again, this will refresh the javascripts and the header 
 to show the latest version.
  • Recovery in case of an error.
 Recover Code
 mv $CONVIRT_DIR $CONVIRT_DIR.upgrade_failed
 cp -r BACKUP_DIR/convirt $CONVIRT_BASE
 Recover Repository
 a. Drop the database convirt
 b. Restore it from backup
    mysql -u root -p convirt  < (sql file created in "Backup Repository" step)   
 File a support ticket with Convirture Support

Upgrade 2.1-2.1.1

  • Initialize variables
 export FROM_VER=2.1
 export TO_VER=2.1.1
 export CONVIRT_BASE=~
 export CONVIRT_DIR=$CONVIRT_BASE/convirt
 NOTE Assumption is made that current version of ConVirt is in the home directory. If your 
      deployment is different, please adjust CONVIRT_BASE
  • Download latest version of ConVirt
 DOWNLOAD_DIR=~/downloads/
 cd $DOWNLOAD_DIR
 # If any old version move it out.
 mkdir -p save
 mv * save 
 # untar the tarball.
 tar -xzf convirt-$TO_VER-*.tar.gz

  • Shutdown CMS
 cd $CONVIRT_DIR
 ./convirt-ctl stop
  • Backup code
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
  • Backup repository
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root -p convirt  > "convirt_$FROM_VER`date`.sql"
  • Backup configuration
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
  • Upgrade code
Untar the NEW version of convirt over the existing directory. From parent directory of convirt,
 tar -xvf $DOWNLOAD_DIR/convirt-$TO_VER.tar.gz -C $CONVIRT_BASE
  • Upgrade ConVirt Repository
 Use the upgrade script provided to upgrade the ConVirt repository.
 Usage : upgrade_repository 2.1-2.1.1 mysql <dbname> <dbuser> <dbpasswd> 
cd $CONVIRT_DIR/upgrade ./upgrade_repository.sh ${FROM_VER}-${TO_VER} mysql convirt root convirt

 

  • Updating ConVirt configuration.
 # Save default configuration file from new version.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.$TO_VER.default
 # Restore working copy.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working $CONVIRT_DIR/src/convirt/web/convirt/development.ini

 

 # Upgrade configuration
 Nothing to upgrade here.
  • Populate new seed data/Data upgrade
 No data upgrade.
  • Miscellaneous
 Not Applicable
  • Start CMS
 cd $CONVIRT_DIR
 ./convirt-ctl start
  • Refresh Browser
 Launch new browser.
 Login and Refresh the browser. (shift+F5, shift+ refresh)
 This is required so new versions of javascripts gets loaded
 Refresh once on the Login page, you should see the latest ConVirt version.
 Once you login, then you will have to Refresh again, this will refresh the javascripts and the header 
 to show the latest version.
  • Recovery in case of an error.
 Recover Code
 mv $CONVIRT_DIR $CONVIRT_DIR.upgrade_failed
 cp -r BACKUP_DIR/convirt $CONVIRT_BASE
 Recover Repository
 a. Drop the database convirt
 b. Restore it from backup
    mysql -u root -p convirt  < (sql file created in "Backup Repository" step)   
 File a support ticket with Convirture Support

 

Upgrade 2.1.1-2.5

  • Initialize variables
 export FROM_VER=2.1.1
 export TO_VER=2.5
 export CONVIRT_BASE=~
 export CONVIRT_DIR=$CONVIRT_BASE/convirt
 NOTE Assumption is made that current version of ConVirt is in the home directory. If your 
      deployment is different, please adjust CONVIRT_BASE

 

  • Download latest version of ConVirt
 DOWNLOAD_DIR=~/downloads/
 cd $DOWNLOAD_DIR
 # If any old version move it out.
 mkdir -p save
 mv * save 
 # untar the tarball.
 tar -xzf convirt-$TO_VER-*.tar.gz

  • Shutdown CMS
 cd $CONVIRT_DIR
 ./convirt-ctl stop

 

  • Backup code
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR

 

  • Backup repository
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root -p convirt  > "convirt_$FROM_VER`date`.sql"

 

  • Backup configuration
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working

 

  • Check if you have $CONVIRT_DIR/upgrade/VERSION.TXT

If you see one, proceed to next step. i.e. Upgrade the code, otherwise


Extract only upgrade/create_version.py from the recently downloaded convirt-$TO_VER-*.tar.gz in to $CONVIRT_DIR/upgrade directory.

   cd ${CONVIRT_BASE}
   tar -xvf $DOWNLOAD_DIR/convirt-$TO_VER-*.tar.gz convirt/upgrade/create_version.py

Run create_version.py from the upgrade directory

   cd upgrade; python ./create_version.py

Check the newly created convirt/upgrade/VERSION.TXT and verify version info for all components is that of current version i.e. ${FROM_VER}.

 

  • Upgrade code
Untar the NEW version of convirt over the existing directory. From parent directory of convirt,
 tar -xvf $DOWNLOAD_DIR/convirt-$TO_VER.tar.gz -C $CONVIRT_BASE

 

  • Updating ConVirt configuration.
 # Save default configuration file from new version.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.$TO_VER.default
 # Restore working copy.
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working $CONVIRT_DIR/src/convirt/web/convirt/development.ini

 

  • Run the upgrade script
cd $CONVIRT_DIR
source tg2env/bin/activate
cd ${CONVIRT_DIR}/upgrade
python upgrade.py <dbtype> <dbname> <dbuser> <dbpassword>
Example: python upgrade.py mysql convirt_ee root convirt
deactivate
 After the upgrade, VERSION.TXT should have the version that you upgraded to ($TO_VER)  for all components.
 Bug: Upgrading to version 3.3.2 leaves DATA_VERSION to 3.3.1 (This is known issue and can be ignored.)

 

  • Start CMS
 cd $CONVIRT_DIR
 ./convirt-ctl start

 

  • Refresh Browser
 Launch new browser.
 Login and Refresh the browser. (shift+F5, shift+ refresh)
 This is required so new versions of javascripts gets loaded
 Refresh once on the Login page, you should see the latest ConVirt version.
 Once you login, then you will have to Refresh again, this will refresh the javascripts and the header 
 to show the latest version.

 

  • Recovery in case of an error.
 Recover Code
 mv $CONVIRT_DIR $CONVIRT_DIR.upgrade_failed
 cp -r BACKUP_DIR/convirt $CONVIRT_BASE
 Recover Repository
 a. Drop the database convirt
 b. Restore it from backup
    mysql -u root -p convirt  < (sql file created in "Backup Repository" step)   
 File a support ticket with Convirture Support
 

Comments