copr-be: centralize aws/spot/hypervisor config in inventory
This commit is contained in:
parent
54a29eaaa1
commit
9b00f4b02a
5 changed files with 64 additions and 14 deletions
|
@ -38,4 +38,16 @@ builders:
|
||||||
s390x: [0,0,0]
|
s390x: [0,0,0]
|
||||||
aarch64: [0,2,2]
|
aarch64: [0,2,2]
|
||||||
|
|
||||||
|
#x86_hypervisor_01:
|
||||||
|
# x86_64: [2,1,1]
|
||||||
|
|
||||||
|
x86_hypervisor_02:
|
||||||
|
x86_64: [20,3,20]
|
||||||
|
|
||||||
|
x86_hypervisor_03:
|
||||||
|
x86_64: [20,3,20]
|
||||||
|
|
||||||
|
x86_hypervisor_04:
|
||||||
|
x86_64: [20,3,20]
|
||||||
|
|
||||||
rpm_vendor_copr_name: Fedora Copr
|
rpm_vendor_copr_name: Fedora Copr
|
||||||
|
|
|
@ -39,4 +39,16 @@ builders:
|
||||||
s390x: [1,0,0]
|
s390x: [1,0,0]
|
||||||
aarch64: [5,2,2]
|
aarch64: [5,2,2]
|
||||||
|
|
||||||
|
#x86_hypervisor_01:
|
||||||
|
# x86_64: [2,1,1]
|
||||||
|
|
||||||
|
x86_hypervisor_02:
|
||||||
|
x86_64: [2,1,1]
|
||||||
|
|
||||||
|
x86_hypervisor_03:
|
||||||
|
x86_64: [2,1,1]
|
||||||
|
|
||||||
|
x86_hypervisor_04:
|
||||||
|
x86_64: [2,1,1]
|
||||||
|
|
||||||
rpm_vendor_copr_name: Fedora Copr (devel)
|
rpm_vendor_copr_name: Fedora Copr (devel)
|
||||||
|
|
|
@ -162,6 +162,31 @@
|
||||||
# - library
|
# - library
|
||||||
# tags:
|
# tags:
|
||||||
# - provision_config
|
# - provision_config
|
||||||
|
#
|
||||||
|
- name: calculate the maximum resalloc workers per architecture
|
||||||
|
set_fact: "max_{{ item }}_workers={{ builders | community.general.json_query('*.'+item+'[0]') | sum() }}"
|
||||||
|
with_items:
|
||||||
|
- x86_64
|
||||||
|
- armhfp
|
||||||
|
- s390x
|
||||||
|
- aarch64
|
||||||
|
tags:
|
||||||
|
- provision_config
|
||||||
|
|
||||||
|
- name: calculate max number of workers
|
||||||
|
set_fact: "max_workers={{ max_x86_64_workers|int + max_armhfp_workers|int + max_s390x_workers|int + max_aarch64_workers|int }}"
|
||||||
|
tags:
|
||||||
|
- provision_config
|
||||||
|
|
||||||
|
- name: print max arch workers
|
||||||
|
debug: "var=max_{{ item }}_workers"
|
||||||
|
with_items:
|
||||||
|
- x86_64
|
||||||
|
- armhfp
|
||||||
|
- s390x
|
||||||
|
- aarch64
|
||||||
|
tags:
|
||||||
|
- provision_config
|
||||||
|
|
||||||
- name: resalloc
|
- name: resalloc
|
||||||
import_tasks: resalloc.yml
|
import_tasks: resalloc.yml
|
||||||
|
|
|
@ -38,13 +38,14 @@ sleeptime=20
|
||||||
# This option basically controls the amount of RAM allocated for
|
# This option basically controls the amount of RAM allocated for
|
||||||
# processing builds on copr backend, and how many resalloc tickets can
|
# processing builds on copr backend, and how many resalloc tickets can
|
||||||
# be taken at the same time.
|
# be taken at the same time.
|
||||||
builds_max_workers={{ builders.aws.x86_64[0] + builders.aws.aarch64[0] + builders.aws.armhfp[0] }}
|
builds_max_workers={{ max_workers }}
|
||||||
|
|
||||||
# Maximum number of concurrently running tasks per architecture.
|
# Maximum number of concurrently running tasks per architecture.
|
||||||
builds_max_workers_arch=
|
builds_max_workers_arch=
|
||||||
x86_64={{ builders.aws.x86_64[0] }},
|
x86_64={{ max_x86_64_workers }},
|
||||||
aarch64={{ builders.aws.aarch64[0]}},
|
aarch64={{ max_aarch64_workers }},
|
||||||
armhfp={{ builders.aws.armhfp[0] }}
|
armhfp={{ max_armhfp_workers }},
|
||||||
|
s390x={{ max_s390x_workers }}
|
||||||
|
|
||||||
# Maximum number of concurrently running tasks per project owner.
|
# Maximum number of concurrently running tasks per project owner.
|
||||||
{% if env == 'production' %}
|
{% if env == 'production' %}
|
||||||
|
|
|
@ -49,17 +49,12 @@ aws_aarch64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% els
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
# x86_64 hypervisors
|
# x86_64 hypervisors
|
||||||
{% for hv in ["02", "03", "04"] %}
|
{% for hv in ["01", "02", "03", "04"] %}
|
||||||
|
{% if "x86_hypervisor_" + hv in builders %}
|
||||||
copr_hv_x86_64_{{ hv }}_{% if devel %}dev{% else %}prod{% endif %}:
|
copr_hv_x86_64_{{ hv }}_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
{% if devel %}
|
max: {{ builders["x86_hypervisor_" + hv]["x86_64"][0] }}
|
||||||
max: 3
|
max_starting: {{ builders["x86_hypervisor_" + hv]["x86_64"][1] }}
|
||||||
max_starting: 1
|
max_prealloc: {{ builders["x86_hypervisor_" + hv]["x86_64"][2] }}
|
||||||
max_prealloc: 1
|
|
||||||
{% else %}
|
|
||||||
max: 20
|
|
||||||
max_starting: 4
|
|
||||||
max_prealloc: 20
|
|
||||||
{% endif %}
|
|
||||||
tags:
|
tags:
|
||||||
- copr_builder
|
- copr_builder
|
||||||
- arch_x86_64
|
- arch_x86_64
|
||||||
|
@ -85,6 +80,11 @@ copr_hv_x86_64_{{ hv }}_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
reuse_opportunity_time: 180
|
reuse_opportunity_time: 180
|
||||||
reuse_max_count: 8
|
reuse_max_count: 8
|
||||||
reuse_max_time: 1800
|
reuse_max_time: 1800
|
||||||
|
{% else %}
|
||||||
|
#
|
||||||
|
# x86_hypervisor_{{ hv }} not configured in group_vars
|
||||||
|
#
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% macro hw_aarch64(id, inst, max, max_starting, max_prealloc) %}
|
{% macro hw_aarch64(id, inst, max, max_starting, max_prealloc) %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue