Merge lp:~maxiberta/ols-jenkaas/extend-job-builder-docs into lp:~ols-jenkaas-admins/ols-jenkaas/trunk

Proposed by Maximiliano Bertacchini
Status: Merged
Approved by: Maximiliano Bertacchini
Approved revision: 916
Merged at revision: 913
Proposed branch: lp:~maxiberta/ols-jenkaas/extend-job-builder-docs
Merge into: lp:~ols-jenkaas-admins/ols-jenkaas/trunk
Diff against target: 106 lines (+40/-6)
3 files modified
README.rst (+37/-4)
ols-vms.conf (+2/-1)
setup/job-builder (+1/-1)
To merge this branch: bzr merge lp:~maxiberta/ols-jenkaas/extend-job-builder-docs
Reviewer Review Type Date Requested Status
Odysseus Kaziolas (community) Approve
Guillermo Gonzalez Approve
Review via email: mp+453461@code.launchpad.net

Commit message

Update docs, deps and ubuntu release of the job builder container

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

looks good, thanks for the update

review: Approve
Revision history for this message
Odysseus Kaziolas (odysseus-k) wrote :

LGTM. Thank you!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.rst'
2--- README.rst 2020-07-30 18:21:34 +0000
3+++ README.rst 2023-10-12 15:35:12 +0000
4@@ -65,6 +65,33 @@
5 ``ols-job-builder`` in ``ols-vms.conf`` is the container to use to create,
6 update and delete the jobs.
7
8+At the time of writing, `ols-vms` runs on xenial and bionic only.
9+In order to prevent issues with nested LXD containers, it is recommended that
10+an LXD **VM** is used instead of a regular LXD container.
11+
12+Pre-requisites::
13+
14+ $ lxc launch --vm images:ubuntu/bionic -p default -p $USER myjenkaas
15+
16+Note the `--vm` option. It is assumed that an lxd profile named `$USER`
17+already exists where your home directory is mounted on the new VM.
18+
19+Log into the VM and install `ols-vms`::
20+
21+ $ sudo add-apt-repository --update ppa:ubuntuone/ols-tests
22+ $ sudo apt install python3-ols-vms
23+
24+If you've never used lxd before::
25+
26+ $ sudo apt install snapd
27+ $ sudo snap install lxd
28+ $ sudo adduser $USER lxd
29+ $ newgrp lxd
30+ $ sudo lxd init --auto
31+
32+and follow the instructions to setup a bridge, nat'ed for ipv4, ipv6 is not
33+needed, zfs is optional but great.
34+
35 Setting up ``ols-job-builder`` requires the credentials for
36 ``{{jenkaas}.bot.user}``. They need to be retrieved from the jenkins master.
37
38@@ -80,16 +107,22 @@
39
40 You're now ready to create your job builder::
41
42+ $ cd ols-jenkaas/
43 $ ols-vms setup ols-job-builder
44
45-You're good to go, edit job descriptions under 'jobs/' then do:
46+You're good to go, edit job descriptions under 'jobs/', raise an MP and get it
47+merged. Then log into the new `ols-job-builder` container and do::
48
49-ubuntu@ols-job-builder:~/jenkaas$ jenkins-jobs update --delete-old jobs/
50+ $ ubuntu@ols-job-builder:~/jenkaas$ bzr pull
51+ $ ubuntu@ols-job-builder:~/jenkaas$ jenkins-jobs update --delete-old jobs/
52
53 Note: This a WIP and only applies to members of
54 https://launchpad.net/~ols-jenkaas-admins who have the needed credentials,
55 see `Test setup`_ for how to setup a test environment.
56
57+Note: It might be necessary to manually copy `secrets/mattermost.endpoint`
58+from lp:ols-jenkaas-secrets.
59+
60
61 Test setup
62 ==========
63@@ -97,14 +130,14 @@
64 Pre-requisites::
65
66 $ sudo add-apt-repository --update ppa:ubuntuone/ols-tests
67- $ sudo apt-get install wget ssh lxd lxd-client python3-ols-vms bzr-olsvms
68+ $ sudo apt install wget ssh lxd lxd-client python3-ols-vms bzr-olsvms
69
70 If you've never used lxd before::
71
72+ $ sudo snap install lxd
73 $ sudo adduser $USER lxd
74 $ newgrp lxd
75 $ sudo lxd init --auto
76- $ sudo dpkg-reconfigure -p medium lxd
77
78 and follow the instructions to setup a bridge, nat'ed for ipv4, ipv6 is not
79 needed, zfs is optional but great.
80
81=== modified file 'ols-vms.conf'
82--- ols-vms.conf 2023-03-02 05:05:54 +0000
83+++ ols-vms.conf 2023-10-12 15:35:12 +0000
84@@ -60,7 +60,8 @@
85
86 [ols-job-builder]
87 jenkaas = production
88-vm.release = xenial
89+vm.release = bionic
90+logging.level = DEBUG
91 lxd.image = ubuntu-daily:{vm.release}/{vm.architecture}
92 apt.sources = ppa:ubuntuone/ols-tests
93 # python3-pip is needed to install a more recent version of
94
95=== modified file 'setup/job-builder'
96--- setup/job-builder 2020-07-30 18:45:58 +0000
97+++ setup/job-builder 2023-10-12 15:35:12 +0000
98@@ -4,7 +4,7 @@
99
100
101 # We need to run jenkins_jobs from pip to get the bzr scm :-/
102-LC_ALL=C pip3 install --user jenkins-job-builder
103+LC_ALL=C pip3 install --user jenkins-job-builder==2.10.1
104 LC_ALL=C pip3 install --user git+https://github.com/jovandeginste/jenkins-jobs-mattermost.git
105
106 CONF_DIR=~/.config/jenkins_jobs

Subscribers

People subscribed via source and target branches