Commit 280a4dfc authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

packer: add debian 12 image for vm bootstrap

parent 5dfe2a60
Pipeline #32834 passed with stage
in 0 seconds
{
"builders": [
{
"accelerator": "kvm",
"boot_command": [
"<esc><wait><wait><wait><wait>",
"auto preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian12.cfg ",
"debian-installer=en_US.UTF-8 locale=en_US keymap=fr ",
"netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ",
"fb=false debconf/frontend=noninteractive ",
"passwd/user-fullname={{user `user`}} ",
"passwd/user-password={{user `password`}} ",
"passwd/user-password-again={{user `password`}} ",
"passwd/username={{user `user`}} ",
"<enter>"
],
"boot_wait": "5s",
"disk_size": "{{ user `disk_size`}}000",
"format": "qcow2",
"headless": true,
"http_directory": "http",
"iso_checksum": "sha256:013f5b44670d81280b5b1bc02455842b250df2f0c6763398feb69af1a805a14f",
"iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso",
"name": "debian12-vm-bootstrap-{{ user `disk_size`}}G-{{ user `name`}}",
"shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now",
"ssh_password": "{{user `password`}}",
"ssh_timeout": "3600s",
"ssh_username": "{{user `user`}}",
"type": "qemu"
}
],
"provisioners": [
{
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"scripts/update.sh",
"scripts/packages.sh",
"scripts/network-debian.sh",
"scripts/cleanup.sh",
"scripts/vm-bootstrap.sh"
],
"type": "shell"
}
],
"variables": {
"disk_size": "100",
"domain": "",
"name": "image",
"password": "slapos",
"user": "slapos"
}
}
preseed-debian11.cfg
\ No newline at end of file
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