Commit a8be7996 authored by Kristopher Ruzic's avatar Kristopher Ruzic

add some changes

parent 3f95ab74
[buildout]
parts =
slap-configuration
packer
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap_connection:computer_id}
partition = ${slap_connection:partition_id}
url = ${slap_connection:server_url}
key = ${slap_connection:key_file}
cert = ${slap_connection:cert_file}
[packer]
recipe = slapos.recipe.build
......@@ -16,7 +26,7 @@ md5sum_x86-64 = f343d709b84db494e8d6ec38259aa4a6
# script to install.
script =
location = %(location)r
location = %(location)
self.failIfPathExists(location)
import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
......@@ -26,3 +36,13 @@ script =
md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
shutil.move(extract_dir, location)
[packer-json-template]
recipe = hexagonit.recipe.download
url = ${slap-configuration:configuration:packer_json}
destination = ${buildout:parts-directory}
filename = packer-template.json
#md5sum = 47d492dafe5cb314bdc49bf013d21ead
download-only = true
on-update = true
\ No newline at end of file
......@@ -4,6 +4,14 @@
"title": "Input Parameters",
"properties": {
"packer_json": {
"title": "KVM packer JSON",
"description": "The json file describing what image to build",
"type": "string",
"format": "uri",
"default": "http://lab.nexedi.cn/krruzic/test-repository/packer-debian-schema.json",
"enum": ["http://lab.nexedi.cn/krruzic/test-repository/packer-debian-schema.json"]
},
"ram-size": {
"title": "RAM size",
"description": "RAM size, in MB.",
......@@ -76,7 +84,6 @@
"minimum": 1,
"maximum": 65535
},
"virtual-hard-drive-url": {
"title": "Existing disk image URL",
"description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.",
......
${instance-parameter:configuration.name-of-parameter}
[packer-build]
recipe = slapos.cookbook:wrapper
command-line =
packer build
${buildout:parts-directory}/${packer-json-template:filename}
\ No newline at end of file
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