diff --git a/component/packer/buildout.cfg b/component/packer/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e834fc2d50b0dfa166e041dc6eed431e0657fc5f --- /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 0000000000000000000000000000000000000000..826d78f524fcefb10a76d677da857432694f3453 --- /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