copr-be: simplify VM quota

This commit is contained in:
Pavel Raiskup 2021-05-23 22:40:48 +02:00
parent 07ac442116
commit 3fdc635dd4
4 changed files with 20 additions and 32 deletions

View file

@ -29,26 +29,23 @@ nm_controlled_resolv: True
builders:
# max|max_spawn|max_prealloc
aws:
x86_64: [4,1,1]
armhfp: [2,0,0]
s390x: [2,0,0]
aarch64: [2,1,1]
x86_64: [4, 1, 1]
aarch64: [2, 1, 1]
aws_spot:
x86_64: [5,2,3]
armhfp: [2,0,0]
s390x: [1,0,0]
aarch64: [5,2,2]
x86_64: [5, 2, 3]
aarch64: [5, 2, 2]
#x86_hypervisor_01:
# x86_64: [2,1,1]
x86_hypervisor_02:
x86_64: [2,1,1]
x86_64: [2, 1, 1]
x86_hypervisor_03:
x86_64: [2,1,1]
x86_64: [2, 1, 1]
x86_hypervisor_04:
x86_64: [2,1,1]
x86_64: [2, 1, 1]
rpm_vendor_copr_name: Fedora Copr (devel)

View file

@ -167,14 +167,12 @@
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 }}"
set_fact: "max_workers={{ max_x86_64_workers|int + max_aarch64_workers|int }}"
tags:
- provision_config
@ -182,8 +180,6 @@
debug: "var=max_{{ item }}_workers"
with_items:
- x86_64
- armhfp
- s390x
- aarch64
tags:
- provision_config

View file

@ -40,12 +40,13 @@ sleeptime=20
# be taken at the same time.
builds_max_workers={{ max_workers }}
# Maximum number of concurrently running tasks per architecture.
# Maximum number of concurrently running tasks per architecture. Since we
# emulate s390x and armhfp on x86_64, we give it ~25% of the x86_64 quota.
builds_max_workers_arch=
x86_64={{ max_x86_64_workers }},
aarch64={{ max_aarch64_workers }},
armhfp={{ max_armhfp_workers }},
s390x={{ max_s390x_workers }}
armhfp={{ (max_x86_64_workers|int / 4)|int }},
s390x={{ (max_x86_64_workers|int / 4)|int }},
# Maximum number of concurrently running tasks per project owner.
{% if env == 'production' %}

View file

@ -112,24 +112,18 @@ aarch64_{{ id }}_{{ inst }}:
- arch_aarch64_native
{% endmacro %}
{{ aws_x86_64(builders.aws.x86_64[0] + builders.aws.armhfp[0] + builders.aws.s390x[0],
builders.aws.x86_64[1] + builders.aws.armhfp[1] + builders.aws.s390x[1],
builders.aws.x86_64[2] + builders.aws.armhfp[2] + builders.aws.s390x[2])
{{ aws_x86_64(builders.aws.x86_64[0], builders.aws.x86_64[1],
builders.aws.x86_64[2])
}}
{{ aws_aarch64(builders.aws.aarch64[0],
builders.aws.aarch64[1],
{{ aws_aarch64(builders.aws.aarch64[0], builders.aws.aarch64[1],
builders.aws.aarch64[2])
}}
{{ aws_x86_64(builders.aws_spot.x86_64[0] + builders.aws_spot.armhfp[0] + builders.aws_spot.s390x[0],
builders.aws_spot.x86_64[1] + builders.aws_spot.armhfp[1] + builders.aws_spot.s390x[1],
builders.aws_spot.x86_64[2] + builders.aws_spot.armhfp[2] + builders.aws_spot.s390x[2],
True)
{{ aws_x86_64(builders.aws_spot.x86_64[0], builders.aws_spot.x86_64[1],
builders.aws_spot.x86_64[2], True)
}}
{{ aws_aarch64(builders.aws_spot.aarch64[0],
builders.aws_spot.aarch64[1],
builders.aws_spot.aarch64[2],
True)
{{ aws_aarch64(builders.aws_spot.aarch64[0], builders.aws_spot.aarch64[1],
builders.aws_spot.aarch64[2], True)
}}
{% if env == "production" %}