diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bc50ccdb167d07c1e08c1bee53621a11bec35cb..56a3a5e673ce63398de2026c34ffb945a497c108 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,12 +2,13 @@ build: tags: [kvm] stage: build before_script: + - sudo apt update && sudo apt install -y rsync - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/".insteadOf "git@${CI_SERVER_HOST}:" - git -C .. clone git@${CI_SERVER_HOST}:entanglement.garden/vm-images/common.git script: - make image-host.qcow2 - qemu-img info image-host.qcow2 - - xz -vzT 0 image-host.qcow2 + - xz -zT 0 image-host.qcow2 - xz -l image-host.qcow2.xz - sha256sum image-host.* | tee SHA256SUMS - - rsync image-host.qcow2.xz SHA256SUMS rsync://172.18.100.75/images/image-host/ + - rsync image-host.qcow2.xz SHA256SUMS rsync://image-host.fruit-0.entanglement.garden/images/image-host/ diff --git a/Makefile b/Makefile index 1dad7f7a9a9637c7d632bc88e517048c7a53fd5a..b221ded45a890c7ddc21fcbe7d7424d2193607de 100755 --- a/Makefile +++ b/Makefile @@ -5,11 +5,12 @@ ssh_key.pub: ssh_key ssh_key: ssh-keygen -t ed25519 -f ssh_key -qN "" -http/user-data: ssh_key.pub +http/user-data: ../common/user-data-template.yaml ssh_key.pub sed "s#SSH_KEY#$(shell cat ssh_key.pub)#g" ../common/user-data-template.yaml > http/user-data image-host.qcow2: http/user-data files/ scripts/ image-host.json packer build -timestamp-ui -var-file ../common/vars.json image-host.json image-host.qcow2.xz: image-host.qcow2 - xz -zT 0 image-host.qcow2 + rm -f image-host.qcow2.xz || true + xz -zvT 0 image-host.qcow2 diff --git a/http/buster-preseed.cfg b/http/buster-preseed.cfg deleted file mode 100644 index c98015afcb07d32b819652ce467cd6575256734c..0000000000000000000000000000000000000000 --- a/http/buster-preseed.cfg +++ /dev/null @@ -1,43 +0,0 @@ -choose-mirror-bin mirror/http/proxy string -d-i netcfg/get_hostname string image-host -d-i apt-setup/use_mirror boolean true -d-i base-installer/kernel/override-image string linux-server -d-i clock-setup/utc boolean true -d-i clock-setup/utc-auto boolean true -d-i finish-install/reboot_in_progress note -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i grub-installer/bootdev string /dev/vda -d-i keymap select us -d-i mirror/country string manual -d-i mirror/http/directory string /debian -d-i mirror/http/hostname string http.debian.net -d-i mirror/http/proxy string -d-i partman-auto-lvm/guided_size string max -d-i partman-auto/choose_recipe select atomic -d-i partman-auto/method string lvm -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/confirm_write_new_label boolean true -d-i passwd/root-login boolean false -d-i passwd/root-password-again password vagrant -d-i passwd/root-password password vagrant -d-i passwd/make-user boolean false -d-i passwd/username string vagrant -d-i pkgsel/include string openssh-server -d-i pkgsel/install-language-support boolean false -d-i pkgsel/update-policy select unattended-upgrades -d-i pkgsel/upgrade select full-upgrade -d-i time/zone string UTC -d-i user-setup/allow-password-weak boolean true -d-i user-setup/encrypt-home boolean false -d-i preseed/late_command string sed -i '/^deb cdrom:/s/^/#/' /target/etc/apt/sources.list -apt-cdrom-setup apt-setup/cdrom/set-first boolean false -apt-mirror-setup apt-setup/use_mirror boolean true -popularity-contest popularity-contest/participate boolean false -tasksel tasksel/first multiselect standard, ubuntu-server diff --git a/http/meta-data b/http/meta-data index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a6307066d91238a0becbefcc8b9add48c5444177 100644 --- a/http/meta-data +++ b/http/meta-data @@ -0,0 +1,2 @@ +instance-id: image-host +local-hostname: image-host