Commit 40ace39b authored by Kristopher Ruzic's avatar Kristopher Ruzic

add some hardcoded stuff to point to custom build of packer, and build packer locally

final commit before showing Rafael...
parent 46fef392
......@@ -72,7 +72,7 @@ bytes = 8
# Specific code. It needs Jinja.
recipe = slapos.cookbook:kvm
is-packer = True
vnc-passwd = 'l'
vnc-passwd =
ipv4 = ${slap-network-information:local-ipv4}
ipv6 = ${slap-network-information:global-ipv6}
......@@ -402,25 +402,29 @@ runner-path = ${directory:services}/6tunnel-cluster
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-64 = https://lab.nexedi.cn/krruzic/packer/raw/master/packer-cust.tar.gz
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
md5sum_x86-64 = 3611aa15844975033664979e2e831f2f
# script to install.
# 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)
import os
import subprocess
os.chdir('/srv/slapgrid/slappart8/srv/runner/project/goapps/src/github.com/mitchellh/packer')
subprocess.call("./patch.sh", shell=True)
# 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)
[packer-build-template]
......@@ -434,9 +438,9 @@ context =
key dash other:dash-exe
[packer-configuration]
packer-environment = ${buildout:parts-directory}/qemu/bin/
packer-environment = {{ qemu_executable_location }}
packer-build-command =
${buildout:parts-directory}/packer/packer build -color=false ${buildout:directory}/packer.json
${buildout:parts-directory}/packer/packer build -color=false ${buildout:directory}/etc/packer.json
......
......@@ -70,8 +70,8 @@ networkcache-section = networkcache
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = master
repository = http://lab.nexedi.cn/krruzic/slapos.git
branch = kvm-packer-merge
git-executable = ${git:location}/bin/git
[slapos-cookbook-develop]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment