openqa/server: create a cloud-init ISO

We're going to test Cloud images in openQA now autocloud is
retiring. We need a cloud-init ISO to be able to boot them.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-11-21 11:18:37 -08:00 committed by Pierre-Yves Chibon
parent cbfacfcf67
commit 29a666e2a3
3 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,2 @@
instance-id: iid-local01
local-hostname: openqa-cloud

View file

@ -0,0 +1,4 @@
#cloud-config
password: fedora
chpasswd: { expire: False }
ssh_pwauth: True

View file

@ -106,7 +106,7 @@
name: ['python3-libselinux', 'git', 'json_diff', 'libselinux-utils', 'python3-libsemanage',
'nfs-utils', 'perl(Class::DBI::Pg)', 'expect', 'libguestfs-tools-c', 'libguestfs-xfs',
'libvirt-daemon-config-network', 'libvirt-python3', 'python3-libguestfs',
'virt-install', 'withlock']
'virt-install', 'withlock', 'genisoimage']
state: present
tags:
- packages
@ -147,6 +147,7 @@
file: path={{ item }} state=directory owner=geekotest group=root mode=0755
with_items:
- /var/lib/openqa/share/factory/iso
- /var/lib/openqa/share/factory/iso/fixed
- /var/lib/openqa/share/factory/hdd
- /var/lib/openqa/share/factory/hdd/fixed
- /var/lib/openqa/share/factory/repo
@ -184,6 +185,18 @@
# when: "diskcheck.rc > 1"
# ignore_errors: yes
- name: Copy in meta-data for cloud-init ISO creation
copy: src=meta-data dest=/var/tmp/meta-data owner=root group=root mode=0644
- name: Copy in user-data for cloud-init ISO creation
copy: src=user-data dest=/var/tmp/user-data owner=root group=root mode=0644
- name: Create cloud-init ISO
command: genisoimage -output cloudinit.iso -volid cidata -joliet -rock /var/tmp/user-data /var/tmp/meta-data
args:
chdir: /var/lib/openqa/share/factory/iso/fixed
creates: /var/lib/openqa/share/factory/iso/fixed/cloudinit.iso
- name: Create exports file
template: src=exports.j2 dest=/etc/exports.d/openqa.exports owner=root group=root mode=0644
tags: