Vitalie Lazu old blog

Another blog about ruby, rails, debian and system administration. Other useful staff for developers and system administrators.

Friday, November 28, 2008

New release for Assembla.com

Today I released a new version of Assembla.

Mostly I spent time on preparing git branch for release and review code and rails migrations.

This release contains most bug fixing, but and a few improvements:
* New look and feel for space stream tab


* Ajax for posting messages on Message tab


* Export time records for a space



More feature will come shortly, check our roadmap

Please help us improving the site by posting your feature requests at http://feedback.assembla.com

Labels: , ,

Wednesday, November 12, 2008

How to setup a runit service for grails

Today I had a task to setup continuous integration for grails on EC2 server. I asked Google for a solution and it returns no results, so I want to share my experience., maybe it will be helpful for other system administrators.

Below is a little script that do all automatically, you will need just to start the service with:
sv start grails


You can also add a hourly cron job to update grails application from git or subversion.


setup_grails_runit.sh

#!/bin/sh
#

apt-get install runit

sv_dir=/etc/sv/grails
mkdir -p $sv_dir/log

cat - > $sv_dir/run <<EOF
#!/bin/sh

export JAVA_HOME='/opt/jdk1.6.0_10'
export PATH=${JAVA_HOME}/bin:$PATH

export JIBX_HOME='/opt/jibx'
export PATH=${JIBX_HOME}/bin:$PATH

cd /opt/apps/my_project
exec grails -Dserver.port=80 run-app
EOF

cat - > $sv_dir/log/run <<EOF
#!/bin/sh

set -e
# use /mnt, because on EC2 a bigger disk is mounted to /mnt
LOG=/mnt/log/grails

test -d "$LOG" || mkdir -p -m2750 "$LOG" && chown nobody:adm "$LOG"
exec chpst -unobody svlogd -tt "$LOG"
EOF

chmod 755 $sv_dir/run $sv_dir/log/run

# add service
update-service --add $sv_dir

Labels: , ,