| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 1 | { |
| 2 | "provisioners": [ |
| 3 | { |
| 4 | "type": "shell", |
| Mike Marchetti | bcbad57 | 2018-10-03 16:12:08 -0400 | [diff] [blame] | 5 | "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", |
| 6 | "script": "scripts/setup.sh" |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 7 | }, |
| 8 | { |
| 9 | "type": "shell", |
| Mike Marchetti | bcbad57 | 2018-10-03 16:12:08 -0400 | [diff] [blame] | 10 | "script": "scripts/install_packages.sh" |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 11 | }, |
| 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 Marchetti | 79731f4 | 2018-07-10 18:07:12 +0200 | [diff] [blame] | 23 | "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 Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 34 | } |
| 35 | ], |
| Michael Marchetti | 6d3457b | 2018-07-11 20:28:44 +0200 | [diff] [blame] | 36 | "variables": { |
| 37 | "build_dir": "jujubase-{{timestamp}}" |
| 38 | }, |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 39 | "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 Marchetti | 6d3457b | 2018-07-11 20:28:44 +0200 | [diff] [blame] | 69 | "disk_size": 40000, |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 70 | "guest_os_type": "Ubuntu_64", |
| 71 | "headless": true, |
| 72 | "http_directory": "http", |
| 73 | "iso_urls": [ |
| Michael Marchetti | 159cbb8 | 2018-08-02 17:33:02 +0200 | [diff] [blame] | 74 | "iso/ubuntu-16.04.5-server-amd64.iso", |
| 75 | "http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso" |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 76 | ], |
| 77 | "iso_checksum_type": "sha256", |
| Michael Marchetti | 159cbb8 | 2018-08-02 17:33:02 +0200 | [diff] [blame] | 78 | "iso_checksum": "c94de1cc2e10160f325eb54638a5b5aa38f181d60ee33dae9578d96d932ee5f8", |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 79 | "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 Marchetti | 6d3457b | 2018-07-11 20:28:44 +0200 | [diff] [blame] | 86 | "output_directory": "{{user `build_dir`}}", |
| Michael Marchetti | 79731f4 | 2018-07-10 18:07:12 +0200 | [diff] [blame] | 87 | "vm_name": "xenial-jujubase", |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 88 | "vboxmanage": [ |
| 89 | [ |
| 90 | "modifyvm", |
| 91 | "{{.Name}}", |
| 92 | "--memory", |
| 93 | "4096" |
| 94 | ], |
| 95 | [ |
| 96 | "modifyvm", |
| 97 | "{{.Name}}", |
| 98 | "--cpus", |
| 99 | "2" |
| 100 | ] |
| 101 | ] |
| 102 | } |
| Michael Marchetti | 79731f4 | 2018-07-10 18:07:12 +0200 | [diff] [blame] | 103 | ], |
| 104 | "post-processors": [ |
| 105 | { |
| Michael Marchetti | 6d3457b | 2018-07-11 20:28:44 +0200 | [diff] [blame] | 106 | "output": "{{user `build_dir`}}/{{.Provider}}-jujubase.box", |
| Michael Marchetti | 79731f4 | 2018-07-10 18:07:12 +0200 | [diff] [blame] | 107 | "type": "vagrant", |
| 108 | "keep_input_artifact": true |
| 109 | } |
| Mike Marchetti | 1b64bd4 | 2018-06-13 09:21:40 -0400 | [diff] [blame] | 110 | ] |
| 111 | } |