Commit d6aefc18 authored by Kristopher Ruzic's avatar Kristopher Ruzic

moves files around

parent 0d1ef902
...@@ -5,19 +5,17 @@ extends = ...@@ -5,19 +5,17 @@ extends =
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
parts += parts +=
packer
dash dash
dash-output dash-output
slapos-cookbook slapos-cookbook
packer
instance-profile
[packer] [packer]
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://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 url_x86 = https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_386.zip
...@@ -37,18 +35,4 @@ script = ...@@ -37,18 +35,4 @@ script =
md5sum = self.options['md5sum_' + platform] md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum)) extract_dir = self.extract(self.download(url, md5sum))
shutil.move(extract_dir, location) 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 @@ ...@@ -2,7 +2,7 @@
"variables": { "variables": {
"user": "nexedi", "user": "nexedi",
"password": "test", "password": "test",
"disk_size": ${disk_size}, "disk_size": {{ disk_size }},
"domain": "" "domain": ""
}, },
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
"accelerator": "kvm", "accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}", "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": "0b31bccccb048d20b551f70830bb7ad0",
"iso_checksum_type": "md5", "iso_checksum_type": "md5",
...@@ -45,4 +46,4 @@ ...@@ -45,4 +46,4 @@
] ]
} }
] ]
} }
\ No newline at end of file
[buildout] [buildout]
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
extends = extends =
../../software/kvm/instance-kvm.cfg.jinja2 ${template:output}
parts += parts =
packer-json-template packer-json-template
packer-build-template packer-build-template
kvm-instance dynamic-template-kvm
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/ etc = $${buildout:directory}/etc/
etc-run = $${:etc}/run etc-run = $${:etc}/run
srv = $${buildout:directory}/srv/
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -33,20 +35,20 @@ partition = $${slap_connection:partition_id} ...@@ -33,20 +35,20 @@ partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url} url = $${slap_connection:server_url}
key = $${slap_connection:key_file} key = $${slap_connection:key_file}
cert = $${slap_connection:cert_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] [packer-json-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = $${instance-parameter:configuration.packer_json} url = $${instance-parameter:configuration.packer_json}
output = ${buildout:parts-directory}/packer-template.json output = ${buildout:parts-directory}/packer-template.json
context = context =
key disk_size slap-parameter:disk-size key disk_size slap-parameter:disk-size
#destination = ${buildout:parts-directory} #destination = ${buildout:parts-directory}
#md5sum = 47d492dafe5cb314bdc49bf013d21ead #md5sum = 47d492dafe5cb314bdc49bf013d21ead
[packer-build-template] [packer-build-template]
< = jinja2-template-base < = jinja2-template-base
template = ${template-wrapper:output} template = ${packer-template-wrapper:output}
rendered = $${directory:etc-run}/packer-build rendered = $${directory:etc-run}/packer-build
mode = 0700 mode = 0700
extra-context = extra-context =
...@@ -56,7 +58,5 @@ extra-context = ...@@ -56,7 +58,5 @@ extra-context =
[packer-configuration] [packer-configuration]
packer-environment = ${buildout:parts-directory}/qemu/bin/ packer-environment = ${buildout:parts-directory}/qemu/bin/
packer-build-command = packer-build-command =
${buildout:parts-directory}/packer/packer build -debug -color=false $${packer-json-template:output} > testing.log ${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
...@@ -4,6 +4,23 @@ extends = ...@@ -4,6 +4,23 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/qemu-kvm/buildout.cfg ../../component/qemu-kvm/buildout.cfg
../../component/packer/buildout.cfg ../../component/packer/buildout.cfg
../../software/kvm/software.cfg
parts += parts +=
qemu template
\ No newline at end of file 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