copr-backend: use copr-resalloc-aws-new wrapper
We use this to create the AWS images, so why not to use this to start
the VMs.
This reverts commit 8f87caf6bb
.
This commit is contained in:
parent
9fbf8c1b7c
commit
093a651fa2
3 changed files with 40 additions and 38 deletions
|
@ -124,6 +124,17 @@
|
||||||
- provision_config
|
- provision_config
|
||||||
- provision_config_resalloc_aws
|
- provision_config_resalloc_aws
|
||||||
|
|
||||||
|
- name: shortcuts around resalloc-aws-start
|
||||||
|
template: src="{{ roles_path }}/copr/backend/templates/provision/copr-resalloc-aws-new.j2"
|
||||||
|
dest="/usr/local/bin/copr-resalloc-aws-new-{{ item }}"
|
||||||
|
mode=0755
|
||||||
|
with_items:
|
||||||
|
- aarch64
|
||||||
|
- x86_64
|
||||||
|
tags:
|
||||||
|
- provision_config
|
||||||
|
- provision_config_resalloc_aws
|
||||||
|
|
||||||
- name: f33 has outdated ansible community general plugins, use copr
|
- name: f33 has outdated ansible community general plugins, use copr
|
||||||
community.general.copr:
|
community.general.copr:
|
||||||
state: enabled
|
state: enabled
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
cmd=(
|
||||||
|
/usr/bin/resalloc-aws-new
|
||||||
|
--aws-profile default
|
||||||
|
--ami {{ copr_builder_images.aws[item] }}
|
||||||
|
--ssh-key-name copr-builder
|
||||||
|
--security-group-id sg-0c3efdb681ced5d4f
|
||||||
|
--debug
|
||||||
|
{% for subnet in aws_arch_subnets[item] %}
|
||||||
|
--possible-subnet {{ subnet }}
|
||||||
|
{% endfor %}
|
||||||
|
{% if item == 'x86_64' %}
|
||||||
|
--instance-type i3.large
|
||||||
|
{% else %}
|
||||||
|
--instance-type a1.xlarge
|
||||||
|
{% endif %}
|
||||||
|
--tag FedoraGroup=copr
|
||||||
|
--tag CoprPurpose=builder
|
||||||
|
--tag CoprInstance={% if devel %}devel{% else %}production{% endif %}
|
||||||
|
--tag arch={{ item }}
|
||||||
|
--playbook /var/lib/resallocserver/provision/builderpb-aws.yml
|
||||||
|
)
|
||||||
|
|
||||||
|
set -x
|
||||||
|
# execute the command + additional arguments
|
||||||
|
exec "${cmd[@]}" "$@"
|
|
@ -24,25 +24,7 @@ aws_x86_64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% else
|
||||||
- arch_s390x_emulated
|
- arch_s390x_emulated
|
||||||
- arch_noarch
|
- arch_noarch
|
||||||
- aws
|
- aws
|
||||||
cmd_new: >
|
cmd_new: copr-resalloc-aws-new-x86_64{% if spot %} --spot-price 0.156{% endif %}
|
||||||
/usr/bin/resalloc-aws-new
|
|
||||||
{% if spot %}
|
|
||||||
--spot-price 0.156
|
|
||||||
{% endif %}
|
|
||||||
--aws-profile default
|
|
||||||
--ami {{ copr_builder_images.aws["x86_64"] }}
|
|
||||||
--ssh-key-name copr-builder
|
|
||||||
--security-group-id sg-0c3efdb681ced5d4f
|
|
||||||
--debug
|
|
||||||
{% for subnet in aws_arch_subnets["x86_64"] %}
|
|
||||||
--possible-subnet {{ subnet }}
|
|
||||||
{% endfor %}
|
|
||||||
--instance-type i3.large
|
|
||||||
--tag FedoraGroup=copr
|
|
||||||
--tag CoprPurpose=builder
|
|
||||||
--tag CoprInstance={% if devel %}devel{% else %}production{% endif %}
|
|
||||||
--tag arch=x86_64
|
|
||||||
--playbook /var/lib/resallocserver/provision/builderpb-aws.yml
|
|
||||||
cmd_delete: /usr/bin/resalloc-aws-delete --aws-profile default
|
cmd_delete: /usr/bin/resalloc-aws-delete --aws-profile default
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
|
@ -62,25 +44,7 @@ aws_aarch64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% els
|
||||||
- arch_aarch64
|
- arch_aarch64
|
||||||
- arch_aarch64_native
|
- arch_aarch64_native
|
||||||
- aws
|
- aws
|
||||||
cmd_new: >
|
cmd_new: copr-resalloc-aws-new-aarch64{% if spot %} --spot-price 0.102{% endif %}
|
||||||
/usr/bin/resalloc-aws-new
|
|
||||||
{% if spot %}
|
|
||||||
--spot-price 0.102
|
|
||||||
{% endif %}
|
|
||||||
--aws-profile default
|
|
||||||
--ami {{ copr_builder_images.aws["aarch64"] }}
|
|
||||||
--ssh-key-name copr-builder
|
|
||||||
--security-group-id sg-0c3efdb681ced5d4f
|
|
||||||
--debug
|
|
||||||
{% for subnet in aws_arch_subnets["aarch64"] %}
|
|
||||||
--possible-subnet {{ subnet }}
|
|
||||||
{% endfor %}
|
|
||||||
--instance-type a1.xlarge
|
|
||||||
--tag FedoraGroup=copr
|
|
||||||
--tag CoprPurpose=builder
|
|
||||||
--tag CoprInstance={% if devel %}devel{% else %}production{% endif %}
|
|
||||||
--tag arch=aarch64
|
|
||||||
--playbook /var/lib/resallocserver/provision/builderpb-aws.yml
|
|
||||||
cmd_delete: /usr/bin/resalloc-aws-delete --aws-profile default
|
cmd_delete: /usr/bin/resalloc-aws-delete --aws-profile default
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue