From 875b3cfc3a95957ea457879d53cb2b4a891a1492 Mon Sep 17 00:00:00 2001 From: Fletcher Nichol Date: Fri, 29 May 2015 10:08:29 -0600 Subject: [PATCH] Add build metadata to boxes and build artifacts. For each Packer template that is run via `bin/bento`, a JSON file of build metadata will be written to the `builds/` directory, which looks like the following (using the `ubuntu-14.100i386` template as an example): { "name": "ubuntu-14.10-i386", "version": "2.0.20150528211301", "build_timestamp": "20150528211301", "git_revision": "6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b", "box_basename": "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b", "atlas_org": "chef", "arch": "32", "template": "ubuntu-14.10-i386", "md5": { "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.parallels.box": "e3a18b096cddc73384f0912c3a65ebad", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.virtualbox.box": "106f2ca4e6da18663e7216a72dd62e56", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.vmware.box": "8990550bc2a0e2e7515ed3433ec54b46" }, "sha256": { "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.parallels.box": "0a0e3c9369de005a456f0cd7d94ba4d4b562d7231c11d9c5af8e40ef77131d3d", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.virtualbox.box": "0c23480a99294aea8f42daea2576a41820ec3bebb99a9d0a8ab72a3de1b24137", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.vmware.box": "9128b66ef4bae323a123fcdd0be5a598bb538f822295ab6bf043e7630a49b608" } } In addition to the "sidecar" metadata file, a trimmed down version will is added to each Vagrant box in `/etc/bento-metadata.json`. Using the example above, here is what the file would look like: { "name": "ubuntu-14.10-i386", "version": "2.0.20150528211301", "build_timestamp": "20150528211301", "git_revision": "6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b_dirty", "box_basename": "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b_dirty", "atlas_org": "chef", "arch": "32", "template": "ubuntu-14.10-i386" } Also note that this changes the file naming scheme of the resulting box artifacts in an effort to host multiple builds of the same templates in one directory while maintaining enough information about the box within the filename itself. Using the same example as above, the VirtualBox provider box name is: chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.virtualbox.box Which uses the following recipe to construct the filename: * `atlas_org` value (default: `"chef"`) * double underscore, which could be later interpreted as a slash (`/`) for an Atalas box name * `name` value which may or may not equal the name of the template (captured as the `template` value) * a dash * `version` value, which removes the last digit in a version string and replaces it with the `build_timestamp` (a Year/Month/Day/Hour/Minute/Second format in UTC timezone) * a period * the string `"git"` * a period * `git_revision` value, which will append `"_dirty"` if the current state of the git repository is not completely clean (i.e., there are uncommitted changes which happens in active development) * a period * the value of the `{{.Provider}}` Packer variable, being one of `"virtualbox"`, `"vmware"`, or `"parallels"` * finished with `".box"` Closes #364 --- bin/bento | 67 +++++++++++++++++++++++--------------- centos-5.11-i386.json | 18 ++++++++-- centos-5.11-x86_64.json | 18 ++++++++-- centos-6.6-i386.json | 18 ++++++++-- centos-6.6-x86_64.json | 18 ++++++++-- centos-7.1-x86_64.json | 18 ++++++++-- debian-6.0.10-amd64.json | 18 ++++++++-- debian-6.0.10-i386.json | 18 ++++++++-- debian-7.8-amd64.json | 18 ++++++++-- debian-7.8-i386.json | 18 ++++++++-- fedora-20-i386.json | 18 ++++++++-- fedora-20-x86_64.json | 18 ++++++++-- fedora-21-i386.json | 18 ++++++++-- fedora-21-x86_64.json | 18 ++++++++-- floppy/dummy_metadata.json | 3 ++ freebsd-10.1-amd64.json | 18 ++++++++-- freebsd-10.1-i386.json | 18 ++++++++-- freebsd-9.3-amd64.json | 18 ++++++++-- freebsd-9.3-i386.json | 18 ++++++++-- macosx-10.7.json | 18 ++++++++-- macosx-10.8.json | 18 ++++++++-- macosx-10.9.json | 18 ++++++++-- omnios-r151010j.json | 18 ++++++++-- opensuse-13.2-i386.json | 18 ++++++++-- opensuse-13.2-x86_64.json | 18 ++++++++-- oracle-5.11-i386.json | 18 ++++++++-- oracle-5.11-x86_64.json | 18 ++++++++-- oracle-6.6-i386.json | 18 ++++++++-- oracle-6.6-x86_64.json | 18 ++++++++-- rhel-5.11-i386.json | 18 ++++++++-- rhel-5.11-x86_64.json | 18 ++++++++-- rhel-6.6-i386.json | 18 ++++++++-- rhel-6.6-x86_64.json | 18 ++++++++-- rhel-7.1-x86_64.json | 18 ++++++++-- scripts/common/metadata.sh | 6 ++++ sles-11-sp2-i386.json | 18 ++++++++-- sles-11-sp2-x86_64.json | 18 ++++++++-- sles-11-sp3-i386.json | 18 ++++++++-- sles-11-sp3-x86_64.json | 18 ++++++++-- sles-12-x86_64.json | 18 ++++++++-- solaris-10.11-x86.json | 23 ++++++++++--- solaris-11-x86.json | 22 ++++++++++--- ubuntu-10.04-amd64.json | 10 ++++-- ubuntu-10.04-i386.json | 18 ++++++++-- ubuntu-12.04-amd64.json | 18 ++++++++-- ubuntu-12.04-i386.json | 22 ++++++++++--- ubuntu-14.04-amd64.json | 18 ++++++++-- ubuntu-14.04-i386.json | 19 +++++++++-- ubuntu-14.10-amd64.json | 18 ++++++++-- ubuntu-14.10-i386.json | 18 ++++++++-- 50 files changed, 801 insertions(+), 127 deletions(-) create mode 100644 floppy/dummy_metadata.json create mode 100755 scripts/common/metadata.sh diff --git a/bin/bento b/bin/bento index 20a030171..7fa86d37a 100755 --- a/bin/bento +++ b/bin/bento @@ -148,18 +148,22 @@ class BuildRunner def start banner("Starting build for templates: #{templates}") time = Benchmark.measure do - templates.each do |template| - Tempfile.open("#{template}-metadata-var-file") do |md| - write_var_file(template, md) - md.close - packer(template, md.path) - write_metadata(template) - end - end + templates.each { |template| build_template(template) } end banner("Build finished in #{duration(time.real)}.") end + def build_template(template) + Tempfile.open("#{template}-metadata.json") do |md_file| + Tempfile.open("#{template}-metadata-var-file") do |var_file| + write_box_metadata(template, md_file) + write_var_file(template, md_file.path, var_file) + packer(template, var_file.path) + write_final_metadata(template) + end + end + end + def packer(template, var_file) cmd = packer_cmd(template, var_file) banner("[#{template}] Running: '#{cmd.join(' ')}'") @@ -179,7 +183,14 @@ class BuildRunner cmd end - def write_metadata(template) + def write_box_metadata(template, io) + md = BuildMetadata.new(template, build_timestamp).read + + io.write(JSON.pretty_generate(md)) + io.close + end + + def write_final_metadata(template) md = BuildMetadata.new(template, build_timestamp).read path = File.join(File.dirname(__FILE__), "..", "builds") filename = File.join(path, "#{md[:box_basename]}.metadata.json") @@ -191,16 +202,17 @@ class BuildRunner File.open(filename, "wb") { |file| file.write(JSON.pretty_generate(md)) } end - def write_var_file(template, io) + def write_var_file(template, md_file, io) md = BuildMetadata.new(template, build_timestamp).read - io.write(JSON.pretty_generate(Hash.new.tap { |h| - h[:box_basename] = md[:box_basename] - h[:build_timestamp] = md[:build_timestamp] - h[:git_revision] = md[:git_revision] - h[:metadata] = JSON.pretty_generate(md) - h[:version] = md[:version] + io.write(JSON.pretty_generate({ + box_basename: md[:box_basename], + build_timestamp: md[:build_timestamp], + git_revision: md[:git_revision], + metadata: md_file, + version: md[:version] })) + io.close end end @@ -212,8 +224,8 @@ class ChecksumMetadata def read { - :md5 => md5_checksums, - :sha256 => sha256_checksums, + md5: md5_checksums, + sha256: sha256_checksums } end @@ -242,15 +254,16 @@ class BuildMetadata end def read - Hash.new.tap do |h| - h[:name] = name - h[:version] = version - h[:build_timestamp] = build_timestamp - h[:git_revision] = git_revision - h[:box_basename] = box_basename - h[:atlas_org] = atlas_org - h[:arch] = template_vars.fetch("arch", UNKNOWN) - end + { + name: name, + version: version, + build_timestamp: build_timestamp, + git_revision: git_revision, + box_basename: box_basename, + atlas_org: atlas_org, + arch: template_vars.fetch("arch", UNKNOWN), + template: template_vars.fetch("template", UNKNOWN), + } end private diff --git a/centos-5.11-i386.json b/centos-5.11-i386.json index fed906f00..5b45afeed 100644 --- a/centos-5.11-i386.json +++ b/centos-5.11-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_centos-5.11-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/vagrant.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -121,7 +127,15 @@ } ], "variables": { - "mirror": "http://mirrors.kernel.org/centos" + "arch": "32", + "box_basename": "centos-5.11-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.kernel.org/centos", + "name": "centos-5.11-i386", + "template": "centos-5.11-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/centos-5.11-x86_64.json b/centos-5.11-x86_64.json index 1a89dd38e..1133c4593 100644 --- a/centos-5.11-x86_64.json +++ b/centos-5.11-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_centos-5.11.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/vagrant.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -121,7 +127,15 @@ } ], "variables": { - "mirror": "http://mirrors.kernel.org/centos" + "arch": "64", + "box_basename": "centos-5.11", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.kernel.org/centos", + "name": "centos-5.11", + "template": "centos-5.11-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/centos-6.6-i386.json b/centos-6.6-i386.json index 21e7cfcd7..2ee0078b8 100644 --- a/centos-6.6-i386.json +++ b/centos-6.6-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_centos-6.6-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://mirrors.kernel.org/centos" + "arch": "32", + "box_basename": "centos-6.6-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.kernel.org/centos", + "name": "centos-6.6-i386", + "template": "centos-6.6-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/centos-6.6-x86_64.json b/centos-6.6-x86_64.json index 50fb8586c..a69ebae1d 100644 --- a/centos-6.6-x86_64.json +++ b/centos-6.6-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_centos-6.6.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://mirrors.kernel.org/centos" + "arch": "64", + "box_basename": "centos-6.6", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.kernel.org/centos", + "name": "centos-6.6", + "template": "centos-6.6-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/centos-7.1-x86_64.json b/centos-7.1-x86_64.json index 205b42621..f909a42fe 100644 --- a/centos-7.1-x86_64.json +++ b/centos-7.1-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_centos-7.1.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://mirrors.kernel.org/centos" + "arch": "64", + "box_basename": "centos-7.1", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.kernel.org/centos", + "name": "centos-7.1", + "template": "centos-7.1-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/debian-6.0.10-amd64.json b/debian-6.0.10-amd64.json index cceab70b0..49cee79d4 100644 --- a/debian-6.0.10-amd64.json +++ b/debian-6.0.10-amd64.json @@ -144,15 +144,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_debian-6.0.10.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/debian/update.sh", "scripts/common/sshd.sh", "scripts/debian/networking.sh", @@ -166,7 +172,15 @@ } ], "variables": { - "mirror": "http://cdimage.debian.org/cdimage/archive" + "arch": "64", + "box_basename": "debian-6.0.10", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdimage.debian.org/cdimage/archive", + "name": "debian-6.0.10", + "template": "debian-6.0.10-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/debian-6.0.10-i386.json b/debian-6.0.10-i386.json index b9df2ad98..fd7cd23c0 100644 --- a/debian-6.0.10-i386.json +++ b/debian-6.0.10-i386.json @@ -144,15 +144,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_debian-6.0.10-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/debian/update.sh", "scripts/common/sshd.sh", "scripts/debian/networking.sh", @@ -166,7 +172,15 @@ } ], "variables": { - "mirror": "http://cdimage.debian.org/cdimage/archive" + "arch": "32", + "box_basename": "debian-6.0.10-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdimage.debian.org/cdimage/archive", + "name": "debian-6.0.10-i386", + "template": "debian-6.0.10-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/debian-7.8-amd64.json b/debian-7.8-amd64.json index 6933534ea..03f330004 100644 --- a/debian-7.8-amd64.json +++ b/debian-7.8-amd64.json @@ -144,15 +144,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_debian-7.8.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/debian/update.sh", "scripts/common/sshd.sh", "scripts/debian/networking.sh", @@ -166,7 +172,15 @@ } ], "variables": { - "mirror": "http://cdimage.debian.org/cdimage/archive" + "arch": "64", + "box_basename": "debian-7.8", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdimage.debian.org/cdimage/archive", + "name": "debian-7.8", + "template": "debian-7.8-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/debian-7.8-i386.json b/debian-7.8-i386.json index e5a6c7152..0a89c3f12 100644 --- a/debian-7.8-i386.json +++ b/debian-7.8-i386.json @@ -144,15 +144,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_debian-7.8-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/debian/update.sh", "scripts/common/sshd.sh", "scripts/debian/networking.sh", @@ -166,7 +172,15 @@ } ], "variables": { - "mirror": "http://cdimage.debian.org/cdimage/archive" + "arch": "32", + "box_basename": "debian-7.8-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdimage.debian.org/cdimage/archive", + "name": "debian-7.8-i386", + "template": "debian-7.8-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/fedora-20-i386.json b/fedora-20-i386.json index 08ce1bcd2..1f4639672 100644 --- a/fedora-20-i386.json +++ b/fedora-20-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_fedora-20-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/fedora/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://download.fedoraproject.org/pub/fedora/linux" + "arch": "32", + "box_basename": "fedora-20-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://download.fedoraproject.org/pub/fedora/linux", + "name": "fedora-20-i386", + "template": "fedora-20-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/fedora-20-x86_64.json b/fedora-20-x86_64.json index 4848ab0e9..3ed1eeb89 100644 --- a/fedora-20-x86_64.json +++ b/fedora-20-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_fedora-20.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/fedora/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://download.fedoraproject.org/pub/fedora/linux" + "arch": "64", + "box_basename": "fedora-20", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://download.fedoraproject.org/pub/fedora/linux", + "name": "fedora-20", + "template": "fedora-20-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/fedora-21-i386.json b/fedora-21-i386.json index c80fe4a74..8a28a2e6e 100644 --- a/fedora-21-i386.json +++ b/fedora-21-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_fedora-21-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/fedora/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://download.fedoraproject.org/pub/fedora/linux" + "arch": "32", + "box_basename": "fedora-21-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://download.fedoraproject.org/pub/fedora/linux", + "name": "fedora-21-i386", + "template": "fedora-21-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/fedora-21-x86_64.json b/fedora-21-x86_64.json index 157715530..2270306c0 100644 --- a/fedora-21-x86_64.json +++ b/fedora-21-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_fedora-21.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/fedora/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://download.fedoraproject.org/pub/fedora/linux" + "arch": "64", + "box_basename": "fedora-21", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://download.fedoraproject.org/pub/fedora/linux", + "name": "fedora-21", + "template": "fedora-21-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/floppy/dummy_metadata.json b/floppy/dummy_metadata.json new file mode 100644 index 000000000..5a3288a37 --- /dev/null +++ b/floppy/dummy_metadata.json @@ -0,0 +1,3 @@ +{ + "metadata": "not provided" +} diff --git a/freebsd-10.1-amd64.json b/freebsd-10.1-amd64.json index 908655802..2ca219eb7 100644 --- a/freebsd-10.1-amd64.json +++ b/freebsd-10.1-amd64.json @@ -146,7 +146,7 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_freebsd-10.1.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" @@ -156,10 +156,16 @@ } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "export {{.Vars}} && cat {{.Path}} | su -m", "scripts": [ + "scripts/common/metadata.sh", "scripts/freebsd/postinstall.sh", "scripts/freebsd/cleanup.sh", "scripts/freebsd/vmtools.sh", @@ -169,7 +175,15 @@ } ], "variables": { - "mirror": "http://ftp.freebsd.org/pub/FreeBSD" + "arch": "64", + "box_basename": "freebsd-10.1", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://ftp.freebsd.org/pub/FreeBSD", + "name": "freebsd-10.1", + "template": "freebsd-10.1-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/freebsd-10.1-i386.json b/freebsd-10.1-i386.json index d40e7c442..312f86f27 100644 --- a/freebsd-10.1-i386.json +++ b/freebsd-10.1-i386.json @@ -146,7 +146,7 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_freebsd-10.1-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" @@ -156,10 +156,16 @@ } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "export {{.Vars}} && cat {{.Path}} | su -m", "scripts": [ + "scripts/common/metadata.sh", "scripts/freebsd/postinstall.sh", "scripts/freebsd/cleanup.sh", "scripts/freebsd/vmtools.sh", @@ -169,7 +175,15 @@ } ], "variables": { - "mirror": "http://ftp.freebsd.org/pub/FreeBSD" + "arch": "32", + "box_basename": "freebsd-10.1-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://ftp.freebsd.org/pub/FreeBSD", + "name": "freebsd-10.1-i386", + "template": "freebsd-10.1-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/freebsd-9.3-amd64.json b/freebsd-9.3-amd64.json index e8b474b38..73177411a 100644 --- a/freebsd-9.3-amd64.json +++ b/freebsd-9.3-amd64.json @@ -158,7 +158,7 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_freebsd-9.3.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" @@ -168,10 +168,16 @@ } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "export {{.Vars}} && cat {{.Path}} | su -m", "scripts": [ + "scripts/common/metadata.sh", "scripts/freebsd/postinstall.sh", "scripts/freebsd/vmtools.sh", "scripts/freebsd/cleanup.sh", @@ -181,7 +187,15 @@ } ], "variables": { - "mirror": "http://ftp.freebsd.org/pub/FreeBSD" + "arch": "64", + "box_basename": "freebsd-9.3", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://ftp.freebsd.org/pub/FreeBSD", + "name": "freebsd-9.3", + "template": "freebsd-9.3-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/freebsd-9.3-i386.json b/freebsd-9.3-i386.json index 275af5b7d..29e72d6a6 100644 --- a/freebsd-9.3-i386.json +++ b/freebsd-9.3-i386.json @@ -157,7 +157,7 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_freebsd-9.3-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" @@ -167,9 +167,15 @@ } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "execute_command": "export {{.Vars}} && cat {{.Path}} | su -m", "scripts": [ + "scripts/common/metadata.sh", "scripts/freebsd/postinstall.sh", "scripts/freebsd/vmtools.sh", "scripts/freebsd/cleanup.sh", @@ -179,7 +185,15 @@ } ], "variables": { - "mirror": "http://ftp.freebsd.org/pub/FreeBSD" + "arch": "32", + "box_basename": "freebsd-9.3-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://ftp.freebsd.org/pub/FreeBSD", + "name": "freebsd-9.3-i386", + "template": "freebsd-9.3-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/macosx-10.7.json b/macosx-10.7.json index 2b3f643eb..caebd083b 100644 --- a/macosx-10.7.json +++ b/macosx-10.7.json @@ -155,12 +155,17 @@ "min_packer_version": "0.6.0", "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_macosx-10.7.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant", "vagrantfile_template": "vagrantfile_templates/macosx.rb" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "destination": "/private/tmp/kcpassword", "source": "scripts/macosx/support/kcpassword", @@ -169,6 +174,7 @@ { "execute_command": "echo 'vagrant'| {{.Vars}} sudo -E -S sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/macosx/hostname.sh", "scripts/macosx/builder.sh", "scripts/macosx/update.sh", @@ -189,9 +195,17 @@ } ], "variables": { + "arch": "64", "autologin_vagrant_user": "", + "box_basename": "macosx-10.7", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", "iso_checksum": "e2a48af008ff3c4db6a8235151a1e90ea600fceb", - "iso_url": "http://fakeurl/OSX_InstallESD_10.7.5_11G63.dmg" + "iso_url": "http://fakeurl/OSX_InstallESD_10.7.5_11G63.dmg", + "metadata": "floppy/dummy_metadata.json", + "name": "macosx-10.7", + "template": "macosx-10.7", + "version": "2.0.TIMESTAMP" } } diff --git a/macosx-10.8.json b/macosx-10.8.json index d5cc57756..666355594 100644 --- a/macosx-10.8.json +++ b/macosx-10.8.json @@ -155,12 +155,17 @@ "min_packer_version": "0.6.0", "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_macosx-10.8.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant", "vagrantfile_template": "vagrantfile_templates/macosx.rb" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "destination": "/private/tmp/kcpassword", "source": "scripts/macosx/support/kcpassword", @@ -169,6 +174,7 @@ { "execute_command": "echo 'vagrant'| {{.Vars}} sudo -E -S sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/macosx/hostname.sh", "scripts/macosx/builder.sh", "scripts/macosx/update.sh", @@ -189,9 +195,17 @@ } ], "variables": { + "arch": "64", "autologin_vagrant_user": "", + "box_basename": "macosx-10.8", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", "iso_checksum": "e2a48af008ff3c4db6a8235151a1e90ea600fceb", - "iso_url": "http://fakeurl/OSX_InstallESD_10.8.5_12F45.dmg" + "iso_url": "http://fakeurl/OSX_InstallESD_10.8.5_12F45.dmg", + "metadata": "floppy/dummy_metadata.json", + "name": "macosx-10.8", + "template": "macosx-10.8", + "version": "2.0.TIMESTAMP" } } diff --git a/macosx-10.9.json b/macosx-10.9.json index 18c386834..9d936f22d 100644 --- a/macosx-10.9.json +++ b/macosx-10.9.json @@ -155,12 +155,17 @@ "min_packer_version": "0.6.0", "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_macosx-10.9.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant", "vagrantfile_template": "vagrantfile_templates/macosx.rb" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "destination": "/private/tmp/kcpassword", "source": "scripts/macosx/support/kcpassword", @@ -169,6 +174,7 @@ { "execute_command": "echo 'vagrant'| {{.Vars}} sudo -E -S sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/macosx/hostname.sh", "scripts/macosx/builder.sh", "scripts/macosx/update.sh", @@ -189,9 +195,17 @@ } ], "variables": { + "arch": "64", "autologin_vagrant_user": "", + "box_basename": "macosx-10.9", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", "iso_checksum": "e2a48af008ff3c4db6a8235151a1e90ea600fceb", - "iso_url": "http://fakeurl/OSX_InstallESD_10.9.1_13B42.dmg" + "iso_url": "http://fakeurl/OSX_InstallESD_10.9.1_13B42.dmg", + "metadata": "floppy/dummy_metadata.json", + "name": "macosx-10.9", + "template": "macosx-10.9", + "version": "2.0.TIMESTAMP" } } diff --git a/omnios-r151010j.json b/omnios-r151010j.json index a3f1e3d00..684fad1c1 100644 --- a/omnios-r151010j.json +++ b/omnios-r151010j.json @@ -180,7 +180,7 @@ "post-processors": [ { "compression_level": 9, - "output": "builds/{{.Provider}}/opscode_omnios-r151010j.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/omnios.rb" @@ -190,10 +190,16 @@ } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "export {{.Vars}} && sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/omnios/vmtools.sh", "scripts/omnios/postinstall.sh" ], @@ -201,7 +207,15 @@ } ], "variables": { - "mirror": "http://omnios.omniti.com/media" + "arch": "64", + "box_basename": "omnios-r151010j", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://omnios.omniti.com/media", + "name": "omnios-r151010j", + "template": "omnios-r151010j", + "version": "2.0.TIMESTAMP" } } diff --git a/opensuse-13.2-i386.json b/opensuse-13.2-i386.json index dad100d7c..036b4b389 100644 --- a/opensuse-13.2-i386.json +++ b/opensuse-13.2-i386.json @@ -113,15 +113,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_opensuse-13.2-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", @@ -135,7 +141,15 @@ } ], "variables": { - "mirror": "http://download.opensuse.org/distribution" + "arch": "32", + "box_basename": "opensuse-13.2-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://download.opensuse.org/distribution", + "name": "opensuse-13.2-i386", + "template": "opensuse-13.2-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/opensuse-13.2-x86_64.json b/opensuse-13.2-x86_64.json index 7c4e7bf0f..27e0c9173 100644 --- a/opensuse-13.2-x86_64.json +++ b/opensuse-13.2-x86_64.json @@ -113,15 +113,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_opensuse-13.2-x86_64.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", @@ -135,7 +141,15 @@ } ], "variables": { - "mirror": "http://download.opensuse.org/distribution" + "arch": "64", + "box_basename": "opensuse-13.2-x86_64", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://download.opensuse.org/distribution", + "name": "opensuse-13.2-x86_64", + "template": "opensuse-13.2-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/oracle-5.11-i386.json b/oracle-5.11-i386.json index caa98dca4..206a2041a 100644 --- a/oracle-5.11-i386.json +++ b/oracle-5.11-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_oracle-5.11-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/vagrant.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -121,7 +127,15 @@ } ], "variables": { - "mirror": "http://mirrors.dotsrc.org/oracle-linux/EL5/U11/i386" + "arch": "32", + "box_basename": "oracle-5.11-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.dotsrc.org/oracle-linux/EL5/U11/i386", + "name": "oracle-5.11-i386", + "template": "oracle-5.11-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/oracle-5.11-x86_64.json b/oracle-5.11-x86_64.json index b616e027f..9596cfa3a 100644 --- a/oracle-5.11-x86_64.json +++ b/oracle-5.11-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_oracle-5.11.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/vagrant.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -121,7 +127,15 @@ } ], "variables": { - "mirror": "http://mirrors.dotsrc.org/oracle-linux/EL5/U11/x86_64" + "arch": "64", + "box_basename": "oracle-5.11", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.dotsrc.org/oracle-linux/EL5/U11/x86_64", + "name": "oracle-5.11", + "template": "oracle-5.11-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/oracle-6.6-i386.json b/oracle-6.6-i386.json index abaa3d6dc..c113d7ba2 100644 --- a/oracle-6.6-i386.json +++ b/oracle-6.6-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_oracle-6.6-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://mirrors.dotsrc.org/oracle-linux/OL6/U6/i386" + "arch": "32", + "box_basename": "oracle-6.6-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.dotsrc.org/oracle-linux/OL6/U6/i386", + "name": "oracle-6.6-i386", + "template": "oracle-6.6-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/oracle-6.6-x86_64.json b/oracle-6.6-x86_64.json index 607e12173..d32ccbc86 100644 --- a/oracle-6.6-x86_64.json +++ b/oracle-6.6-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_oracle-6.6.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://mirrors.dotsrc.org/oracle-linux/OL6/U6/x86_64" + "arch": "64", + "box_basename": "oracle-6.6", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://mirrors.dotsrc.org/oracle-linux/OL6/U6/x86_64", + "name": "oracle-6.6", + "template": "oracle-6.6-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/rhel-5.11-i386.json b/rhel-5.11-i386.json index 8ab1c4243..d1b3aa3aa 100644 --- a/rhel-5.11-i386.json +++ b/rhel-5.11-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_rhel-5.11-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/vagrant.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -121,7 +127,15 @@ } ], "variables": { - "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-5.11/md5sum/1ab756241a4a209b8d39abe6bace84a9" + "arch": "32", + "box_basename": "rhel-5.11-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-5.11/md5sum/1ab756241a4a209b8d39abe6bace84a9", + "name": "rhel-5.11-i386", + "template": "rhel-5.11-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/rhel-5.11-x86_64.json b/rhel-5.11-x86_64.json index 8fb7a4457..d0d04a3d7 100644 --- a/rhel-5.11-x86_64.json +++ b/rhel-5.11-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_rhel-5.11.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/vagrant.sh", "scripts/common/sshd.sh", "scripts/common/vmtools.sh", @@ -121,7 +127,15 @@ } ], "variables": { - "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-5.11/md5sum/86cc2d5548ee2ff9c8d3e2b4db3e6001" + "arch": "64", + "box_basename": "rhel-5.11", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-5.11/md5sum/86cc2d5548ee2ff9c8d3e2b4db3e6001", + "name": "rhel-5.11", + "template": "rhel-5.11-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/rhel-6.6-i386.json b/rhel-6.6-i386.json index 800432915..21fb0638e 100644 --- a/rhel-6.6-i386.json +++ b/rhel-6.6-i386.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_rhel-6.6-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-6.6/md5sum/64e687f958db92feccc3f7701a8771f8" + "arch": "32", + "box_basename": "rhel-6.6-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-6.6/md5sum/64e687f958db92feccc3f7701a8771f8", + "name": "rhel-6.6-i386", + "template": "rhel-6.6-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/rhel-6.6-x86_64.json b/rhel-6.6-x86_64.json index 69bc3a184..cbc51fe5a 100644 --- a/rhel-6.6-x86_64.json +++ b/rhel-6.6-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_rhel-6.6.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-6.6/md5sum/ef031b0ae8458d6489eb277ba1dcb5de" + "arch": "64", + "box_basename": "rhel-6.6", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "https://content-web.rhn.redhat.com/rhn/isos/rhel-6.6/md5sum/ef031b0ae8458d6489eb277ba1dcb5de", + "name": "rhel-6.6", + "template": "rhel-6.6-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/rhel-7.1-x86_64.json b/rhel-7.1-x86_64.json index e4649e714..817f31f9b 100644 --- a/rhel-7.1-x86_64.json +++ b/rhel-7.1-x86_64.json @@ -102,15 +102,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_rhel-7.1.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/centos/fix-slow-dns.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", @@ -122,7 +128,15 @@ } ], "variables": { - "mirror": "http://put-your-mirror-here/" + "arch": "64", + "box_basename": "rhel-7.1", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://put-your-mirror-here/", + "name": "rhel-7.1", + "template": "rhel-7.1-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/scripts/common/metadata.sh b/scripts/common/metadata.sh new file mode 100755 index 000000000..500f4437f --- /dev/null +++ b/scripts/common/metadata.sh @@ -0,0 +1,6 @@ +#!/bin/sh -eux + +mkdir -p /etc +cp /tmp/bento-metadata.json /etc/bento-metadata.json +chmod 0444 /etc/bento-metadata.json +rm -f /tmp/bento-metadata.json diff --git a/sles-11-sp2-i386.json b/sles-11-sp2-i386.json index b65a9dd74..2390582a0 100644 --- a/sles-11-sp2-i386.json +++ b/sles-11-sp2-i386.json @@ -114,15 +114,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_sles-11sp2-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", @@ -135,7 +141,15 @@ } ], "variables": { - "mirror": "http://cdn2.novell.com/prot/FkjGyLMMiss~" + "arch": "32", + "box_basename": "sles-11-sp2-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdn2.novell.com/prot/FkjGyLMMiss~", + "name": "sles-11-sp2-i386", + "template": "sles-11-sp2-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/sles-11-sp2-x86_64.json b/sles-11-sp2-x86_64.json index 0d37148ca..91af54993 100644 --- a/sles-11-sp2-x86_64.json +++ b/sles-11-sp2-x86_64.json @@ -114,15 +114,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_sles-11sp2.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", @@ -134,7 +140,15 @@ } ], "variables": { - "mirror": "http://cdn.novell.com/free/h0AOp5AT-18~" + "arch": "64", + "box_basename": "sles-11-sp2", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdn.novell.com/free/h0AOp5AT-18~", + "name": "sles-11-sp2", + "template": "sles-11-sp2-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/sles-11-sp3-i386.json b/sles-11-sp3-i386.json index 8b5d04ead..9e0177fda 100644 --- a/sles-11-sp3-i386.json +++ b/sles-11-sp3-i386.json @@ -114,15 +114,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_sles-11sp3-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", @@ -135,7 +141,15 @@ } ], "variables": { - "mirror": "http://cdn2.novell.com/prot/4uiuDMzX0ck~" + "arch": "32", + "box_basename": "sles-11-sp3-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdn2.novell.com/prot/4uiuDMzX0ck~", + "name": "sles-11-sp3-i386", + "template": "sles-11-sp3-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/sles-11-sp3-x86_64.json b/sles-11-sp3-x86_64.json index 0b7251fc6..418dfc5ea 100644 --- a/sles-11-sp3-x86_64.json +++ b/sles-11-sp3-x86_64.json @@ -114,15 +114,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_sles-11sp3.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", @@ -135,7 +141,15 @@ } ], "variables": { - "mirror": "http://cdn2.novell.com/prot/Q_VbW21BiB4~" + "arch": "64", + "box_basename": "sles-11-sp3", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdn2.novell.com/prot/Q_VbW21BiB4~", + "name": "sles-11-sp3", + "template": "sles-11-sp3-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/sles-12-x86_64.json b/sles-12-x86_64.json index 0e88db7d7..2cbe098fa 100644 --- a/sles-12-x86_64.json +++ b/sles-12-x86_64.json @@ -114,15 +114,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_sles-12.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/common/sshd.sh", "scripts/common/vagrant.sh", "scripts/sles/unsupported-modules.sh", @@ -137,7 +143,15 @@ } ], "variables": { - "mirror": "http://cdn2.novell.com/prot/Q_VbW21BiB4~" + "arch": "64", + "box_basename": "sles-12", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://cdn2.novell.com/prot/Q_VbW21BiB4~", + "name": "sles-12", + "template": "sles-12-x86_64", + "version": "2.0.TIMESTAMP" } } diff --git a/solaris-10.11-x86.json b/solaris-10.11-x86.json index cbaa660e9..c4a322bb6 100644 --- a/solaris-10.11-x86.json +++ b/solaris-10.11-x86.json @@ -94,14 +94,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_solaris-10.11.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, + { + "environment_vars": [], "execute_command": "/usr/local/bin/sudo {{.Path}}", "scripts": [ + "scripts/common/metadata.sh", "scripts/solaris10/vmtools.sh", "scripts/solaris10/minimize.sh" ], @@ -109,9 +116,17 @@ } ], "variables": { - "DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris10/downloads/index.html", - "README": "You must download the automated installer iso from the following page, and then place it somewhere that packer can fetch it", - "mirror": "./packer_cache" + "_DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris10/downloads/index.html", + "_README": "You must download the automated installer iso from the following page, and then place it somewhere that packer can fetch it", + "arch": "64", + "box_basename": "solaris-10.11", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "./packer_cache", + "name": "solaris-10.11", + "template": "solaris-10.11-x86", + "version": "2.0.TIMESTAMP" } } diff --git a/solaris-11-x86.json b/solaris-11-x86.json index f1f64cca5..22220f4bb 100644 --- a/solaris-11-x86.json +++ b/solaris-11-x86.json @@ -114,15 +114,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_solaris-11.2.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|sudo -S bash {{.Path}}", "scripts": [ + "scripts/common/metadata.sh", "scripts/solaris/update.sh", "scripts/solaris/vmtools.sh", "scripts/common/vagrant.sh", @@ -132,9 +138,17 @@ } ], "variables": { - "DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html", - "README": "You must download the automated installer iso from the following page, and then place it somewhere that packer can fetch it", - "mirror": "./packer_cache" + "_DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html", + "_README": "You must download the automated installer iso from the following page, and then place it somewhere that packer can fetch it", + "arch": "64", + "box_basename": "solaris-11.2", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "./packer_cache", + "name": "solaris-11.2", + "template": "solaris-11.2-x86", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-10.04-amd64.json b/ubuntu-10.04-amd64.json index cac6b2c1f..4e90fbaff 100644 --- a/ubuntu-10.04-amd64.json +++ b/ubuntu-10.04-amd64.json @@ -170,10 +170,16 @@ } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -190,11 +196,11 @@ "arch": "64", "box_basename": "ubuntu-10.04", "build_timestamp": "{{isotime \"20060102150405\"}}", - "chef_version": "provisionerless", "git_revision": "__unknown_git_revision__", - "metadata": "{ \"metadata\": \"not provided\" }", + "metadata": "floppy/dummy_metadata.json", "mirror": "http://releases.ubuntu.com", "name": "ubuntu-10.04", + "template": "ubuntu-10.04-amd64", "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-10.04-i386.json b/ubuntu-10.04-i386.json index 916d93ef3..00b407b4b 100644 --- a/ubuntu-10.04-i386.json +++ b/ubuntu-10.04-i386.json @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-10.04-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,15 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "32", + "box_basename": "ubuntu-10.04-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-10.04-i386", + "template": "ubuntu-10.04-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-12.04-amd64.json b/ubuntu-12.04-amd64.json index 0f42752af..abf4b4ab8 100644 --- a/ubuntu-12.04-amd64.json +++ b/ubuntu-12.04-amd64.json @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-12.04.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,15 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "64", + "box_basename": "ubuntu-12.04", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-12.04", + "template": "ubuntu-12.04-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-12.04-i386.json b/ubuntu-12.04-i386.json index 3248d1731..dfb225379 100644 --- a/ubuntu-12.04-i386.json +++ b/ubuntu-12.04-i386.json @@ -134,9 +134,9 @@ "disk_size": 40960, "guest_os_type": "ubuntu", "http_directory": "http", - "iso_checksum": "3bae12e315c89d42d7bf571e4e35efce585c7624", + "iso_checksum": "a34c224b7fe72a2f5c768be5afee5c53817743fd", "iso_checksum_type": "sha1", - "iso_url": "{{user `mirror`}}/12.04.5/ubuntu-12.04.4-server-i386.iso", + "iso_url": "{{user `mirror`}}/12.04.5/ubuntu-12.04.5-server-i386.iso", "output_directory": "packer-ubuntu-12.04-i386-parallels", "parallels_tools_flavor": "lin", "prlctl": [ @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-12.04-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,15 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "32", + "box_basename": "ubuntu-12.04-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-12.04-i386", + "template": "ubuntu-12.04-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-14.04-amd64.json b/ubuntu-14.04-amd64.json index bc8fe7249..2d6eb149d 100644 --- a/ubuntu-14.04-amd64.json +++ b/ubuntu-14.04-amd64.json @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-14.04.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,15 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "64", + "box_basename": "ubuntu-14.04", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-14.04", + "template": "ubuntu-14.04-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-14.04-i386.json b/ubuntu-14.04-i386.json index 8b77a116d..7ff01ae74 100644 --- a/ubuntu-14.04-i386.json +++ b/ubuntu-14.04-i386.json @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-14.04-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,16 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "32", + "box_basename": "ubuntu-14.04-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "chef_version": "provisionerless", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-14.04-i386", + "template": "ubuntu-14.04-i386", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-14.10-amd64.json b/ubuntu-14.10-amd64.json index 14d679680..270366944 100644 --- a/ubuntu-14.10-amd64.json +++ b/ubuntu-14.10-amd64.json @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-14.10.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,15 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "64", + "box_basename": "ubuntu-14.10", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-14.10", + "template": "ubuntu-14.10-amd64", + "version": "2.0.TIMESTAMP" } } diff --git a/ubuntu-14.10-i386.json b/ubuntu-14.10-i386.json index 2bc4d6598..e8592a806 100644 --- a/ubuntu-14.10-i386.json +++ b/ubuntu-14.10-i386.json @@ -165,15 +165,21 @@ ], "post-processors": [ { - "output": "builds/{{.Provider}}/opscode_ubuntu-14.10-i386.box", + "output": "builds/{{user `box_basename`}}.{{.Provider}}.box", "type": "vagrant" } ], "provisioners": [ + { + "destination": "/tmp/bento-metadata.json", + "source": "{{user `metadata`}}", + "type": "file" + }, { "environment_vars": [], "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": [ + "scripts/common/metadata.sh", "scripts/ubuntu/update.sh", "scripts/common/sshd.sh", "scripts/ubuntu/networking.sh", @@ -187,7 +193,15 @@ } ], "variables": { - "mirror": "http://releases.ubuntu.com" + "arch": "32", + "box_basename": "ubuntu-14.10-i386", + "build_timestamp": "{{isotime \"20060102150405\"}}", + "git_revision": "__unknown_git_revision__", + "metadata": "floppy/dummy_metadata.json", + "mirror": "http://releases.ubuntu.com", + "name": "ubuntu-14.10-i386", + "template": "ubuntu-14.10-i386", + "version": "2.0.TIMESTAMP" } }