1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
Setup of jenkins.debian.net
===========================
:Author: Holger Levsen
:Authorinitials: holger
:EMail: holger@layer-acht.org
:Status: working, in progress
:lang: en
:Doctype: article
:Licence: GPLv2
== About jenkins.debian.net
See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian.net"].
== Setup
=== Installed software that makes jenkins.debian.net run
link:https://jenkins.debian.net[jenkins.debian.net] runs Debian jessie.
=== Jenkins
Currently running the long term support .deb from jenkins-ci.org.
Jenkins is installed using 'deb http://pkg.jenkins-ci.org/debian-stable binary/' into '/etc/apt/sources.list.d/jenkins.list' and `apt-get update && apt-get install jenkins`.
We would prefer to run a jenkins package from jessie-backports.
==== Jenkins plugins
* Jenkins GIT plugin
* Jenkins Subversion Plug-in
* Email-ext Plugin
* Log Parser Plugin
* HTML Publisher plugin
* Static Analysis Utilities
* Read-only configurations
* SCM Sync Configuration Plugin
* Dependency Graph Viewer Plugin
* View Job Filters
* Console Column Plugin
* Priority Sorter Plugin
* Throttle Concurrent Builds Plugin
* Next Executions Plugin
* Build-timeout Plugin
* Build Token Root Plugin
* Embeddable Build Status Plugin
* Plot Plugin
* Sidebar Link
* Green Balls
* Compact Columns
* Console Tail Plugin
* Cron Column
* Simple Theme Plugin
* LiveScreenshot Plugin
* Locale plugin
* Jenkins Translation Assistance plugin
=== updating jenkins.debian.net with 'update_jdn.sh'
'update_jdn.sh' is a hackish script which will install all needed packages, copy their configuration in place, generate the documentation webpages and update all jenkins jobs if needed.
As user run:
----
cd
git clone git://git.debian.org/git/qa/jenkins.debian.net.git
cd jenkins.debian.net
./update_jdn.sh
----
'vncdotool' is the only software which is not installed by packages and is not covered by this script.
=== IRC notification configuration using kgb-client
The jenkins jobs are configured to send email to 'jenkins+$IRC_CHANNEL' (like 'jenkins+debian-qa'), this is parsed by a script ('/srv/jenkins/bin/email2irc.sh') run through 'procmail' which then in turn notifies 'kgb-client', which notfies 'kgb-server'(s) on the internet, which are the bots notifying the IRC channels.
The Jenkins EMail notification plugin is used as its state tracking is best (and the Jenkins IRC plugin is way too powerful).
=== Installing vncdotool
----
apt-get install python-twisted python-imaging
git clone https://github.com/sibson/vncdotool
cd vncdotool/
python setup.py install
----
=== munin
link://munin-monitoring[Munin] is installed, running with link:https://jenkins.debian.net/munin/[jenkins plugins] not yet published elsewhere.
=== Using jenkins-job-builder
'update_jdn.sh' takes care of this too, so this is just a quick run through. Make sure to also look at the upstream documentation at http://ci.openstack.org/jenkins-job-builder/
* run `cd /srv/jenkins/job-cfg ; jenkins-job-builder update .` to update jobs
* for testing: `cd /srv/jenkins/job-cfg ; rm test-output/ -r ; mkdir test-output ; jenkins-job-builder test . -o test-output/ ; ls test-output/`
=== Backup
Currently only the configuration is backed up, but neither the jenkins results nor system logs. But that's at least sufficient to re-setup the system if needed.
* The _etckeeper_ package is installed and automatically keeps '/etc' in '/etc/.git'.
* The _SCM Sync Configuration Plugin_ is installed in Jenkins, putting all Jenkins configuration into '/srv/jenkins.debian.net-scm-sync.git'.
** (This is not ideal yet, because it also puts the generated job configuration there...)
I've cloned these two git repos on my desktop and manually run `git pull`. This is certainly not ideal but good enough to re-setup the system anytime, which is something.
=== Setup of standalone tests.reproducible-builds.org for development
If you'd like to run tests.repoducible-builds.org without the rest of the jenkins set up, here are some necessary steps. Note that most of these steps are performed in the update_jdn.sh script, see above. Your clone of the jenkins git (git://git.debian.org/git/qa/jenkins.debian.net.git) will be referred to as $JENKINSGIT.
==== Dependencies, users, directories and files
Some dependencies:
----
sudo apt install python3 python3-psycopg2 sqlite3 python-rpy2 dctrl-tools
----
Create a user jenkins for testing. Create the following directories:
----
sudo mkdir -p /var/lib/jenkins/userContent/reproducible/ /srv/reproducible-results/ /srv/workspace /schroots /chroots
----
Create the following symlinks:
----
ln -s $JENKINSGIT/bin /srv/jenkins/bin/
ln -s $JENKINSGIT/userContent/reproducible/static /var/lib/jenkins/userContent/reproducible/static/
----
Additional, give user jenkins write access to the root $JENKINSGIT directory and following directory trees:
* /srv/reproducible-results/...
* /var/lib/jenkins/...
* /srv/workspace/...
* $JENKINSGIT/userContent/...
* $JENKINSGIT/bin/...
==== Database
Get a recent copy of the database from:
----
wget https://tests.reproducible-builds.org/reproducible.db
----
Keep the database (or a symlink of it) in /var/lib/jenkins/reproducible.db and give the user Jenkins write access.
==== Websites scripts
THe $JENKINSGIT/bin/reproducible_html_*.py and $JENKINSGIT/bin/reproducible_html_*.sh scripts produce the debian testing pages and you probably want to run all of them at least once. Below are the requirements for some scripts.
All webpages will be served out of /var/lib/jenkins/userContent/reproducible and you need to point a webserver to this directory. Build the reproducible dashboard for debian with the $JENKINSGIT/bin/reproducible_html_dashboard.sh, and navigate to <host>/reproducible.html in your browser.
*Requirements for $JENKINSGIT/bin/reproducible_html_dashboard.sh*
Before running, create the following directories and files:
----
sudo mkdir /srv/reproducible-results/node-information/
for i in i386 amd64 armhf ; do touch /srv/reproducible-results/node-information/dummy_$i ; done
----
And run the following script as user jenkins:
----
$JENKINSGIT/bin/reproducible_html_repository_comparison.sh
----
// vim: set filetype=asciidoc:
|