Table of Contents |
---|
Preamble
- Notify all stake holders before the release.
- Before proceeding with initializations, make sure that you are pointing at branches/1.1.3.
- Execute all steps in the SF ENVs first and test the application.
- If tests pass, then execute steps on SD ENVs.
- Should things go badly, we can switch over to SD.
DOWN
web into MAINT mode (SF_PROD_WEB)
put the web servers into maintenance mode (SF WEB, SD WEB)
Code Block |
---|
cd /var/www/html sudo ./set_eas_mode.sh MAINT |
database backup (SF_PROD_DB)
Code Block |
---|
sudo -u postgres -i /home/dba/scripts/dbbackup.sh > /var/tmp/dbbackup.log |
DEPLOY
...
ETL PROD
upgrade ETL code
Log into to the ETL server and do he the following.
Code Block |
---|
REM see warning above cd "C:\Program Files\MAD\" del etl setup.bat |
migrate DB
Now you can run this migrate job:
Code Block |
---|
cd etl\src python job.py --job migrate_to_1.1.3 --action INIT --env SF_PROD |
reconfigure geowebcache truncate job
Add an scheduled task to truncate the geowebcache.
The ETL job name is "map_cache_truncate".
This makes obsolete the linux crontab entry on GEO PROD (SF for sure, maybe SD) that truncate the geowebcache...
so you must remove these crontab entires. Execute the line below on sf_prod_geo to being editing the crontab...
Code Block |
---|
sudo crontab -e |
upgrade java (SF_PROD_GEO
...
, SD_PROD_GEO)
install the latest version of java
Remember that in PROD you must also do this to the SD instance!
...
Code Block |
---|
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7/jre-7-linux-x64.rpm" sudo rpm -ivh jre-7-linux-x64.rpm?AuthParam=1347904319_53c7d4517bc08e457c15c859a1ba216e |
install JAI
http://download.java.net/media/jai/builds/release/1_1_3/
Code Block |
---|
wget http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib-linux-amd64-jre.bin
sudo cp jai-1_1_3-lib-linux-amd64-jre.bin /usr/java/jre1.7.0
sudo cd /usr/java/jre1.7.0
sudo sh jai-1_1_3-lib-linux-amd64-jre.bin |
remove previous version of java
Code Block |
---|
cd /usr sudo rm -rf jdk1.6.0_24 |
upgrade tomcat (SF_PROD_GEO
...
, SD_PROD_GEO)
preamble
Code Block |
---|
sudo /usr/sbin/usermod -g geodev tomcat
sudo /usr/sbin/usermod -d /usr/share/apache-tomcat-7.0.32 tomcat |
install tomcat 7
http://davidghedini.blogspot.com/2011/02/install-tomcat-7-on-centos-rhel.html
Code Block |
---|
wget http://mirror.ccolnevhost.columbia.edunet/pub/software/apache/tomcat/tomcat-7/v7.0.3032/bin/apache-tomcat-7.0.3032.tar.gz cd /usr/share sudo tar xvfz ~/apache-tomcat-7.0.3032.tar.gz sudo chown -Rf tomcat:tomcatgeodev /usr/share/apache-tomcat-7.0.3032/ |
configure tomcat startup
Ensures that tomcat will startup on server restart.
Code Block |
---|
cd /etc/init.d sudo svn export http://eas.googlecode.com/svn/trunk/geoserver/tomcat sudo dos2unix tomcat sudo chmod 755 tomcat sudo -u root /sbin/chkconfig --add tomcat sudo -u root /sbin/chkconfig --level 234 tomcat on sudo -u root /sbin/chkconfig --list tomcat sudo chmod g+rwx /usr/share/apache-tomcat-7.0.32/webapps svn export http://eas.googlecode.com/svn/trunk/geoserver/deploy_geoserver_env.sh /usr/share/apache-tomcat-7.0.32/webapps/deploy_geoserver_env.sh |
tomcat start, stop, restart
Code Block |
---|
sudo /sbin/service tomcat start
sudo /sbin/service tomcat stop
sudo /sbin/service tomcat restart |
inspect log files for errors
Code Block |
---|
view /usr/share/apache-tomcat-7.0.3032/logs/catalina.out |
examine tomcat admin panel
SSH tunnel required.
http://localhost:8081/ (DEV)
http://localhost:8082/ (QA)
http://localhost:8083/ (PROD)
...
Code Block |
---|
sudo rm -rf /usr/share/tomcat5 sudo rm /etc/init.d/tomcat5 |
upgrade geoserver (SF_PROD_GEO
...
, SD_PROD_GEO)
Code Block |
---|
cd /usr/share/apache-tomcat-7.0.3032/webapps sudo wget http://downloads.sourceforge.net/geoserver/geoserver-2.1.4-war.zip sudo unzip geoserver-2.1.4-war.zip |
Clean out the gwc
Code Block |
---|
sudo /sbin/service tomcat stopstart sudo rm -rf /srv/gwc sudo /sbin/service tomcat startstop |
upgrade the deploy automation and deployClean out the gwc
Code Block |
---|
cd /usr/share/apache-tomcat-7.0.30/webapps sudo svnrm export-rf http:/srv/eas.googlecode.com/svn/trunk/geoserver/deploy_geoserver_init.sh sudo dos2unix deploy_geoserver_init.sh sudo ./deploy_geoserver_init.sh |
After the start up inspect the the log file.
Code Block |
---|
view /usr/share/apache-tomcat-7.0.30/webapps/geoserver_configuration/logs/geoserver.log |
This exception is OK because we do not use this plugin:
Code Block |
---|
DEBUG...
Unable to load kakadu JPEG2000 reader spi
java.lang.ClassNotFoundException: it.geosolutions.imageio.plugins.jp2k.JP2KKakaduImageReaderSpi
... |
The should be no exceptions besides this one.
gwc/* |
install geoserver image pyramid plugin
Code Block |
---|
mkdir downloads/ cd downloads/ wget http://iweb.dl.sourceforge.net/project/geoserver/GeoServer%20Extensions/2.1.4/geoserver-2.1.4-pyramid-plugin.zip unzip geoserver-2.1.4-pyramid-plugin.zip sudo cp gt-imagepyramid-2.7.5.jar /usr/share/apache-tomcat-7.0.3032/webapps/geoserver/WEB-INF/lib sudo chown -R tomcat:geodev /usr/share/apache-tomcat-7.0.32/webapps/geoserver sudo /sbin/service tomcat restartstart |
install image processing software (SF_PROD_GEO, SD_PROD_GEO)
We need to install the following on the geoserver boxes so we can process imagery in situ.
Add a python symlink...
Code Block |
---|
cd /usr/local/bin/ sudo ln -s /usr/local/bin/python2.5 python |
proj.4
Code Block |
---|
sudo chown dev /usr/local/src
mkdir /usr/local/src/TARFILES
cd /usr/local/src/TARFILES
wget ftp://ftp.remotesensing.org/proj/proj-4.8.0.tar.gz
wget ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.5.tar.gz
cd ../
tar xvfz TARFILES/proj-4.8.0.tar.gz
cd proj-4.8.0/nad
tar xvfz ../../TARFILES/proj-datumgrid-1.5.tar.gz
cd ..
./configure --without-jni
make
sudo make install
|
install geos
Code Block |
---|
cd /usr/local/src/TARFILES wget http://download.osgeo.org/geos/geos-3.3.3.tar.bz2 cd .. tar xvfj TARFILES/geos-3.3.3.tar.bz2 cd geos-3.3.3 # no python bindings ./configure make sudo make install |
install gdal
Code Block |
---|
cd /usr/local/src/TARFILES
wget http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz
cd ../
tar xvfz TARFILES/gdal-1.9.0.tar.gz
cd gdal-1.9.0/
# set your PATH properly so we get the right version of python
export PATH=/usr/local/bin/:$PATH
./configure --with-python
make
sudo PATH=/usr/local/bin/:$PATH make install
make clean
1013 history
1014 ./configure --with-python -classic
1015 ./configure --with-python --classic
1016 ./configure --with-python-classic
1017 make
1018 sudo make install
|
install mrsidgeodecode
This software is needed to extract the mrsid data.
Code Block |
---|
mkdir downloads
mkdir bin
cd downloads
wget http://bin.us.lizardtech.com/geoexpress_commandlineutils_linux.tgz
tar xvfz geoexpress_commandlineutils_linux.tgz
cd linux64
tar xvf GeoExpressCLUtils-8.5.0.3330.tar
cp -P GeoExpressCLUtils-8.5.0.3330/bin/* ~/bin |
Next, add this to your .bash_profile. Indeed, it is all commented out - we do it because it's the right thing to do.
Code Block |
---|
# If you choose to use lizard tech tools while doing projections, you'll need this.
# NOTE that this prevents GDAL from working properly so I comment it out.
# All I use Lizard tech for is to get data out of mrsid format!
#PROJSO=/home/dev/lizard_tech/linux64/GeoExpressCLUtils-8.5.0.3330/libproject
#export PROJSO
|
Last, test it to make sure it is working...
Code Block |
---|
mrsidgeodecode |
You will probably get this message...
mrsidgeodecode: error while loading shared libraries: libgeos_c.so.1: cannot open shared object file: No such file or directory
In any case, add this to your .bashrc
Code Block |
---|
LD_LIBRARY_PATH_DEFAULT=/usr/local/lib
export LD_LIBRARY_PATH_DEFAULT
LD_LIBRARY_PATH_MRSID=~/bin:/usr/local/lib
export LD_LIBRARY_PATH_MRSID
LD_LIBRARY_PATH=$LD_LIBRARY_PATH_DEFAULT
export LD_LIBRARY_PATH
PROJSO_MRSID=/home/dev/lizard_tech/linux64/GeoExpressCLUtils-8.5.0.3330/libproject
export PROJSO_MRSID |
One more time...
Code Block |
---|
|
Install python Numeric so we can use gdal_retile.py with an alpha channel patch.
RE
http://onlamp.com/python/2000/05/03/install_num_python.html
Code Block |
---|
cd /usr/local/src/TARFILES
wget http://voxel.dl.sourceforge.net/project/numpy/Old%20Numeric/24.2/Numeric-24.2.tar.gz
cd ..
tar xvfz Numeric-24.2.tar.gz
cd Numeric-24.2.tar.gz
sudo python2.5 setup.py install |
Make sure it is working...
Code Block |
---|
python2.5
import Numeric |
UP
web
...
install |
Add this to your .bashrc
Code Block |
---|
LD_LIBRARY_PATH_DEFAULT=/usr/local/lib
export LD_LIBRARY_PATH_DEFAULT
LD_LIBRARY_PATH=$LD_LIBRARY_PATH_DEFAULT
export LD_LIBRARY_PATH |
deploy imagery data (SF_PROD_GEO, SD_PROD_GEO)
setup imagery/geoserver directories
Code Block |
---|
sudo mkdir /srv/gwc
sudo mkdir /srv/imagery
sudo mkdir /srv/imagery/pyramids
sudo mkdir /srv/imagery/pyramids/2012
sudo chown -R tomcat:geodev /srv/imagery/
sudo chown -R tomcat:geodev /srv/gwc/
sudo chmod -R g+rw /srv/imagery/pyramids |
copy/prepare the data
You can either build the pyramid or copy the one from SF DEV GEO.
For this deploy, we are going to do the latter.
Do this well before the actual deploy.
Copy
- from SF_DEV_GEO//srv/imagery
- to SF_PROD_GEO//srv/imagery & SD_PROD_GEO//srv/imagery
Use secure FTP which operates over SSH; I use winscp.
This is about 7GB and takes about 15-20 minutes per node.
In the off chance that you need to build the pyramid from scratch, follow the instructions spelled out in main():
http://code.google.com/p/eas/source/browse/trunk/bin/build_pyramids.py
upgrade the deploy automation and deploy (SF_PROD_GEO, SD_PROD_GEO)
Code Block |
---|
cd /usr/share/apache-tomcat-7.0.32/webapps
sudo svn export http://eas.googlecode.com/svn/trunk/geoserver/deploy_geoserver_init.sh
sudo dos2unix deploy_geoserver_init.sh
sudo ./deploy_geoserver_init.sh |
After the start up inspect the the log file.
Code Block |
---|
view /usr/share/apache-tomcat-7.0.32/webapps/geoserver_configuration/logs/geoserver.log |
This exception is OK because we do not use this plugin:
Code Block |
---|
DEBUG...
Unable to load kakadu JPEG2000 reader spi
java.lang.ClassNotFoundException: it.geosolutions.imageio.plugins.jp2k.JP2KKakaduImageReaderSpi
... |
The should be no exceptions besides this one.
deploy web application (SF_PROD_WEB, SD_PROD_WEB)
Code Block |
---|
# see warning at top
cd /var/www/html
sudo ./deploy_eas_init.sh
# make sure web application works and is correct version |
UP
web
put WEB (SF/SD) servers into LIVE mode
Code Block |
---|
cd /var/www/html sudo ./set_eas_mode.sh LIVE |
...
and test the application. You will not be able to log into SD.
Put SD WEB servers into STANDBY mode
Code Block |
---|
cd /var/www/html sudo ./set_eas_mode.sh SD_STANDBY |
Seed Image Cache
Once again, log into ETL PROD and seed the image cache:
Code Block |
---|
python job.py --job SEED_IMAGE_CACHE --action EXECUTE --env SF_PROD |
This took about 8 hours to run from level 12 to level 19 inclusive.