copr-be: start builders in random availability zones

Aarch64 hosts are not in all zones, so specify subnets per-architecture.
This commit is contained in:
Pavel Raiskup 2020-08-25 11:19:07 +02:00
parent 52710e789f
commit b4b963d037
3 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,17 @@
# Your requested instance type (a1.xlarge) is not supported in your requested Availability Zone (us-east-1a).
# Your requested instance type (a1.xlarge) is not supported in your requested Availability Zone (us-east-1d).
# Your requested instance type (a1.xlarge) is not supported in your requested Availability Zone (us-east-1f).
aws_arch_subnets:
x86_64:
- subnet-0995f6a466849f4c3
- subnet-08cadf5a14b530ac4
- subnet-07b0b3168a353e3ee
- subnet-09c74a3e6420a206b
- subnet-01d4e967ab5e78005
- subnet-05437ac82d63b6ef5
aarch64:
- subnet-0995f6a466849f4c3
- subnet-08cadf5a14b530ac4
- subnet-07b0b3168a353e3ee

View file

@ -907,6 +907,10 @@ copr_back_dev_aws
copr_dist_git_dev_aws
copr_keygen_dev_aws
[copr_all_instances_aws:children]
copr_aws
copr_dev_aws
# [copr_hypervisors_aarch64]
# virthost-aarch64-os01.fedorainfracloud.org
# virthost-aarch64-os02.fedorainfracloud.org

View file

@ -1,5 +1,9 @@
- debug: msg="vm_name={{ vm_name }}"
- name: random subnet to overcome datacenter failures
set_fact: subnet_id={{ item }}
with_random_choice: "{{ aws_arch_subnets[arch] }}"
- name: Launch instance
ec2:
key_name: "{{ keypair }}"
@ -9,7 +13,7 @@
wait: true
region: "{{ aws_region }}"
# both x86_64 and aarch64 arches can be allocated in us-east-1c
vpc_subnet_id: subnet-0995f6a466849f4c3
vpc_subnet_id: "{{ subnet_id }}"
assign_public_ip: yes
instance_tags:
FedoraGroup: copr