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 ...@@ -72,7 +72,7 @@ bytes = 8
# Specific code. It needs Jinja. # Specific code. It needs Jinja.
recipe = slapos.cookbook:kvm recipe = slapos.cookbook:kvm
is-packer = True is-packer = True
vnc-passwd = 'l' vnc-passwd =
ipv4 = ${slap-network-information:local-ipv4} ipv4 = ${slap-network-information:local-ipv4}
ipv6 = ${slap-network-information:global-ipv6} ipv6 = ${slap-network-information:global-ipv6}
...@@ -402,25 +402,29 @@ runner-path = ${directory:services}/6tunnel-cluster ...@@ -402,25 +402,29 @@ runner-path = ${directory:services}/6tunnel-cluster
recipe = slapos.recipe.build 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). # 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 url_x86 = https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_386.zip
# supported architectures md5sums # supported architectures md5sums
md5sum_x86 = a545108a0ccfde7c1e74de6c4e6fdded md5sum_x86 = a545108a0ccfde7c1e74de6c4e6fdded
md5sum_x86-64 = f343d709b84db494e8d6ec38259aa4a6 md5sum_x86-64 = 3611aa15844975033664979e2e831f2f
# script to install. # script to install
script = script =
location = %(location)r import os
self.failIfPathExists(location) import subprocess
import sys os.chdir('/srv/slapgrid/slappart8/srv/runner/project/goapps/src/github.com/mitchellh/packer')
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' } subprocess.call("./patch.sh", shell=True)
WK_SUFIX_MAP = { 'x86': '386', 'x86-64': 'amd64' } # location = %(location)r
platform = guessPlatform() # self.failIfPathExists(location)
url = self.options['url_' + platform] # import sys
md5sum = self.options['md5sum_' + platform] # ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
extract_dir = self.extract(self.download(url, md5sum)) # WK_SUFIX_MAP = { 'x86': '386', 'x86-64': 'amd64' }
shutil.move(extract_dir, location) # 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] [packer-build-template]
...@@ -434,9 +438,9 @@ context = ...@@ -434,9 +438,9 @@ context =
key dash other:dash-exe key dash other:dash-exe
[packer-configuration] [packer-configuration]
packer-environment = ${buildout:parts-directory}/qemu/bin/ packer-environment = {{ qemu_executable_location }}
packer-build-command = 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 ...@@ -70,8 +70,8 @@ networkcache-section = networkcache
[slapos.cookbook-repository] [slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git repository = http://lab.nexedi.cn/krruzic/slapos.git
branch = master branch = kvm-packer-merge
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
[slapos-cookbook-develop] [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