From e6b11636c8eba0a6f08bf770c8818069f59e1a27 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat Date: Thu, 2 Jul 2015 13:58:24 +0000 Subject: [PATCH] Added packer component and a WIP software --- component/packer/buildout.cfg | 28 ++++++++++++++++++++++++++++ software/packer/software.cfg | 9 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 component/packer/buildout.cfg create mode 100644 software/packer/software.cfg diff --git a/component/packer/buildout.cfg b/component/packer/buildout.cfg new file mode 100644 index 000000000..e834fc2d5 --- /dev/null +++ b/component/packer/buildout.cfg @@ -0,0 +1,28 @@ +[buildout] + +parts = + packer + +[packer] +recipe = slapos.recipe.build + +# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64). +url_x86-64 = https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_amd64.zip +url_x86 = https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_386.zip + +# supported architectures md5sums +md5sum_x86 = a545108a0ccfde7c1e74de6c4e6fdded +md5sum_x86-64 = f343d709b84db494e8d6ec38259aa4a6 + +# script to install. +script = + location = %(location)r + self.failIfPathExists(location) + import sys + ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' } + WK_SUFIX_MAP = { 'x86': '386', 'x86-64': 'amd64' } + platform = guessPlatform() + url = self.options['url_' + platform] + md5sum = self.options['md5sum_' + platform] + extract_dir = self.extract(self.download(url, md5sum)) + shutil.move(extract_dir, location) diff --git a/software/packer/software.cfg b/software/packer/software.cfg new file mode 100644 index 000000000..826d78f52 --- /dev/null +++ b/software/packer/software.cfg @@ -0,0 +1,9 @@ +[buildout] + +extends = + ../../stack/slapos.cfg + ../../component/qemu-kvm/buildout.cfg + ../../component/packer/buildout.cfg + +parts += + qemu \ No newline at end of file -- 2.25.1