If you see outdated content please navigate to the page footer and click "Report an issue on GitHub".
It is not user documentation and should not be treated as such.
User Documentation is available here.
Jenkins oVirt Server
oVirt Jenkins server is jenkins.ovirt.org (107.22.215.130)
Recommended server specs
These are specs for servers to run Jenkins slaves for oVirt testing. One base configuration could be:
- 16 GB RAM each
- 4/8 cores each
- 200 GB disk each
- 32 GB swap
Access to the server
- OS Level Access: Restricted to infra team only. (PKI)
- Read UI Access: Anonymous read access is available to see all jobs/workspaces and build results.
- Login UI Access: availialble only to infra team, and by request to infra@ovirt.org.
Contact Infra team if you think you should have privileged access to the server.
Troubleshooting OS level access:
restorecon -R -v /home/user
restorecon -R -v /home/user/.ssh
chmod 700 /home/user/.ssh
chmod 600 /home/user/.ssh/authorized_keys
passwd user
Installation
- Install LTS version from http://pkg.jenkins-ci.org/redhat-stable/
- Run it behind Apache: https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache
chkconfig httpd on
yum install java-1.6.0-openjdk-devel git postgresql postgresql-server postgresql-contrib
- Run
/etc/init.d/postgresql initdb
- Set
postgresql
inpg_hba.conf
totrust
- Restart PostgreSQL service
-
Add engine ‘role’ as superuser to PostgreSQL:
psql -U postgres -c "CREATE ROLE engine WITH LOGIN SUPERUSER"
service jenkins start
-
Install Jenkins plugins:
wget http://localhost:8080/jnlpJars/jenkins-cli.jar java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin audit-trail java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin git java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin multiple-scms java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin analysis-collector java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin findbugs java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin Email-ext java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin port-allocator
- Config
JAVA_HOME
in Jenkins > configuration - Config default maven in Jenkins > configuration
-
Edit
/etc/sysconfig/jenkins
(replace line):JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Xms4g -Xmx4g -XX:MaxPermSize=1024M"
- increase limit of open file using
ulimit -n
(for persistent change add to/etc/sysctl.conf
):fs.file-max = 2048
- Amazon EC2 doesn’t come with swap space, so create a swap file or swap partition.
Create swap space
Check to see if you have the /dev/xvdk
device available (fdisk -cul
).
If /dev/xvdk
exists, follow these steps:
-
Edit the storage device:
fdisk -cu /dev/xvdk
-
Create a new swap partition (type 82) and save changes.
-
Create swap:
mkswap /dev/xvdk1
-
Activate swap:
swapon /dev/xvdk1
-
Add device to the filesystem list:
echo "/dev/xvdk1 none swap sw 0 0" >> /etc/fstab
If /dev/xvdk
does not exist, create a swapfile.
Add temporary space for workspace (deletes data after reboot)
mkfs -t ext4 /dev/xvdj
mkdir /ephemeral0
echo "/dev/xvdj /ephemeral0 ext4 defaults 1 2" >> /etc/fstab
mount /ephemeral0
Expand default root partition
Amazon VM comes with a default 5GB / partition. but it actually has 50GB you can use. run this command to expand it
resize2fs /dev/xvde1
Change open files
Jenkins slave might run out of openfiles. to change this you need to run:
ulimit -n 2048
-
Edit
/etc/sysctl.conf
:fs.file-max = 2048
-
Edit
/etc/security/limits.conf
:jenkins soft nofiles 2048 jenkins hard nofiles 2048
allows sudo access for jenkins user
Jenkins user needs sudo access to be able to run tests from jenkins jobs, do this on each jenkins slave: edit /etc/suders:
-
Comment out this line:
Defaults requiretty
-
Add the line:
jenkins ALL=(ALL) NOPASSWD: ALL