copr-dev: configure spot instances

And also add a configuration options for the s390x arch quota.
This commit is contained in:
Pavel Raiskup 2021-05-19 14:19:07 +02:00
parent ee0a88df33
commit 0295b35a21
3 changed files with 34 additions and 11 deletions

View file

@ -30,6 +30,12 @@ builders:
aws: aws:
x86_64: [100,15,15] x86_64: [100,15,15]
armhfp: [20,3,3] armhfp: [20,3,3]
s390x: [5,1,1]
aarch64: [20,6,6] aarch64: [20,6,6]
aws_spot:
x86_64: [0,1,1]
armhfp: [0,0,0]
s390x: [0,0,0]
aarch64: [0,2,2]
rpm_vendor_copr_name: Fedora Copr rpm_vendor_copr_name: Fedora Copr

View file

@ -29,8 +29,14 @@ nm_controlled_resolv: True
builders: builders:
# max|max_spawn|max_prealloc # max|max_spawn|max_prealloc
aws: aws:
x86_64: [10,1,1] x86_64: [4,1,1]
armhfp: [3,1,1] armhfp: [2,0,0]
s390x: [2,0,0]
aarch64: [2,1,1]
aws_spot:
x86_64: [5,2,3]
armhfp: [2,0,0]
s390x: [1,0,0]
aarch64: [5,2,2] aarch64: [5,2,2]
rpm_vendor_copr_name: Fedora Copr (devel) rpm_vendor_copr_name: Fedora Copr (devel)

View file

@ -1,5 +1,5 @@
{% macro aws_x86_64(max, max_starting, max_prealloc) %} {% macro aws_x86_64(max, max_starting, max_prealloc, spot=False) %}
aws_x86_64_normal_{% if devel %}dev{% else %}prod{% endif %}: aws_x86_64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% else %}prod{% endif %}:
max: {{ max }} max: {{ max }}
max_starting: {{ max_starting }} max_starting: {{ max_starting }}
max_prealloc: {{ max_prealloc }} max_prealloc: {{ max_prealloc }}
@ -18,7 +18,7 @@ aws_x86_64_normal_{% if devel %}dev{% else %}prod{% endif %}:
- arch_s390x - arch_s390x
- arch_s390x_emulated - arch_s390x_emulated
- aws - aws
cmd_new: "/var/lib/resallocserver/resalloc_provision/vm-aws-new --arch=x86_64" cmd_new: "/var/lib/resallocserver/resalloc_provision/vm-aws-new --arch=x86_64 {% if spot %}--spot{% endif %}"
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aws-delete" cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aws-delete"
cmd_livecheck: "/var/lib/resallocserver/resalloc_provision/vm-aws-check" cmd_livecheck: "/var/lib/resallocserver/resalloc_provision/vm-aws-check"
livecheck_period: 180 livecheck_period: 180
@ -27,8 +27,8 @@ aws_x86_64_normal_{% if devel %}dev{% else %}prod{% endif %}:
reuse_max_time: 1800 reuse_max_time: 1800
{% endmacro %} {% endmacro %}
{% macro aws_aarch64(max, max_starting, max_prealloc) %} {% macro aws_aarch64(max, max_starting, max_prealloc, spot=False) %}
aws_aarch64_normal_{% if devel %}dev{% else %}prod{% endif %}: aws_aarch64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% else %}prod{% endif %}:
max: {{ max }} max: {{ max }}
max_starting: {{ max_starting }} max_starting: {{ max_starting }}
max_prealloc: {{ max_prealloc }} max_prealloc: {{ max_prealloc }}
@ -37,7 +37,7 @@ aws_aarch64_normal_{% if devel %}dev{% else %}prod{% endif %}:
- arch_aarch64 - arch_aarch64
- arch_aarch64_native - arch_aarch64_native
- aws - aws
cmd_new: "/var/lib/resallocserver/resalloc_provision/vm-aws-new --arch=aarch64" cmd_new: "/var/lib/resallocserver/resalloc_provision/vm-aws-new --arch=aarch64 {% if spot %}--spot{% endif %}"
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aws-delete" cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aws-delete"
cmd_livecheck: "/var/lib/resallocserver/resalloc_provision/vm-aws-check" cmd_livecheck: "/var/lib/resallocserver/resalloc_provision/vm-aws-check"
livecheck_period: 180 livecheck_period: 180
@ -109,15 +109,26 @@ aarch64_{{ id }}_{{ inst }}:
- arch_aarch64_native - arch_aarch64_native
{% endmacro %} {% endmacro %}
{{ aws_x86_64(builders.aws.x86_64[0] + builders.aws.armhfp[0], {{ 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.x86_64[1] + builders.aws.armhfp[1] + builders.aws.s390x[1],
builders.aws.x86_64[2] + builders.aws.armhfp[2]) builders.aws.x86_64[2] + builders.aws.armhfp[2] + builders.aws.s390x[2])
}} }}
{{ aws_aarch64(builders.aws.aarch64[0], {{ aws_aarch64(builders.aws.aarch64[0],
builders.aws.aarch64[1], builders.aws.aarch64[1],
builders.aws.aarch64[2]) 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_aarch64(builders.aws_spot.aarch64[0],
builders.aws_spot.aarch64[1],
builders.aws_spot.aarch64[2],
True)
}}
{% if env == "production" %} {% if env == "production" %}
{{ hw_aarch64("01", "prod", 4, 2, 4) }} {{ hw_aarch64("01", "prod", 4, 2, 4) }}
{{ hw_aarch64("02", "prod", 4, 2, 4) }} {{ hw_aarch64("02", "prod", 4, 2, 4) }}