Hello.

I'm using your quickstart scripts to build dev boxes for my team.

I have added the following to your great scripts in order to:

1. Add Hudson
2. Put it on port 8081 to no conflict with Solr
3. Make "quickstart" the hudson user and hudson directory

After the code is run, a restart of hudson will create hudson files in the quickstart directory. Code goes in an sh script and the script can be added in the install-quickstart.sh file as: bash -x ~/quickstart/quickstart-add-hudson.sh

#!/bin/bash
cd ~
wget -O /tmp/key http://hudson-ci.org/debian/hudson-ci.org.key
sudo apt-key add /tmp/key
wget -O /tmp/hudson.deb http://hudson-ci.org/latest/debian/hudson.deb
sudo dpkg --install /tmp/hudson.deb
sudo apt-get install -f #this just fixes any dependencies, usually just daemon
mkdir /home/quickstart/hudson
zenity --info --text="Around line 15 change the user to: HUDSON_USER=quickstart and around line 40 change the port to HTTP_PORT=8081"
sudo gedit /etc/default/hudson

Hope this may be useful to someone else.

Comments

sikjoy’s picture

After running your shell script and going through the install, when visiting http://localhost:8081, I get the following message:

[!] Error

hudson.util.IOException2: Failed to create a temporary file in /var/lib/hudson
	at hudson.util.AtomicFileWriter.(AtomicFileWriter.java:67)
	at hudson.util.AtomicFileWriter.(AtomicFileWriter.java:54)
	at hudson.util.TextFile.write(TextFile.java:78)
	at hudson.model.Hudson.(Hudson.java:596)
	at hudson.model.Hudson.(Hudson.java:554)
	at hudson.WebAppMain$2.run(WebAppMain.java:222)
Caused by: java.io.IOException: Permission denied
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.checkAndCreate(File.java:1716)
	at java.io.File.createTempFile(File.java:1804)
	at hudson.util.AtomicFileWriter.(AtomicFileWriter.java:65)
	... 5 more

Should I also edit the HUDSON_HOME=/home/quickstart/hudson variable around line 21 in /etc/default/hudson?

MichaelCole’s picture

Hi Sean,

I added this to cvs, but haven't tested it. Do you have any advice for Sicjoy's issue?

MichaelCole’s picture

Status: Active » Postponed

Hi, adding Hudson would be awesome, but I need to postpone this for a 1.0.

If you make any progress, add some notes so I can use it.

Thanks,

Mike

Sean Buscay’s picture

Hi Michael and sicjoy,

Sorry, Just saw this.

Here's the latest version of the script:

#!/bin/bash

cd ~

wget -O /tmp/key http://hudson-ci.org/debian/hudson-ci.org.key
sudo apt-key add /tmp/key

wget -O /tmp/hudson.deb http://hudson-ci.org/latest/debian/hudson.deb
sudo dpkg --install /tmp/hudson.deb

sudo apt-get install -f #this just fixes any dependencies, usually just daemon

mkdir /home/quickstart/hudson

sudo /etc/init.d/hudson stop
# ######################################### Configure

sudo sed -i 's/HUDSON_USER=hudson/HUDSON_USER=quickstart/g'     /etc/default/hudson
sudo sed -i 's/HTTP_PORT=8080/HTTP_PORT=8081/g'       /etc/default/hudson
sudo sed -i 's/\/var\/lib\/hudson/\/home\/quickstart\/hudson/g'       /etc/default/hudson

sudo /etc/init.d/hudson start
sleep 3s
zenity --info --text="*** Opening Husdon ***"
firefox http://localhost:8081

Note: In the previous script I forgot to note that I also change the hudson directory to be under quickstart. That's why it gave the error sicjoy posted.

MichaelCole’s picture

Status: Postponed » Active
MichaelCole’s picture

updated etc/install-hudson.sh

Will test out.

MichaelCole’s picture

Status: Active » Fixed

Just added this to upcoming version. Works great, thanks for the code Sean --Mike

Status: Fixed » Closed (fixed)
Issue tags: -hudson

Automatically closed -- issue fixed for 2 weeks with no activity.