Compare commits
51 Commits
05d6ec78c3
...
main
Author | SHA1 | Date | |
---|---|---|---|
1e9c3f461d | |||
87b7a3b8ab | |||
b7318e1549 | |||
46a8616ba4 | |||
2fcb082ccd | |||
c490db3cb0 | |||
e214d7b092 | |||
97209dee64 | |||
8167cb6554 | |||
fee73891e8 | |||
6e08664e14 | |||
caab68a92d | |||
ea20c5848c | |||
75ab6d02da | |||
2cf2f865e6 | |||
e94b05112b | |||
d2ac6c777d | |||
55cfdb03bf | |||
6588979f8a | |||
5013fa83cc | |||
18e0214a21 | |||
5a27129508 | |||
3b10d7ee0f | |||
2a1d0b520f | |||
d8fea80ded | |||
060c35058d | |||
e342cea6ef | |||
1a47889679 | |||
de5e7d31fd | |||
ae110e4fda | |||
f438cb7c92 | |||
4e00aa8ba7 | |||
a051724f38 | |||
cb410f3dc5 | |||
86b8e70740 | |||
082d12f3b7 | |||
0ff1cd0b1b | |||
ca7969baf3 | |||
1b3a73bf20 | |||
3210d922bf | |||
770a3291b8 | |||
2d64028486 | |||
b682663c56 | |||
5883f10ecf | |||
700bb4dfbd | |||
ec7d42a75a | |||
8fa506613b | |||
ef329da040 | |||
7dae517aad | |||
1356bd920a | |||
a7d72db1b5 |
72
Almalinux/almalinux-9.pkr.hcl
Normal file
72
Almalinux/almalinux-9.pkr.hcl
Normal file
@ -0,0 +1,72 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "almalinux-9" {
|
||||
template_name = "almalinux-9"
|
||||
template_description = "Almalinux 9.5, generated on ${timestamp()}"
|
||||
vm_id = "204"
|
||||
boot_wait = "10s"
|
||||
boot_key_interval = "200ms"
|
||||
boot_command = ["<tab><wait1s>", " inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/almalinux-9-server.ks<enter><wait5m>"]
|
||||
|
||||
http_directory = "http"
|
||||
http_port_max = "8089"
|
||||
http_port_min = "8080"
|
||||
|
||||
os = "l26"
|
||||
cores = "2"
|
||||
sockets = "1"
|
||||
cpu_type = "host"
|
||||
memory = "2048"
|
||||
scsi_controller = "virtio-scsi-single"
|
||||
disks {
|
||||
disk_size = "30G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
format = "qcow2"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "kamino"
|
||||
pool = "Templates"
|
||||
|
||||
boot_iso {
|
||||
type = "scsi"
|
||||
iso_url = "https://repo.almalinux.org/almalinux/9.5/isos/x86_64/AlmaLinux-9.5-x86_64-boot.iso"
|
||||
iso_checksum = "sha256:3038fb71a29d33c3c93117bd8f4c3f612cb152dce057c666b6b11dfa793fb65c"
|
||||
iso_download_pve = true
|
||||
iso_storage_pool = "iso"
|
||||
unmount = true
|
||||
}
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.almalinux-9"]
|
||||
|
||||
provisioner "shell" {
|
||||
script = "scripts/rhel-install.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "scripts/initial-setup.sh"
|
||||
destination = "/home/xadmin/initial-setup.sh"
|
||||
}
|
||||
}
|
72
Debian/debian-12.pkr.hcl
Normal file
72
Debian/debian-12.pkr.hcl
Normal file
@ -0,0 +1,72 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "debian-12" {
|
||||
template_name = "debian-12"
|
||||
template_description = "Debian 12.9, generated on ${timestamp()}"
|
||||
vm_id = "203"
|
||||
boot_wait = "10s"
|
||||
boot_key_interval = "200ms"
|
||||
boot_command = ["<esc><wait1s>", "auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian.cfg", "<enter><wait>"]
|
||||
|
||||
http_directory = "http"
|
||||
http_port_max = "8089"
|
||||
http_port_min = "8080"
|
||||
|
||||
os = "l26"
|
||||
cores = "2"
|
||||
sockets = "1"
|
||||
cpu_type = "host"
|
||||
memory = "2048"
|
||||
scsi_controller = "virtio-scsi-single"
|
||||
disks {
|
||||
disk_size = "30G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
format = "qcow2"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "kamino"
|
||||
pool = "Templates"
|
||||
|
||||
boot_iso {
|
||||
type = "scsi"
|
||||
iso_url = "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso"
|
||||
iso_checksum = "sha256:1257373c706d8c07e6917942736a865dfff557d21d76ea3040bb1039eb72a054"
|
||||
iso_download_pve = true
|
||||
iso_storage_pool = "iso"
|
||||
unmount = true
|
||||
}
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.debian-12"]
|
||||
|
||||
provisioner "shell" {
|
||||
script = "scripts/debian-install.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "scripts/initial-setup.sh"
|
||||
destination = "/home/xadmin/initial-setup.sh"
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "freebsd-14" {
|
||||
template_name = "freebsd-14"
|
||||
template_description = "FreeBSD 14.0, generated on ${timestamp()}"
|
||||
# shutdown_command = "echo 'packer' | sudo -S poweroff"
|
||||
disks {
|
||||
disk_size = "10G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "geonosis"
|
||||
|
||||
iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso"
|
||||
iso_checksum = "sha256:71db8160a2339634bd9fbabbf10dd868148ebc9e1b08c1d8c4e5b954d30941ec"
|
||||
iso_storage_pool = "iso"
|
||||
unmount_iso = true
|
||||
iso_download_pve = true
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.freebsd-14"]
|
||||
}
|
68
FreeBSD/freebsd-14.pkr.hcl
Normal file
68
FreeBSD/freebsd-14.pkr.hcl
Normal file
@ -0,0 +1,68 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "freebsd-14" {
|
||||
template_name = "freebsd-14"
|
||||
template_description = "FreeBSD 14.2, generated on ${timestamp()}"
|
||||
vm_id = "202"
|
||||
boot_wait = "10s"
|
||||
boot_key_interval = "200ms"
|
||||
boot_command = ["<enter>", "<wait15s>", "<enter><wait1s>", "<enter><wait1s>", "freebsd", "<enter><wait1s>", "<enter><wait1s>", "<enter><wait1s>", "<enter><wait1s>", "<enter><wait1s>", "<enter><wait5s>", "<right><enter><wait1s>", "<enter><wait1s>", "<enter><wait4s>", "<enter><wait1s>", "<enter><wait1s>", " <enter><wait1s>", "<left><enter><wait1s>", "<enter><wait100s>", "packer<enter><wait1s>", "packer<enter><wait1s>", "<down><down><enter><wait1s>", "95<up><enter><wait1s>", "<enter><wait1s>", "<enter><wait1s>", "<enter><wait1s>", "<enter><wait1s>", "<down><down><down> <enter><wait1s>", "<down><down><down><down><down><down><down><down> <enter><wait1s>", "<enter><wait2s>", "<enter><wait1s>", "xadmin<enter>", "Remote admin user<enter>", "<enter>", "<enter>", "wheel<enter>", "<enter>", "<enter>", "<enter>", "<enter>", "<enter>", "<enter>", "<enter>", "<enter>", "packer<enter>", "packer<enter>", "<enter>", "<enter>", "<enter><wait1s>", "<enter><wait1s>", "<left><enter><wait1s>", "pkg install -y qemu-guest-agent sudo<enter><wait30s>", "echo 'xadmin ALL=(ALL:ALL) NOPASSWD:ALL' > /usr/local/etc/sudoers.d/xadmin<enter><wait1s>", "sysrc qemu_guest_agent_enable=YES<enter><wait1s>", "exit<enter><wait1s>", "<enter>"]
|
||||
|
||||
os = "other"
|
||||
cores = "2"
|
||||
sockets = "1"
|
||||
cpu_type = "host"
|
||||
memory = "2048"
|
||||
scsi_controller = "virtio-scsi-single"
|
||||
disks {
|
||||
disk_size = "30G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
format = "qcow2"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "kamino"
|
||||
pool = "Templates"
|
||||
|
||||
boot_iso {
|
||||
type = "scsi"
|
||||
iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.2/FreeBSD-14.2-RELEASE-amd64-bootonly.iso"
|
||||
iso_checksum = "sha256:d063e48b81b99005c8097e60377c23fb07e4116c5f0c0b41a5dc368fc4df6bf9"
|
||||
iso_download_pve = true
|
||||
iso_storage_pool = "iso"
|
||||
unmount = true
|
||||
}
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.freebsd-14"]
|
||||
|
||||
provisioner "shell" {
|
||||
script = "scripts/freebsd-install.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "scripts/initial-setup.sh"
|
||||
destination = "/home/xadmin/initial-setup.sh"
|
||||
}
|
||||
}
|
72
Rocky/rocky-9.pkr.hcl
Normal file
72
Rocky/rocky-9.pkr.hcl
Normal file
@ -0,0 +1,72 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "rocky-9" {
|
||||
template_name = "rocky-9"
|
||||
template_description = "Rocky Linux 9.5, generated on ${timestamp()}"
|
||||
vm_id = "201"
|
||||
boot_wait = "10s"
|
||||
boot_key_interval = "200ms"
|
||||
boot_command = ["<tab><wait1s>", " inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/rocky-9-server.ks<enter><wait5m>"]
|
||||
|
||||
http_directory = "http"
|
||||
http_port_max = "8089"
|
||||
http_port_min = "8080"
|
||||
|
||||
os = "l26"
|
||||
cores = "2"
|
||||
sockets = "1"
|
||||
cpu_type = "host"
|
||||
memory = "2048"
|
||||
scsi_controller = "virtio-scsi-single"
|
||||
disks {
|
||||
disk_size = "30G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
format = "qcow2"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "kamino"
|
||||
pool = "Templates"
|
||||
|
||||
boot_iso {
|
||||
type = "scsi"
|
||||
iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.5-x86_64-boot.iso"
|
||||
iso_checksum = "sha256:628c069c9685477360640a6b58dc919692a11c44b49a50a024b5627ce3c27d5f"
|
||||
iso_download_pve = true
|
||||
iso_storage_pool = "iso"
|
||||
unmount = true
|
||||
}
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.rocky-9"]
|
||||
|
||||
provisioner "shell" {
|
||||
script = "scripts/rhel-install.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "scripts/initial-setup.sh"
|
||||
destination = "/home/xadmin/initial-setup.sh"
|
||||
}
|
||||
}
|
86
Ubuntu/ubuntu-22.pkr.hcl
Normal file
86
Ubuntu/ubuntu-22.pkr.hcl
Normal file
@ -0,0 +1,86 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "ubuntu-22" {
|
||||
template_name = "ubuntu-22"
|
||||
template_description = "Ubuntu 22.04, generated on ${timestamp()}"
|
||||
vm_id = "205"
|
||||
boot_wait = "10s"
|
||||
boot_key_interval = "200ms"
|
||||
boot_command = [
|
||||
# Edit boot options
|
||||
"e<wait>",
|
||||
|
||||
# Go to the end of the boot command
|
||||
"<down><down><down><down><left> <wait>",
|
||||
|
||||
# Add kernel command-line to start autoinstall
|
||||
"autoinstall ",
|
||||
"ds=\"nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/\"",
|
||||
"<leftCtrlOn>x<leftCtrlOff><wait>"
|
||||
]
|
||||
|
||||
http_directory = "http"
|
||||
http_port_max = "8089"
|
||||
http_port_min = "8080"
|
||||
|
||||
os = "l26"
|
||||
cores = "2"
|
||||
sockets = "1"
|
||||
cpu_type = "host"
|
||||
memory = "2048"
|
||||
scsi_controller = "virtio-scsi-single"
|
||||
disks {
|
||||
disk_size = "30G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
format = "qcow2"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "kamino"
|
||||
pool = "Templates"
|
||||
|
||||
boot_iso {
|
||||
type = "scsi"
|
||||
iso_url = "https://releases.ubuntu.com/22.04.5/ubuntu-22.04.5-live-server-amd64.iso"
|
||||
iso_checksum = "sha256:9bc6028870aef3f74f4e16b900008179e78b130e6b0b9a140635434a46aa98b0"
|
||||
iso_download_pve = true
|
||||
iso_storage_pool = "iso"
|
||||
unmount = true
|
||||
}
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.ubuntu-22"]
|
||||
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"scripts/debian-install.sh",
|
||||
"scripts/remove-snap.sh"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "scripts/initial-setup.sh"
|
||||
destination = "/home/xadmin/initial-setup.sh"
|
||||
}
|
||||
}
|
86
Ubuntu/ubuntu-24.pkr.hcl
Normal file
86
Ubuntu/ubuntu-24.pkr.hcl
Normal file
@ -0,0 +1,86 @@
|
||||
variable "proxmox_apiuser" {
|
||||
type = string
|
||||
default = "packer"
|
||||
}
|
||||
|
||||
variable "proxmox_apitoken" {
|
||||
type = string
|
||||
default = "changeme"
|
||||
}
|
||||
|
||||
source "proxmox-iso" "ubuntu-24" {
|
||||
template_name = "ubuntu-24"
|
||||
template_description = "Ubuntu 24.04, generated on ${timestamp()}"
|
||||
vm_id = "206"
|
||||
boot_wait = "10s"
|
||||
boot_key_interval = "200ms"
|
||||
boot_command = [
|
||||
# Edit boot options
|
||||
"e<wait>",
|
||||
|
||||
# Go to the end of the boot command
|
||||
"<down><down><down><down><left> <wait>",
|
||||
|
||||
# Add kernel command-line to start autoinstall
|
||||
"autoinstall ",
|
||||
"ds=\"nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/\"",
|
||||
"<leftCtrlOn>x<leftCtrlOff><wait>"
|
||||
]
|
||||
|
||||
http_directory = "http"
|
||||
http_port_max = "8089"
|
||||
http_port_min = "8080"
|
||||
|
||||
os = "l26"
|
||||
cores = "2"
|
||||
sockets = "1"
|
||||
cpu_type = "host"
|
||||
memory = "2048"
|
||||
scsi_controller = "virtio-scsi-single"
|
||||
disks {
|
||||
disk_size = "30G"
|
||||
storage_pool = "templates"
|
||||
type = "scsi"
|
||||
format = "qcow2"
|
||||
}
|
||||
network_adapters {
|
||||
bridge = "vmbr0"
|
||||
model = "virtio"
|
||||
}
|
||||
|
||||
proxmox_url = "https://kamino.int.metaunix.net:8006/api2/json/"
|
||||
insecure_skip_tls_verify = true
|
||||
username = "${var.proxmox_apiuser}"
|
||||
password = "${var.proxmox_apitoken}"
|
||||
node = "kamino"
|
||||
pool = "Templates"
|
||||
|
||||
boot_iso {
|
||||
type = "scsi"
|
||||
iso_url = "https://releases.ubuntu.com/24.04.1/ubuntu-24.04.1-live-server-amd64.iso"
|
||||
iso_checksum = "sha256:e240e4b801f7bb68c20d1356b60968ad0c33a41d00d828e74ceb3364a0317be9"
|
||||
iso_download_pve = true
|
||||
iso_storage_pool = "iso"
|
||||
unmount = true
|
||||
}
|
||||
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "packer"
|
||||
ssh_timeout = "20m"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.proxmox-iso.ubuntu-24"]
|
||||
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"scripts/debian-install.sh",
|
||||
"scripts/remove-snap.sh"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "scripts/initial-setup.sh"
|
||||
destination = "/home/xadmin/initial-setup.sh"
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
qemu = {
|
||||
version = ">= 1.0.10"
|
||||
source = "github.com/hashicorp/qemu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
source "qemu" "almalinux-9" {
|
||||
iso_url = "https://repo.almalinux.org/almalinux/9.3/isos/x86_64/AlmaLinux-9.3-x86_64-boot.iso"
|
||||
iso_checksum = "sha256:af5377a1d16bbe599ea91a8761ad645f2f54687075802bdc0c0703ee610182e9"
|
||||
output_directory = "/srv/kvm/"
|
||||
shutdown_command = "echo 'packer' | sudo -S poweroff"
|
||||
disk_size = "5000M"
|
||||
format = "qcow2"
|
||||
accelerator = "kvm"
|
||||
ssh_host = "kamino.int.metaunix.net"
|
||||
ssh_username = "xadmin"
|
||||
ssh_password = "s0m3password"
|
||||
ssh_timeout = "20m"
|
||||
vm_name = "almalinux-9"
|
||||
net_device = "virtio-net"
|
||||
disk_interface = "virtio"
|
||||
boot_wait = "10s"
|
||||
boot_command = ["<tab> text inst.ks=http://ks-v1.int.metaunix.net/kickstarts/almalinux-9-server.ks<enter><wait>"]
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.qemu.almalinux-9"]
|
||||
}
|
61
http/almalinux-9-server.ks
Normal file
61
http/almalinux-9-server.ks
Normal file
@ -0,0 +1,61 @@
|
||||
url --url="https://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/"
|
||||
|
||||
# Keyboard layouts
|
||||
keyboard --vckeymap=us --xlayouts='us'
|
||||
# System language
|
||||
lang en_US.UTF-8
|
||||
|
||||
# System timezone
|
||||
timezone America/New_York --isUtc
|
||||
|
||||
# Crypted root password
|
||||
rootpw --iscrypted $6$kkuIkd8S9gDUhK8g$1XbqJDCjt1zQAhxb9sC2mE5CGd.D0xV1efu0R8h1e.oovRKtEWqR5KaTDPSTztpxSw2qmDVORZJGnNpiJxUFT1
|
||||
# MD5 password hashing
|
||||
authselect --useshadow --passalgo=sha512
|
||||
# Create my initial user :D
|
||||
#user --disabled
|
||||
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
|
||||
|
||||
network --device=eth0 --bootproto=dhcp --ipv6=auto --activate
|
||||
|
||||
# Run the Setup Agent on first boot
|
||||
firstboot --disable
|
||||
# SELinux configuration
|
||||
selinux --disabled
|
||||
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
# Disk partitioning information
|
||||
part /boot --fstype=ext3 --size=1000
|
||||
part swap --fstype="swap" --recommended
|
||||
part / --fstype=xfs --size=1 --grow
|
||||
|
||||
# Reboot after installation
|
||||
reboot --eject
|
||||
|
||||
%packages
|
||||
@base
|
||||
@core
|
||||
bash
|
||||
nfs-utils
|
||||
sudo
|
||||
|
||||
%end
|
||||
|
||||
%post
|
||||
# Update the system
|
||||
yum -y update
|
||||
# Istall the EPEL repository
|
||||
dnf -y install epel-release
|
||||
|
||||
dnf -y install wget vim yum-plugin-versionlock qemu-guest-agent
|
||||
|
||||
echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/xadmin
|
||||
|
||||
systemctl enable qemu-guest-agent
|
||||
|
||||
%end
|
163
http/debian.cfg
Normal file
163
http/debian.cfg
Normal file
@ -0,0 +1,163 @@
|
||||
#### Contents of the preconfiguration file (for wheezy)
|
||||
# Preseeding only locale sets language, country and locale.
|
||||
d-i debian-installer/locale string en_US
|
||||
|
||||
# Keyboard selection.
|
||||
d-i keymap select us
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
d-i console-keymaps-at/keymap select us
|
||||
|
||||
### Network configuration
|
||||
# netcfg will choose an interface that has link if possible. This makes it
|
||||
# skip displaying a list if there is more than one interface.
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# If you want the preconfiguration file to work on systems both with and
|
||||
# without a dhcp server, uncomment these lines and the static network
|
||||
# configuration below.
|
||||
#d-i netcfg/dhcp_failed note
|
||||
#d-i netcfg/dhcp_options select Configure network manually
|
||||
|
||||
# Any hostname and domain names assigned from dhcp take precedence over values set here.
|
||||
d-i netcfg/get_hostname string unassigned-hostname
|
||||
d-i netcfg/get_domain string unassigned-domain
|
||||
|
||||
# Force a hostname
|
||||
#d-i netcfg/hostname string somehost
|
||||
|
||||
# Disable that annoying WEP key dialog.
|
||||
d-i netcfg/wireless_wep string
|
||||
|
||||
# If non-free firmware is needed for the network or other hardware, this will try to load it
|
||||
d-i hw-detect/load_firmware boolean true
|
||||
|
||||
### Mirror settings
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/http/hostname string http.us.debian.org
|
||||
d-i mirror/http/directory string /debian
|
||||
d-i mirror/http/proxy string
|
||||
|
||||
### Account setup
|
||||
# Root password,
|
||||
d-i passwd/root-password-crypted password $6$CPlWX.5WLxqmNT2$VSJcR9FIZq4Efq32hMHmsB.qN7mbvDxxi3MueUjGVeSKp.t9EgYz5qFNWYpWKyvA66erkhJcHrqN3p/kgm/Y./
|
||||
|
||||
# To create a normal user account.
|
||||
d-i passwd/user-fullname string Remote admin user
|
||||
d-i passwd/username string xadmin
|
||||
d-i passwd/user-password-crypted password $6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
|
||||
d-i passwd/user-uid string 1000
|
||||
|
||||
### Clock and time zone setup
|
||||
# Controls whether or not the hardware clock is set to UTC.
|
||||
d-i clock-setup/utc boolean false
|
||||
|
||||
# You may set this to any valid setting for $TZ; see the contents of /usr/share/zoneinfo/ for valid values.
|
||||
d-i time/zone string America/New_York
|
||||
|
||||
# Controls whether to use NTP to set the clock during the install
|
||||
d-i clock-setup/ntp boolean true
|
||||
# NTP server to use. The default is almost always fine here.
|
||||
d-i clock-setup/ntp-server string ntp.example.com
|
||||
|
||||
### Partitioning
|
||||
#d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto/method string regular
|
||||
d-i partman-lvm/purge_lvm_from_device boolean true
|
||||
d-i partman-md/device_remove_lvm boolean true
|
||||
d-i partman-md/device_remove_md boolean true
|
||||
d-i partman-lvm/confirm boolean true
|
||||
|
||||
# atomic: all files in one partition
|
||||
# home: separate /home partition
|
||||
# multi: separate /home, /usr, /var, and /tmp partitions
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
|
||||
#d-i partman-auto/expert_recipe string \
|
||||
# boot-root :: \
|
||||
# 1000 1000 1000 ext3 \
|
||||
# $primary{ } $bootable{ } \
|
||||
# method{ format } format{ } \
|
||||
# use_filesystem{ } filesystem{ ext3 } \
|
||||
# mountpoint{ /boot } \
|
||||
# . \
|
||||
# 256 512 768 linux-swap \
|
||||
# method{ swap } format{ } \
|
||||
# . \
|
||||
# 5000 10000 1000000000 xfs \
|
||||
# method{ format } format{ } \
|
||||
# use_filesystem{ } filesystem{ xfs } \
|
||||
# mountpoint{ / } \
|
||||
# .
|
||||
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
## Controlling how partitions are mounted
|
||||
# The default is to mount by UUID, but you can also choose "traditional" to
|
||||
# use traditional device names, or "label" to try filesystem labels before
|
||||
# falling back to UUIDs.
|
||||
d-i partman/mount_style select uuid
|
||||
|
||||
## Installing the bootloader
|
||||
# This is fairly safe to set, it makes grub install automatically to the MBR
|
||||
# if no other operating system is detected on the machine.
|
||||
d-i grub-installer/only_debian boolean true
|
||||
|
||||
### Base system installation
|
||||
# The kernel image (meta) package to be installed; "none" can be used if no
|
||||
# kernel is to be installed.
|
||||
d-i base-installer/kernel/image string linux-image-486
|
||||
|
||||
### Apt setup
|
||||
# You can choose to install non-free and contrib software.
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
# Uncomment this if you don't want to use a network mirror.
|
||||
#d-i apt-setup/use_mirror boolean false
|
||||
# Select which update services to use; define the mirrors to be used.
|
||||
# Values shown below are the normal defaults.
|
||||
d-i apt-setup/services-select multiselect security, updates
|
||||
d-i apt-setup/security_host string security.debian.org
|
||||
|
||||
# By default the installer requires that repositories be authenticated using a known gpg key.
|
||||
d-i debian-installer/allow_unauthenticated boolean true
|
||||
|
||||
# Select the boot device to install to
|
||||
d-i grub-installer/bootdev string default
|
||||
|
||||
# This will eject the installation media upon reboot
|
||||
d-i cdrom-detect/eject boolean true
|
||||
|
||||
# Install combination of stuff
|
||||
tasksel tasksel/first multiselect standard
|
||||
# Individual additional packages to install
|
||||
d-i pkgsel/include string \
|
||||
apt-transport-https \
|
||||
bash \
|
||||
curl \
|
||||
dnsutils \
|
||||
openssh-server \
|
||||
nfs-common \
|
||||
qemu-guest-agent \
|
||||
sudo \
|
||||
vim
|
||||
|
||||
# Whether to upgrade packages after debootstrap.
|
||||
# Allowed values: none, safe-upgrade, full-upgrade
|
||||
d-i pkgsel/upgrade select none
|
||||
|
||||
# Some versions of the installer can report back on what software you have installed, and what software you use.
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Avoid that last message about the install being complete.
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
#### Advanced options
|
||||
# This first command is run as early as possible, just after preseeding is read.
|
||||
#d-i preseed/early_command string anna-install some-udeb
|
||||
# This command is run just before the install finishes, but when there is still a usable /target directory.
|
||||
#d-i preseed/late_command string in-target wget -O /root/post-install.sh http://tarsonis.metaunix.net/scripts/post-install.sh; in-target chmod +x /root/post-install.sh; in-target /root/post-install.sh
|
||||
d-i preseed/late_command string in-target systemctl enable qemu-guest-agent; \
|
||||
echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/xadmin;
|
61
http/rocky-9-server.ks
Normal file
61
http/rocky-9-server.ks
Normal file
@ -0,0 +1,61 @@
|
||||
url --url="https://dl.rockylinux.org/pub/rocky/$releasever/BaseOS/$basearch/os/"
|
||||
|
||||
# Keyboard layouts
|
||||
keyboard --vckeymap=us --xlayouts='us'
|
||||
# System language
|
||||
lang en_US.UTF-8
|
||||
|
||||
# System timezone
|
||||
timezone America/New_York --isUtc
|
||||
|
||||
# Crypted root password
|
||||
rootpw --iscrypted $6$kkuIkd8S9gDUhK8g$1XbqJDCjt1zQAhxb9sC2mE5CGd.D0xV1efu0R8h1e.oovRKtEWqR5KaTDPSTztpxSw2qmDVORZJGnNpiJxUFT1
|
||||
# MD5 password hashing
|
||||
authselect --useshadow --passalgo=sha512
|
||||
# Create my initial user :D
|
||||
#user --disabled
|
||||
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
|
||||
|
||||
network --device=eth0 --bootproto=dhcp --ipv6=auto --activate
|
||||
|
||||
# Run the Setup Agent on first boot
|
||||
firstboot --disable
|
||||
# SELinux configuration
|
||||
selinux --disabled
|
||||
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
# Disk partitioning information
|
||||
part /boot --fstype=ext3 --size=1000
|
||||
part swap --fstype="swap" --recommended
|
||||
part / --fstype=xfs --size=1 --grow
|
||||
|
||||
# Reboot after installation
|
||||
reboot --eject
|
||||
|
||||
%packages
|
||||
@base
|
||||
@core
|
||||
bash
|
||||
nfs-utils
|
||||
sudo
|
||||
|
||||
%end
|
||||
|
||||
%post
|
||||
# Update the system
|
||||
yum -y update
|
||||
# Istall the EPEL repository
|
||||
dnf -y install epel-release
|
||||
|
||||
dnf -y install wget vim yum-plugin-versionlock qemu-guest-agent
|
||||
|
||||
echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/xadmin
|
||||
|
||||
systemctl enable qemu-guest-agent
|
||||
|
||||
%end
|
0
http/ubuntu/meta-data
Normal file
0
http/ubuntu/meta-data
Normal file
45
http/ubuntu/user-data
Normal file
45
http/ubuntu/user-data
Normal file
@ -0,0 +1,45 @@
|
||||
#cloud-config
|
||||
autoinstall:
|
||||
version: 1
|
||||
|
||||
early-commands:
|
||||
- systemctl stop ssh
|
||||
|
||||
locale: en_US.UTF-8
|
||||
keyboard:
|
||||
layout: us
|
||||
|
||||
apt:
|
||||
geoip: true
|
||||
preserve_sources_list: false
|
||||
primary:
|
||||
- arches: [i386, amd64]
|
||||
uri: "http://archive.ubuntu.com/ubuntu"
|
||||
|
||||
storage:
|
||||
layout:
|
||||
name: lvm
|
||||
|
||||
identity:
|
||||
hostname: ubuntu
|
||||
username: xadmin
|
||||
password: $6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
|
||||
|
||||
user-data:
|
||||
disable_root: true
|
||||
package_upgrade: true
|
||||
|
||||
ssh:
|
||||
allow-pw: true
|
||||
authorized-keys: []
|
||||
install-server: true
|
||||
|
||||
packages:
|
||||
- "qemu-guest-agent"
|
||||
|
||||
late-commands:
|
||||
- "echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/xadmin"
|
||||
- "chmod 440 /target/etc/sudoers.d/xadmin"
|
||||
- "curtin in-target --target=/target -- apt install -y qemu-guest-agent"
|
||||
- "curtin in-target --target=/target -- systemctl enable qemu-guest-agent"
|
||||
- "curtin in-target --target=/target -- systemctl start qemu-guest-agent"
|
@ -1,9 +1,8 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
name = {
|
||||
version = "~> 1"
|
||||
version = "1.2.1"
|
||||
source = "github.com/hashicorp/proxmox"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
8
scripts/debian-install.sh
Normal file
8
scripts/debian-install.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Debian/Ubuntu steps
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
sudo apt install -y vim
|
||||
|
17
scripts/freebsd-install.sh
Normal file
17
scripts/freebsd-install.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# FreeBSD steps
|
||||
sudo pkg update
|
||||
sudo pkg upgrade -y
|
||||
sudo pkg autoremove -y
|
||||
|
||||
# install QEMU guest agent
|
||||
sudo pkg install -y bash
|
||||
|
||||
# Delete /etc/hostid so it gets regenerated
|
||||
sudo rm /etc/hostid
|
||||
|
||||
# Install Puppet
|
||||
sudo pkg install -y puppet8
|
||||
echo "\n[agent]\nserver = puppet-v2.int.metaunix.net\nruninterval = 6h\n" | sudo tee -a /usr/local/etc/puppet/puppet.conf
|
||||
|
35
scripts/initial-setup.sh
Normal file
35
scripts/initial-setup.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
PUPPET_MASTER='puppet-v1.int.metaunix.net'
|
||||
|
||||
# determine OS version
|
||||
if [ -f '/etc/redhat-release' ]; then
|
||||
OS="rhel"
|
||||
elif [ -f '/etc/debian_version' ]; then
|
||||
OS="debian"
|
||||
elif [ -d '/etc/ubuntu-advantage' ]; then
|
||||
OS="ubuntu"
|
||||
else
|
||||
OS="freebsd"
|
||||
fi
|
||||
|
||||
read -p 'System hostname: ' HOSTNAME
|
||||
read -p 'System domain: ' DOMAIN
|
||||
|
||||
if [ "$OS" = 'freebsd' ]; then
|
||||
# Configure system hostname
|
||||
sysrc hostname="$HOSTNAME.$DOMAIN"
|
||||
|
||||
# Expand file system to match disk's bounds
|
||||
gpart recover da0 # run this first in case the disk is corrupted
|
||||
camcontrol reprobe da0 # force re-probing of the disk info
|
||||
gpart resize -i 3 da0 # re-size the root partition automatically
|
||||
zpool online -e zroot da0p3 # make ZFS resize the volume to match
|
||||
|
||||
# Install Puppet
|
||||
echo -e "[agent]\nserver = $PUPPET_MASTER" > /usr/local/etc/puppet/puppet.conf
|
||||
sysrc puppet_enable="YES"
|
||||
else
|
||||
# Configure system hostname
|
||||
hostnamectl set-hostname "$HOSTNAME"
|
||||
fi
|
6
scripts/remove-snap.sh
Normal file
6
scripts/remove-snap.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo apt purge -y snapd
|
||||
|
||||
sudo rm -rf /var/lib/snap
|
||||
sudo rm -rf /root/snap
|
6
scripts/rhel-install.sh
Normal file
6
scripts/rhel-install.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo dnf update -y
|
||||
|
||||
sudo dnf install -y vim
|
||||
|
Reference in New Issue
Block a user