cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilya <ilya.mailing.li...@gmail.com>
Subject Re: [Migrate from Citrix CloudPlatform 4.3 to CloudStack 4.8]
Date Wed, 16 Mar 2016 21:20:06 GMT
Many folks on this list have migrated to Apache CloudStack from CCP.

Backup your environment, you can use this script, it will dump the 3 DBs
cloudstack needs and contents of /etc/ into a tar.gz file

Before you start, make sure you can test DBPASS decryption process
run
> DBPASS=$(java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.0.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI
input="$(cat /etc/cloudstack/management/db.properties | grep db.cloud.password | awk -F'('
'{print $2}' | sed 's/)//g')" password="$(cat /etc/cloudstack/management/key)" | grep -A2
OUTPUT | tail -1
> echo $DBPASS



Backup script..

-----------------------
> #!/bin/bash
>
> HOSTNAME=$(hostname -s)
> if rpm -q cloudstack-management >/dev/null 2>&1
> then
>         VERSION=$(rpm -q cloudstack-management | sed 's/cloudstack-management-//g' |
sed 's/.el6.x86_64//g')
>         echo "NOTE: Identified cloudstack-management version as $VERSION"
> else
>         echo "ERROR: cloudstack-management RPM is not installed, exiting...."
>         exit 1
> fi
> 
> DATESTAMP=$(date +%m%d%y-%H%M%S)
> DBPASS=$(java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.0.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI
input="$(cat /etc/cloudstack/management/db.properties | grep db.cloud.password | awk -F'('
'{print $2}' | sed 's/)//g')" password="$(cat /etc/cloudstack/management/key)" | grep -A2
OUTPUT | tail -1)
> DBHOST=$(cat /etc/cloudstack/management/db.properties | grep db.cloud.host | awk -F'='
'{print $2}' | tail -1 )
> DBUSER=$(cat /etc/cloudstack/management/db.properties | grep db.cloud.username | awk
-F'=' '{print $2}')
> DB=$(cat /etc/cloudstack/management/db.properties | grep db.cloud.name | awk -F'=' '{print
$2}')
> DBPORT=$(cat /etc/cloudstack/management/db.properties | grep db.cloud.port | awk -F'='
'{print $2}')
> 
> cd /root/cloudstack-db-backups/
> echo "NOTE: Your MySQL Configs are - DBPASS: $DBPASS , DBHOST: $DBHOST , DBUSER: $DBUSER
, DBNAME: $DB , DBPORT: $DBPORT"
> for db in "cloud" "cloud_usage" "cloudbridge"
>         do
>                 printf "NOTE: Creating backup of database $db as $db-$VERSION.$DATESTAMP.sql
"
>                 mysqldump -h $DBHOST -u $DBUSER -P $DBPORT -p$DBPASS $db > $db-$VERSION.$DATESTAMP.sql
&& echo "... done" || echo "... error"
> done
> printf "NOTE: Compressing all files *-$VERSION.$DATESTAMP.sql as and /etc/cloudstack/
into $HOSTNAME-bundle-cloud-dbs-and-config-$VERSION.$DATESTAMP.tgz"
> tar -zcvf  $HOSTNAME-bundle-cloud-dbs-and-config-$VERSION.$DATESTAMP.tgz *-$VERSION.$DATESTAMP.sql
/etc/cloudstack/ > /dev/null 2>&1 && echo "... done" || echo "... error"



-----------------------

With the backup above, you can move to next version. In case something
goes bad, install old CCP RPMs, restore mysql DBs, revert
/etc/cloudstack/ - you should be able to start your cloudstack.

Or you can just stop cloudstack service, stop mysql and take a
vmware/xen type of snapshot.

My personal opinion, I'd say goto 4.5.x first - i can attest its the
most large scale tested version so far.

Bake it, and then try 4.8, if not, you can fallback to functional 4.5..

Regards
ilya



On 3/15/16 6:02 AM, Glenn Wagner wrote:
> Hi Gian,
> 
> Yes this can be done without breaking your environment,
> I would suggest you test this in a Lab first with a copy of your
> production DB.
> 
> Have a look at the upgrade from 4.3 Doc with regard to the template you
> need to use for XenServer or VMware (Update System-VM templates)
> http://docs.cloudstack.apache.org/projects/cloudstack-release-notes/en/4.8.0/upgrade/upgrade-4.3.html
> 
> Thanks
> Glenn
> 
> 
> 
> 
> ShapeBlue <http://www.shapeblue.com> 	
> Glenn Wagner
> Senior Consultant 	,  	ShapeBlue
> 
> d:  	* | s: +27 21 527 0091* <tel:|%20s:%20+27%2021%20527%200091>
>  |  	m:  	*+27 73 917 4111* <tel:+27%2073%20917%204111>
> 
> e:  	*glenn.wagner@shapeblue.com | t: *
> <mailto:glenn.wagner@shapeblue.com%20|%20t:> 	 |  	w: 
> *www.shapeblue.com* <http://www.shapeblue.com>
> 
> a: 
> 2nd Floor, Oudehuis Centre, 122 Main Rd, Somerset West Cape Town 7130 South Africa
> 
> 
> Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue
> Services India LLP is a company incorporated in India and is operated
> under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is
> a company incorporated in Brasil and is operated under license from
> Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The
> Republic of South Africa and is traded under license from Shape Blue
> Ltd. ShapeBlue is a registered trademark.
> This email and any attachments to it may be confidential and are
> intended solely for the use of the individual to whom it is addressed.
> Any views or opinions expressed are solely those of the author and do
> not necessarily represent those of Shape Blue Ltd or related companies.
> If you are not the intended recipient of this email, you must neither
> take any action based upon its contents, nor copy or show it to anyone.
> Please contact the sender if you believe you have received this email in
> error.
> 
> 
> -----Original Message-----
> From: Gian Paolo Buono [mailto:gianpaolo.buono@gesca.it]
> Sent: Tuesday, 15 March 2016 1:36 PM
> To: users@cloudstack.apache.org
> Subject: [Migrate from Citrix CloudPlatform 4.3 to CloudStack 4.8]
> 
> Hi all,
> 
> we have need to migrate from Citrix CloudPlatform 4.3 to CloudStack 4.8.
> I have read this post:
> 
> https://www.citrix.com/blogs/2014/04/01/citrix-cloudplatform-and-apache-cloudstack/
> 
> Do you think that is it possible without destroy our infrasctracture cloud ?
> 
> Best Regards
> Gian Paolo
> Find out more about ShapeBlue and our range of CloudStack related services:
> IaaS Cloud Design & Build
> <http://shapeblue.com/iaas-cloud-design-and-build//> | CSForge – rapid
> IaaS deployment framework <http://shapeblue.com/csforge/>
> CloudStack Consulting <http://shapeblue.com/cloudstack-consultancy/> |
> CloudStack Software Engineering
> <http://shapeblue.com/cloudstack-software-engineering/>
> CloudStack Infrastructure Support
> <http://shapeblue.com/cloudstack-infrastructure-support/> | CloudStack
> Bootcamp Training Courses <http://shapeblue.com/cloudstack-training/>

Mime
View raw message