Created
February 13, 2015 22:47
-
-
Save EntropyWorks/afea6c0bb137eab8d7d7 to your computer and use it in GitHub Desktop.
Messing around with Packer
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": { | |
"version": "{{env `CLOUD_VER`}}", | |
"cloud_user": "{{env `CLOUD_USER`}}", | |
"cloud_token": "{{env `CLOUD_TOKEN`}}", | |
"atlas_token": "{{env `ATLAS_TOKEN`}}", | |
"push_name": "entropyworks/ubuntu-stable-atg-amd64", | |
"os_codename": "ubuntu-stable", | |
"arch": "amd64", | |
"release" "14.04" | |
"release_minor" ".1" | |
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9", | |
"hostname": "ubuntu", | |
"ssh_name": "vagrant", | |
"ssh_pass": "vagrant" | |
}, | |
"provisioners": [ | |
{ | |
"override": { | |
"virtualbox-iso": { | |
"execute_command": "echo 'vagrant' | sudo -S sh '{{ .Path }}'" | |
} | |
}, | |
"type": "shell", | |
"scripts": [ | |
"scripts/root_setup.sh" | |
] | |
}, | |
{ | |
"type": "shell", | |
"scripts": [ | |
"scripts/setup.sh" | |
] | |
} | |
], | |
"builders": [ | |
{ | |
"name": "ubuntu-{{user `release`}}.{{user `arch`}}.virtualbox", | |
"guest_additions_path": "VBoxGuestAdditions.iso", | |
"iso_url": "http://releases.ubuntu.com/{{user `release`}}/ubuntu-{{user `release`}}{{user `release_minior`}}-server-{{user `arch`}}.iso", | |
"ssh_port": "22", | |
"ssh_username": "{{user `ssh_name`}}", | |
"ssh_password": "{{user `ssh_pass`}}", | |
"iso_checksum_type": "md5", | |
"virtualbox_version_file": ".vbox_version", | |
"http_port_max": "9009", | |
"vboxmanage": [ | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--memory", | |
"512" | |
], | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--cpus", | |
"2" | |
] | |
], | |
"boot_command": [ | |
"<esc><esc><enter><wait>", | |
"/install/vmlinuz noapic ", | |
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", | |
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", | |
"hostname={{user `hostname`}} ", | |
"fb=false debconf/frontend=noninteractive ", | |
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", | |
"keyboard-configuration/variant=USA console-setup/ask_detect=false ", | |
"initrd=/install/initrd.gz -- <enter>" | |
], | |
"guest_os_type": "Ubuntu_64", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"boot_wait": "10s", | |
"http_port_min": "9001", | |
"http_directory": "ubuntu_64", | |
"shutdown_command": "echo '{{user `ssh_pass`}}' | sudo -S shutdown -P now", | |
"type": "virtualbox-iso" | |
} | |
], | |
"push": { | |
"name": "{{user `push_name`}}" | |
}, | |
"post-processors": [ | |
[{ | |
"type": "vagrant", | |
"compression_level": "9", | |
"output": "{{user `os_codename`}}-{{user `arch`}}-{{.Provider}}.box", | |
"only": [ | |
"virtualbox-iso" | |
] | |
}, | |
{ | |
"type": "atlas", | |
"artifact": "{{user `cloud_user`}}/{{user `os_codename`}}-{{user `arch`}}", | |
"artifact_type": "vagrant", | |
"metadata": { | |
"created_at": "{{timestamp}}" | |
"version": "{{user `version`}}", | |
"version_description": "Created with Packer", | |
}, | |
"only": [ | |
"virtualbox-iso" | |
] | |
}, | |
{ | |
"type": "vagrant-cloud", | |
"box_tag": "{{user `cloud_user`}}/{{user `os_codename`}}-{{user `arch`}}", | |
"access_token": "{{user `cloud_token`}}", | |
"version_description": "Created with Packer", | |
"version": "{{user `version`}}", | |
"only": [ | |
"virtualbox-iso" | |
] | |
}] | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment