Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Site Promotion 3.8.1 to 5.5
- This topic has 7 replies, 6 voices, and was last updated 14 years, 8 months ago by herm ernst.
-
CreatorTopic
-
December 20, 2007 at 8:44 pm #49710Donna SniderParticipant
Cloverleaf 3.8.1 is running on an older server (AIX 4.3). I want to install 5.5 on a new server (AIX 5.5). I have reviewed the Site Promotion instructions. My question – Can I perform the site promotion with the roots on two different servers? If yes, how? Thanks!
Donna
-
CreatorTopic
-
AuthorReplies
-
-
December 20, 2007 at 9:29 pm #63225James CobaneParticipant
Donna, You should be able to tar up your existing sites and simply lay them back out on the new box under a root3.8.1P directory you create. This is just to allow the hcirootcopy scripts to do it’s job. However, with that said, I would put an ‘official’ query into Quovadx Support to insure that you follow their recommended procedure(s) to avoid any potential support issues.
Hope this helps.
Jim Cobane
Henry Ford Health
-
December 20, 2007 at 10:32 pm #63226Todd LundstedtParticipant
I have used Jim’s method twice with good success. Don’t forget to check your scripts (typically in “usercmds” directory) and things to ensure the new paths are correct. -
December 21, 2007 at 7:48 am #63227Richard HartParticipant
Donna. We’ve completed a few migrates of Cloverleaf and server OS.
In essence we
1. ‘tar’ the site source
(NetConfig, formats, tclprocs etc, but not the database)
2. use the normal ‘hcisiteinit’ to create the new site
3. install the tar file
4. load and adjust the NetConfig if required
(we scripted this for out Cl3.5.5 -> 5.1)
When all sites were migrated, we ran the standard scripts that update the formats etc.
We also created Cloverleaf ‘pipe’ and ‘crossover’ sites to handle the staged migration that saved modifying the ‘real’ NetConfigs
-
December 21, 2007 at 3:12 pm #63228Russ RossParticipant
Here is the script ( tar_site_to_move.ksh ) that I’ve been using to tar up the site to move: Code:
#!/usr/bin/kshclear
echo “”
showroot
echo “”
echo “Is this the site you want to move to another machine?”
echo “(y to continue; anything else to quit)”
read xyz
if [ “$xyz” != “y” ]; then
exit
fi
if [[ ! -d /upgrade ]]; then
echo “FATAL ERROR – need to manually create /upgrade directory”
exit
fi
if [[ ! -d /upgrade/new_box ]]; then
echo “FATAL ERROR – need to manually create /upgrade/new_box directory”
exit
fi
cd /upgrade/new_box
rm -rf /upgrade/new_box/$HCISITE /upgrade/new_box/$HCISITE.tar
mkdir /upgrade/new_box/$HCISITE
tar_tar_dir $HCISITEDIR /upgrade/new_box/$HCISITE
tar -cvf $HCISITE.tar ./$HCISITE
chmod -R 777 /upgrade/new_box/$HCISITE
rm -rf /upgrade/new_box/$HCISITE
Then I FTP the tar file to the /upgrade/new_box directory on my new server and proceed to run the untar_prep script.
Here is the script ( 521_untar_prep_mdahub4_site.ksh ) that I’ve been using successfully to migrate the tar file from the old machine to the new machine and upgraded version of cloverleaf (I successfully migrated to a new server and upgraded from 3.5.5 stepped through 3.8 ended up at QDX 5.2.1 using this):
Code:
#!/usr/bin/ksh#————————————————–
# Here is an example of normal usage of this script
#————————————————–
#
# /upgrade/scripts/521_untar_prep_mdahub4_site.ksh test_sms_genie t_sms_genie
##———————————————————-
# set the MDA_UPDIR environment variable if not already set
#———————————————————-if [[ “`echo $MDA_UPDIR`” = “” ]]; then
export MDA_UPDIR=/upgrade
fi#———————————————
# make sure this script is run by the hci user
#———————————————me=`whoami`
if [ “$me” != “hci” ]; then
echo “”
echo ” $0 must be run as hci”
echo “”
exit 1
fi#———————————————-
# check if old site name was give as argument 1
#———————————————-site_name=”$1″
if [ “$site_name” = “” ]; then
echo “”
echo “***** ERROR – must supply OLD site name *****”
echo “”
echo “Here is one example of normal usage of this scripts:”
echo “”
echo ” $MDA_UPDIR/scripts/521_untar_prep_mdahub4_site.ksh test_sms_genie t_sms_genie”
echo “”
exit 2
fi#——————————————————
# see if a tar file exists for the old site to be moved
#——————————————————cd $MDA_UPDIR/new_box
if [[ ! -a $site_name.tar ]]; then
echo “”
echo “***** ERROR – no file called ( $site_name.tar ) in directory ( $MDA_UPDIR/new_box ) *****”
echo “”
echo “Here is what is in directory ( `pwd` )”
echo “”
ls -al
echo “”
exit 3
fi#—————————————————
# check if the new site name was given as argument 2
#—————————————————new_site=”$2″
if [ “$new_site” = “” ]; then
echo “”
echo “***** ERROR – must supply NEW site name *****”
echo “”
echo “——————————————–”
echo “Here are some of the possible site prefixes:”
echo “——————————————–”
echo “”
echo ” mda_global”
echo ” p_mock_”
echo ” p_new_”
echo ” p_old_”
echo ” p_real_”
echo ” prod_batch”
echo ‘ prod_batch_###’
echo ” test_upgrade”
echo “”
echo ” mda_global”
echo ” t_”
echo ” test_batch”
echo ‘ test_batch_###’
echo ” test_upgrade”
echo “”
echo “Here is one example of normal usage of this scripts:”
echo “”
echo ” $MDA_UPDIR/scripts/521_untar_prep_mdahub4_site.ksh test_sms_genie t_sms_genie”
echo “”
exit 4
fi#—————————————————–
# check to be sure the new site does not already exist
#—————————————————–### if [[ -d $HCIROOT/$new_site ]]; then
if [ “`ls $HCIROOT/$new_site 2>/dev/null`” ]; then
echo “”
echo “***** ERROR – the new site ( $new_site ) already exist”
echo “***** you will need to rename or delete it and rerun this script again”
echo “***** this script is terminating without taking any action”
echo “”
exit 5
fi#——————————————
# create the new site and update server.ini
#——————————————### if [[ ! -d $HCIROOT/$new_site ]]; then
if [ ! “`ls $HCIROOT/$new_site 2>/dev/null`” ]; then
echo “”
echo “==============================”
echo “”
echo ” About to do ( hcisiteinit $new_site )”
echo ” respond y to accept”
echo ” any other response will abort this script”
echo “”
read response
if [[ “$response” != “y” ]]; then
echo “”
echo “This script has been terminated without doing any action.”
echo “”
exit 6
fi
echo “”
echo ” creating new site ( $new_site )”
echo “”
hcisiteinit $new_site
set_server_ini_environs.ksh
if [[ ! -d $HCIROOT/$new_site ]]; then
echo “”
echo “***** ERROR – hcisiteinit did not create directory ( $HCIROOT/$new_site ) *****”
echo “”
exit 7
fi
fi#————————————————
# replace the site directory with a symbolic link
#————————————————if [[ ! -d /sites ]]; then
echo “ERROR will need to create /sites file system”
exit 9
fi
if [[ ! -d /sites/5.2.1P2 ]]; then
mkdir /sites/5.2.1P2
fi
if [[ -d /sites/5.2.1P2/$new_site ]]; then
echo “ERROR /sites/5.2.1P2/$new_site already exists”
exit 9
fi
if [[ ! -d /sites/5.2.1P2/$new_site ]]; then
mkdir /sites/5.2.1P2/$new_site
mkdir /sites/5.2.1P2/${new_site}/`date +”v01_%Y.%m.%d”`
fitar_tar_dir $HCIROOT/$new_site
/sites/5.2.1P2/${new_site}/`date +”v01_%Y.%m.%d”`rm -rf $HCIROOT/$new_site
ln -s /sites/5.2.1P2/${new_site}/`date +”v01_%Y.%m.%d”` $HCIROOT/$new_site
#——————-
# untar the old site
#——————-cd $MDA_UPDIR/new_box
rm -rf $site_name
tar -xvf $site_name.tarif [[ ! -d $MDA_UPDIR/new_box/$site_name ]]; then
echo “”
echo “***** ERROR – tar extract did not create directory ( $MDA_UPDIR/new_box/$site_name ) *****”
echo “”
exit 8
fi#—————————————————————————
# clean up the old site in preparation of using it to overwrite the new site
#—————————————————————————cd $MDA_UPDIR/new_box/$site_name
rm -rf `ls -al | grep “^-” | awk ‘{print $9}’ | grep -v “^NetConfig$”`
rm -rf exec
rm -rf lock; mkdir lock
rm -rf logs; mkdir logs
rm -rf revisions; mkdir revisions
rm -rf stats; mkdir stats
rm -f ./Alerts/qdx522_hide_default.alrt#—————————
# get rid of all *.bak files
#—————————find . -name “*.bak” -exec rm -rf {} ;
find . -name “backup” -exec rm -rf {} ;
find . -name “x.x” -exec rm -rf {} ;
find . -name “core” -exec rm -rf {} ;#————————————————————————-
# make sure the site specific tclprocs directory only contains *.tcl files
#————————————————————————-cd $MDA_UPDIR/new_box/$site_name/tclprocs
rm -rf `ls -l | grep -v “^-” | awk ‘{print $9}’`
rm -f `ls -1 | grep -v “.tcl$”`
rm -f .*.tcl#———————————————————————-
# make sure the site specific Xlate directory only contains *.xlt files
#———————————————————————-cd $MDA_UPDIR/new_box/$site_name/Xlate
rm -rf `ls -l | grep -v “^-” | awk ‘{print $9}’`
rm -f `ls -1 | grep -v “.xlt$”`
rm -f .*.xlt#————————————————–
# set the ownership of the entire site to hci:staff
#————————————————–chown -R hci:staff $MDA_UPDIR/new_box/$site_name
#—————————————–
# tar_tar_dir the old_site to the new_site
#—————————————–if [[ -d $HCIROOT/$new_site ]]; then
echo “”
echo “==============================”
echo “”
echo ” About to do ( tar_tar_dir $MDA_UPDIR/new_box/$site_name $HCIROOT/$new_site )”
echo ” respond y to accept”
echo ” any other response will abort this script”
echo “”
read response
if [[ “$response” != “y” ]]; then
echo “”
echo “This script has been terminated without doing.”
echo “”
echo ” tar_tar_dir $MDA_UPDIR/new_box/$site_name $HCIROOT/$new_site ”
echo “”
exit 9
fi
tar_tar_dir $MDA_UPDIR/new_box/$site_name $HCIROOT/$new_site
fi#——————————————————–
# create the process directories defined in the NetConfig
#——————————————————–echo “”
echo “creating the process directories”
procList=`grep “^process” $HCIROOT/$new_site/NetConfig | awk ‘{print $2}’ | sort`
cd $HCIROOT/$new_site/exec/processes
for proc in $procList; do
rm -rf $proc; mkdir $proc
done
ls -al
echo “”#——————–
# link data directory
#——————–echo “”
echo “—————”
echo “ln -s /data/$new_site $HCIROOT/$new_site/data”
echo “—————”
echo “”
if [[ ! -a /data/$new_site ]] then
echo “”
echo “creating /data/$new_site directory to link too”
echo “”
mkdir /data/$new_site
ln -sf /data/$new_site $HCIROOT/$new_site/data
else
if [[ -a $HCIROOT/$new_site/data ]] then rm -rf $HCIROOT/$new_site/data; fi
ln -sf /data/$new_site $HCIROOT/$new_site/data
fi#—————
# make TCL index
#—————echo “”
echo “Doing a mktclindex”
cd $HCIROOT/$new_site/tclprocs
mktclindex
ls -al
echo “”#————————————————
# clear database for safety
# and reset shared memory pointer/file for safety
#————————————————echo “”
echo “About to clear data base for safety”mySite=$SITE
setroot -clear
setroot /quovadx/qdx5.2/integrator $new_siteshowroot
clear_db.kshcd $HCIROOT/$new_site/exec
rm -f monitorShmemFile
hcimsiutil -Rsetroot -clear
setroot /quovadx/qdx5.2/integrator $mySite#——————————————-
# hide Alerts and clean out Alerts directory
#——————————————-echo “Hiding alerts and cleaning out Alerts directory”
if [[ ! -d $HCIROOT/$new_site/Alerts ]] then
echo “ERROR – no Alerts direcotry exists”
exit
ficd $HCIROOT/$new_site/Alerts
if [[ ! -a qdx522_hide_default.alrt ]] then
cp -p default.alrt qdx522_hide_default.alrt
firm -rf `ls -1 | grep -v ‘qdx522_hide_default.alrt’`
cp $MDA_UPDIR/scripts/522_off.alrt off.alrt
ln -sf off.alrt default.alrtls -al
echo “”#—————————————————-
# reminder to manually create the data subdirectories
#—————————————————-echo “”
echo “************”
echo “IMPORTANT — you will have to manually create the /data/$new_site subdirectories”
echo “ALSO; do a save in the GUI NetConfig to see if any errors show up in addition to doing a netcheck”
echo “************”
echo “”
Since this has some stuf specific to our enterprise you will likely have to modify to fit your needs but it can be a good check list on what needs attention.
Here are some of the other procs that I noticed get called.
set_server_ini_environs.ksh
Code:
#!/usr/bin/ksh# the purpose of this script is to set the environs variable in the server.ini file
# so that it has all our Cloverleaf sites in sorted order# History:
#
# 2005.08.17 Russ Ross wrote initial version
#cp -p $HCIROOT/server/server.ini
$HCIROOT/server/server.ini_`date +”%Y.%m.%d_%H:%M:%S”`perl -pi -e “s,^environs=.*$,`mk_server_ini_environs.ksh`,”
$HCIROOT/server/server.ini
mk_server_ini_environs.ksh
Code:
#!/usr/bin/ksh# the purpose of this script is to create the statement to initialize the environs variable
# which can be redirected to a temp file like x.x and then manually inserted
# into the server.ini file so the Cloverleaf sites will appear in sorted order in the GUI# History:
#
# 2005.06.21 Russ Ross wrote initial versionenvorns_statement=”environs=”
for site in `list_sites.ksh`; do
envorns_statement=”$envorns_statement$HCIROOT/$site;”
done
echo “$envorns_statement” | perl -pi -e “s/;$//”
list_sites.ksh
Code:
#!/usr/bin/ksh# Begin Module Header ==============================================================================
#
#——
# Name:
#——
#
# list_sites.ksh
#
#———
# Purpose:
#———
#
# List all the sites for the current $HCIROOT
#
#——–
# Inputs:
#——–
#
# none
#
#——-
# Notes:
#——-
#
# This script assumes the proper environment is set when it is called
# and all sites are symbolic links at the $HCIROOT level
#
#———
# History:
#———
#
# 2001.02.22 Russ Ross
# – wrote initial version.
#
# 2001.07.25 Russ Ross
# – modified to look for $HCIROOT/*/siteInfo files to determine the list of sites,
# previously had looked for symbolic links in the $HCIROOT directory which only
# works if everyone follows MDACC conventions
#
# 2003.11.17 Russ Ross
# – modified to execlude siteProto from the list of sites
#
# End of Module Header =============================================================================#—————————————————————————————–
# get a list of all the sites for the current $HCIROOT
# (Note: there is an assumption that all sites are a symbolic link at the $HCIROOT level)
#—————————————————————————————–(cd $HCIROOT; ls ./*/siteInfo 2>/dev/null) | awk -F/ ‘{print $2}’ | grep -v siteProto | sort
clear_db.ksh
Code:
#!/usr/bin/ksh# here are some other usefule database commands
#———————————————-
#
# lmclear -u TEST -mp (if the user locks the database by doing ctrl-c during a hcidbdump -r
#
# lmclear -s -mp (that gives you a list of active database users)
#
# hcilmclear -p ris (if the ris process hangs the database)
#if [[ -d $HCISITEDIR/exec/databases ]]; then
cd $HCISITEDIR/exec/databases
hcisitectl -k l
rm -f *.log
rm -f lm_*
rm -f vista.tafrm -f mid.ctr
hcidbinit -ACi
keybuild rlog; dchain rlog
keybuild elog; dchain elogfi
MERRY CHRISTMAS!!!
Russ Ross
RussRoss318@gmail.com -
December 21, 2007 at 3:17 pm #63229Russ RossParticipant
The scripts in my previous post might seem like more work than it is worth. However, we currently have 129 test sites and 61 production sites so I have scripted every step of an upgrade as much as I can.
That way the migration cut over is as short as possible and I can do iterations using the scripts until they seem flawless.
Plus I have a record of what was done and is a good starting point for the next upgrade to help remember what needs to be done in what order.
Russ Ross
RussRoss318@gmail.com -
December 22, 2007 at 3:29 am #63230Donna SniderParticipant
Thank you to all who responded. The info is very helpful!! Donna
-
January 22, 2010 at 8:39 pm #63231herm ernstParticipant
Russ, We are looking to upgrade from 3.8.1 to 5.7
Would your scripts in this post still be valid or would additional updates need to be made to them?
-
-
AuthorReplies
- The forum ‘Cloverleaf’ is closed to new topics and replies.