UniFi Network Controller VM image
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.8 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. {
  2. "variables": {
  3. "iso_url": "http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-standard-3.9.3-x86_64.iso",
  4. "iso_checksum": "6e28c5c902ccb6db24596dfb6a1c255c7989d0b9be4e92e87a8eff523201a459",
  5. "iso_checksum_type": "sha256",
  6. "boot_wait": "10s",
  7. "root_password": null,
  8. "ssh_timeout": "60m",
  9. "machine_hostname": "unifi",
  10. "http_directory": "http/",
  11. "output_directory": "output/base/"
  12. },
  13. "builders": [
  14. {
  15. "type": "virtualbox-iso",
  16. "guest_os_type": "Linux_64",
  17. "format": "ova",
  18. "iso_url": "{{user `iso_url`}}",
  19. "iso_checksum": "{{user `iso_checksum`}}",
  20. "iso_checksum_type": "{{user `iso_checksum_type`}}",
  21. "http_directory": "{{user `http_directory`}}",
  22. "output_directory": "{{user `output_directory`}}",
  23. "boot_wait": "{{user `boot_wait`}}",
  24. "boot_command": [
  25. "root<enter><wait>",
  26. "ifconfig eth0 up && ",
  27. "udhcpc -i eth0<enter>",
  28. "<wait5>",
  29. "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers<enter><wait>",
  30. "sed -i ",
  31. "-e \"s/:hostname:/{{user `machine_hostname`}}/g\" ",
  32. "answers<enter>",
  33. "sed -i \"s/rc-service \\$svc start/#&/\" /sbin/setup-sshd<enter>",
  34. "setup-alpine -f answers && ",
  35. "mount /dev/sda3 /mnt && ",
  36. "echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config && ",
  37. "rc-update add acpid && ",
  38. "umount /mnt && ",
  39. "reboot",
  40. "<enter>",
  41. "<wait5>",
  42. "{{user `root_password`}}<enter><wait>",
  43. "{{user `root_password`}}<enter><wait20>",
  44. "y<enter>"
  45. ],
  46. "communicator": "ssh",
  47. "ssh_username": "root",
  48. "ssh_password": "{{user `root_password`}}",
  49. "ssh_timeout": "{{user `ssh_timeout`}}"
  50. }
  51. ]
  52. }