-
Notifications
You must be signed in to change notification settings - Fork 26
/
debian-11-ppc64le-openstack.json.pkr.hcl
113 lines (103 loc) · 2.92 KB
/
debian-11-ppc64le-openstack.json.pkr.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
variable "mirror" {
type = string
default = "http://cdimage.debian.org/cdimage/archive"
}
variable "release" {
type = string
default = "11.9.0"
}
variable "osuadmin_passwd" {
type = string
sensitive = true
default = "$6$S3y2eCRW3c6SjK/l$ym9rE8J7IZvzkJ5SRMYkxp2PrZ98FNkGy/leHLZU0ATm/yQqCA3l74VNLGdMWKPnhJL4JiB7jBDxj5k3.aZlj1"
}
source "qemu" "debian-11" {
accelerator = "kvm"
boot_command = [
"c<wait>",
"linux /install/vmlinux",
" auto",
" console-setup/ask_detect=false",
" console-setup/layoutcode=us",
" console-setup/modelcode=pc105",
" debconf/frontend=noninteractive",
" debian-installer=en_US.UTF-8",
" fb=false",
" kbd-chooser/method=us",
" keyboard-configuration/xkb-keymap=us",
" keyboard-configuration/layout=USA",
" keyboard-configuration/variant=USA",
" locale=en_US.UTF-8",
" netcfg/get_hostname=packer",
" netcfg/get_domain=local",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian-11/preseed-ppc64.cfg",
" url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian-11/preseed-ppc64.cfg",
"<enter><wait>",
"initrd /install/initrd.gz",
"<enter><wait>",
"boot<enter>"
]
boot_key_interval = "30ms"
boot_wait = "10s"
disk_interface = "virtio-scsi"
disk_size = 4096
format = "raw"
headless = true
http_directory = "http"
iso_checksum = "file:${var.mirror}/${var.release}/ppc64el/iso-cd/SHA256SUMS"
iso_url = "${var.mirror}/${var.release}/ppc64el/iso-cd/debian-${var.release}-ppc64el-netinst.iso"
machine_type = "pseries"
qemu_binary = "qemu-kvm"
qemuargs = [
[ "-m", "2048M" ],
[ "-boot", "strict=on" ]
]
shutdown_command = "/sbin/halt -h -p"
ssh_password = "osuadmin"
ssh_port = 22
ssh_username = "root"
ssh_wait_timeout = "10000s"
vnc_bind_address = "0.0.0.0"
vnc_port_min = 5901
vnc_port_max = 5901
vm_name = "debian-11"
}
build {
sources = [
"source.qemu.debian-11"
]
provisioner "shell-local" {
scripts = [
"scripts/common/berks-vendor.sh"
]
}
provisioner "shell" {
execute_command = "{{ .Vars }} sudo -S -E bash '{{ .Path }}'"
scripts = [
"scripts/common/install-cinc.sh"
]
}
provisioner "file" {
source = "cookbooks"
destination = "/tmp/cinc/"
}
provisioner "file" {
source = "chef/client.rb"
destination = "/tmp/cinc/client.rb"
}
provisioner "file" {
source = "chef/runlist/openstack.json"
destination = "/tmp/cinc/dna.json"
}
provisioner "shell" {
execute_command = "{{ .Vars }} sudo -S -E bash '{{ .Path }}'"
environment_vars = [
"OSUADMIN_PASSWD=${var.osuadmin_passwd}"
]
scripts = [
"scripts/common/converge-cinc.sh",
"scripts/common/remove-cinc.sh",
"scripts/common/minimize.sh"
]
}
}