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 =
...
@@ -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
component/packer/debian77
.json.jinja2
→
software/packer/debian8
.json.jinja2
View file @
d6aefc18
...
@@ -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
component
/packer/instance.cfg.in
→
software
/packer/instance.cfg.in
View file @
d6aefc18
[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_}/debian
77
.json.jinja2
configuration.packer_json = ${:_profile_base_location_}/debian
8
.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
software/packer/software.cfg
View file @
d6aefc18
...
@@ -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
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