Created
November 20, 2017 03:00
-
-
Save petruchito/78fc44eb0318d440581d4dec0401eb78 to your computer and use it in GitHub Desktop.
packer issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"iso_url": "", | |
"iso_checksum": "", | |
"iso_checksum_type": "sha256", | |
"redhat_release": "", | |
"redhat_platform": "x86_64", | |
"artifact_description": "", | |
"artifact_version": "", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"disk_size": "20480", | |
"iso_url": "http://ftp.byfly.by/pub/CentOS/7/isos/x86_64/CentOS-7-x86_64-Minimal-1708.iso", | |
"iso_checksum": "bba314624956961a2ea31dd460cd860a77911c1e0a56e4820a12b9c5dad363f5", | |
"artifact_description": "CentOS 7.4 (build 1708): CentOS-7-x86_64-Minimal-1708.iso, 20GB /, nothing extra", | |
"artifact_version": "7.4.1708", | |
"redhat_release": "7.4", | |
"output_path": "D:/Temp/packer" | |
}, | |
"builders": [ | |
{ | |
"name": "centos-{{user `redhat_release`}}", | |
"type": "virtualbox-iso", | |
"vm_name": "packer-centos-vm", | |
"boot_wait": "10s", | |
"disk_size": "{{user `disk_size`}}", | |
"guest_os_type": "RedHat_64", | |
"http_directory": "http", | |
"output_directory": "{{user `output_path`}}/output", | |
"iso_url": "{{user `iso_url`}}", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"guest_additions_path": "{{user `output_path`}}/VBoxGuestAdditions.iso", | |
"boot_command": [ | |
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.ks<enter><wait>" | |
], | |
"shutdown_command": "sudo -S /sbin/halt -h -p", | |
"shutdown_timeout" : "5m", | |
"ssh_wait_timeout": "15m", | |
"ssh_username": "{{user `ssh_username`}}", | |
"ssh_password": "{{user `ssh_password`}}", | |
"ssh_port": 22, | |
"ssh_pty": true, | |
"vboxmanage": [ | |
[ "modifyvm", "{{.Name}}", "--memory", "1024" ], | |
[ "modifyvm", "{{.Name}}", "--cpus", "2" ] | |
], | |
"hard_drive_interface": "sata", | |
"virtualbox_version_file": ".vbox_version", | |
"export_opts": | |
[ | |
"--manifest", | |
"--vsys", "0", | |
"--description", "{{user `artifact_description`}}", | |
"--version", "{{user `artifact_version`}}" | |
] | |
} | |
], | |
"post-processors": [ | |
{ | |
"output": "{{user `output_path`}}/sbeliakou-vagrant-centos-{{user `redhat_release`}}-{{user `redhat_platform`}}-minimal.box", | |
"compression_level": "6", | |
"type": "vagrant" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"execute_command": "{{.Vars}} sudo -S -E bash '{{.Path}}'", | |
"start_retry_timeout": "1m", | |
"expect_disconnect": true, | |
"pause_before": "5s", | |
"override": { | |
"centos-{{user `redhat_release`}}": { | |
"scripts": [ | |
"scripts/base.sh", | |
"scripts/vagrant.sh", | |
"scripts/virtualbox.sh", | |
"scripts/cleanup.sh" | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment