summaryrefslogtreecommitdiff
path: root/template.json
diff options
context:
space:
mode:
Diffstat (limited to 'template.json')
-rw-r--r--template.json111
1 files changed, 111 insertions, 0 deletions
diff --git a/template.json b/template.json
new file mode 100644
index 0000000..eaa4332
--- /dev/null
+++ b/template.json
@@ -0,0 +1,111 @@
+{
+ "variables": {
+ "atlas_username": "{{env `ATLAS_USERNAME`}}",
+ "atlas_name": "{{env `ATLAS_NAME`}}",
+ "version": "0.0.1"
+ },
+ "provisioners": [
+ {
+ "type": "shell",
+ "scripts": [
+ "scripts/base.sh",
+ "scripts/virtualbox.sh",
+ "scripts/vmware.sh",
+ "scripts/vagrant.sh",
+ "scripts/dep.sh",
+ "scripts/cleanup.sh",
+ "scripts/zerodisk.sh"
+ ],
+ "override": {
+ "virtualbox-iso": {
+ "execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
+ },
+ "vmware-iso": {
+ "execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
+ }
+ }
+ }
+ ],
+ "builders": [
+ {
+ "type": "virtualbox-iso",
+ "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={{ .Name }} ",
+ "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>"
+ ],
+ "headless": true,
+ "boot_wait": "10s",
+ "disk_size": 20480,
+ "guest_os_type": "Ubuntu_64",
+ "http_directory": "http",
+ "iso_checksum": "af224223de99e2a730b67d7785b657f549be0d63221188e105445f75fb8305c9",
+ "iso_checksum_type": "sha256",
+ "iso_url": "http://releases.ubuntu.com/precise/ubuntu-12.04.5-server-amd64.iso",
+ "ssh_username": "vagrant",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_wait_timeout": "10000s",
+ "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'",
+ "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
+ "virtualbox_version_file": ".vbox_version"
+ },
+ {
+ "type": "vmware-iso",
+ "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={{ .Name }} ",
+ "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>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": 20480,
+ "guest_os_type": "Ubuntu-64",
+ "headless": true,
+ "http_directory": "http",
+ "iso_checksum": "af224223de99e2a730b67d7785b657f549be0d63221188e105445f75fb8305c9",
+ "iso_checksum_type": "sha256",
+ "iso_url": "http://releases.ubuntu.com/precise/ubuntu-12.04.5-server-amd64.iso",
+ "skip_compaction": true,
+ "ssh_username": "vagrant",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_wait_timeout": "10000s",
+ "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'",
+ "tools_upload_flavor": "linux"
+ }
+ ],
+ "post-processors": [
+ {
+ "type": "vagrant"
+ },
+ {
+ "type": "atlas",
+ "only": ["vmware-iso"],
+ "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
+ "artifact_type": "vagrant.box",
+ "metadata": {
+ "provider": "vmware-desktop",
+ "version": "{{user `version`}}"
+ }
+ },
+ {
+ "type": "atlas",
+ "only": ["virtualbox-iso"],
+ "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
+ "artifact_type": "vagrant.box",
+ "metadata": {
+ "provider": "virtualbox",
+ "version": "{{user `version`}}"
+ }
+ }
+ ],
+ "push": {}
+}