First, create your AMI and make sure that you've set up "security groups" to allow for an open HTTP 8080 port as described here.
Now, ssh into your AMI, and do the following:
#First make sure and install javac - its probably not on the machine from the beggining.
yum install java-1.6.0-openjdk-devel
#Resize the filesystem to be as big as possible - this is for fresh AMIs. Sometimes, for some reason , the filesystems are small.
#install jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
service jenkins start
#make sure its internally accessible/running before testing the external access by wgetting the jenkins home page:
wget http://ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com:8080
cat index.html <-- you should see something here :)
#stop iptables so that you can see the jenkins build server pages outside of ec2.
/etc/init.d/iptables stop
Now you should be able to go to
http://ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com:8080 on your local browser and see the jenkins home page :)
Next , set up your accounts permissions so that users can create accounts for themselves (temporary for a couple of minutes, and then deselect the "allow users to sign up" checkbox).
http://ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com:8080/configureSecurity/?
Yay ! Now you have a jenkins build server with accounts.
No comments:
Post a Comment