-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrusty.json
122 lines (122 loc) · 4.49 KB
/
trusty.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"variables": {
"atlas_username": "{{env `ATLAS_BUILD_USERNAME`}}",
"atlas_name": "{{env `ATLAS_BUILD_NAME`}}",
"vagrantcloud_token": "{{env `VAGRANTCLOUD_TOKEN`}}",
"version": "1.0.{{timestamp}}",
"maint_password_hash": "{{env `MAINT_PASSWORD_HASH`}}"
},
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "Ubuntu_64",
"iso_url": "http://releases.ubuntu.com/14.04.5/ubuntu-14.04.5-server-amd64.iso",
"iso_checksum": "dde07d37647a1d2d9247e33f14e91acb10445a97578384896b4e1d985f754cc1",
"iso_checksum_type": "sha256",
"http_directory": "http",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "30m",
"disk_size": 8192,
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/shutdown -P now",
"guest_additions_mode": "upload",
"guest_additions_path": "linux.iso",
"headless": "true",
"vm_name": "tmpl-trusty",
"output_directory":"output-virtualbox-iso-trusty",
"boot_command" : [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/trusty.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{ .Name }} <wait>",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- <enter>"
]
},
{
"type": "vmware-iso",
"guest_os_type": "ubuntu-64",
"iso_url": "http://releases.ubuntu.com/14.04.5/ubuntu-14.04.5-server-amd64.iso",
"iso_checksum": "dde07d37647a1d2d9247e33f14e91acb10445a97578384896b4e1d985f754cc1",
"iso_checksum_type": "sha256",
"http_directory": "http",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "30m",
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/shutdown -P now",
"vm_name": "tmpl-trusty",
"disk_type_id": "0",
"disk_size": 8192,
"headless": "true",
"output_directory":"output-vmware-iso-trusty",
"boot_command" : [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/trusty.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{ .Name }} <wait>",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- <enter>"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"wget http://apt.puppetlabs.com/puppetlabs-release-pc1-$(lsb_release -sc).deb",
"echo 'vagrant' | sudo -S -E dpkg -i puppetlabs-release-pc1-$(lsb_release -sc).deb",
"rm puppetlabs-release-pc1-$(lsb_release -sc).deb",
"echo 'vagrant' | sudo -S -E apt-get update",
"echo 'vagrant' | sudo -S -E DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y",
"echo 'vagrant' | sudo -S -E DEBIAN_FRONTEND=noninteractive apt-get install puppet-agent -y"
]
},
{
"type": "puppet-masterless",
"manifest_file": "puppet/ubuntu.pp",
"module_paths": ["puppet/modules/"],
"facter": {
"maint_password_hash": "{{user `maint_password_hash`}}"
},
"execute_command": "{{if .Sudo}} echo 'vagrant' | sudo -S -E {{end}}{{.FacterVars}} /opt/puppetlabs/bin/puppet apply --order=manifest --modulepath='{{.ModulePath}}' {{.ManifestFile}}"
}
],
"post-processors": [
[
{
"type": "vagrant",
"compression_level": 9,
"keep_input_artifact": false
},
{
"type": "vagrant-cloud",
"access_token": "{{user `vagrantcloud_token`}}",
"box_tag": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"version": "{{user `version`}}"
}
],
[
{
"type": "compress",
"compression_level": 9,
"output": "{{.BuildName}}_bundle.tar.gz"
},
{
"type": "atlas",
"only": ["vmware-iso"],
"artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"artifact_type": "vmware.image",
"metadata": {
"created_at": "{{timestamp}}",
"provider": "vmware"
}
}
]
]
}