-
Notifications
You must be signed in to change notification settings - Fork 3
/
photon.json
135 lines (135 loc) · 3.99 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
{
"min_packer_version": "1.6.3",
"variables": {
"k8s_app_ovf_template": "photon.xml.template",
"ovftool_deploy_vcenter": "10.10.60.10",
"ovftool_deploy_vcenter_username": "administrator@jarvis.lab",
"ovftool_deploy_vcenter_password": "VMware1!"
},
"builders": [
{
"type": "vmware-iso",
"vm_name": "{{ user `vm_name` }}",
"guest_os_type": "Other",
"version": "17",
"disk_size": "25600",
"boot_command": [
"<esc><wait>",
"vmlinuz initrd=initrd.img root=/dev/ram0 loglevel=3 ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/photon-kickstart.json photon.media=cdrom insecure_installation=1",
"<enter>"
],
"boot_wait": "10s",
"headless": false,
"vnc_over_websocket": true,
"insecure_connection": true,
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"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 `K8S_APP_VERSION` }}"
}
}
],
"provisioners": [
{
"type": "shell",
"inline": ["mkdir -p /root/config"]
},
{
"type": "file",
"source": "k8s-app-bom.json",
"destination": "/root/config/k8s-app-bom.json"
},
{
"type": "shell",
"environment_vars": [
"K8S_APP_VERSION={{ user `K8S_APP_VERSION` }}"
],
"expect_disconnect" : true,
"scripts": [
"scripts/photon-settings.sh",
"scripts/photon-docker.sh"
]
},
{
"type": "shell",
"environment_vars": [
"K8S_APP_VERSION={{ user `K8S_APP_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/getOvfProperty.py",
"destination": "/root/setup/getOvfProperty.py"
},
{
"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-shell.sh",
"destination": "/root/setup/setup-05-shell.sh"
}
],
"post-processors": [
{
"type": "shell-local",
"environment_vars": ["K8S_APP_VERSION={{ user `K8S_APP_VERSION` }}", "K8S_APPLIANCE_NAME={{ user `vm_name` }}", "FINAL_K8S_APPLIANCE_NAME={{ user `vm_name` }}_{{user `K8S_APP_VERSION`}}", "K8S_APP_OVF_TEMPLATE={{ user `k8s_app_ovf_template` }}"],
"inline": [
"cd manual",
"./add_ovf_properties.sh"
]
}
]
}