Skip to content

Instantly share code, notes, and snippets.

@sapher
Last active June 3, 2019 04:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapher/6f657a09331e044c1b8ea51d33530ea1 to your computer and use it in GitHub Desktop.
Save sapher/6f657a09331e044c1b8ea51d33530ea1 to your computer and use it in GitHub Desktop.
Packer.io template file for RancherOS
{
"variables": {
"ros_version" : "v0.5.0",
"iso_md5" : "467caa8394684ba54e8731aed8480652",
"vm_name" : "rancher_image"
},
"builders": [
{
"type": "vmware-iso",
"iso_url": "https://releases.rancher.com/os/{{ user `ros_version` }}/rancheros.iso",
"guest_os_type": "other",
"iso_checksum_type": "md5",
"iso_checksum": "{{ user `iso_md5` }}",
"output_directory": "output_rancheros",
"ssh_wait_timeout": "30s",
"shutdown_command": "sudo shutdown -h now",
"disk_size": 8000,
"ssh_username": "rancher",
"ssh_password": "rancher",
"headless" : false,
"ssh_port": 22,
"vm_name": "{{ user `vm_name` }}",
"boot_wait": "5s",
"vmx_data": {
"memsize": "4096"
}
}
],
"provisioners": [
{
"type":"file",
"source": "cloud-config.yml",
"destination": "/tmp/cloud-config.yml"
},
{
"type": "shell",
"inline": [
"ifconfig",
"sudo ros install -d /dev/sda -f -c /tmp/cloud-config.yml -i rancher/os:{{ user `ros_version` }} --no-reboot"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment