vagrant.json 5.82 KB
Newer Older
1
2
{
    "variables": {
3
4
        "iso_url": "https://mirror.pkgbuild.com/iso/latest/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
        "iso_checksum_url": "https://mirror.pkgbuild.com/iso/latest/sha1sums.txt",
Christian Rebischke's avatar
Christian Rebischke committed
5
        "disk_size": "20480",
6
        "headless": "true",
7
        "vagrant_cloud_token": "PLACEHOLDER",
Kristian Klausen's avatar
Kristian Klausen committed
8
9
        "boot_wait": "60s",
        "mirror": ""
10
11
12
13
    },
    "builders": [
        {
            "type": "virtualbox-iso",
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
14
15
            "cpus": 2,
            "memory": 1024,
16
            "boot_wait": "{{user `boot_wait`}}",
17
            "http_directory": "http",
Christian Rebischke's avatar
Christian Rebischke committed
18
            "disk_size": "{{user `disk_size`}}",
19
            "guest_os_type": "ArchLinux_64",
20
            "iso_checksum": "file:{{user `iso_checksum_url`}}",
21
22
23
24
            "iso_url": "{{user `iso_url`}}",
            "ssh_username": "vagrant",
            "ssh_password": "vagrant",
            "ssh_port": 22,
25
            "ssh_timeout": "10000s",
Christian Rebischke's avatar
Christian Rebischke committed
26
            "shutdown_command": "sudo systemctl poweroff",
27
            "guest_additions_mode": "disable",
Christian Rebischke's avatar
Christian Rebischke committed
28
            "headless": "{{user `headless`}}",
29
            "boot_command": [
30
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
31
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>",
Kristian Klausen's avatar
Kristian Klausen committed
32
                "MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
33
            ]
34
35
        },
        {
Christian Rebischke's avatar
Christian Rebischke committed
36
            "type": "qemu",
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
37
38
            "cpus": 2,
            "memory": 1024,
39
            "boot_wait": "{{user `boot_wait`}}",
Christian Rebischke's avatar
Christian Rebischke committed
40
41
            "http_directory": "http",
            "disk_size": "{{user `disk_size`}}",
42
            "iso_checksum": "file:{{user `iso_checksum_url`}}",
Christian Rebischke's avatar
Christian Rebischke committed
43
44
45
46
            "iso_url": "{{user `iso_url`}}",
            "ssh_username": "vagrant",
            "ssh_password": "vagrant",
            "ssh_port": 22,
47
            "ssh_timeout": "10000s",
Christian Rebischke's avatar
Christian Rebischke committed
48
            "shutdown_command": "sudo systemctl poweroff",
Christian Rebischke's avatar
Christian Rebischke committed
49
            "headless": "{{user `headless`}}",
50
51
            "accelerator": "{{user `accelerator`}}",
            "disk_compression": true,
52
            "boot_command": [
53
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
54
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>",
Kristian Klausen's avatar
Kristian Klausen committed
55
                "MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
Christian Rebischke's avatar
Christian Rebischke committed
56
            ]
57
58
        },
        {
Rafael Soares's avatar
Rafael Soares committed
59
            "type": "vmware-iso",
60
            "boot_wait": "{{user `boot_wait`}}",
Rafael Soares's avatar
Rafael Soares committed
61
62
            "http_directory": "http",
            "disk_size": "{{user `disk_size`}}",
63
            "iso_checksum": "file:{{user `iso_checksum_url`}}",
Rafael Soares's avatar
Rafael Soares committed
64
65
66
67
            "iso_url": "{{user `iso_url`}}",
            "ssh_username": "vagrant",
            "ssh_password": "vagrant",
            "ssh_port": 22,
68
            "ssh_timeout": "10000s",
Rafael Soares's avatar
Rafael Soares committed
69
70
            "shutdown_command": "sudo systemctl poweroff",
            "headless": "{{user `headless`}}",
Ladar Levison's avatar
Ladar Levison committed
71
72
            "memory": "{{user `memory`}}",
            "cpus": "{{user `cpus`}}",
Rafael Soares's avatar
Rafael Soares committed
73
            "boot_command": [
74
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
75
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>",
Kristian Klausen's avatar
Kristian Klausen committed
76
                "MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
Rafael Soares's avatar
Rafael Soares committed
77
            ]
78
79
80
81
82
83
        }
    ],
    "provisioners": [
        {
            "type": "shell",
            "scripts": [
84
                "provision/postinstall.sh",
Christian Rebischke's avatar
Christian Rebischke committed
85
86
                "provision/virtualbox.sh",
                "provision/cleanup.sh"
87
            ],
88
            "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
89
90
91
            "only": [
                "virtualbox-iso"
            ]
92
93
94
95
96
97
98
99
100
        },
        {
            "type": "shell",
            "scripts": [
                "provision/postinstall.sh",
                "provision/qemu.sh",
                "provision/cleanup.sh"
            ],
            "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
101
102
103
            "only": [
                "qemu"
            ]
Rafael Soares's avatar
Rafael Soares committed
104
105
106
107
108
109
110
111
112
        },
        {
            "type": "shell",
            "scripts": [
                "provision/postinstall.sh",
                "provision/vmware.sh",
                "provision/cleanup.sh"
            ],
            "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
113
114
115
            "only": [
                "vmware-iso"
            ]
116
117
118
119
120
121
        },
        {
            "type": "shell",
            "scripts": [
                "provision/write_zeroes.sh"
            ],
Sven-Hendrik Haase's avatar
Sven-Hendrik Haase committed
122
            "execute_command": "'vagrant'|sudo -S sh '{{.Path}}'"
123
124
125
        }
    ],
    "post-processors": [
126
127
128
        [
            {
                "type": "vagrant",
Christian Rebischke's avatar
Christian Rebischke committed
129
                "keep_input_artifact": false,
130
131
132
133
                "output": "Arch-Linux-x86_64-{{ .Provider }}-{{isotime \"2006-01-02\"}}.box"
            },
            {
                "type": "vagrant-cloud",
134
135
136
                "only": [
                    "virtualbox-iso"
                ],
137
                "access_token": "{{user `vagrant_cloud_token`}}",
138
139
140
141
142
                "box_tag": "archlinux/archlinux",
                "version": "{{isotime \"2006.01.02\"}}"
            },
            {
                "type": "vagrant-cloud",
143
144
145
                "only": [
                    "qemu"
                ],
146
                "access_token": "{{user `vagrant_cloud_token`}}",
147
148
149
150
151
                "box_tag": "archlinux/archlinux",
                "version": "{{isotime \"2006.01.02\"}}"
            },
            {
                "type": "vagrant-cloud",
152
153
154
                "only": [
                    "vmware-iso"
                ],
155
                "access_token": "{{user `vagrant_cloud_token`}}",
156
157
158
159
                "box_tag": "archlinux/archlinux",
                "version": "{{isotime \"2006.01.02\"}}"
            }
        ]
160
161
    ]
}