Skip to content

Instantly share code, notes, and snippets.

@GuyBarros
Last active February 12, 2020 10:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuyBarros/fec2ba18c3ca90f6c1fda1435266c9ee to your computer and use it in GitHub Desktop.
Save GuyBarros/fec2ba18c3ca90f6c1fda1435266c9ee to your computer and use it in GitHub Desktop.
Johnny's PTFE Packer script
{
"variables": {
"version": "",
"memory" : "8196",
"cpucorecount": "4"
},
"provisioners": [
{
"type": "file",
"source": "bootcamp.rli",
"destination": "/root/bootcamp.rli"
},
{
"type": "file",
"source": "airgap.gz",
"destination": "/root/airgap.gz"
},
{
"type": "file",
"source": "replicated.tar.gz",
"destination": "/root/replicated.tar.gz"
},
{
"type": "shell",
"inline": [
"hostnamectl set-hostname ptfe.bootcamp",
"yum install -y docker",
"curl https://install.terraform.io/ptfe/stable > install_ptfe.sh",
"chmod 500 install_ptfe.sh",
"systemctl enable --now firewalld",
"firewall-cmd --permanent --zone=trusted --add-interface=docker0",
"iptables -F && sudo iptables-save"
]
}
],
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"I<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.conf<enter><wait>"
],
"boot_wait": "5s",
"disk_size": 81920,
"guest_os_type": "RedHat_64",
"headless": true,
"http_directory": "ks",
"iso_url": "/aux/iso/CentOS-7-x86_64-DVD-1804.iso",
"iso_checksum": "506e4e06abf778c3435b4e5745df13e79ebfc86565d7ea1e128067ef6b5a6345",
"iso_checksum_type": "sha256",
"ssh_username": "root",
"ssh_password": "captainamerica",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "sudo shutdown -P now",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"vm_name": "packer-ptfe-el7",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"4096"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"2"
]
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment