Improve performance, add additional ram, improve Ubuntu user-data (and fix 22.04)
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Tyler 2023-06-03 23:54:32 -04:00
parent 8b43210a26
commit 870c913711
5 changed files with 28 additions and 6 deletions

View File

@ -10,7 +10,7 @@ steps:
- name: ubuntu
commands:
- packer build ubuntu/ubuntu-20.04-amd64.json
- wget -O mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- wget -qO mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- ./mc mirror --overwrite builds/ STORAGE/$MC_BUCKET/ubuntu
- rm -f mc
environment:
@ -31,7 +31,7 @@ steps:
- name: ubuntu
commands:
- packer build ubuntu/ubuntu-22.04-amd64.json
- wget -O mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- wget -qO mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- ./mc mirror --overwrite builds/ STORAGE/$MC_BUCKET/ubuntu
- rm -f mc
environment:
@ -52,7 +52,7 @@ steps:
- name: debian
commands:
- packer build debian/debian-11-amd64.json
- wget -O mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- wget -qO mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- ./mc mirror --overwrite builds/ STORAGE/$MC_BUCKET/debian
- rm -f mc
environment:

View File

@ -36,6 +36,7 @@
"type": "qemu",
"vm_name": "{{ user `template` }}",
"qemuargs": [
[ "-cpu", "host" ],
[ "-m", "{{ user `memory` }}" ],
[ "-display", "{{ user `qemu_display` }}" ]
]
@ -81,7 +82,7 @@
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "eb3f96fd607e4b67e80f4fc15670feb7d9db5be50f4ca8d0bf07008cb025766b",
"iso_name": "debian-11.7.0-amd64-netinst.iso",
"memory": "1024",
"memory": "4096",
"mirror": "http://cdimage.debian.org/cdimage/release",
"mirror_directory": "11.7.0/amd64/iso-cd",
"name": "debian-11",

View File

@ -11,3 +11,21 @@ autoinstall:
ssh:
install-server: true
allow-pw: yes
late-commands:
- |
curtin in-target --target=/target -- /bin/bash -c ' \
sed -ie "s/^[#\s]*UseDNS.*$/UseDNS no/g" /etc/ssh/sshd_config; \
ssh-keygen -A; \
systemctl enable ssh.service; \
sed -ie "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=\"0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
update-grub; \
update-initramfs -c -k all; \
apt-get -y purge snapd; \
systemctl disable apt-daily.service; \
systemctl disable apt-daily.timer; \
systemctl disable apt-daily-upgrade.service; \
systemctl disable apt-daily-upgrade.timer; \
exit 0 \
'

View File

@ -35,6 +35,7 @@
"vm_name": "{{ user `template` }}",
"vnc_bind_address": "{{ user `vnc_bind_address` }}",
"qemuargs": [
[ "-cpu", "host" ],
[ "-m", "{{ user `memory` }}" ],
[ "-display", "{{ user `qemu_display` }}" ]
]
@ -78,7 +79,7 @@
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b",
"iso_name": "ubuntu-20.04.6-live-server-amd64.iso",
"memory": "2048",
"memory": "4096",
"mirror": "http://releases.ubuntu.com",
"mirror_directory": "focal",
"name": "ubuntu-20.04-amd64",

View File

@ -34,12 +34,14 @@
"shutdown_command": "echo 'ubuntu' | sudo -S shutdown -P now",
"ssh_password": "ubuntu",
"ssh_port": 22,
"ssh_read_write_timeout": "600s",
"ssh_timeout": "10000s",
"ssh_username": "ubuntu",
"type": "qemu",
"vm_name": "{{ user `template` }}",
"vnc_bind_address": "{{ user `vnc_bind_address` }}",
"qemuargs": [
[ "-cpu", "host" ],
[ "-m", "{{ user `memory` }}" ],
[ "-display", "{{ user `qemu_display` }}" ]
]
@ -83,7 +85,7 @@
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931",
"iso_name": "ubuntu-22.04.2-live-server-amd64.iso",
"memory": "2048",
"memory": "4096",
"mirror": "http://releases.ubuntu.com",
"mirror_directory": "22.04.2",
"name": "ubuntu-22.04-amd64",