-
Notifications
You must be signed in to change notification settings - Fork 0
/
host.json
86 lines (81 loc) · 2.37 KB
/
host.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
{
"variables": {
"iso_arch_mirror": "ftp.lysator.liu.se/pub/archlinux",
"iso_arch_release": "2015.01.01",
"iso_checksum": "a8344dde2e9a22e6a66d10ee016818c1491a9054",
"name": "build-host",
"ram": 1024,
"cpus": 1,
"sda_size": 10240,
"timezone": "UTC",
"language": "en_US.UTF-8",
"keymap": "sv-latin1",
"build_user": "lfs",
"build_dir": "/mnt/lfs",
"_target_dir": "/mnt",
"_ssh_pass": "root"
},
"builders": [
{
"name": "{{user `name`}}",
"type": "virtualbox-iso",
"guest_os_type": "ArchLinux_64",
"disk_size": "{{user `sda_size`}}",
"guest_additions_mode": "disable",
"hard_drive_interface": "sata",
"shutdown_command": "umount -r {{user `_target_dir`}}; poweroff",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--cpus",
"{{user `cpus`}}",
"--memory",
"{{user `ram`}}"
]
],
"ssh_username": "root",
"ssh_password": "{{user `_ssh_pass`}}",
"iso_urls": [
"http://{{user `iso_arch_mirror`}}/iso/{{user `iso_arch_release`}}/archlinux-{{user `iso_arch_release`}}-dual.iso"
],
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "sha1",
"boot_wait": "5s",
"boot_command": [
"<enter>",
"<wait10><wait5>",
"systemctl start sshd<enter>",
"usermod --password $(openssl passwd -crypt {{user `_ssh_pass`}}) root<enter>",
"<wait>"
]
}
],
"provisioners": [
{
"type": "shell",
"environment_vars": [
"TARGET_DIR='{{user `_target_dir`}}'",
"BUILD_DIR='{{user `build_dir`}}'"
],
"scripts": [
"provisioning/bootstrap.sh"
]
},
{
"type": "shell",
"remote_path": "/config.sh",
"execute_command": "chmod +x {{ .Path }}; cp {{ .Path }} {{user `_target_dir`}}; {{ .Vars }} /usr/bin/arch-chroot {{user `_target_dir`}} {{ .Path }}; rm {{user `_target_dir`}}{{ .Path }}",
"environment_vars": [
"BUILD_DIR='{{user `build_dir`}}'",
"TIMEZONE={{user `timezone`}}",
"LANGUAGE={{user `language`}}",
"KEYMAP={{user `keymap`}}",
"BUILD_USER={{user `build_user`}}"
],
"scripts": [
"provisioning/system-configuration.sh"
]
}
]
}