This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
104 lines (99 loc) · 3.45 KB
/
packer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"variables": {
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"atlas_username": "fische",
"atlas_name": "co876",
"token": "{{env `ATLAS_TOKEN`}}",
"version": "0.2"
},
"push": {
"name": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"vcs": true
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "Ubuntu_64",
"iso_url": "http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-server-amd64.iso",
"iso_checksum": "d2d939ca0e65816790375f6826e4032f",
"iso_checksum_type": "md5",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_wait_timeout": "20m",
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S shutdown -P now",
"http_directory": "http",
"boot_command": [
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"/install/vmlinuz noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=fr <wait>",
"hostname={{ .Name }} <wait>",
"fb=false debconf/frontend=noninteractive <wait>",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=FR keyboard-configuration/variant=FR console-setup/ask_detect=false <wait>",
"initrd=/install/initrd.gz --",
"<enter><wait>"
],
"boot_wait": "10s",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso"
}
],
"provisioners": [
{
"type": "file",
"source": "files/",
"destination": "/tmp"
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"scripts": [
"scripts/base.sh",
"scripts/vagrant.sh",
"scripts/install/apache.sh",
"scripts/setup/apache.sh",
"scripts/install/ldap.sh",
"scripts/setup/ldap.sh"
]
},
{
"type": "shell",
"environment_vars": [
"LOGIN={{user `ssh_username`}}",
"PASSWORD={{user `ssh_password`}}"
],
"execute_command": "echo '{{user `ssh_password`}}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/utils/add_apache_user.sh",
"remote_path": "/home/vagrant/add_apache_user.sh",
"skip_clean": true
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/virtualbox.sh",
"only": ["virtualbox-iso"]
},
{
"type": "shell",
"execute_command": "echo '{{user `ssh_password`}}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"script": "scripts/cleanup.sh"
}
],
"post-processors": [
[
{
"output": "builds/{{.Provider}}-co876-{{user `version`}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile.tpl"
},
{
"type": "vagrant-cloud",
"box_tag": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"access_token": "{{user `token`}}",
"version": "{{user `version`}}"
}
]
]
}