forked from vmware-samples/vcenter-event-broker-appliance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
photon.json
172 lines (171 loc) · 5 KB
/
photon.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
"variables": {
"veba_ovf_template": "photon.xml.template",
"ovftool_deploy_vcenter": "192.168.30.200",
"ovftool_deploy_vcenter_username": "administrator@vsphere.local",
"ovftool_deploy_vcenter_password": "VMware1!"
},
"builders": [
{
"type": "vmware-iso",
"vm_name": "{{ user `vm_name` }}",
"guest_os_type": "Other",
"version": "13",
"disk_size": "12288",
"boot_command": [
"<esc><wait>",
"vmlinuz initrd=initrd.img root=/dev/ram0 loglevel=3 ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/photon-kickstart.json photon.media=cdrom",
"<enter>"
],
"boot_wait": "10s",
"headless": false,
"vnc_disable_password": true,
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"http_directory": "http",
"remote_type": "esx5",
"remote_host": "{{ user `builder_host` }}",
"remote_datastore": "{{ user `builder_host_datastore` }}",
"remote_username": "{{ user `builder_host_username` }}",
"remote_password": "{{ user `builder_host_password` }}",
"ssh_username": "{{ user `guest_username` }}",
"ssh_password": "{{ user `guest_password` }}",
"ssh_port": 22,
"format": "ovf",
"shutdown_command": "/sbin/shutdown -h now",
"shutdown_timeout": "1000s",
"vmx_data": {
"numvcpus": "{{ user `numvcpus` }}",
"memsize": "{{ user `ramsize` }}",
"ethernet0.networkName": "{{ user `builder_host_portgroup` }}",
"ethernet0.present": "TRUE",
"ethernet0.startConnected": "TRUE",
"ethernet0.virtualDev": "vmxnet3",
"ethernet0.addressType": "generated",
"ethernet0.wakeOnPcktRcv": "FALSE",
"annotation": "Version: {{ user `VEBA_VERSION` }}"
}
}
],
"provisioners": [
{
"type": "shell",
"inline": ["mkdir -p /root/config"]
},
{
"type": "file",
"source": "veba-bom.json",
"destination": "/root/config/veba-bom.json"
},
{
"type": "shell",
"environment_vars": [
"VEBA_VERSION={{ user `VEBA_VERSION` }}",
"VEBA_COMMIT={{ user `VEBA_COMMIT` }}"
],
"expect_disconnect" : true,
"scripts": [
"scripts/photon-settings.sh",
"scripts/photon-docker.sh"
]
},
{
"type": "shell",
"environment_vars": [
"VEBA_VERSION={{ user `VEBA_VERSION` }}"
],
"pause_before": "20s",
"scripts": [
"scripts/photon-containers.sh",
"scripts/photon-cleanup.sh"
]
},
{
"type": "file",
"source": "files/rc.local",
"destination": "/etc/rc.d/rc.local"
},
{
"type": "file",
"source": "files/setup.sh",
"destination": "/root/setup/setup.sh"
},
{
"type": "file",
"source": "files/setup-01-os.sh",
"destination": "/root/setup/setup-01-os.sh"
},
{
"type": "file",
"source": "files/setup-02-proxy.sh",
"destination": "/root/setup/setup-02-proxy.sh"
},
{
"type": "file",
"source": "files/setup-03-network.sh",
"destination": "/root/setup/setup-03-network.sh"
},
{
"type": "file",
"source": "files/setup-04-kubernetes.sh",
"destination": "/root/setup/setup-04-kubernetes.sh"
},
{
"type": "file",
"source": "files/setup-05-event-processor.sh",
"destination": "/root/setup/setup-05-event-processor.sh"
},
{
"type": "file",
"source": "files/setup-06-event-router.sh",
"destination": "/root/setup/setup-06-event-router.sh"
},
{
"type": "file",
"source": "files/setup-07-tinywww.sh",
"destination": "/root/setup/setup-07-tinywww.sh"
},
{
"type": "file",
"source": "files/setup-08-ingress.sh",
"destination": "/root/setup/setup-08-ingress.sh"
},
{
"type": "file",
"source": "files/setup-09-banner.sh",
"destination": "/root/setup/setup-09-banner.sh"
},
{
"type": "file",
"source": "files/tinywww.yml",
"destination": "/root/config/tinywww.yml"
},
{
"type": "file",
"source": "files/tinywww-debug.yml",
"destination": "/root/config/tinywww-debug.yml"
},
{
"type": "file",
"source": "files/veba-dcui",
"destination": "/usr/bin/veba-dcui"
}
],
"post-processors": [
{
"type": "shell-local",
"environment_vars": ["VEBA_VERSION={{ user `VEBA_VERSION` }}", "VEBA_APPLIANCE_NAME={{ user `vm_name` }}", "FINAL_VEBA_APPLIANCE_NAME={{ user `vm_name` }}_{{user `VEBA_VERSION`}}", "VEBA_OVF_TEMPLATE={{ user `veba_ovf_template` }}"],
"inline": [
"cd manual",
"./add_ovf_properties.sh"
]
},
{
"type": "shell-local",
"inline": [
"pwsh -F unregister_vm.ps1 {{ user `ovftool_deploy_vcenter` }} {{ user `ovftool_deploy_vcenter_username` }} {{ user `ovftool_deploy_vcenter_password` }} {{ user `vm_name` }}"
]
}
]
}