-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu-focal.json
109 lines (109 loc) · 3.85 KB
/
ubuntu-focal.json
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
{
"_comment": "Build with `packer build ubuntu-focal.json`",
"builders": [
{
"name": "{{ user `name` }}",
"vm_name": "{{ user `name` }}",
"accelerator": "{{ user `accelerator` }}",
"type": "qemu",
"qemuargs": [
["-display", "none"]
],
"boot_wait": "5s",
"boot_command": [
"{{ user `boot_command_prefix` }}",
"/install/vmlinuz noapic ",
"initrd=/install/initrd.gz ",
"debian-installer={{ user `locale` }} auto locale={{ user `locale` }} kbd-chooser/method=en ",
"hostname={{ user `name` }} ",
"fb=false ",
"debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP ",
"keyboard-configuration/layout=GB ",
"keyboard-configuration/variant=GB ",
"console-setup/ask_detect=false ",
"ipv6.disable_ipv6=1 net.ifnames=0 biosdevname=0 ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/{{ user `preseed_file_name` }} ",
"--- <enter>"
],
"cpus": "{{ user `cpus` }}",
"disk_size": "{{ user `disk_size` }}",
"disk_discard": "unmap",
"disk_cache": "unsafe",
"disk_compression": true,
"disk_interface": "virtio-scsi",
"net_device": "virtio-net",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{ user `ubuntu_iso_checksum` }}",
"iso_urls": [
"{{ user `ubuntu_images_url` }}"
],
"memory": "{{ user `memory` }}",
"output_directory": "{{ user `name` }}-qemu",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_timeout": "60m",
"ssh_username": "{{ user `ssh_username` }}"
}
],
"post-processors": [
[
{
"compression_level": 9,
"output": "{{ user `packer_images_output_dir` }}/{{ user `name` }}-{{ .Provider }}.box",
"type": "vagrant"
},
{
"type": "vagrant-cloud",
"box_tag": "enr0s/ubuntu-focal",
"access_token": "{{user `cloud_token`}}",
"version": "{{user `version`}}"
}
]
],
"provisioners": [
{
"execute_command": "echo 'vagrant' | sudo -S -E bash '{{ .Path }}'",
"scripts": [
"scripts/common/vagrant.sh",
"scripts/ubuntu/update.sh",
"scripts/ubuntu/qemu.sh",
"scripts/ubuntu/cleanup.sh"
],
"type": "shell",
"pause_before": "120s",
"start_retry_timeout": "15m",
"expect_disconnect": "true"
},
{
"execute_command": "echo 'vagrant' | sudo -S -E bash '{{ .Path }}'",
"scripts": [
"scripts/common/machine.sh",
"scripts/common/leases.sh"
],
"type": "shell",
"start_retry_timeout": "15m",
"expect_disconnect": "true"
}
],
"variables": {
"boot_command_prefix": "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"accelerator": "kvm",
"cpus": "1",
"disk_size": "20480",
"headless": "false",
"memory": "512",
"name": "ubuntu-focal",
"packer_images_output_dir": "boxes/",
"preseed_file_name": "preseed.cfg",
"locale": "en_GB",
"ssh_fullname": "vagrant",
"ssh_password": "vagrant",
"ssh_username": "vagrant",
"ubuntu_images_url": "http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso",
"ubuntu_iso_checksum": "sha256:f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2",
"cloud_token": "{{ env `VAGRANT_CLOUD_TOKEN` }}",
"version": "1.0.{{timestamp}}"
}
}