This wiki page is a placeholder to capture best practices for setting up Hudson to perform automated tests on Drupal.
Some quick links:
- Getting XML from SimpleTest: http://drupal.org/node/602332
- Drush+Coder and Hudson: http://sysadminsjourney.com/content/2010/01/20/drupal-meet-hudson-hudson...
- Pre-configured AMI: http://getpantheon.com/vulcan
- A beginnersguide to using Hudson for continuous integration with Drupal (grouppost): http://groups.drupal.org/node/96289
Much more to come! Add your favorite resources!
Using the Vulcan AMI:
Let's Fire up the instances!
The current AMI for a Hudson server is:
Name: PANTHEON-vulcan-hudson-alpha0.2.manifest.xml
AMI: ami-75c7271c
The current AMI for a Worker server is:
Name: PANTHEON-vulcan-worker-alpha0.2.manifest.xml
AMI: ami-77c7271e
Create an account at Amazon Web Services (http://aws.amazon.com/), launch one each of the above images using the AWS Management Console (https://console.aws.amazon.com/ec2/home) or ElasticFox (http://sourceforge.net/projects/elasticfox/) and connect to the hudson instance:
$ ssh -i /path/to/.pem root@hudson.amazon.public.dns
(changing the path to you *.pem and the Amazon Public DNS to the appropriate values)
edit this file: /etc/tomcat6/tomcat-users.xml
and change :
<user username="root" password="hudson" roles="admin"/>
to
<user username="root" password="new-pass" roles="admin"/>
$ su - tomcat6
$ ssh-keygen
copy /usr/share/tomcat6/.ssh/id_ras.pub
$ ssh -i /path/to/.pem root@worker.amazon.public.dns
(changing the path to you *.pem and the Amazon Public DNS to the appropriate values)
$ su - hudson
$ mkdir .ssh
paste the hudson server tomcat6 id_ras.pub contents into /home/hudson/.ssh/authorized_keys
startup vnc and set your password:
$ vncserver
(you will be prompted to create a password)
test this (on hudson)
$ su - tomcat6
$ ssh hudson@worker.amazon.private.dns
Now that Hudson and the Worker are up and running:
Configure hudson instance
go to amazon.public.dns:8080 with your browser
login u:root p:new-pass
go to Manage Hudson -> Configure System -> "Hudson URL": http://amazon.private.dns:8080/
Configure worker node
go to Manage Hudson -> Manage Nodes and select worker1 now select configure
set:
# of executors to 1
Remote FS root to /home/hudson
Labels to selinium
Launch method to SSH
Host to worker amazon.private.dns
click on Advanded
Username to hudson
No password
Private Key File to /usr/share/tomcat6/.ssh/id_rsa
click on Environment variables. then set:
name to DISPLAY
value to :1
then click save
The worker node will need to be restarted to connect the selenium RC to the grid.
goto Disconnect
hudson will ask you to confirm
select yes
Next
launch slave agent
Verify worker has successfully registered it's RC with hudson
go back to dashboard
select Selenium Grid
you should see the worker nodes amazon.private.dns information registered as a remote control
goto dashboard select Drupal6_Selenium
select configure
scroll down to build steps and set HUDSONHOST = "amazon.private.dns"
then click save
goto dashboard select Drupal7_Selenium
select configure
scroll down to build steps and set HUDSONHOST = "amazon.private.dns"
then click save
Test VNC
point your VNC client to the worker's amazon.public.dns:1