Home > Tutorial > Part 6: Jenkins installation

Part 6: Jenkins installation

September 27, 2012 Leave a comment Go to comments

Jenkins Installation

We need to download maven from http://maven.apache.org and jenkins from http://jenkins-ci.org. You can download it directly from the virtual server (easy option). If you downloaded them in the host machine then you need to follow step below:

Transfer downloaded files to the virtual server, you can open a terminal in the host machine and use the ‘scp’ command:

scp apache-maven-3.0.3-bin.tar.gz jenkins.war root@10.200.242.97:/tmp

Make sure you have ‘scp’ available in your system and do not forget to change the IP. The ‘scp’ command copy files and directories securely between remote hosts without starting an FTP session or logging into the remote systems explicitly through SSH. So also make sure you have configured correctly your server following the instructions provided in the tutorial.

Now go to the virtual machine. You can use the virtual machine directly in the VirtualBox window or if you prefer, you can open a SSH session from the host machine. Either way is fine. If you want to do ssh you can use the following command:

ssh -l root 10.200.242.97

Remember to change the IP according to your set-up.

Our files are in virtual server’s temporary folder. You can choose any local to install them but I prefer to put them in /usr/local/jenkins. Create jenkins folder and move the files to it and extract only apache maven file.

cd /usr/local
mkdir jenkins
cd jenkins
mv /tmp/jenkins.war .
mv /tmp/apache-maven-3.0.4-bin.tar.gz .
tar zxvf apache-maven-3.0.4-bin.tar.gz

Start jenkins with root user. You can also start with the non root user we created during Debian’s installation.

java -jar jenkins.war

Wait a little bit until you see “INFO: Jenkins is fully up and running”. Now open a browser in the host and enter the following URL: http://10.200.242.97:8080. Always remember to change the IP or put localhost if your using hte virtual machine. Jenkins should be running in port 8080 and the main screen should be displayed:

We need to configure Jenkins. Click on “Manage Jenkins” links in the left.

To install Testlink plug in click on “Manage Plugins”

Change to Available tab to list all jenkins plugins available to install. Locate TestLink Plugin and check it. Scroll to the end of page and hit “Install” button.

Jenkins will automatically download and install the plugin for you. Wait until it finishes the operation. Make sure you have checked “Restart Jenkins when installation is complete and no jobs are running” to automatically restart.

If this does not work you can stop Jenkins manually and start it again:

java -jar jenkins.war

Going back to “Manage Jenkins” screen, click on “Configure System”.

Click on “Add Maven” button, put “Maven 3.0.4” in the name text box and uncheck “Install automatically” check box. A new field is displayed. Put “/usr/local/jenkins/apache-maven-3.0.4” in MAVEN_HOME. You can also try the automatically install option but for some reason when I did it didn’t work.

In the same page, click on “Add” button under TestLink section.

We need to fill Name, URL and Developer Key fields. In the name you can put anything. I put “TestLink 1.9.4”. URL field is pre populated with a default path. Make sure the path to xmlrpc.php file is correct. Keep “localhost” because we are running Jenkins and TestLink in the same server.

Now for the Developer Key field we need to first log in TestLink. Open a new browser window and enter TestLink URL. If you are executing from the host machine you can enter http://10.200.242.97/testlink. Remember to change IP. If you executing virtual machine: http://localhost/testlink

In the main TestLink screen go to “My Settings” link. In “API interface” section click on “Generate a new key” button.

You will now see a Personal API access key generated.

Copy the value and go back to Jenkins configuration screen and paste it to Developer Key field.

Click on save button. Jenkins is ready!

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment