copr-backend: helper for creating s390x machines

This commit is contained in:
Pavel Raiskup 2022-01-19 13:13:55 +01:00
parent c07049af0f
commit 5aea865ef9
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,33 @@
#! /bin/sh -x
# This script is used for building s390x qcow2 images in IBM Cloud,
# for IBM Cloud. For more info see:
# https://docs.pagure.org/copr.copr/how_to_upgrade_builders.html
# if failure — then at least ASAP
set -e
# request the s390x machine
ticket=$(resalloc ticket --tag arch_s390x)
# wait till the machine is avialable
IP=$(resalloc ticket-wait "$ticket")
ansible-playbook -i "$IP," /var/lib/resallocserver/provision/playbook-prepare-builder-to-create-images.yml
set +x
cat <<EOF
DONE.
Now you can start the work on the machine:
$ ssh root@$IP
!WARNING! !WARNING! !WARNING
Don't forget to drop the machine once you are done:
$ resalloc ticket-close $ticket
!WARNING! !WARNING! !WARNING
EOF

View file

@ -143,6 +143,14 @@
- provision_config
- provision_config_resalloc_aws
- name: shortcut for creating s390x images in cloud
copy:
src: copr-prepare-s390x-image-builder
dest: /usr/local/bin/copr-prepare-s390x-image-builder
mode: 755
tags:
- images_s390x
- name: f33 has outdated ansible community general plugins, use copr
community.general.copr:
state: enabled