| ramonsalguer | 8ac0f08 | 2020-06-03 20:13:34 +0200 | [diff] [blame] | 1 | { |
| 2 | "builders": [ |
| 3 | { |
| 4 | "boot_command": [ |
| 5 | "<esc><wait>", |
| 6 | "<esc><wait>", |
| 7 | "<enter><wait>", |
| 8 | "/install/vmlinuz<wait>", |
| 9 | " auto<wait>", |
| 10 | " console-setup/ask_detect=false<wait>", |
| 11 | " console-setup/layoutcode=us<wait>", |
| 12 | " console-setup/modelcode=pc105<wait>", |
| 13 | " debconf/frontend=noninteractive<wait>", |
| 14 | " debian-installer=en_US.UTF-8<wait>", |
| 15 | " fb=false<wait>", |
| 16 | " initrd=/install/initrd.gz<wait>", |
| 17 | " kbd-chooser/method=us<wait>", |
| 18 | " keyboard-configuration/layout=USA<wait>", |
| 19 | " keyboard-configuration/variant=USA<wait>", |
| 20 | " locale=en_US.UTF-8<wait>", |
| 21 | " netcfg/get_domain=vm<wait>", |
| 22 | " netcfg/get_hostname=vagrant<wait>", |
| 23 | " grub-installer/bootdev=/dev/sda<wait>", |
| 24 | " noapic<wait>", |
| 25 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", |
| 26 | " -- <wait>", |
| 27 | "<enter><wait>" |
| 28 | ], |
| 29 | "boot_wait": "10s", |
| 30 | "disk_size": "{{user `disk_size`}}", |
| 31 | "guest_additions_url": "{{ user `guest_additions_url` }}", |
| 32 | "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", |
| 33 | "guest_os_type": "Ubuntu_64", |
| 34 | "hard_drive_interface": "sata", |
| 35 | "headless": "{{ user `headless` }}", |
| 36 | "http_directory": "{{user `http_directory`}}", |
| 37 | "iso_checksum": "{{user `iso_checksum`}}", |
| 38 | "iso_checksum_type": "{{user `iso_checksum_type`}}", |
| 39 | "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", |
| 40 | "output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-virtualbox", |
| 41 | "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", |
| 42 | "ssh_password": "vagrant", |
| 43 | "ssh_port": 22, |
| 44 | "ssh_username": "vagrant", |
| 45 | "ssh_timeout": "10000s", |
| 46 | "type": "virtualbox-iso", |
| 47 | "memory": "{{ user `memory` }}", |
| 48 | "cpus": "{{ user `cpus` }}", |
| 49 | "virtualbox_version_file": ".vbox_version", |
| 50 | "vm_name": "{{ user `template` }}" |
| 51 | }, |
| 52 | { |
| 53 | "boot_command": [ |
| 54 | "<esc><wait>", |
| 55 | "<esc><wait>", |
| 56 | "<enter><wait>", |
| 57 | "/install/vmlinuz<wait>", |
| 58 | " auto<wait>", |
| 59 | " console-setup/ask_detect=false<wait>", |
| 60 | " console-setup/layoutcode=us<wait>", |
| 61 | " console-setup/modelcode=pc105<wait>", |
| 62 | " debconf/frontend=noninteractive<wait>", |
| 63 | " debian-installer=en_US.UTF-8<wait>", |
| 64 | " fb=false<wait>", |
| 65 | " initrd=/install/initrd.gz<wait>", |
| 66 | " kbd-chooser/method=us<wait>", |
| 67 | " keyboard-configuration/layout=USA<wait>", |
| 68 | " keyboard-configuration/variant=USA<wait>", |
| 69 | " locale=en_US.UTF-8<wait>", |
| 70 | " netcfg/get_domain=vm<wait>", |
| 71 | " netcfg/get_hostname=vagrant<wait>", |
| 72 | " grub-installer/bootdev=/dev/sda<wait>", |
| 73 | " noapic<wait>", |
| 74 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", |
| 75 | " -- <wait>", |
| 76 | "<enter><wait>" |
| 77 | ], |
| 78 | "boot_wait": "10s", |
| 79 | "disk_size": "{{user `disk_size`}}", |
| 80 | "guest_os_type": "ubuntu-64", |
| 81 | "headless": "{{ user `headless` }}", |
| 82 | "http_directory": "{{user `http_directory`}}", |
| 83 | "iso_checksum": "{{user `iso_checksum`}}", |
| 84 | "iso_checksum_type": "{{user `iso_checksum_type`}}", |
| 85 | "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", |
| 86 | "output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-vmware", |
| 87 | "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", |
| 88 | "ssh_password": "vagrant", |
| 89 | "ssh_port": 22, |
| 90 | "ssh_username": "vagrant", |
| 91 | "ssh_timeout": "10000s", |
| 92 | "tools_upload_flavor": "linux", |
| 93 | "type": "vmware-iso", |
| 94 | "vm_name": "{{ user `template` }}", |
| 95 | "memory": "{{ user `memory` }}", |
| 96 | "cpus": "{{ user `cpus` }}", |
| 97 | "vmx_data": { |
| 98 | "cpuid.coresPerSocket": "1", |
| 99 | "ethernet0.pciSlotNumber": "32" |
| 100 | }, |
| 101 | "vmx_remove_ethernet_interfaces": true |
| 102 | }, |
| 103 | { |
| 104 | "boot_command": [ |
| 105 | "<esc><wait>", |
| 106 | "<esc><wait>", |
| 107 | "<enter><wait>", |
| 108 | "/install/vmlinuz<wait>", |
| 109 | " auto<wait>", |
| 110 | " console-setup/ask_detect=false<wait>", |
| 111 | " console-setup/layoutcode=us<wait>", |
| 112 | " console-setup/modelcode=pc105<wait>", |
| 113 | " debconf/frontend=noninteractive<wait>", |
| 114 | " debian-installer=en_US.UTF-8<wait>", |
| 115 | " fb=false<wait>", |
| 116 | " initrd=/install/initrd.gz<wait>", |
| 117 | " kbd-chooser/method=us<wait>", |
| 118 | " keyboard-configuration/layout=USA<wait>", |
| 119 | " keyboard-configuration/variant=USA<wait>", |
| 120 | " locale=en_US.UTF-8<wait>", |
| 121 | " netcfg/get_domain=vm<wait>", |
| 122 | " netcfg/get_hostname=vagrant<wait>", |
| 123 | " grub-installer/bootdev=/dev/sda<wait>", |
| 124 | " noapic<wait>", |
| 125 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", |
| 126 | " -- <wait>", |
| 127 | "<enter><wait>" |
| 128 | ], |
| 129 | "boot_wait": "10s", |
| 130 | "disk_size": "{{user `disk_size`}}", |
| 131 | "guest_os_type": "ubuntu", |
| 132 | "http_directory": "{{user `http_directory`}}", |
| 133 | "iso_checksum": "{{user `iso_checksum`}}", |
| 134 | "iso_checksum_type": "{{user `iso_checksum_type`}}", |
| 135 | "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", |
| 136 | "output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-parallels", |
| 137 | "parallels_tools_flavor": "lin", |
| 138 | "memory": "{{ user `memory` }}", |
| 139 | "cpus": "{{ user `cpus` }}", |
| 140 | "prlctl_version_file": ".prlctl_version", |
| 141 | "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", |
| 142 | "ssh_password": "vagrant", |
| 143 | "ssh_port": 22, |
| 144 | "ssh_username": "vagrant", |
| 145 | "ssh_timeout": "10000s", |
| 146 | "type": "parallels-iso", |
| 147 | "vm_name": "{{ user `template` }}" |
| 148 | }, |
| 149 | { |
| 150 | "boot_command": [ |
| 151 | "<esc><wait>", |
| 152 | "<esc><wait>", |
| 153 | "<enter><wait>", |
| 154 | "/install/vmlinuz<wait>", |
| 155 | " auto<wait>", |
| 156 | " console-setup/ask_detect=false<wait>", |
| 157 | " console-setup/layoutcode=us<wait>", |
| 158 | " console-setup/modelcode=pc105<wait>", |
| 159 | " debconf/frontend=noninteractive<wait>", |
| 160 | " debian-installer=en_US.UTF-8<wait>", |
| 161 | " fb=false<wait>", |
| 162 | " initrd=/install/initrd.gz<wait>", |
| 163 | " kbd-chooser/method=us<wait>", |
| 164 | " keyboard-configuration/layout=USA<wait>", |
| 165 | " keyboard-configuration/variant=USA<wait>", |
| 166 | " locale=en_US.UTF-8<wait>", |
| 167 | " netcfg/get_domain=vm<wait>", |
| 168 | " netcfg/get_hostname=vagrant<wait>", |
| 169 | " grub-installer/bootdev=/dev/vda<wait>", |
| 170 | " noapic<wait>", |
| 171 | " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", |
| 172 | " -- <wait>", |
| 173 | "<enter><wait>" |
| 174 | ], |
| 175 | "boot_wait": "10s", |
| 176 | "disk_size": "{{user `disk_size`}}", |
| 177 | "headless": "{{ user `headless` }}", |
| 178 | "http_directory": "{{user `http_directory`}}", |
| 179 | "iso_checksum": "{{user `iso_checksum`}}", |
| 180 | "iso_checksum_type": "{{user `iso_checksum_type`}}", |
| 181 | "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", |
| 182 | "output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-qemu", |
| 183 | "memory": "{{ user `memory` }}", |
| 184 | "cpus": "{{ user `cpus` }}", |
| 185 | "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", |
| 186 | "ssh_password": "vagrant", |
| 187 | "ssh_port": 22, |
| 188 | "ssh_username": "vagrant", |
| 189 | "ssh_timeout": "10000s", |
| 190 | "type": "qemu", |
| 191 | "vm_name": "{{ user `template` }}" |
| 192 | }, |
| 193 | { |
| 194 | "type": "openstack", |
| 195 | "source_image_name": "{{ user `openstack_image` }}", |
| 196 | "ssh_username": "ubuntu", |
| 197 | "ssh_port": 22, |
| 198 | "ssh_timeout": "10000s", |
| 199 | "flavor": "{{ user `openstack_flavor` }}", |
| 200 | "image_name": "{{ user `template` }}", |
| 201 | "networks": [ "{{ user `openstack_internal_net` }}" ], |
| 202 | "floating_ip_network": "{{ user `openstack_floating_net` }}" |
| 203 | }, |
| 204 | { |
| 205 | "boot_command": [ |
| 206 | "<esc><wait10><esc><esc><enter><wait>", |
| 207 | "set gfxpayload=1024x768<enter>", |
| 208 | "linux /install/vmlinuz ", |
| 209 | "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed-hyperv.cfg ", |
| 210 | "debian-installer=en_US.UTF-8 auto locale=en_US.UTF-8 kbd-chooser/method=us ", |
| 211 | "hostname={{.Name}} ", |
| 212 | "fb=false debconf/frontend=noninteractive ", |
| 213 | "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", |
| 214 | "keyboard-configuration/variant=USA console-setup/ask_detect=false <enter>", |
| 215 | "initrd /install/initrd.gz<enter>", |
| 216 | "boot<enter>" |
| 217 | ], |
| 218 | "boot_wait": "10s", |
| 219 | "communicator": "ssh", |
| 220 | "cpus": "{{ user `cpus` }}", |
| 221 | "disk_size": "{{user `disk_size`}}", |
| 222 | "enable_secure_boot": false, |
| 223 | "generation": "{{user `hyperv_generation`}}", |
| 224 | "http_directory": "{{user `http_directory`}}", |
| 225 | "iso_checksum": "{{user `iso_checksum`}}", |
| 226 | "iso_checksum_type": "{{user `iso_checksum_type`}}", |
| 227 | "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", |
| 228 | "memory": "{{user `memory`}}", |
| 229 | "output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-hyperv", |
| 230 | "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", |
| 231 | "ssh_password": "vagrant", |
| 232 | "ssh_port": 22, |
| 233 | "ssh_timeout": "10000s", |
| 234 | "ssh_username": "vagrant", |
| 235 | "switch_name": "{{user `hyperv_switch`}}", |
| 236 | "type": "hyperv-iso", |
| 237 | "vm_name": "{{ user `template` }}" |
| 238 | } |
| 239 | ], |
| 240 | "post-processors": [ |
| 241 | { |
| 242 | "output": "{{ user `build_directory` }}/{{user `box_basename`}}.{{.Provider}}.box", |
| 243 | "type": "vagrant" |
| 244 | } |
| 245 | ], |
| 246 | "provisioners": [ |
| 247 | { |
| 248 | "environment_vars": [ |
| 249 | "HOME_DIR=/home/vagrant", |
| 250 | "http_proxy={{user `http_proxy`}}", |
| 251 | "https_proxy={{user `https_proxy`}}", |
| 252 | "no_proxy={{user `no_proxy`}}" |
| 253 | ], |
| 254 | "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", |
| 255 | "expect_disconnect": true, |
| 256 | "scripts": [ |
| 257 | "{{template_dir}}/../_common/check_vagrant_user.sh", |
| 258 | "{{template_dir}}/scripts/update.sh", |
| 259 | "{{template_dir}}/../_common/motd.sh", |
| 260 | "{{template_dir}}/../_common/sshd.sh", |
| 261 | "{{template_dir}}/scripts/networking.sh", |
| 262 | "{{template_dir}}/scripts/sudoers.sh", |
| 263 | "{{template_dir}}/scripts/vagrant.sh", |
| 264 | "{{template_dir}}/../_common/virtualbox.sh", |
| 265 | "{{template_dir}}/scripts/vmware.sh", |
| 266 | "{{template_dir}}/../_common/parallels.sh", |
| 267 | "{{template_dir}}/scripts/hyperv.sh" |
| 268 | ], |
| 269 | "type": "shell" |
| 270 | }, |
| 271 | { |
| 272 | "environment_vars": [ |
| 273 | "HOME_DIR=/home/vagrant", |
| 274 | "http_proxy={{user `http_proxy`}}", |
| 275 | "https_proxy={{user `https_proxy`}}", |
| 276 | "no_proxy={{user `no_proxy`}}", |
| 277 | "STATE_FOLDER={{user `state_folder`}}" |
| 278 | ], |
| 279 | "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S su - vagrant -c '{{.Vars}} {{.Path}}'", |
| 280 | "expect_disconnect": "true", |
| 281 | "scripts": [ |
| 282 | "{{template_dir}}/scripts/install_osm.sh" |
| 283 | ], |
| 284 | "type": "shell" |
| 285 | }, |
| 286 | { |
| 287 | "type": "file", |
| 288 | "source": "{{template_dir}}/scripts/update_osm_info_docker.sh", |
| 289 | "destination": "/tmp/update_osm_info_docker.sh" |
| 290 | }, |
| 291 | { |
| 292 | "environment_vars": [ |
| 293 | "HOME_DIR=/home/vagrant", |
| 294 | "http_proxy={{user `http_proxy`}}", |
| 295 | "https_proxy={{user `https_proxy`}}", |
| 296 | "no_proxy={{user `no_proxy`}}", |
| 297 | "STATE_FOLDER={{user `state_folder`}}" |
| 298 | ], |
| 299 | "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S su - vagrant -c '{{.Vars}} {{.Path}}'", |
| 300 | "expect_disconnect": "true", |
| 301 | "inline": [ |
| 302 | "sudo mv /tmp/update_osm_info_docker.sh ${STATE_FOLDER}/", |
| 303 | "sudo chmod a+rx ${STATE_FOLDER}/update_osm_info_docker.sh" |
| 304 | ], |
| 305 | "type": "shell" |
| 306 | }, |
| 307 | { |
| 308 | "environment_vars": [ |
| 309 | "HOME_DIR=/home/vagrant", |
| 310 | "http_proxy={{user `http_proxy`}}", |
| 311 | "https_proxy={{user `https_proxy`}}", |
| 312 | "no_proxy={{user `no_proxy`}}" |
| 313 | ], |
| 314 | "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", |
| 315 | "expect_disconnect": true, |
| 316 | "scripts": [ |
| 317 | "{{template_dir}}/scripts/cleanup.sh", |
| 318 | "{{template_dir}}/../_common/minimize.sh" |
| 319 | ], |
| 320 | "type": "shell" |
| 321 | } |
| 322 | ], |
| 323 | "variables": { |
| 324 | "box_basename": "osm-7.0.1", |
| 325 | "build_directory": "../../builds", |
| 326 | "http_directory": "{{template_dir}}/http", |
| 327 | "build_timestamp": "{{isotime \"20060102150405\"}}", |
| 328 | "cpus": "1", |
| 329 | "disk_size": "65536", |
| 330 | "git_revision": "__unknown_git_revision__", |
| 331 | "headless": "", |
| 332 | "http_proxy": "{{env `http_proxy`}}", |
| 333 | "https_proxy": "{{env `https_proxy`}}", |
| 334 | "hyperv_generation": "2", |
| 335 | "openstack_internal_net": "{{env `NETWORK_ID`}}", |
| 336 | "openstack_floating_net": "{{env `VIM_EXT_NET`}}", |
| 337 | "openstack_flavor": "{{env `FLAVOR_NAME`}}", |
| 338 | "openstack_image": "{{env `SOURCE_IMAGE_NAME`}}", |
| 339 | "guest_additions_url": "", |
| 340 | "iso_checksum": "e2ecdace33c939527cbc9e8d23576381c493b071107207d2040af72595f8990b", |
| 341 | "iso_checksum_type": "sha256", |
| 342 | "iso_name": "ubuntu-18.04.4-server-amd64.iso", |
| 343 | "memory": "6144", |
| 344 | "mirror": "http://cdimage.ubuntu.com", |
| 345 | "mirror_directory": "ubuntu/releases/18.04.4/release", |
| 346 | "name": "osm-7.0.1", |
| 347 | "no_proxy": "{{env `no_proxy`}}", |
| 348 | "preseed_path": "preseed.cfg", |
| 349 | "template": "osm-7.0.1-amd64", |
| 350 | "state_folder": "/etc/osm", |
| 351 | "version": "TIMESTAMP" |
| 352 | } |
| 353 | } |