BHL
Archive
This is a read-only archive of the BHL Staff Wiki as it appeared on Sept 21, 2018. This archive is searchable using the search box on the left, but the search may be limited in the results it can provide.

Jenkins_installation

Jenkins installation notes


Login:
use can use the usual bhletech account to log into jenkins.

We install Jenkins through apt-get.

Installation

wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list
sudo aptitude update
sudo aptitude install jenkins
 

What does this package do?

Setting up an Apache Proxy for port 80 -> 8082

This configuration will setup Apache2 to proxy port 80 to 8080 so that you can keep Jenkins on 8080.
sudo aptitude install apache2 (if we don't have apache installed)
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod vhost_alias
 

Running Jenkins behind Apache

mod_proxy

mod_proxy works by making Apache perform "reverse proxy" — when a request arrives for certain URLs, Apache becomes a proxy and further forward that request to Jenkins, then it forwards the response back to the client.
The following Apache modules must be installed :
a2enmod proxy
a2enmod proxy_http
 
We need to set up the proxy on bhle-dev-1
ProxyPass         /  http://bhl-mandible.nhm.ac.uk:8082/jenkins
ProxyPassReverse  /  http://bhl-mandible.nhm.ac.uk:8082/jenkins
ProxyRequests     Off
 
# Local reverse proxy authorization override
# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Ubuntu)
<Proxy http://bhl-mandible.nhm.ac.uk:8081/jenkins*>
  Order deny,allow
  Allow from all
</Proxy>
 
This assumes that you run Jenkins on port 8082.

on NHM server, here is Jenkins: http://bhle-dev-1.nhm.ac.uk/

Reference :
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache