Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos
Commits
d6aefc18
Commit
d6aefc18
authored
Jul 15, 2015
by
Kristopher Ruzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moves files around
parent
0d1ef902
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
35 deletions
+39
-35
component/packer/buildout.cfg
component/packer/buildout.cfg
+4
-20
software/packer/debian8.json.jinja2
software/packer/debian8.json.jinja2
+4
-3
software/packer/instance.cfg.in
software/packer/instance.cfg.in
+10
-10
software/packer/software.cfg
software/packer/software.cfg
+19
-2
software/packer/templates/wrapper.in
software/packer/templates/wrapper.in
+2
-0
No files found.
component/packer/buildout.cfg
View file @
d6aefc18
...
...
@@ -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
component/packer/debian77
.json.jinja2
→
software/packer/debian8
.json.jinja2
View file @
d6aefc18
...
...
@@ -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
}
component
/packer/instance.cfg.in
→
software
/packer/instance.cfg.in
View file @
d6aefc18
[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_}/debian
77
.json.jinja2
configuration.packer_json = ${:_profile_base_location_}/debian
8
.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
software/packer/software.cfg
View file @
d6aefc18
...
...
@@ -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
software/packer/templates/wrapper.in
0 → 100644
View file @
d6aefc18
#!${dash-output:dash}
export PATH=$PATH:{{ env }} && {{ content }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment