copr-be: add 'copr-resalloc-aws-new wrapper
This will be used for both starting new VMs, and creating snapshots.
This commit is contained in:
parent
cb64856a6c
commit
0fb047d8ad
2 changed files with 38 additions and 0 deletions
|
@ -102,6 +102,17 @@
|
|||
- provision_config
|
||||
- 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
|
||||
community.general.copr:
|
||||
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[@]}" "$@"
|
Loading…
Add table
Add a link
Reference in a new issue