blob: f4930fc7499b297dc458c17b6ac527d565d08583 [file] [log] [blame]
Mike Marchetti1b64bd42018-06-13 09:21:40 -04001{
2 "provisioners": [
3 {
4 "type": "shell",
5 "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
6 "script": "scripts/install_packages.sh"
7 },
8 {
9 "type": "shell",
10 "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
11 "script": "scripts/setup.sh"
12 },
13 {
14 "type": "file",
15 "source": "scripts/lxd-bridge",
16 "destination": "/tmp/lxd-bridge"
17 },
18 {
19 "type": "shell",
20 "script": "scripts/lxd-setup.sh"
21 },
22 {
23 "type": "shell",
Michael Marchetti79731f42018-07-10 18:07:12 +020024 "inline": ["echo 'vagrant' | sudo shutdown -r now"],
25 "expect_disconnect": "true"
26 },
27 {
28 "type": "shell",
29 "script": "scripts/juju-setup.sh",
30 "pause_before": "10s"
31 },
32 {
33 "type": "shell",
34 "script": "scripts/cleanup.sh"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040035 }
36 ],
Michael Marchetti6d3457b2018-07-11 20:28:44 +020037 "variables": {
38 "build_dir": "jujubase-{{timestamp}}"
39 },
Mike Marchetti1b64bd42018-06-13 09:21:40 -040040 "builders": [
41 {
42 "type": "virtualbox-iso",
43 "boot_command": [
44 "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
45 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
46 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
47 "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
48 "/install/vmlinuz<wait>",
49 " auto<wait>",
50 " console-setup/ask_detect=false<wait>",
51 " console-setup/layoutcode=us<wait>",
52 " console-setup/modelcode=pc105<wait>",
53 " debconf/frontend=noninteractive<wait>",
54 " debian-installer=en_US<wait>",
55 " fb=false<wait>",
56 " initrd=/install/initrd.gz<wait>",
57 " kbd-chooser/method=us<wait>",
58 " keyboard-configuration/layout=USA<wait>",
59 " keyboard-configuration/variant=USA<wait>",
60 " locale=en_US<wait>",
61 " netcfg/get_domain=vm<wait>",
62 " netcfg/get_hostname=vagrant<wait>",
63 " grub-installer/bootdev=/dev/sda<wait>",
64 " noapic<wait>",
65 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
66 " -- <wait>",
67 "<enter><wait>"
68 ],
69 "boot_wait": "10s",
Michael Marchetti6d3457b2018-07-11 20:28:44 +020070 "disk_size": 40000,
Mike Marchetti1b64bd42018-06-13 09:21:40 -040071 "guest_os_type": "Ubuntu_64",
72 "headless": true,
73 "http_directory": "http",
74 "iso_urls": [
Michael Marchetti159cbb82018-08-02 17:33:02 +020075 "iso/ubuntu-16.04.5-server-amd64.iso",
76 "http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040077 ],
78 "iso_checksum_type": "sha256",
Michael Marchetti159cbb82018-08-02 17:33:02 +020079 "iso_checksum": "c94de1cc2e10160f325eb54638a5b5aa38f181d60ee33dae9578d96d932ee5f8",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040080 "ssh_username": "vagrant",
81 "ssh_password": "vagrant",
82 "ssh_port": 22,
83 "ssh_wait_timeout": "10000s",
84 "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
85 "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
86 "virtualbox_version_file": ".vbox_version",
Michael Marchetti6d3457b2018-07-11 20:28:44 +020087 "output_directory": "{{user `build_dir`}}",
Michael Marchetti79731f42018-07-10 18:07:12 +020088 "vm_name": "xenial-jujubase",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040089 "vboxmanage": [
90 [
91 "modifyvm",
92 "{{.Name}}",
93 "--memory",
94 "4096"
95 ],
96 [
97 "modifyvm",
98 "{{.Name}}",
99 "--cpus",
100 "2"
101 ]
102 ]
103 }
Michael Marchetti79731f42018-07-10 18:07:12 +0200104 ],
105 "post-processors": [
106 {
Michael Marchetti6d3457b2018-07-11 20:28:44 +0200107 "output": "{{user `build_dir`}}/{{.Provider}}-jujubase.box",
Michael Marchetti79731f42018-07-10 18:07:12 +0200108 "type": "vagrant",
109 "keep_input_artifact": true
110 }
Mike Marchetti1b64bd42018-06-13 09:21:40 -0400111 ]
112}