-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextcloud-build-vmware.json
117 lines (116 loc) · 3.94 KB
/
nextcloud-build-vmware.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
{
"variables": {
"name": "nextcloud-community",
"build_name": "nextcloud-community",
"build_cpu_cores": "2",
"build_memory": "2048",
"cpu_cores": "2",
"memory": "2048",
"disk_size": "20000",
"headless": "true",
"iso_checksum": "737ae7041212c628de5751d15c3016058b0e833fdc32e7420209b76ca3d0a535",
"iso_checksum_type": "sha256",
"iso_url": "http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso",
"ssh_username": "vagrant",
"ssh_password": "vagrant"
},
"push": {
"name": "{{user `name`}}",
"exclude": [
".git",
"packer_cache",
"output*-production",
"*.box"
]
},
"builders": [{
"name": "{{ user `build_name` }}-production",
"vm_name": "{{ user `build_name` }}-production",
"boot_command": [
"<enter><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><bs><bs>",
"noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{ user `build_name` }}-production ",
"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>"
],
"boot_wait": "10s",
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "2",
"headless": "{{user `headless`}}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'",
"ssh_password": "{{user `ssh_username`}}",
"ssh_username": "{{user `ssh_password`}}",
"ssh_wait_timeout": "20m",
"tools_upload_flavor": "linux",
"guest_os_type": "ubuntu-64",
"type": "vmware-iso",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"memsize": "{{user `build_memory`}}",
"numvcpus": "{{user `build_cpu_cores`}}",
"ethernet0.addresstype": "generated",
"ethernet0.bsdname": "en0",
"ethernet0.connectiontype": "nat",
"ethernet0.displayname": "Ethernet",
"ethernet0.linkstatepropagation.enable": "FALSE",
"ethernet0.pcislotnumber": "32",
"ethernet0.present": "TRUE",
"ethernet0.virtualdev": "e1000",
"ethernet0.wakeonpcktrcv": "FALSE"
},
"vmx_data_post": {
"cpuid.coresPerSocket": "1",
"ethernet0.connectiontype": "bridged",
"ethernet0.virtualdev": "vmxnet3",
"memsize": "{{user `memory`}}",
"numvcpus": "{{user `cpu_cores`}}"
}
}],
"provisioners": [{
"type": "shell",
"inline": ["sleep 10"]
},
{
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"script": "scripts/packages.sh",
"type": "shell"
},
{
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"script": "scripts/vagrant.sh",
"type": "shell"
},
{
"type": "shell",
"inline": [
"wget https://raw.githubusercontent.com/enoch85/scripts/master/packer/nextcloud/add_ncadmin.sh -P /tmp",
"bash /tmp/add_ncadmin.sh",
"wget https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh -P /tmp",
"sudo chown ncadmin:ncadmin /tmp/nextcloud_install_production.sh"
]
},
{
"execute_command": "echo 'ncadmin' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"script": "scripts/install.sh",
"type": "shell"
},
{
"type": "shell",
"pause_before": "10s",
"inline": [
"sudo rm -f /tmp/*.sh"
]
}
],
"post-processors": [{
"type": "compress",
"output": "{{.BuildName}}-vm.zip",
"compression_level": 3
}]
}