From 983e39abff353099156b338d270c8aec1cca55a0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 30 Nov 2018 10:34:04 -0800 Subject: [PATCH] openqa/dispatcher: improve 'extra arches' implementation These bits were still named and described as if they were ppc64 specific, even though they actually cover aarch64 too. Also I decided I don't like the implementation of cueing *directly* off the infra deployment type here, it feels wrong. Instead let's just make it work from a config variable, and set that variable to false by default and true in group_vars/openqa-stg. Signed-off-by: Adam Williamson --- inventory/group_vars/openqa-stg | 3 +++ roles/openqa/dispatcher/defaults/main.yml | 1 + ...ages.json.ppc64 => images.json.extraarches} | 0 roles/openqa/dispatcher/tasks/main.yml | 18 ++++++++++++------ 4 files changed, 16 insertions(+), 6 deletions(-) rename roles/openqa/dispatcher/files/{images.json.ppc64 => images.json.extraarches} (100%) diff --git a/inventory/group_vars/openqa-stg b/inventory/group_vars/openqa-stg index 5f5bbcbcc7..c2f988e503 100644 --- a/inventory/group_vars/openqa-stg +++ b/inventory/group_vars/openqa-stg @@ -34,6 +34,9 @@ openqa_assetsize_updates: 75 openqa_key: "{{ stg_openqa_apikey }}" openqa_secret: "{{ stg_openqa_apisecret }}" +# for now, we have the 'extra' arches (ppc64 and aarch64) on stg +openqa_extraarches: true + wikitcms_password: "{{ stg_wikitcms_password }}" wikitcms_token: "{{ private }}/files/openidc/staging/wikitcms.json" diff --git a/roles/openqa/dispatcher/defaults/main.yml b/roles/openqa/dispatcher/defaults/main.yml index fded397ce1..8af3ea5913 100644 --- a/roles/openqa/dispatcher/defaults/main.yml +++ b/roles/openqa/dispatcher/defaults/main.yml @@ -1,2 +1,3 @@ openqa_hostname: localhost openqa_consumer: true +openqa_extraarches: false diff --git a/roles/openqa/dispatcher/files/images.json.ppc64 b/roles/openqa/dispatcher/files/images.json.extraarches similarity index 100% rename from roles/openqa/dispatcher/files/images.json.ppc64 rename to roles/openqa/dispatcher/files/images.json.extraarches diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 99d1e10c55..c2b78043fa 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -9,6 +9,12 @@ # - external_hostname ## string - The public hostname of the openQA server (used in ResultsDB links) ## default - ansible_nodename +# - openqa_extraarches +## bool - when this is set, this instance will be configured to +## create jobs for 'extra' arches beyond x86_64 (currently +## ppc64 and aarch64). Only set it if this instance will +## have worker hosts for those arches +## default - false # # Optional vars # - wikitcms_token @@ -99,12 +105,12 @@ notify: - restart fedmsg-hub -# For now, we want ppc64 jobs generated on staging but not prod (as we -# have ppc64 workers for stg but not prod). So we have a WANTED file -# for staging. -- name: Install ppc64-imbued WANTED file if this is staging - copy: src=images.json.ppc64 dest=/etc/fedora-openqa/images.json - when: (deployment_type is defined) and (deployment_type == 'stg') +# For now, we only have enough ppc64/aarch64 workers for one instance, +# so we have a variant WANTED file that we deploy based on a config +# variable. +- name: Install extra arch WANTED images config if enabled + copy: src=images.json.extraarches dest=/etc/fedora-openqa/images.json + when: openqa_extraarches notify: - restart fedmsg-hub