mirror of
https://github.com/rocky-linux/ansible-role-kojid.git
synced 2024-11-21 20:51:26 +00:00
working koji config
This commit is contained in:
parent
9c749f89fe
commit
51ac7e0a6f
@ -1,7 +1,7 @@
|
|||||||
CI Badge
|
CI Badge
|
||||||
|
|
||||||
# Ansible template role
|
# Kojid Role
|
||||||
basic Role to use going forward because I forget pieces
|
This role prepares a system to be a koji builder. This requires kerberos keytabs.
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
Ensure all dependencies are installed and then follow the below process
|
Ensure all dependencies are installed and then follow the below process
|
||||||
@ -36,5 +36,3 @@ There are numerous other options within the [defaults/main.yml](./defaults/main.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
The [changelog](./CHANGELOG.md) is stored externally
|
The [changelog](./CHANGELOG.md) is stored externally
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,6 +33,9 @@ kojid_web_url: https://koji.rockylinux.org/koji
|
|||||||
kojid_hub_url: https://koji.rockylinux.org/kojihub
|
kojid_hub_url: https://koji.rockylinux.org/kojihub
|
||||||
kojid_files_url: https://koji.rockylinux.org/kojifiles
|
kojid_files_url: https://koji.rockylinux.org/kojifiles
|
||||||
kojid_ca_bundle: /etc/pki/tls/certs/ca-bundle.crt
|
kojid_ca_bundle: /etc/pki/tls/certs/ca-bundle.crt
|
||||||
|
kojid_keytab: /etc/kojid.keytab
|
||||||
|
kojid_smtp_host: smtp.rockylinux.org
|
||||||
|
kojid_allowed_scm: "git.centos.org:/* git.rockylinux.org:/*"
|
||||||
|
|
||||||
kojid_maxjobs: 20
|
kojid_maxjobs: 20
|
||||||
kojid_minspace: 8192
|
kojid_minspace: 8192
|
||||||
|
30
tasks/config.yml
Normal file
30
tasks/config.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
# kojid configuration
|
||||||
|
|
||||||
|
# oz
|
||||||
|
- name: OZ Config
|
||||||
|
template:
|
||||||
|
src: oz.cfg.j2
|
||||||
|
dest: /etc/oz/oz.cfg
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
notify: restart_kojid
|
||||||
|
|
||||||
|
- name: runroot config
|
||||||
|
template:
|
||||||
|
src: runroot.conf.j2
|
||||||
|
dest: /etc/kojid/plugins/runroot.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
notify: restart_kojid
|
||||||
|
|
||||||
|
- name: Configure kojid
|
||||||
|
template:
|
||||||
|
src: kojid.conf.j2
|
||||||
|
dest: /etc/kojid/kojid.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
notify: restart_kojid
|
@ -12,3 +12,6 @@
|
|||||||
|
|
||||||
- name: Create the users for kojid
|
- name: Create the users for kojid
|
||||||
import_tasks: users.yml
|
import_tasks: users.yml
|
||||||
|
|
||||||
|
- name: Configure kojid
|
||||||
|
import_tasks: config.yml
|
||||||
|
@ -4,3 +4,18 @@
|
|||||||
yum:
|
yum:
|
||||||
name: "{{ kojid_packages }}"
|
name: "{{ kojid_packages }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
# armv7l specific
|
||||||
|
- name: Install libkcapi for increased armv7 sockets
|
||||||
|
yum:
|
||||||
|
name: libkcapi
|
||||||
|
state: present
|
||||||
|
when: ansible_architecture == 'armv7l'
|
||||||
|
|
||||||
|
# x86_64 specific
|
||||||
|
- name: Install x86_64 specific packages
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- python3-osbs-client
|
||||||
|
state: present
|
||||||
|
when: ansible_architecture == 'x86_64'
|
||||||
|
10
templates/buildtools.repo.j2
Normal file
10
templates/buildtools.repo.j2
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[r8-rockytools]
|
||||||
|
name = Rocky Infra Tools
|
||||||
|
baseurl = {{ kojid_buildtools_repo_url }}
|
||||||
|
enabled=1
|
||||||
|
{% if kojid_buildtools_repo_gpgcheck %}
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/kojid_buildtools_repo_gpgkey
|
||||||
|
{% else %}
|
||||||
|
gpgcheck=0
|
||||||
|
{% endif %}
|
33
templates/kojid.conf.j2
Normal file
33
templates/kojid.conf.j2
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
[kojid]
|
||||||
|
sleeptime=15
|
||||||
|
maxjobs={{ kojid_maxjobs }}
|
||||||
|
minspace={{ kojid_minspace }}
|
||||||
|
topdir={{ kojid_mount }}
|
||||||
|
workdir=/tmp/koji
|
||||||
|
mockdir=/var/lib/mock
|
||||||
|
mockuser=kojibuilder
|
||||||
|
vendor={{ kojid_vendor }}
|
||||||
|
packager={{ kojid_packager }}
|
||||||
|
mockhost=redhat-linux-gnu
|
||||||
|
server={{ kojid_hub_url }}
|
||||||
|
topurl={{ kojid_files_url }}
|
||||||
|
use_createrepo_c=True
|
||||||
|
from_addr=Koji Build System <buildsys@rockylinux.org>
|
||||||
|
smtphost={{ kojid_smtp_host }}
|
||||||
|
host_principal_format = compile/%s@ROCKYLINUX.ORG
|
||||||
|
keytab = {{ kojid_keytab }}
|
||||||
|
serverca = {{ kojid_ca_bundle }}
|
||||||
|
|
||||||
|
; Modify
|
||||||
|
allowed_scvs={{ kojid_allowed_scm }}
|
||||||
|
|
||||||
|
; Other settings
|
||||||
|
build_arch_can_fail = true
|
||||||
|
|
||||||
|
{% set plugins = [] %}
|
||||||
|
|
||||||
|
{% if kojid_runroot_builder %}
|
||||||
|
{{ plugins.append("runroot") }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
plugins = {{ plugins | join(" ") }}
|
31
templates/oz.cfg.j2
Normal file
31
templates/oz.cfg.j2
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[paths]
|
||||||
|
output_dir = /var/lib/libvirt/images
|
||||||
|
data_dir = /var/lib/oz
|
||||||
|
screenshot_dir = /var/lib/oz/screenshots
|
||||||
|
# sshprivkey = /etc/oz/id_rsa-icicle-gen
|
||||||
|
|
||||||
|
[libvirt]
|
||||||
|
uri = qemu:///system
|
||||||
|
image_type = raw
|
||||||
|
# type = kvm
|
||||||
|
# bridge_name = virbr0
|
||||||
|
{% if ansible_architecture == 'ppc64' or ansible_architecture == 'ppc64le' %}
|
||||||
|
cpus = 4
|
||||||
|
{% else %}
|
||||||
|
cpus = 4
|
||||||
|
{% endif %}
|
||||||
|
memory = 4096
|
||||||
|
|
||||||
|
[cache]
|
||||||
|
original_media = yes
|
||||||
|
modified_media = no
|
||||||
|
jeos = no
|
||||||
|
|
||||||
|
[icicle]
|
||||||
|
safe_generation = no
|
||||||
|
|
||||||
|
[timeouts]
|
||||||
|
install = 14400
|
||||||
|
inactivity = 300
|
||||||
|
boot = 300
|
||||||
|
shutdown = 90
|
37
templates/runroot.conf.j2
Normal file
37
templates/runroot.conf.j2
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[paths]
|
||||||
|
; comma-delimited list of default mountpoints
|
||||||
|
; They will be mounted during each run. It is suggested, that these
|
||||||
|
; paths has readonly options and are made writable via extra_mounts
|
||||||
|
; parameter for individual calls.
|
||||||
|
default_mounts = /mnt/koji
|
||||||
|
|
||||||
|
; comma-delimited list of safe roots.
|
||||||
|
; Each extra_mount need to start with some of these prefixes. Other paths are
|
||||||
|
; not allowed for mounting. Only absolute paths are allowed here, no
|
||||||
|
; wildcards.
|
||||||
|
safe_roots = /mnt/koji/compose,/srv/odcs
|
||||||
|
|
||||||
|
; path substitutions is tuple per line, delimited by comma, order is
|
||||||
|
; important.
|
||||||
|
; Path prefixes which can be substituted for other mountpoints.
|
||||||
|
; Usable for locations symlinked from other mounts.
|
||||||
|
; path_subs = /mnt/archive/prehistory/,/mnt/prehistoric_disk/archive/prehistory
|
||||||
|
|
||||||
|
; mount origins, order is important here, ordered by best catch
|
||||||
|
[path0]
|
||||||
|
mountpoint = /mnt/koji/compose
|
||||||
|
path = /mnt/koji/compose
|
||||||
|
fstype = bind
|
||||||
|
options = bind
|
||||||
|
|
||||||
|
[path1]
|
||||||
|
mountpoint = /mnt/koji
|
||||||
|
path = /mnt/koji
|
||||||
|
fstype = bind
|
||||||
|
options = bind
|
||||||
|
|
||||||
|
[path2]
|
||||||
|
mountpoint = /srv/odcs
|
||||||
|
path = /srv/odcs
|
||||||
|
fstype = bind
|
||||||
|
options = bind
|
Loading…
Reference in New Issue
Block a user