Commit 0a0bd8da authored by Alain Takoudjou's avatar Alain Takoudjou

kvm: file containing hostname and ipv4 added in public folder

parent 04c1af5e
......@@ -95,7 +95,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = 679c350a9570252dad1079ea1c80a6ec
md5sum = 2bd53e4ea24ec94a3bde46ec0cbcc1e2
download-only = true
on-update = true
......@@ -103,7 +103,7 @@ on-update = true
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
mode = 644
md5sum = ea4302330452cb00c76f8a52e7e952eb
md5sum = 84d4462570bedb289a2bbda1a9acb872
download-only = true
on-update = true
......
......@@ -30,6 +30,7 @@ config-frontend-instance-name = {{ instance_name ~ ' VNC Frontend' }}
config-frontend-software-type = {{ dumps(frontend_dict.get('software-type', 'frontend')) }}
config-frontend-software-url = {{ dumps(frontend_dict.get('software-url', 'http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg')) }}
config-frontend-instance-guid = {{ dumps(frontend_dict.get('instance-guid', '')) }}
config-name = {{ instance_name }}
config-authorized-key = {{ dumps(slapparameter_dict.get('authorized-key', '')) }}
config-nbd-port = {{ dumps(kvm_parameter_dict.get('nbd-port', 1024)) }}
config-nbd-host = {{ dumps(kvm_parameter_dict.get('nbd-host', '')) }}
......
......@@ -20,7 +20,8 @@ parts =
httpd
httpd-promise
get-authorized-key
publish-host-config
extends =
{{ template_httpd_cfg }}
{% endif -%}
......@@ -329,6 +330,23 @@ command =
echo "$authorizedkey" > ${:path}
update-command = ${:command}
[publish-host-config]
recipe = plone.recipe.command
name = {{ slapparameter_dict.get('name', 'localhost') }}
{% if slapparameter_dict.get('use-tap', 'False') == 'True' and tap_network_dict.has_key('ipv4') -%}
local-ipv4 = ${slap-network-information:tap-ipv4}
{% else -%}
local-ipv4 = 127.0.0.1
{% endif -%}
path-host = ${directory:public}/hostname
path-ip = ${directory:public}/ipv4
command =
rm -f ${:path-host}
rm -f ${:path-ip}
echo "${:name}" > ${:path-host}
echo "${:local-ipv4}" > ${:path-ip}
update-command = ${:command}
[slap-parameter]
# Default values if not specified
frontend-software-type = frontend
......
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