Procedure for upgrading Evergreen
Quick notes based on the upgrade from 2.0 to 2.1:
Before beginning the actual upgrade
Prepare!
- Set up your release-specific feature branches in git (http://git.evergreen-ils.org/?p=contrib/Conifer.git - see
feature/*_2_1
branches) - Merge all release-specific feature branches into one merge branch (for this upgrade, dbs/rel_2_1_mergery)
- Test the following steps on a test server (modifying server names / passwords accordingly)
Upgrade the database schema
Depending on the operations involved (for example, updating every call number and every copy), this may take many hours.
- Upgrade any database server prerequisites (for this upgrade,
cpan Library::CallNumber::LC
) - Prevent any write operations that might affect the database via lock escalation:
- Kill clark-kent.pl on protostar (
ps wax | grep Clark
;kill <PID>
;rm /tmp/reporter-LOCK
) - Disable cron jobs on protostar and carbon (
su - opensrf; crontab -e
and comment out the cron jobs)
- Kill clark-kent.pl on protostar (
- Upgrade the database schema; :
- Grab the version upgrade branch (note: given the reorganization of version upgrades in master, I chose to build this branch against master and therefore it is not part of the merge branch!)
git clone git://git.evergreen-ils.org/contrib/Conifer.git
(only need to do this once, then you can usegit fetch --all
andgit checkout
to update and switch branches)cd Conifer
git checkout origin/feature/upgrade_2_1
- From the git repository directory, run the database upgrade, directing STDOUT and STDERR into a log file:
psql -U evergreen -h <HOSTNAME> -d <DBNAME> -f Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql > ~/upgrade_2_1.out 2>&1
- Grab the version upgrade branch (note: given the reorganization of version upgrades in master, I chose to build this branch against master and therefore it is not part of the merge branch!)
Upgrade the Evergreen code
You can run through these steps while the database schema is being upgraded.
- On protostar (the server on which
/openils/
is mounted as a writable NFS share), get your merge branch from git:cd /openils/sources
git clone git://git.evergreen-ils.org/contrib/Conifer.git
(only need to do this once, then you can usegit fetch --all
andgit checkout
to update and switch branches)cd Conifer
git checkout origin/dbs/mergery_2_1
- Install all of the prerequisites on both protostar and carbon:
make -f Open-ILS/src/extras/Makefile.install debian-squeeze
apt-get install nsis
- Add a route to nsis.sourceforge.net for one of the staff client install pieces:
sudo route add -net 216.34.181.96 netmask 255.255.255.255 gw 131.104.100.161 dev eth0
- Move the system-installed libdbi out of the way (it gets installed as a dependency on syslog-ng, eventually we need to replace with rsyslog):
sudo mv /usr/lib/libdbi.a /usr/lib/libdbi.a.bak sudo mv /usr/lib/libdbi.la /usr/lib/libdbi.la.bak sudo mv /usr/lib/libdbi.so.0 /usr/lib/libdbi.so.0.bak sudo mv /usr/lib/libdbi.so.0.0.5 /usr/lib/libdbi.so.0.0.5.bak sudo ldconfig
- Build Evergreen, including all desired locales, and specify the automatic update hostname for the client:
cd build/i18n make LOCALE=en-CA install make LOCALE=fr-CA install cd ../.. ./autogen.sh ./configure --prefix=/openils --sysconf=/openils/conf --enable-python --with-updateshost=clients.concat.ca --localstatedir=/var/local make sudo make install # Install all of the TPAC skin templates and ensure no old templates are hanging around sudo rm -fr /openils/var/templates_*; cp -r Open-ILS/src/templates_* /openils/var/. cd Open-ILS/xul/staff_client && sudo make rigrelease rebuild updates-client sudo chown -R opensrf:opensrf /openils
- Configure Evergreen opensrf_core.xml and opensrf.xml with any new stanzas that are required (
diff
is your friend) - Configure Apache configuration files with any new required stanzas
Now get the Perl modules installed on carbon
:
cd /openils/sources/Conifer
cd Open-ILS/src/perlmods/lib
sudo ./Build install
Starting things up after the install
- As the
opensrf
user, start up the OpenSRF processes oncarbon
andprotostar
in order, then generate the required JavaScript? files, etc, viaautogen.sh
:# On carbon osrf_ctl.sh -a start_router # On carbon osrf_ctl.sh -a start_perl # On protostar osrf_ctl.sh -a start_perl # On carbon osrf_ctl.sh -a start_c # On protostar osrf_ctl.sh -a start_c # On protostar autogen.sh -u
- On
protostar
, as theroot
user, start the Apache server:/etc/init.d/apache2 restart
- Restart the cron jobs for
opensrf
oncarbon
andprotostar
- On
protostar
, as theopensrf
user, restart the reporter daemon:/openils/bin/clark-kent.pl --daemon --concurrency 2
- On
protostar
, as thelauadmin
user, restart the Z39.50 server:cd /home/lauadmin/z3950_server sh run-server
Last modified 10 years ago
Last modified on Jun 13, 2013, 12:48:10 PM