-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpackerConfig.json
executable file
·97 lines (97 loc) · 3.68 KB
/
packerConfig.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
{
"variables": {
"iso_downloaded": null,
"oracle_database_downloaded": null,
"proxy": "",
"skip_export": "true"
},
"provisioners": [
{
"type": "file",
"source": "upload",
"destination": "/tmp"
},
{
"type": "file",
"source": "put_files_here",
"destination": "/tmp"
},
{
"type": "shell",
"inline": ["echo 'oracle' | sudo -S -E bash -c 'mv /tmp/upload /tmp/1 && chmod -R 777 /tmp/1 && chown -R oracle /tmp/1 && /tmp/1/1updateLinux.sh {{user `proxy`}} && /sbin/shutdown -r +1'"]
},
{
"pause_before": "200s",
"type": "shell",
"inline": ["echo not necessaryQQQ /home/oracle/bin/nuketimestamps>/dev/null && echo 'oracle'|sudo -S -E bash -c '/tmp/1/2afterFirstReboot.sh 2>&1 | tee /root/log$$ && /tmp/1/3topLevel.sh && /sbin/shutdown -r +1'"
]
},
{
"pause_before": "200s",
"type": "file",
"source": "log.zip",
"destination": "log.zip",
"direction": "download"
},
{
"type": "shell",
"inline": ["rm log.zip"
]
}
],
"builders": [
{
"type": "virtualbox-iso",
"ssh_skip_nat_mapping": true,
"ssh_host": "127.0.0.1",
"ssh_port": 2222,
"disk_size": "30000",
"guest_os_type": "Oracle_64",
"hard_drive_interface": "sata",
"boot_command": [
"<wait10>",
"<tab><wait5> text<wait> noverifyssl <wait>",
"ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/buildTimeConfig.cfg<enter><wait>"
],
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "4096" ],
[ "modifyvm", "{{.Name}}", "--cpus", "2" ],
[ "createhd", "--filename", "Oracle DB Developer VM__2.vdi", "--size", "30000"],
[ "storageattach", "{{.Name}}", "--storagectl", "SATA Controller", "--port", "1", "--device", "0" ,"--type", "hdd", "--medium", "Oracle DB Developer VM__2.vdi"],
[ "modifyvm", "{{.Name}}", "--clipboard", "bidirectional"],
[ "modifyvm", "{{.Name}}", "--draganddrop", "bidirectional"],
[ "modifyvm", "{{.Name}}", "--paravirtprovider", "kvm"],
[ "modifyvm", "{{.Name}}", "--natpf1", "net8,tcp,,1521,,1521"],
[ "modifyvm", "{{.Name}}", "--natpf1", "ssh,tcp,,2222,,22"],
[ "modifyvm", "{{.Name}}", "--natpf1", "apex8080,tcp,,8080,,8080"],
[ "modifyvm", "{{.Name}}", "--natpf1", "apex8081,tcp,,8081,,8081"],
[ "modifyvm", "{{.Name}}", "--natpf1", "ords9090,tcp,,9090,,9090"],
[ "modifyvm", "{{.Name}}", "--audio", "none"],
[ "modifyvm", "{{.Name}}", "--vram", "128"]
],
"vboxmanage_post": [
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
[ "modifyvm", "{{.Name}}", "--cpus", "1" ],
[ "storageattach", "{{.Name}}", "--storagectl", "IDE Controller", "--port", "1", "--device", "0", "--type", "dvddrive", "--medium", "emptydrive"]
],
"guest_additions_mode": "upload",
"iso_url": "OracleLinux-R7-U3-Server-x86_64-dvd.iso",
"iso_checksum_type": "md5",
"iso_checksum": "e44eff40f3a16ffa008285e5c52e1199",
"format": "ova",
"boot_wait": "10s",
"ssh_username": "oracle",
"ssh_password": "oracle",
"ssh_wait_timeout": "2400s",
"output_directory": "output",
"shutdown_command": "echo 'oracle' | sudo -S shutdown -P now",
"post_shutdown_delay": "30s",
"keep_registered": "{{user `skip_export`}}",
"skip_export": "{{user `skip_export`}}",
"shutdown_timeout": "10m",
"vm_name": "Oracle DB Developer VM",
"http_directory":"upload",
"export_opts": ["--vsys", "0","--eulafile","license.txt", "--product", "Oracle RDBMS 18.3, Application Express 18.1,REST Data Services 18.2,SQL Developer 18.2", "--producturl", "http://otn.oracle.com", "--vendor", "Oracle", "--vendorurl", "http://www.oracle.com", "--version", "July_2017"]
}
]
}