HashiCorp Packer build configuration for Babelbox (Debian Installer Demo) VMs.
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.

120 lines
3.5KB

  1. {
  2. "description": "Debian Babelbox",
  3. "builders": [
  4. {
  5. "type": "virtualbox-iso",
  6. "boot_command": [
  7. "<esc><wait>",
  8. "install <wait>",
  9. "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
  10. "debian-installer/locale=en_US <wait>",
  11. "auto <wait>",
  12. "netcfg/get_hostname={{ .Name }} <wait>",
  13. "netcfg/get_domain=demo.local <wait>",
  14. "fb=false <wait>",
  15. "debconf/frontend=noninteractive <wait>",
  16. "console-setup/ask_detect=false <wait>",
  17. "console-keymaps-at/keymap=de <wait>",
  18. "keyboard-configuration/xkb-keymap=de <wait>",
  19. "<enter><wait>"
  20. ],
  21. "disk_size": 10240,
  22. "guest_os_type": "Debian_64",
  23. "hard_drive_interface": "sata",
  24. "headless": false,
  25. "http_directory": "http",
  26. "iso_checksum": "6a901b5abe43d88b39d627e1339d15507cc38f980036b928f835e0f0e957d3d8",
  27. "iso_checksum_type": "sha256",
  28. "iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso",
  29. "shutdown_command": "sudo systemctl poweroff",
  30. "ssh_username": "demo",
  31. "ssh_password": "babelbox",
  32. "ssh_port": "22",
  33. "ssh_wait_timeout": "1800s",
  34. "vm_name": "babelbox-buster",
  35. "vboxmanage": [
  36. [
  37. "modifyvm",
  38. "{{.Name}}",
  39. "--memory",
  40. "1024"
  41. ],
  42. [
  43. "modifyvm",
  44. "{{.Name}}",
  45. "--cpus",
  46. "1"
  47. ]
  48. ],
  49. "output_directory": "babelbox-virtualbox"
  50. },
  51. {
  52. "type": "qemu",
  53. "iso_checksum": "6a901b5abe43d88b39d627e1339d15507cc38f980036b928f835e0f0e957d3d8",
  54. "iso_checksum_type": "sha256",
  55. "iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso",
  56. "output_directory": "babelbox-qemu",
  57. "shutdown_command": "sudo systemctl poweroff",
  58. "disk_size": "10240M",
  59. "format": "qcow2",
  60. "accelerator": "kvm",
  61. "http_directory": "http-qemu",
  62. "ssh_username": "demo",
  63. "ssh_password": "babelbox",
  64. "ssh_timeout": "20m",
  65. "vm_name": "babelbox-buster",
  66. "net_device": "virtio-net",
  67. "disk_interface": "virtio",
  68. "disk_detect_zeroes": "on",
  69. "boot_wait": "10s",
  70. "boot_command": [
  71. "<esc><wait>",
  72. "install <wait>",
  73. "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
  74. "debian-installer/locale=en_US <wait>",
  75. "auto <wait>",
  76. "netcfg/get_hostname={{ .Name }} <wait>",
  77. "netcfg/get_domain=demo.local <wait>",
  78. "fb=false <wait>",
  79. "debconf/frontend=noninteractive <wait>",
  80. "console-setup/ask_detect=false <wait>",
  81. "console-keymaps-at/keymap=de <wait>",
  82. "keyboard-configuration/xkb-keymap=de <wait>",
  83. "<enter><wait>"
  84. ],
  85. "memory": "1024",
  86. "qemuargs": [
  87. ["-display", "sdl"]
  88. ]
  89. }
  90. ],
  91. "provisioners": [
  92. {
  93. "type": "shell",
  94. "execute_command": "{{ .Vars }} sudo -E /bin/sh '{{ .Path }}'",
  95. "scripts": [
  96. "scripts/babelbox-partitions.sh",
  97. "scripts/setup-babelbox.sh"
  98. ]
  99. },
  100. {
  101. "type": "shell",
  102. "only": [
  103. "virtualbox-iso"
  104. ],
  105. "execute_command": "{{ .Vars }} sudo -E /bin/sh '{{ .Path }}'",
  106. "scripts": [
  107. "scripts/virtualbox.sh"
  108. ]
  109. },
  110. {
  111. "type": "shell",
  112. "execute_command": "{{ .Vars }} sudo -E /bin/sh '{{ .Path }}'",
  113. "scripts": [
  114. "scripts/cleanup.sh",
  115. "scripts/minimize.sh"
  116. ]
  117. }
  118. ]
  119. }