vagrant.json 6.2 KB
Newer Older
1
2
{
    "variables": {
3
4
        "iso_url": "file:///srv/ftp/iso/latest/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
        "iso_checksum_url": "file:///srv/ftp/iso/latest/sha1sums.txt",
5
        "iso_checksum_type": "sha1",
Christian Rebischke's avatar
Christian Rebischke committed
6
7
8
        "disk_size": "20480",
        "memory": "1024",
        "cpus": "2",
9
        "headless": "true",
10
        "vagrant_cloud_token": "PLACEHOLDER",
11
        "write_zeroes": "",
Christian Rebischke's avatar
Christian Rebischke committed
12
        "boot_wait": "60s"
13
14
15
16
    },
    "builders": [
        {
            "type": "virtualbox-iso",
17
            "boot_wait": "{{user `boot_wait`}}",
18
            "http_directory": "http",
Christian Rebischke's avatar
Christian Rebischke committed
19
            "disk_size": "{{user `disk_size`}}",
20
            "guest_os_type": "ArchLinux_64",
21
            "iso_checksum_url": "{{user `iso_checksum_url`}}",
22
23
24
25
26
27
            "iso_checksum_type": "{{user `iso_checksum_type`}}",
            "iso_url": "{{user `iso_url`}}",
            "ssh_username": "vagrant",
            "ssh_password": "vagrant",
            "ssh_port": 22,
            "ssh_wait_timeout": "10000s",
Christian Rebischke's avatar
Christian Rebischke committed
28
            "shutdown_command": "sudo systemctl poweroff",
29
            "guest_additions_mode": "disable",
Christian Rebischke's avatar
Christian Rebischke committed
30
            "headless": "{{user `headless`}}",
31
32
33
34
35
            "vboxmanage": [
                [
                    "modifyvm",
                    "{{.Name}}",
                    "--memory",
Christian Rebischke's avatar
Christian Rebischke committed
36
                    "{{user `memory`}}"
37
38
39
40
41
                ],
                [
                    "modifyvm",
                    "{{.Name}}",
                    "--cpus",
Christian Rebischke's avatar
Christian Rebischke committed
42
                    "{{user `cpus`}}"
43
44
45
                ]
            ],
            "boot_command": [
46
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
47
48
49
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-chroot}.sh'<enter><wait>",
                "bash install.sh < install-chroot.sh && systemctl reboot<enter>"
            ]
Christian Rebischke's avatar
Christian Rebischke committed
50
51
        }, {
            "type": "qemu",
52
            "boot_wait": "{{user `boot_wait`}}",
Christian Rebischke's avatar
Christian Rebischke committed
53
54
            "http_directory": "http",
            "disk_size": "{{user `disk_size`}}",
55
            "iso_checksum_url": "{{user `iso_checksum_url`}}",
Christian Rebischke's avatar
Christian Rebischke committed
56
57
58
59
60
61
62
            "iso_checksum_type": "{{user `iso_checksum_type`}}",
            "iso_url": "{{user `iso_url`}}",
            "ssh_username": "vagrant",
            "ssh_password": "vagrant",
            "ssh_port": 22,
            "ssh_wait_timeout": "10000s",
            "shutdown_command": "sudo systemctl poweroff",
Christian Rebischke's avatar
Christian Rebischke committed
63
            "headless": "{{user `headless`}}",
Christian Rebischke's avatar
Christian Rebischke committed
64
65
66
67
68
69
70
71
72
            "qemuargs": [
                [
                    "-m",
                    "{{user `memory`}}"
                ],
                [
                    "-smp",
                    "{{user `cpus`}}"
                ]
73
74
            ],
            "boot_command": [
75
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
76
77
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-chroot}.sh'<enter><wait>",
                "bash install.sh < install-chroot.sh && systemctl reboot<enter>"
Christian Rebischke's avatar
Christian Rebischke committed
78
            ]
Rafael Soares's avatar
Rafael Soares committed
79
80
        }, {
            "type": "vmware-iso",
81
            "boot_wait": "{{user `boot_wait`}}",
Rafael Soares's avatar
Rafael Soares committed
82
83
            "http_directory": "http",
            "disk_size": "{{user `disk_size`}}",
84
            "iso_checksum_url": "{{user `iso_checksum_url`}}",
Rafael Soares's avatar
Rafael Soares committed
85
86
87
88
89
90
91
92
            "iso_checksum_type": "{{user `iso_checksum_type`}}",
            "iso_url": "{{user `iso_url`}}",
            "ssh_username": "vagrant",
            "ssh_password": "vagrant",
            "ssh_port": 22,
            "ssh_wait_timeout": "10000s",
            "shutdown_command": "sudo systemctl poweroff",
            "headless": "{{user `headless`}}",
Ladar Levison's avatar
Ladar Levison committed
93
94
            "memory": "{{user `memory`}}",
            "cpus": "{{user `cpus`}}",
Rafael Soares's avatar
Rafael Soares committed
95
            "boot_command": [
96
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
Rafael Soares's avatar
Rafael Soares committed
97
98
99
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-chroot}.sh'<enter><wait>",
                "bash install.sh < install-chroot.sh && systemctl reboot<enter>"
            ]
100
        }
Christian Rebischke's avatar
Christian Rebischke committed
101

102
103
104
105
106
    ],
    "provisioners": [
        {
            "type": "shell",
            "scripts": [
107
                "provision/postinstall.sh",
Christian Rebischke's avatar
Christian Rebischke committed
108
109
                "provision/virtualbox.sh",
                "provision/cleanup.sh"
110
            ],
111
112
113
114
115
116
117
118
119
120
121
122
            "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
            "only": ["virtualbox-iso"]
        },
        {
            "type": "shell",
            "scripts": [
                "provision/postinstall.sh",
                "provision/qemu.sh",
                "provision/cleanup.sh"
            ],
            "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
            "only": ["qemu"]
Rafael Soares's avatar
Rafael Soares committed
123
124
125
126
127
128
129
130
131
132
        },
        {
            "type": "shell",
            "scripts": [
                "provision/postinstall.sh",
                "provision/vmware.sh",
                "provision/cleanup.sh"
            ],
            "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'",
            "only": ["vmware-iso"]
133
134
135
136
137
138
        },
        {
            "type": "shell",
            "scripts": [
                "provision/write_zeroes.sh"
            ],
139
            "execute_command": "if [ ! -z \"{{user `write_zeroes`}}\" ]; then echo 'vagrant'|sudo -S sh '{{.Path}}'; fi"
140
141
142
        }
    ],
    "post-processors": [
143
144
145
        [
            {
                "type": "vagrant",
146
                "keep_input_artifact": false,
147
148
149
150
151
                "output": "Arch-Linux-x86_64-{{ .Provider }}-{{isotime \"2006-01-02\"}}.box"
            },
            {
                "type": "vagrant-cloud",
                "only": ["virtualbox-iso"],
152
                "access_token": "{{user `vagrant_cloud_token`}}",
153
154
155
156
157
158
                "box_tag": "archlinux/archlinux",
                "version": "{{isotime \"2006.01.02\"}}"
            },
            {
                "type": "vagrant-cloud",
                "only": ["qemu"],
159
                "access_token": "{{user `vagrant_cloud_token`}}",
160
161
162
163
164
165
                "box_tag": "archlinux/archlinux",
                "version": "{{isotime \"2006.01.02\"}}"
            },
            {
                "type": "vagrant-cloud",
                "only": ["vmware-iso"],
166
                "access_token": "{{user `vagrant_cloud_token`}}",
167
168
169
170
                "box_tag": "archlinux/archlinux",
                "version": "{{isotime \"2006.01.02\"}}"
            }
        ]
171
172
    ]
}