blob: 36b2509567070a680f3da7dcd56dbae983e9c935 [file] [log] [blame]
Mike Marchetti1b64bd42018-06-13 09:21:40 -04001{
2 "provisioners": [
3 {
4 "type": "shell",
Mike Marchettibcbad572018-10-03 16:12:08 -04005 "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
6 "script": "scripts/setup.sh"
Mike Marchetti1b64bd42018-06-13 09:21:40 -04007 },
8 {
9 "type": "shell",
Mike Marchettibcbad572018-10-03 16:12:08 -040010 "script": "scripts/install_packages.sh"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040011 },
12 {
13 "type": "file",
14 "source": "scripts/lxd-bridge",
15 "destination": "/tmp/lxd-bridge"
16 },
17 {
18 "type": "shell",
19 "script": "scripts/lxd-setup.sh"
20 },
21 {
22 "type": "shell",
Michael Marchetti79731f42018-07-10 18:07:12 +020023 "inline": ["echo 'vagrant' | sudo shutdown -r now"],
24 "expect_disconnect": "true"
25 },
26 {
27 "type": "shell",
28 "script": "scripts/juju-setup.sh",
29 "pause_before": "10s"
30 },
31 {
32 "type": "shell",
33 "script": "scripts/cleanup.sh"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040034 }
35 ],
Michael Marchetti6d3457b2018-07-11 20:28:44 +020036 "variables": {
37 "build_dir": "jujubase-{{timestamp}}"
38 },
Mike Marchetti1b64bd42018-06-13 09:21:40 -040039 "builders": [
40 {
41 "type": "virtualbox-iso",
42 "boot_command": [
43 "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
44 "<bs><bs><bs><bs><bs><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 "/install/vmlinuz<wait>",
48 " auto<wait>",
49 " console-setup/ask_detect=false<wait>",
50 " console-setup/layoutcode=us<wait>",
51 " console-setup/modelcode=pc105<wait>",
52 " debconf/frontend=noninteractive<wait>",
53 " debian-installer=en_US<wait>",
54 " fb=false<wait>",
55 " initrd=/install/initrd.gz<wait>",
56 " kbd-chooser/method=us<wait>",
57 " keyboard-configuration/layout=USA<wait>",
58 " keyboard-configuration/variant=USA<wait>",
59 " locale=en_US<wait>",
60 " netcfg/get_domain=vm<wait>",
61 " netcfg/get_hostname=vagrant<wait>",
62 " grub-installer/bootdev=/dev/sda<wait>",
63 " noapic<wait>",
64 " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
65 " -- <wait>",
66 "<enter><wait>"
67 ],
68 "boot_wait": "10s",
Michael Marchetti6d3457b2018-07-11 20:28:44 +020069 "disk_size": 40000,
Mike Marchetti1b64bd42018-06-13 09:21:40 -040070 "guest_os_type": "Ubuntu_64",
71 "headless": true,
72 "http_directory": "http",
73 "iso_urls": [
Michael Marchetti159cbb82018-08-02 17:33:02 +020074 "iso/ubuntu-16.04.5-server-amd64.iso",
75 "http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040076 ],
77 "iso_checksum_type": "sha256",
Michael Marchetti159cbb82018-08-02 17:33:02 +020078 "iso_checksum": "c94de1cc2e10160f325eb54638a5b5aa38f181d60ee33dae9578d96d932ee5f8",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040079 "ssh_username": "vagrant",
80 "ssh_password": "vagrant",
81 "ssh_port": 22,
82 "ssh_wait_timeout": "10000s",
83 "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
84 "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
85 "virtualbox_version_file": ".vbox_version",
Michael Marchetti6d3457b2018-07-11 20:28:44 +020086 "output_directory": "{{user `build_dir`}}",
Michael Marchetti79731f42018-07-10 18:07:12 +020087 "vm_name": "xenial-jujubase",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040088 "vboxmanage": [
89 [
90 "modifyvm",
91 "{{.Name}}",
92 "--memory",
93 "4096"
94 ],
95 [
96 "modifyvm",
97 "{{.Name}}",
98 "--cpus",
99 "2"
100 ]
101 ]
102 }
Michael Marchetti79731f42018-07-10 18:07:12 +0200103 ],
104 "post-processors": [
105 {
Michael Marchetti6d3457b2018-07-11 20:28:44 +0200106 "output": "{{user `build_dir`}}/{{.Provider}}-jujubase.box",
Michael Marchetti79731f42018-07-10 18:07:12 +0200107 "type": "vagrant",
108 "keep_input_artifact": true
109 }
Mike Marchetti1b64bd42018-06-13 09:21:40 -0400110 ]
111}