From 2a9b0f9935e445ce836578a209a68b77de39ef41 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Feb 04 2019 15:41:40 +0000 Subject: Use hub policy to put tasks into channels --- diff --git a/builder/tasks/main.yml b/builder/tasks/main.yml index 1249beb..84a7518 100644 --- a/builder/tasks/main.yml +++ b/builder/tasks/main.yml @@ -25,7 +25,7 @@ capacity: "{{ ansible_processor_count }}" description: "{{ ansible_product_name }} builder with {{ ansible_processor_count }} CPUs and {{ ansible_memtotal_mb }} MB of memory" comment: Added by Ansible - channels: [default] + channels: "{{ channels }}" - name: Start and enable kojid service: name=kojid state=started enabled=true diff --git a/group_vars/buildvm b/group_vars/buildvm index d5b80f5..3629e0f 100644 --- a/group_vars/buildvm +++ b/group_vars/buildvm @@ -1,5 +1,9 @@ # -*- yaml -*- +channels: + - build-srpm + - build-arch + dns: 192.168.1.1 gw: 192.168.1.1 nm: 255.255.255.0 diff --git a/host_vars/koji.kjnet.xyz b/host_vars/koji.kjnet.xyz index 721fba0..8ee5c0e 100644 --- a/host_vars/koji.kjnet.xyz +++ b/host_vars/koji.kjnet.xyz @@ -1,6 +1,11 @@ +# -*- yaml -*- + ec2_ip: 3.121.240.12 ec2_groups: ssh-anywhere,http-anywhere +sleeptime: 1 +maxjobs: 40 + users: - name: mizdebsk perm: admin diff --git a/hub.yml b/hub.yml index 1a487d0..f1c783c 100644 --- a/hub.yml +++ b/hub.yml @@ -169,7 +169,9 @@ capacity: 4 description: Koji hub on AWS EC2 comment: Added by Ansible - channels: [createrepo] + channels: + - createrepo + - lightweight tags: config - name: Start and enable kojid diff --git a/templates/koji-hub.conf.j2 b/templates/koji-hub.conf.j2 index f53c824..b753892 100644 --- a/templates/koji-hub.conf.j2 +++ b/templates/koji-hub.conf.j2 @@ -41,7 +41,7 @@ KojiDir = /mnt/koji ## Other options ## LoginCreatesUser = On -KojiWebURL = http://{{ ansible_host }}/koji +KojiWebURL = https://{{ ansible_host }}/koji # The domain name that will be appended to Koji usernames # when creating email notifications #EmailDomain = example.com @@ -89,3 +89,17 @@ DisableNotifications = True build_from_srpm = has_perm admin :: allow all :: deny + +channel = + # createrepo requires direct access to /mnt/koji + method createrepo :: use createrepo + method createdistrepo :: use createrepo + # lightweight tasks that can be ran directly on the hub + method build :: use lightweight + method tagBuild :: use lightweight + # heavyweight tasks + method buildSRPMFromSCM :: use build-srpm + method buildArch :: use build-arch + # generic rules + is_child_task :: parent + all :: use default diff --git a/templates/kojid.conf.j2 b/templates/kojid.conf.j2 index 84ce2cd..4f56a49 100644 --- a/templates/kojid.conf.j2 +++ b/templates/kojid.conf.j2 @@ -1,6 +1,6 @@ [kojid] ; The number of seconds to sleep between tasks -sleeptime=2 +sleeptime={{ sleeptime | default(10) }} ; The maximum number of jobs that kojid will handle at a time maxjobs={{ maxjobs | default(8 * ansible_processor_count) }}