diff --git a/inventory/inventory b/inventory/inventory index a0adf4bfcb..da2f1c09e0 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -1001,10 +1001,6 @@ copr_db_stg [copr_db_stg] copr-db-stg.aws.fedoraproject.org -# [copr_hypervisors_aarch64] -# virthost-aarch64-os01.fedorainfracloud.org -# virthost-aarch64-os02.fedorainfracloud.org - [debuginfod] debuginfod01.iad2.fedoraproject.org diff --git a/playbooks/groups/copr-aarch64-hypervisors.yml b/playbooks/groups/copr-aarch64-hypervisors.yml deleted file mode 100644 index 5e5e9272d1..0000000000 --- a/playbooks/groups/copr-aarch64-hypervisors.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: provision aarch64 box - hosts: copr_hypervisors_aarch64 - gather_facts: false - user: copr - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - /srv/private/ansible/vars.yml - - roles: - - copr_hypervisor_aarch64 diff --git a/roles/copr_hypervisor_aarch64/files/builder-repositories.repo b/roles/copr_hypervisor_aarch64/files/builder-repositories.repo deleted file mode 100644 index fe96ddafae..0000000000 --- a/roles/copr_hypervisor_aarch64/files/builder-repositories.repo +++ /dev/null @@ -1,24 +0,0 @@ -[infrastructure-tags] -name=Fedora Infrastructure tag $releasever - $basearch -baseurl=https://kojipkgs.fedoraproject.org/repos-dist/f$releasever-infra/latest/$basearch/ -enabled=1 -gpgcheck=1 -gpgkey=https://infrastructure.fedoraproject.org/repo/infra/RPM-GPG-KEY-INFRA-TAGS - -[infrastructure-tags-stg] -name=Fedora Infrastructure staging tag $releasever - $basearch -baseurl=https://kojipkgs.fedoraproject.org/repos-dist/f$releasever-infra-stg/latest/$basearch/ -enabled=0 -gpgcheck=1 -gpgkey=https://infrastructure.fedoraproject.org/repo/infra/RPM-GPG-KEY-INFRA-TAGS - -# [group_copr-copr] -# name=Copr repo for copr owned by @copr -# baseurl=https://copr-be.cloud.fedoraproject.org/results/@copr/copr/fedora-$releasever-x86_64/ -# type=rpm-md -# skip_if_unavailable=False -# gpgcheck=1 -# gpgkey=https://copr-be.cloud.fedoraproject.org/results/@copr/copr/pubkey.gpg -# repo_gpgcheck=0 -# enabled=0 -# enabled_metadata=1 diff --git a/roles/copr_hypervisor_aarch64/files/download b/roles/copr_hypervisor_aarch64/files/download deleted file mode 100755 index 15835adae0..0000000000 --- a/roles/copr_hypervisor_aarch64/files/download +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/sh - -set -e - -for name in \ - builder-repositories.repo \ - download \ - prepare-disk \ - promote-disk \ - upload-disk; \ -do - curl https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/roles/copr_hypervisor_aarch64/files/"$name" \ - > "$name" -done diff --git a/roles/copr_hypervisor_aarch64/files/prepare-disk b/roles/copr_hypervisor_aarch64/files/prepare-disk deleted file mode 100755 index 62d639c773..0000000000 --- a/roles/copr_hypervisor_aarch64/files/prepare-disk +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -x - -set -e - -sourcedir=$(dirname "$(readlink -f "$0")") - -src_img=$1 -dst_img=/tmp/newdisk.qcow2 - -cp "$src_img" "$dst_img" - -# We could be using 'virt-resize --expand /dev/sda2' instead, but we are -# running too old hypervisor to handle Fedora images: -# e2fsck: Get a newer version of e2fsck! - -guestfish -a "$dst_img" <&2 "$*" ; exit 1 ; } - -volume_promoted=$1 -volume=copr-builder - -# the only pool where we can work with qcow2 images (which is effective, -# compared to raw images) -pool=images - -new_volume=copr-builder-$(date +"%Y%m%d_%H%M%S") - -connections=' - qemu:///system - qemu+ssh://copr@virthost-aarch64-os02.fedorainfracloud.org/system -' - -test -n "$volume" || die "first argument (volume) required" - -for connection in $connections; do - virsh --connect="$connection" vol-delete "$volume" --pool "$pool" - virsh --connect="$connection" vol-clone "$volume_promoted" "$volume" --pool "$pool" -done - -echo "copr-builder == $volume_promoted now" diff --git a/roles/copr_hypervisor_aarch64/files/upload-disk b/roles/copr_hypervisor_aarch64/files/upload-disk deleted file mode 100755 index d82785c306..0000000000 --- a/roles/copr_hypervisor_aarch64/files/upload-disk +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh -x - -die() { echo >&2 "$*" ; exit 1 ; } -image=$1 - -# the only pool where we can work with qcow2 images (which is effective, -# compared to raw images) -pool=images - -new_volume=copr-builder-$(date +"%Y%m%d_%H%M%S") - -connections=' - qemu:///system - qemu+ssh://copr@virthost-aarch64-os02.fedorainfracloud.org/system -' - -export VIRSH_DEFAULT_CONNECT_URI= - -test -n "$image" || die "first argument (image) required" -test -f "$image" || die "image $image not found" - -for connection in $connections; do - virsh --connect="$connection" vol-create-as --pool "$pool" "$new_volume" 1M - virsh --connect="$connection" vol-upload --pool "$pool" "$new_volume" --sparse "$image" -done - -echo "uploaded images $new_volume" diff --git a/roles/copr_hypervisor_aarch64/tasks/main.yml b/roles/copr_hypervisor_aarch64/tasks/main.yml deleted file mode 100644 index a3d692c74d..0000000000 --- a/roles/copr_hypervisor_aarch64/tasks/main.yml +++ /dev/null @@ -1,49 +0,0 @@ -## Note that this is mostly for documentation purposes; nobody executed -## this playbook so far (all was setup manually, and I wouldn't probably -## have rights to do execute this) - -- name: assure that copr-be can ssh there as copr@... - authorized_key: user=copr key="{{ item }}" - with_file: - - "provision/files/buildsys.pub" - -# todo: generate it's own key -- name: make sure hostA can ssh to hostB - copy: - src: "{{ private }}/files/copr/buildsys.priv" - dest: /home/copr/.ssh/id_rsa - owner: copr - group: copr - mode: 0600 - -- name: "check that 'images' pool exists" - shell: virsh --connect=qemu:///system pool-list - register: images_pool_check - changed_when: - - images_pool_check.rc == 0 - - '" images " not in images_pool_check.stdout' - failed_when: - - images_pool_check.rc != 0 - -- name: "create 'images' pool" - shell: \ - virsh --connect=qemu:///system pool-define-as --name images --target /var/lib/libvirt/images --type dir --help - virsh --connect=qemu:///system pool-autostart images - virsh --connect=qemu:///system pool-start images - when: images_pool_check.changed - -- name: create directory image management - file: - path=/home/copr/vm-manage - owner=copr - group=copr - state=directory - -- name: copy the helper scripts - copy: - src={{ item }} - dest=/home/copr/vm-manage/{{ item }} - with_items: - - builder-repositories.repo - - prepare-disk - - upload-disk