Feature 8839: Modified Installation script to install OSM with
[osm/devops.git] / packer / ubuntu1604-juju.json
1 {
2   "provisioners": [
3     {
4       "type": "shell",
5       "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
6       "script": "scripts/setup.sh"
7     },
8     {
9       "type": "shell",
10       "script": "scripts/install_packages.sh"
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",
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"
34     }
35   ],
36   "variables": {
37     "build_dir": "jujubase-{{timestamp}}"
38   },
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",
69       "disk_size": 40000,
70       "guest_os_type": "Ubuntu_64",
71       "headless": true,
72       "http_directory": "http",
73       "iso_urls": [
74         "iso/ubuntu-16.04.5-server-amd64.iso",
75         "http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso"
76       ],
77       "iso_checksum_type": "sha256",
78       "iso_checksum": "c94de1cc2e10160f325eb54638a5b5aa38f181d60ee33dae9578d96d932ee5f8",
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",
86       "output_directory": "{{user `build_dir`}}",
87       "vm_name": "xenial-jujubase",
88       "vboxmanage": [
89         [
90           "modifyvm",
91           "{{.Name}}",
92           "--memory",
93           "4096"
94         ],
95         [
96           "modifyvm",
97           "{{.Name}}",
98           "--cpus",
99           "2"
100         ]
101       ]
102     }
103   ],
104   "post-processors": [
105     {
106       "output": "{{user `build_dir`}}/{{.Provider}}-jujubase.box",
107       "type": "vagrant",
108       "keep_input_artifact": true
109     }
110   ]
111 }