diff --git a/build.sh b/build.sh index 986c985..9062423 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,10 @@ #!/usr/bin/env bash +export DEBIAN_FRONTEND=noninteractive + # install ubuntu dependenices for image building apt update -apt install -y libvirt-daemon qemu-utils qemu wget +apt install -y libvirt-daemon qemu-utils qemu wget genisoimage wget https://raw.githubusercontent.com/alpinelinux/alpine-make-vm-image/master/alpine-make-vm-image -O alpine-make-vm-image chmod +x alpine-make-vm-image @@ -21,3 +23,7 @@ DISK_SIZE="20G" IMAGE_FORMAT="qcow2" bash alpine-make-vm-image -b ${ALPINE_BRANCH} -p "$( cat ${PACKAGES_FILE} | xargs) " -s ${DISK_SIZE} -f ${IMAGE_FORMAT} ${IMAGES_FILENAME} --script-chroot ${INIT_SCRIPT} + +cd seed +mkisofs -output ../alpine-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data +cd - diff --git a/seed/meta-data b/seed/meta-data new file mode 100644 index 0000000..77da86d --- /dev/null +++ b/seed/meta-data @@ -0,0 +1,2 @@ +instance-id: iid-local01 +local-hostname: cloudimg diff --git a/seed/user-data b/seed/user-data new file mode 100644 index 0000000..9d4107f --- /dev/null +++ b/seed/user-data @@ -0,0 +1,4 @@ +#cloud-config +password: passw0rd +chpasswd: { expire: False } +ssh_pwauth: True