feat: add talos v1.10.3
Signed-off-by: Vojtěch Mareš <vojtech@mares.cz>
This commit is contained in:
parent
1bfc4141b4
commit
682d5f1e02
3 changed files with 60 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ stages:
|
|||
matrix:
|
||||
- IMAGE:
|
||||
- flatcar-stable
|
||||
- talos-v1.10.3
|
||||
|
||||
validate:
|
||||
extends: .parallel
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ A collection of custom images on my Hetzner Cloud.
|
|||
| **Name** | **Version** | **Path** |
|
||||
| :------: | :---------------: | ------------------------------- |
|
||||
| Flatcar | _Rolling release_ | `images/flatcar-stable.pkr.hcl` |
|
||||
| Talos | _v1.10.3_ | `images/talos-v1.10.3.pkr.hcl` |
|
||||
|
|
|
|||
58
images/talos-v1.10.3.pkr.hcl
Normal file
58
images/talos-v1.10.3.pkr.hcl
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# hcloud.pkr.hcl
|
||||
|
||||
packer {
|
||||
required_plugins {
|
||||
hcloud = {
|
||||
source = "github.com/hetznercloud/hcloud"
|
||||
version = ">= 1.6.0, < 2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
image = "https://factory.talos.dev/image/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/${local.talos_version}/hcloud-${var.arch}.raw.xz"
|
||||
talos_version = "v1.10.3"
|
||||
}
|
||||
|
||||
variable "hcloud_token" {
|
||||
type = string
|
||||
default = env("HCLOUD_TOKEN")
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
source "hcloud" "talos" {
|
||||
token = var.hcloud_token
|
||||
|
||||
rescue = "linux64"
|
||||
image = "debian-11"
|
||||
location = "fsn1"
|
||||
ssh_username = "root"
|
||||
|
||||
snapshot_labels = {
|
||||
type = "infra",
|
||||
os = "talos",
|
||||
version = "${local.talos_version}",
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
source "hcloud.talos" {
|
||||
name = "x86"
|
||||
server_type = "cx22"
|
||||
snapshot_name = "talos-${local.talos_version}-amd64-${formatdate("YYYY-MM-DD", timestamp())}"
|
||||
}
|
||||
|
||||
source "hcloud.talos" {
|
||||
name = "arm"
|
||||
server_type = "cax11"
|
||||
snapshot_name = "talos-${local.talos_version}-arm64-${formatdate("YYYY-MM-DD", timestamp())}"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"apt-get install -y wget",
|
||||
"wget -O /tmp/talos.raw.xz ${local.image}",
|
||||
"xz -d -c /tmp/talos.raw.xz | dd of=/dev/sda && sync",
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in a new issue