Debian-6.0 Hudson-1.396 Postgres-8.4.7 Rails-2.3.8
February 14th, 2011
Hudson is a good CI server. The configuration and set up under Debian has some challenges because the Hudson server runs as hudson:nogroup. You have to setup permissions on the Postgres server correctly.
Luckily, PostgreSQL can be installed as part of the Debian installation, however to get it working with Rails you will need to install libpq-dev
apt-get install libpq-dev
Create the hudson postgresql acct as super user. This is necessary since postgres will check the ident of the account trying to create/modify the databases and simply setting that information in the database.yml file is not enough. Hudson runs, under Debian, as hudson:nogroup
createuser --superuser hudson -U postgres
By default the password will be empty, so log into psql and set the password of the hudson user.
/usr/bin/psql ALTER ROLE hudson WITH ENCRYPTED PASSWORD 'hudsonpw';
Finally in your database.yml file use:
username: hudson password: hudsonpw
Now you can run rake db:create etc and you should be able to build the project using Hudson.
Leave a Reply