copr-backend: helper for creating s390x machines
This commit is contained in:
parent
c07049af0f
commit
5aea865ef9
2 changed files with 41 additions and 0 deletions
33
roles/copr/backend/files/copr-prepare-s390x-image-builder
Normal file
33
roles/copr/backend/files/copr-prepare-s390x-image-builder
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue