Unverified Commit 71bf23e7 authored by Neil Hanlon's avatar Neil Hanlon
Browse files

generic cloud building

parent ee3e5a9c
......@@ -22,3 +22,12 @@ Build names should follow the scheme "RockyLinux-<version>-<type>-<architecture>
### Post creation conversion
Some clouds and image types have requirements on their image. These should all be run as post processors inside Packer
## Requirements
* python3.7+
* mkosi
* git
* systemd-container
* @virt (qemu-img, others)
* dosfstools
* grub2-pc-modules
#!/bin/bash
version=${VERSION:-"8.6"}
mirror=${MIRROR:-http://192.168.20.160}
version=${VERSION:-"8"}
mirror=${MIRROR:-https://dl.rockylinux.org/stg}
type="${TYPE:-Base}"
arch="${ARCH:-$(uname -m)}"
output_type=gpt_xfs
output_file="Rocky-${version}-GenericCloud.raw"
output_file="Rocky-${version}-GenericCloud-${arch}.qcow2"
#requirements: dosfsutils, grub2-pc-modules, qemu-shit
packages='NetworkManager,chrony,cloud-init,cloud-utils-growpart,coreutils,dhcp-client,dnf,dnf-utils,openssh-server,openssh-clients,python3-jsonschema,qemu-guest-agent,rng-tools,cockpit-system,cockpit-ws,dracut-config-generic,dracut-norescue,firewalld,gdisk,grub2,kernel,nfs-utils,rocky-release,rocky-repos,rootfiles,rsync,systemd,tar,yum,yum-utils'
# Bootable (?)
#--qcow2 --boot-protocols=uefi,bios \
#--without-unified-kernel-images \
sudo mkosi -d rocky -r ${version} -m ${mirror} -t ${output_type} -o ${output_file} \
--architecture $arch \
--bootable \
--base-packages=1 \
--base-packages 0 \
--package "${packages}" \
--password=rocky \
-p NetworkManager \
-p chrony \
-p cloud-init \
-p cloud-utils-growpart \
-p coreutils \
-p dhcp-client \
-p dnf \
-p dnf-utils \
-p openssh-server \
-p openssh-clients \
-p python3-jsonschema \
-p qemu-guest-agent \
-p rng-tools \
-p cockpit-system \
-p cockpit-ws \
-p dracut-config-generic \
-p dracut-norescue \
-p firewalld \
-p gdisk \
-p grub2 \
-p kernel \
-p nfs-utils \
-p rocky-release \
-p rocky-repos \
-p rootfiles \
-p rsync \
-p systemd \
-p tar \
-p yum \
-p yum-utils \
--postinst-script=$(dirname $0)/genclo/common.sh \
--qcow2 --boot-protocols=uefi,bios \
--without-unified-kernel-images \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment