ConVirtMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

Upgrade

From ConVirt


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.

Upgrade 2.0-2.0.1

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

 cd $CONVIRT_DIR
 ./convirt-ctl stop
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root –p convirt  > "convirt_$FROM_VER`date`.sql"
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
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
 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


 # 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


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


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
 cd $CONVIRT_DIR
 ./convirt-ctl start
 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.
 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

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

 cd $CONVIRT_DIR
 ./convirt-ctl stop
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root –p convirt  > "convirt_$FROM_VER`date`.sql"
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
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
 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


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


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


 Not Applicable
 cd $CONVIRT_DIR
 ./convirt-ctl start
 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.
 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

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

 cd $CONVIRT_DIR
 ./convirt-ctl stop
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root –p convirt  > "convirt_$FROM_VER`date`.sql"
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
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
 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


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


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


 Not Applicable
 cd $CONVIRT_DIR
 ./convirt-ctl start
 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.
 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

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

 cd $CONVIRT_DIR
 ./convirt-ctl stop
 BACKUP_DIR=~/BACKUP
 mkdir -p $BACKUP_DIR
 cp -r ~/convirt $BACKUP_DIR
 mysqldump -u<dbuser> -p <passwd> <dbname>  >  <dbname_date>.sql
 e.g. mysqldump -u root –p convirt  > "convirt_$FROM_VER`date`.sql"
 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working
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
 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


 # 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.
 No data upgrade.
 Not Applicable
 cd $CONVIRT_DIR
 ./convirt-ctl start
 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.
 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

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

 cd $CONVIRT_DIR
 ./convirt-ctl stop


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


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


 cp $CONVIRT_DIR/src/convirt/web/convirt/development.ini $CONVIRT_DIR/src/convirt/web/convirt/development.ini.working


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


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


 # 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


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


 cd $CONVIRT_DIR
 ./convirt-ctl start


 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.


 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

Retrieved from "http://www.convirture.com/wiki/index.php?title=Upgrade"

This page has been accessed 14,493 times. This page was last modified on 12 February 2014, at 19:08.


Find

Browse
Wiki Home
Installation
Documentation
HOWTOs
FAQ
Developer Resources
Forums
Blog
Website
Recent changes
Wiki Editing Help
Edit
View source
Editing help
This page
Discuss this page
New section
Printable version
Context
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list
Statistics
More...