| dotCMS Configuration | Installing from SVN to War |
These are the general steps:
As you probably know, an amazon instance (and everything you save in it) goes away once you shut it down. Your options are to periodically copy to a S3 bucket as backup or set up an EBS (Elastic Block Storage) to persist your data, settings, etc. Here are the steps I used to get this to work.
#!/bin/bash
setup_cms(){
cd /mnt
tar -xvpszf /data/dotcms.tar.gz
cd /mnt/dotcms
svn update
ant deploy
createdb dotcms
#psql -f /mnt/dotcms/build/sql/postgres.sql dotcms
cp /data/server.xml /mnt/dotcms/conf/
cp /data/ROOT.xml /mnt/dotcms/conf/Catalina/localhost
}
setup_db(){
cd /mnt
#test -d /mnt/db
tar -xvpszf /data/db.tar.gz /etc/init.d/postgresql-8.2 start
}
export JAVA_HOME=/usr/local/java
export ANT_HOME=/usr/local/ant export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
rm /var/run/dotcms.pid
cd /mnt setup_db
#test -d /mnt/dotcms
setup_cms
cd /mnt/dotcms/bin chmod a+x *.sh
./startup.sh
You should be able to reboot your dotcms instance or create a new one, then perform a manual mount of your EBS device. Be sure to configure your instance to attach your EBS device on boot (or you manually attach it after boot).
The final step is to manually execute /etc/start.sh
In order for the changes in your /etc/start.sh to persist, you will need to either bundle the instance to create your own AMI or like me, I use Rightscale 's templating feature to perform the equivelant as bundling. As of this writing, Rightscale offers a free developer account for you to use. Hope you find this info useful.
Dayton Chan
www.riffcloud.com
Business leads, Technology drives
| dotCMS Configuration | Installing from SVN to War |
Post a Comment