|
| 1 | +{ |
| 2 | + "_comment": "Build with `packer build ubuntu1604.json`", |
| 3 | + "builders": [ |
| 4 | + { |
| 5 | + "boot_command": [ |
| 6 | + "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 7 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 8 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 9 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 10 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 11 | + "<bs><bs><bs><bs>", |
| 12 | + "/install/vmlinuz noapic ", |
| 13 | + "file=/floppy/{{ user `preseed` }} ", |
| 14 | + "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", |
| 15 | + "hostname={{ user `hostname` }} ", |
| 16 | + "grub-installer/bootdev=/dev/sda<wait> ", |
| 17 | + "fb=false debconf/frontend=noninteractive ", |
| 18 | + "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", |
| 19 | + "keyboard-configuration/variant=USA console-setup/ask_detect=false ", |
| 20 | + "passwd/user-fullname={{ user `ssh_fullname` }} ", |
| 21 | + "passwd/user-password={{ user `ssh_password` }} ", |
| 22 | + "passwd/user-password-again={{ user `ssh_password` }} ", |
| 23 | + "passwd/username={{ user `ssh_username` }} ", |
| 24 | + "initrd=/install/initrd.gz -- <enter>" |
| 25 | + ], |
| 26 | + "disk_size": "{{ user `disk_size` }}", |
| 27 | + "floppy_files": [ |
| 28 | + "http/{{ user `preseed` }}" |
| 29 | + ], |
| 30 | + "guest_os_type": "{{ user `vmware_guest_os_type` }}", |
| 31 | + "headless": "{{ user `headless` }}", |
| 32 | + "http_directory": "http", |
| 33 | + "iso_checksum": "{{ user `iso_checksum` }}", |
| 34 | + "iso_checksum_type": "{{ user `iso_checksum_type` }}", |
| 35 | + "iso_urls": [ |
| 36 | + "{{ user `iso_path` }}/{{ user `iso_name` }}", |
| 37 | + "{{ user `iso_url` }}" |
| 38 | + ], |
| 39 | + "output_directory": "output-{{ user `vm_name` }}-vmware-iso", |
| 40 | + "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now", |
| 41 | + "ssh_password": "{{ user `ssh_password` }}", |
| 42 | + "ssh_username": "{{ user `ssh_username` }}", |
| 43 | + "ssh_wait_timeout": "10000s", |
| 44 | + "tools_upload_flavor": "linux", |
| 45 | + "type": "vmware-iso", |
| 46 | + "vm_name": "{{ user `vm_name` }}", |
| 47 | + "vmx_data": { |
| 48 | + "memsize": "{{ user `memory` }}", |
| 49 | + "numvcpus": "{{ user `cpus` }}" |
| 50 | + } |
| 51 | + }, |
| 52 | + { |
| 53 | + "boot_command": [ |
| 54 | + "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 55 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 56 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 57 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 58 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 59 | + "<bs><bs><bs><bs>", |
| 60 | + "/install/vmlinuz noapic ", |
| 61 | + "file=/floppy/{{ user `preseed` }} ", |
| 62 | + "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", |
| 63 | + "hostname={{ user `hostname` }} ", |
| 64 | + "grub-installer/bootdev=/dev/sda<wait> ", |
| 65 | + "fb=false debconf/frontend=noninteractive ", |
| 66 | + "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", |
| 67 | + "keyboard-configuration/variant=USA console-setup/ask_detect=false ", |
| 68 | + "passwd/user-fullname={{ user `ssh_fullname` }} ", |
| 69 | + "passwd/user-password={{ user `ssh_password` }} ", |
| 70 | + "passwd/user-password-again={{ user `ssh_password` }} ", |
| 71 | + "passwd/username={{ user `ssh_username` }} ", |
| 72 | + "initrd=/install/initrd.gz -- <enter>" |
| 73 | + ], |
| 74 | + "disk_size": "{{ user `disk_size` }}", |
| 75 | + "floppy_files": [ |
| 76 | + "http/{{ user `preseed` }}" |
| 77 | + ], |
| 78 | + "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
| 79 | + "guest_os_type": "{{ user `virtualbox_guest_os_type` }}", |
| 80 | + "hard_drive_interface": "sata", |
| 81 | + "headless": "{{ user `headless` }}", |
| 82 | + "iso_checksum": "{{ user `iso_checksum` }}", |
| 83 | + "iso_checksum_type": "{{ user `iso_checksum_type` }}", |
| 84 | + "iso_urls": [ |
| 85 | + "{{ user `iso_path` }}/{{ user `iso_name` }}", |
| 86 | + "{{ user `iso_url` }}" |
| 87 | + ], |
| 88 | + "output_directory": "output-{{ user `vm_name` }}-virtualbox-iso", |
| 89 | + "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now", |
| 90 | + "ssh_password": "{{ user `ssh_password` }}", |
| 91 | + "ssh_username": "{{ user `ssh_username` }}", |
| 92 | + "ssh_wait_timeout": "10000s", |
| 93 | + "type": "virtualbox-iso", |
| 94 | + "vboxmanage": [ |
| 95 | + [ |
| 96 | + "modifyvm", "{{.Name}}", "--memory", "{{ user `memory` }}" |
| 97 | + ], |
| 98 | + [ |
| 99 | + "modifyvm", "{{.Name}}", "--cpus", "{{ user `cpus` }}" |
| 100 | + ] |
| 101 | + ], |
| 102 | + "virtualbox_version_file": ".vbox_version", |
| 103 | + "vm_name": "{{user `vm_name`}}" |
| 104 | + }, |
| 105 | + { |
| 106 | + "boot_command": [ |
| 107 | + "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 108 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 109 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 110 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 111 | + "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", |
| 112 | + "<bs><bs><bs><bs>", |
| 113 | + "/install/vmlinuz noapic ", |
| 114 | + "file=/floppy/{{ user `preseed` }} ", |
| 115 | + "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", |
| 116 | + "hostname={{ user `hostname` }} ", |
| 117 | + "grub-installer/bootdev=/dev/sda<wait> ", |
| 118 | + "fb=false debconf/frontend=noninteractive ", |
| 119 | + "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", |
| 120 | + "keyboard-configuration/variant=USA console-setup/ask_detect=false ", |
| 121 | + "passwd/user-fullname={{ user `ssh_fullname` }} ", |
| 122 | + "passwd/user-password={{ user `ssh_password` }} ", |
| 123 | + "passwd/user-password-again={{ user `ssh_password` }} ", |
| 124 | + "passwd/username={{ user `ssh_username` }} ", |
| 125 | + "initrd=/install/initrd.gz -- <enter>" |
| 126 | + ], |
| 127 | + "disk_size": "{{ user `disk_size` }}", |
| 128 | + "floppy_files": [ |
| 129 | + "http/{{ user `preseed` }}" |
| 130 | + ], |
| 131 | + "guest_os_type": "{{ user `parallels_guest_os_type` }}", |
| 132 | + "http_directory": "http", |
| 133 | + "iso_checksum": "{{ user `iso_checksum` }}", |
| 134 | + "iso_checksum_type": "{{ user `iso_checksum_type` }}", |
| 135 | + "iso_urls": [ |
| 136 | + "{{ user `iso_path` }}/{{ user `iso_name` }}", |
| 137 | + "{{ user `iso_url` }}" |
| 138 | + ], |
| 139 | + "output_directory": "output-{{ user `vm_name` }}-parallels-iso", |
| 140 | + "parallels_tools_flavor": "lin", |
| 141 | + "prlctl": [ |
| 142 | + [ |
| 143 | + "set", "{{.Name}}", "--memsize", "{{ user `memory` }}" |
| 144 | + ], |
| 145 | + [ |
| 146 | + "set", "{{.Name}}", "--cpus", "{{ user `cpus` }}" |
| 147 | + ] |
| 148 | + ], |
| 149 | + "prlctl_version_file": ".prlctl_version", |
| 150 | + "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now", |
| 151 | + "ssh_password": "{{ user `ssh_password` }}", |
| 152 | + "ssh_username": "{{ user `ssh_username` }}", |
| 153 | + "ssh_wait_timeout": "10000s", |
| 154 | + "type": "parallels-iso", |
| 155 | + "vm_name": "{{ user `vm_name` }}" |
| 156 | + } |
| 157 | + ], |
| 158 | + "post-processors": [ |
| 159 | + { |
| 160 | + "keep_input_artifact": false, |
| 161 | + "output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `cm`}}{{user `cm_version`}}-{{user `version`}}.box", |
| 162 | + "type": "vagrant", |
| 163 | + "vagrantfile_template": "{{ user `vagrantfile_template` }}" |
| 164 | + } |
| 165 | + ], |
| 166 | + "provisioners": [ |
| 167 | + { |
| 168 | + "environment_vars": [ |
| 169 | + "CM={{user `cm`}}", |
| 170 | + "CM_VERSION={{user `cm_version`}}", |
| 171 | + "CLEANUP_PAUSE={{user `cleanup_pause`}}", |
| 172 | + "DESKTOP={{user `desktop`}}", |
| 173 | + "DOCKER={{user `docker`}}", |
| 174 | + "UPDATE={{user `update`}}", |
| 175 | + "INSTALL_VAGRANT_KEY={{user `install_vagrant_key`}}", |
| 176 | + "SSH_USERNAME={{user `ssh_username`}}", |
| 177 | + "SSH_PASSWORD={{user `ssh_password`}}", |
| 178 | + "http_proxy={{user `http_proxy`}}", |
| 179 | + "https_proxy={{user `https_proxy`}}", |
| 180 | + "ftp_proxy={{user `ftp_proxy`}}", |
| 181 | + "rsync_proxy={{user `rsync_proxy`}}", |
| 182 | + "no_proxy={{user `no_proxy`}}" |
| 183 | + ], |
| 184 | + "execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", |
| 185 | + "scripts": [ |
| 186 | + "script/update.sh", |
| 187 | + "script/desktop.sh", |
| 188 | + "script/vagrant.sh", |
| 189 | + "script/sshd.sh", |
| 190 | + "script/vmware.sh", |
| 191 | + "script/virtualbox.sh", |
| 192 | + "script/parallels.sh", |
| 193 | + "script/docker.sh", |
| 194 | + "script/cmtool.sh", |
| 195 | + "script/motd.sh", |
| 196 | + "custom-script.sh", |
| 197 | + "script/minimize.sh", |
| 198 | + "script/cleanup.sh" |
| 199 | + ], |
| 200 | + "type": "shell" |
| 201 | + } |
| 202 | + ], |
| 203 | + "variables": { |
| 204 | + "cleanup_pause": "", |
| 205 | + "cm": "nocm", |
| 206 | + "cm_version": "", |
| 207 | + "cpus": "1", |
| 208 | + "custom_script": ".", |
| 209 | + "desktop": "false", |
| 210 | + "disk_size": "65536", |
| 211 | + "docker": "false", |
| 212 | + "ftp_proxy": "{{env `ftp_proxy`}}", |
| 213 | + "headless": "", |
| 214 | + "http_proxy": "{{env `http_proxy`}}", |
| 215 | + "https_proxy": "{{env `https_proxy`}}", |
| 216 | + "install_vagrant_key": "true", |
| 217 | + "iso_checksum": "e3d456d3351ddfedeeb0b0774c9d1e0fa24d3e5e", |
| 218 | + "iso_checksum_type": "sha1", |
| 219 | + "iso_name": "ubuntu-16.04-beta2-server-amd64.iso", |
| 220 | + "iso_path": "/Volumes/Thunder/software/ubuntu", |
| 221 | + "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04-beta2-server-amd64.iso", |
| 222 | + "memory": "512", |
| 223 | + "no_proxy": "{{env `no_proxy`}}", |
| 224 | + "parallels_guest_os_type": "ubuntu", |
| 225 | + "preseed" : "preseed-1504.cfg", |
| 226 | + "rsync_proxy": "{{env `rsync_proxy`}}", |
| 227 | + "hostname": "vagrant", |
| 228 | + "ssh_fullname": "vagrant", |
| 229 | + "ssh_password": "vagrant", |
| 230 | + "ssh_username": "vagrant", |
| 231 | + "update": "false", |
| 232 | + "vagrantfile_template": "", |
| 233 | + "version": "0.1.0", |
| 234 | + "virtualbox_guest_os_type": "Ubuntu_64", |
| 235 | + "vm_name": "ubuntu1604", |
| 236 | + "vmware_guest_os_type": "ubuntu-64" |
| 237 | + } |
| 238 | +} |
| 239 | + |
0 commit comments