Add an openstack image type
This is a qcow2 image with cloud-init in the template.
(cherry picked from commit 98f8b23129
)
Resolves: rhbz#1656105
This commit is contained in:
parent
5e64051665
commit
e1d2e168ed
@ -40,8 +40,8 @@ compose start http-server qcow2``. It will print a UUID that you can use to
|
||||
keep track of the build. You can also cancel the build if needed.
|
||||
|
||||
The available types of images is displayed by ``composer-cli compose types``.
|
||||
Currently this consists of: ami, ext4-filesystem, live-iso, partitioned-disk,
|
||||
qcow2, tar, vhd, vmdk
|
||||
Currently this consists of: ami, ext4-filesystem, live-iso, openstack,
|
||||
partitioned-disk, qcow2, tar, vhd, vmdk
|
||||
|
||||
Monitor the build status
|
||||
------------------------
|
||||
|
46
share/composer/openstack.ks
Normal file
46
share/composer/openstack.ks
Normal file
@ -0,0 +1,46 @@
|
||||
# Lorax Composer openstack output kickstart template
|
||||
|
||||
# Firewall configuration
|
||||
firewall --disabled
|
||||
|
||||
# NOTE: The root account is locked by default
|
||||
# Network information
|
||||
network --bootproto=dhcp --onboot=on --activate
|
||||
# System keyboard
|
||||
keyboard --xlayouts=us --vckeymap=us
|
||||
# System language
|
||||
lang en_US.UTF-8
|
||||
# SELinux configuration
|
||||
selinux --enforcing
|
||||
# Installation logging level
|
||||
logging --level=info
|
||||
# Shutdown after installation
|
||||
shutdown
|
||||
# System timezone
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 console=tty1 net.ifnames=0"
|
||||
|
||||
# Start sshd and cloud-init at boot time
|
||||
services --enabled=sshd,cloud-init,cloud-init-local,cloud-config,cloud-final
|
||||
|
||||
%post
|
||||
# Remove random-seed
|
||||
rm /var/lib/systemd/random-seed
|
||||
|
||||
# Clear /etc/machine-id
|
||||
rm /etc/machine-id
|
||||
touch /etc/machine-id
|
||||
%end
|
||||
|
||||
%packages
|
||||
kernel
|
||||
-dracut-config-rescue
|
||||
grub2
|
||||
|
||||
# Make sure virt guest agents are installed
|
||||
qemu-guest-agent
|
||||
spice-vdagent
|
||||
cloud-init
|
||||
|
||||
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
@ -610,6 +610,28 @@ def compose_args(compose_type):
|
||||
"app_template": None,
|
||||
"app_file": None,
|
||||
},
|
||||
"openstack": {"make_iso": False,
|
||||
"make_disk": True,
|
||||
"make_fsimage": False,
|
||||
"make_appliance": False,
|
||||
"make_ami": False,
|
||||
"make_tar": False,
|
||||
"make_pxe_live": False,
|
||||
"make_ostree_live": False,
|
||||
"make_oci": False,
|
||||
"make_vagrant": False,
|
||||
"ostree": False,
|
||||
"live_rootfs_keep_size": False,
|
||||
"live_rootfs_size": 0,
|
||||
"image_type": "qcow2",
|
||||
"qemu_args": [],
|
||||
"image_name": "disk.qcow2",
|
||||
"fs_label": "",
|
||||
"image_only": True,
|
||||
"app_name": None,
|
||||
"app_template": None,
|
||||
"app_file": None,
|
||||
},
|
||||
}
|
||||
return _MAP[compose_type]
|
||||
|
||||
|
@ -800,7 +800,7 @@ class ServerTestCase(unittest.TestCase):
|
||||
data = json.loads(resp.data)
|
||||
self.assertNotEqual(data, None)
|
||||
self.assertEqual(data["status"], False, "Failed to fail to start test compose: %s" % data)
|
||||
self.assertEqual(data["errors"], [{"id": BAD_COMPOSE_TYPE, "msg": "Invalid compose type (snakes), must be one of ['ami', 'ext4-filesystem', 'live-iso', 'partitioned-disk', 'qcow2', 'tar', 'vhd', 'vmdk']"}],
|
||||
self.assertEqual(data["errors"], [{"id": BAD_COMPOSE_TYPE, "msg": "Invalid compose type (snakes), must be one of ['ami', 'ext4-filesystem', 'live-iso', 'openstack', 'partitioned-disk', 'qcow2', 'tar', 'vhd', 'vmdk']"}],
|
||||
"Failed to get errors: %s" % data)
|
||||
|
||||
def test_compose_03_status_fail(self):
|
||||
|
Loading…
Reference in New Issue
Block a user