|
| 1 | +{ |
| 2 | +"variables": { |
| 3 | + "iso_downloaded": null, |
| 4 | + "oracle_database_downloaded": null, |
| 5 | + "proxy": "", |
| 6 | + "skip_export": "true" |
| 7 | +}, |
| 8 | + "provisioners": [ |
| 9 | + { |
| 10 | + "type": "file", |
| 11 | + "source": "upload", |
| 12 | + "destination": "/tmp" |
| 13 | + }, |
| 14 | + { |
| 15 | + "type": "file", |
| 16 | + "source": "put_files_here", |
| 17 | + "destination": "/tmp" |
| 18 | + }, |
| 19 | + { |
| 20 | + "type": "shell", |
| 21 | + "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'"] |
| 22 | + }, |
| 23 | + { |
| 24 | + "pause_before": "200s", |
| 25 | + "type": "shell", |
| 26 | + "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'" |
| 27 | + ] |
| 28 | + }, |
| 29 | + { |
| 30 | + "pause_before": "200s", |
| 31 | + "type": "file", |
| 32 | + "source": "log.zip", |
| 33 | + "destination": "log.zip", |
| 34 | + "direction": "download" |
| 35 | + }, |
| 36 | + { |
| 37 | + "type": "shell", |
| 38 | + "inline": ["rm log.zip" |
| 39 | + ] |
| 40 | + } |
| 41 | + ], |
| 42 | + "builders": [ |
| 43 | + { |
| 44 | + "type": "virtualbox-iso", |
| 45 | + "ssh_skip_nat_mapping": true, |
| 46 | + "ssh_host": "127.0.0.1", |
| 47 | + "ssh_port": 2222, |
| 48 | + "disk_size": "30000", |
| 49 | + "guest_os_type": "Oracle_64", |
| 50 | + "hard_drive_interface": "sata", |
| 51 | + "boot_command": [ |
| 52 | + "<wait10>", |
| 53 | + "<tab><wait5> text<wait> noverifyssl <wait>", |
| 54 | + "ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/buildTimeConfig.cfg<enter><wait>" |
| 55 | + ], |
| 56 | + "vboxmanage": [ |
| 57 | + [ "modifyvm", "{{.Name}}", "--memory", "4096" ], |
| 58 | + [ "modifyvm", "{{.Name}}", "--cpus", "2" ], |
| 59 | + [ "createhd", "--filename", "Oracle DB Developer VMo_2.vdi", "--size", "30000"], |
| 60 | + [ "storageattach", "{{.Name}}", "--storagectl", "SATA Controller", "--port", "1", "--device", "0" ,"--type", "hdd", "--medium", "Oracle DB Developer VMo_2.vdi"], |
| 61 | + [ "modifyvm", "{{.Name}}", "--clipboard", "bidirectional"], |
| 62 | + [ "modifyvm", "{{.Name}}", "--draganddrop", "bidirectional"], |
| 63 | + [ "modifyvm", "{{.Name}}", "--paravirtprovider", "kvm"], |
| 64 | + [ "modifyvm", "{{.Name}}", "--natpf1", "net8,tcp,,1521,,1521"], |
| 65 | + [ "modifyvm", "{{.Name}}", "--natpf1", "ssh,tcp,,2222,,22"], |
| 66 | + [ "modifyvm", "{{.Name}}", "--natpf1", "apex8080,tcp,,8080,,8080"], |
| 67 | + [ "modifyvm", "{{.Name}}", "--natpf1", "apex8081,tcp,,8081,,8081"], |
| 68 | + [ "modifyvm", "{{.Name}}", "--audio", "none"], |
| 69 | + [ "modifyvm", "{{.Name}}", "--vram", "128"] |
| 70 | + ], |
| 71 | + "vboxmanage_post": [ |
| 72 | + [ "modifyvm", "{{.Name}}", "--memory", "2048" ], |
| 73 | + [ "modifyvm", "{{.Name}}", "--cpus", "1" ], |
| 74 | + [ "storageattach", "{{.Name}}", "--storagectl", "IDE Controller", "--port", "1", "--device", "0", "--type", "dvddrive", "--medium", "emptydrive"] |
| 75 | + ], |
| 76 | + "guest_additions_mode": "upload", |
| 77 | + "iso_url": "OracleLinux-R7-U3-Server-x86_64-dvd.iso", |
| 78 | + "iso_checksum_type": "md5", |
| 79 | + "iso_checksum": "e44eff40f3a16ffa008285e5c52e1199", |
| 80 | + "format": "ova", |
| 81 | + "boot_wait": "10s", |
| 82 | + "ssh_username": "oracle", |
| 83 | + "ssh_password": "oracle", |
| 84 | + "ssh_wait_timeout": "2400s", |
| 85 | + "output_directory": "output", |
| 86 | + "shutdown_command": "echo 'oracle' | sudo -S shutdown -P now", |
| 87 | + "post_shutdown_delay": "30s", |
| 88 | + "keep_registered": "{{user `skip_export`}}", |
| 89 | + "skip_export": "{{user `skip_export`}}", |
| 90 | + "shutdown_timeout": "10m", |
| 91 | + "vm_name": "Oracle DB Developer VM", |
| 92 | + "http_directory":"upload", |
| 93 | + "export_opts": ["--vsys", "0","--eulafile","license.txt", "--product", "Oracle RDBMS 12.2, Application Express 5.1,REST Data Services 3.0,SQL Developer 4.2", "--producturl", "http://otn.oracle.com", "--vendor", "Oracle", "--vendorurl", "http://www.oracle.com", "--version", "May_2017"] |
| 94 | + } |
| 95 | + ] |
| 96 | +} |
0 commit comments