Commit 8a6fc7fa authored by Rafael Monnerat's avatar Rafael Monnerat

slaprunner: Create definitions.cfg for pre-load slapos node format

  Creating this file and updating the slapos.cfg configuration
  is possible to call slapos node format from the partition in the
  same way you would do in a computer.
parent f3dc178f
......@@ -18,7 +18,7 @@ md5sum = 8d6878ff1d2e75010c50a1a2b0c13b24
[template-runner]
filename = instance-runner.cfg
md5sum = 46b998f29f5d990d5f2281dd2cbca81d
md5sum = 73f8d2e4dda8f46b83cb45cacd7434f7
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......@@ -50,7 +50,11 @@ md5sum = 525e37ea8b2acf6209869999b15071a6
[template-slapos-cfg]
filename = template/slapos.cfg.in
md5sum = e6a3ca1604ae5458248135cd6de0f3e6
md5sum = 95de0677e78fc06cc8304cc6caea9169
[template-slapformat-definition.cfg]
filename = template/slapformat-definition.cfg.in
md5sum = a94299dd2133956060486609e30b97ec
[template-parameters]
filename = parameters.xml.in
......
......@@ -21,6 +21,7 @@ common-runner-parts =
shellinabox
shellinabox-service
slapos-cfg
slapformat-definition.cfg
cron-entry-prepare-software
deploy-instance-parameters
instance-software
......@@ -160,6 +161,7 @@ supervisor = ${buildout:bin-directory}/slapgrid-supervisorctl
git-binary = ${git:location}/bin/git
root_check = false
slapos.cfg = $${directory:etc}/slapos.cfg
slapformat-definition.cfg = $${directory:etc}/slapformat-definition.cfg
working-directory = $${runnerdirectory:home}
project-directory = $${runnerdirectory:project}
instance_root = $${runnerdirectory:instance-root}
......@@ -664,6 +666,18 @@ mode = 700
context =
section slaprunner test-runner
[slapformat-definition.cfg]
recipe = slapos.recipe.template:jinja2
template = ${template-slapformat-definition.cfg:location}/${template-slapformat-definition.cfg:filename}
rendered = $${slaprunner:slapformat-definition.cfg}
mode = 700
context =
section slaprunner slaprunner
key partition_user user-info:pw-name
import codecs codecs
raw buildout_shared_part_list_dump $${slaprunner:buildout-shared-part-list-dump}
[shellinabox]
recipe = slapos.recipe.template:jinja2
# We cannot use slapos.cookbook:wrapper here because this recipe escapes too much
......
......@@ -42,6 +42,7 @@ common-parts =
instance-runner-import
instance-runner-export
template-slapos-cfg
template-slapformat-definition.cfg
template-slapuser-script
# XXX: we have to manually add this for resilience
rdiff-backup
......@@ -110,6 +111,10 @@ recipe = slapos.recipe.build:download
< = template-download-base
filename = slapos.cfg.in
[template-slapformat-definition.cfg]
< = template-download-base
filename = slapformat-definition.cfg.in
[template-parameters]
< = download-only-base
......
[computer]
# Address example: 2001:67c:1254:27::1/ffff:ffff:ffff:ffff::/64
address = {{ slaprunner['ipv6'] }}/64
{% for partition_index in range(int(slaprunner['partition-amount'])) %}
[partition_{{ partition_index }}]
address = {{ slaprunner['ipv4'] }}/255.255.255.255 {{ slaprunner['ipv6'] }}/64
user = {{ partition_user }}
pathname = slappart{{ partition_index }}
network_interface =
{% endfor %}
......@@ -22,6 +22,11 @@ pidfile_instance = {{slaprunner['pidfile-instance']}}
[slapformat]
partition_amount = {{ slaprunner['partition-amount'] }}
alter_user = false
alter_network = false
create_tab = false
create_tun = false
computer_xml = {{ slaprunner['etc_dir'] }}/slapos.xml
[slaprunner]
slapos = {{ slaprunner['slapos'] }}
......
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