Commit d6aefc18 authored by Kristopher Ruzic's avatar Kristopher Ruzic

moves files around

parent 0d1ef902
......@@ -5,19 +5,17 @@ extends =
../../component/dash/buildout.cfg
parts +=
packer
dash
dash-output
slapos-cookbook
packer
instance-profile
[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).
# 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
......@@ -37,18 +35,4 @@ script =
md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
shutil.move(extract_dir, location)
[template-wrapper]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/wrapper.in
output = ${buildout:directory}/template-wrapper.cfg
mode = 0644
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
#md5sum = 968bea0fc81dc604a874c53648b7d13f
mode = 0644
......@@ -2,7 +2,7 @@
"variables": {
"user": "nexedi",
"password": "test",
"disk_size": ${disk_size},
"disk_size": {{ disk_size }},
"domain": ""
},
......@@ -16,7 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso",
"iso_url":
"http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso",
"iso_checksum": "0b31bccccb048d20b551f70830bb7ad0",
"iso_checksum_type": "md5",
......@@ -45,4 +46,4 @@
]
}
]
}
\ No newline at end of file
}
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
extends =
../../software/kvm/instance-kvm.cfg.jinja2
${template:output}
parts +=
parts =
packer-json-template
packer-build-template
kvm-instance
dynamic-template-kvm
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
etc-run = $${:etc}/run
srv = $${buildout:directory}/srv/
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
......@@ -33,20 +35,20 @@ partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file}
configuration.packer_json = ${:_profile_base_location_}/debian77.json.jinja2
configuration.packer_json = ${:_profile_base_location_}/debian8.json.jinja2
[packer-json-template]
recipe = slapos.recipe.template
url = $${instance-parameter:configuration.packer_json}
output = ${buildout:parts-directory}/packer-template.json
context =
context =
key disk_size slap-parameter:disk-size
#destination = ${buildout:parts-directory}
#md5sum = 47d492dafe5cb314bdc49bf013d21ead
[packer-build-template]
< = jinja2-template-base
template = ${template-wrapper:output}
template = ${packer-template-wrapper:output}
rendered = $${directory:etc-run}/packer-build
mode = 0700
extra-context =
......@@ -56,7 +58,5 @@ extra-context =
[packer-configuration]
packer-environment = ${buildout:parts-directory}/qemu/bin/
packer-build-command =
${buildout:parts-directory}/packer/packer build -debug -color=false $${packer-json-template:output} > testing.log
[kvm-instance]
disk-path = ${directory:srv}/virtual.qcow2
\ No newline at end of file
${buildout:parts-directory}/packer/packer build -debug -color=false $${packer-json-template:output} >
testing.log
......@@ -4,6 +4,23 @@ extends =
../../stack/slapos.cfg
../../component/qemu-kvm/buildout.cfg
../../component/packer/buildout.cfg
../../software/kvm/software.cfg
parts +=
qemu
\ No newline at end of file
template
template-kvm
qemu
instance-profile
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
#md5sum = cf67212d3155767d0d0d8a6d75d2d8ad
output = ${buildout:directory}/instance.cfg
[packer-template-wrapper]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/wrapper.in
output = ${buildout:directory}/template-wrapper.cfg
mode = 0644
#!${dash-output:dash}
export PATH=$PATH:{{ env }} && {{ content }}
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