Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
slapos
Commits
1b7e2e06
Commit
1b7e2e06
authored
Nov 04, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[KVM SR] publish nat rules as parameters.
parent
5033aa2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
software/kvm/common.cfg
software/kvm/common.cfg
+2
-2
software/kvm/instance-kvm-resilient.cfg.jinja2
software/kvm/instance-kvm-resilient.cfg.jinja2
+2
-2
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+7
-1
No files found.
software/kvm/common.cfg
View file @
1b7e2e06
...
@@ -88,7 +88,7 @@ mode = 0644
...
@@ -88,7 +88,7 @@ mode = 0644
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
mode = 644
md5sum =
03550e647e07af99dcd2af8f4869ecbe
md5sum =
e16c15f72fdeb92ce1854bc25daf5ad7
download-only = true
download-only = true
on-update = true
on-update = true
...
@@ -96,7 +96,7 @@ on-update = true
...
@@ -96,7 +96,7 @@ on-update = true
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2
url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2
mode = 644
mode = 644
md5sum =
038c338e3ce545a73393ceee38a9ac7d
md5sum =
a07c96b53fe9145278cd64a3b27a459a
download-only = true
download-only = true
on-update = true
on-update = true
...
...
software/kvm/instance-kvm-resilient.cfg.jinja2
View file @
1b7e2e06
...
@@ -29,13 +29,13 @@ return =
...
@@ -29,13 +29,13 @@ return =
# Resilient related parameters
# Resilient related parameters
url ssh-public-key ssh-url notification-id ip
url ssh-public-key ssh-url notification-id ip
# KVM related parameters
# KVM related parameters
backend-url url ipv6
# XXX: return ALL parameters (like nat rules), through jinja
backend-url url
[publish-connection-informations]
[publish-connection-informations]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
backend-url = ${request-kvm:connection-backend-url}
backend-url = ${request-kvm:connection-backend-url}
url = ${request-kvm:connection-url}
url = ${request-kvm:connection-url}
ipv6 = ${request-kvm:connection-ipv6}
[kvm-frontend-url-promise]
[kvm-frontend-url-promise]
# Check that url parameter is complete
# Check that url parameter is complete
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
1b7e2e06
...
@@ -215,7 +215,13 @@ curl_path = {{ curl_executable_location }}
...
@@ -215,7 +215,13 @@ curl_path = {{ curl_executable_location }}
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
backend-url = https://[${novnc-instance:ip}]:${novnc-instance:port}/vnc_auto.html?host=[${novnc-instance:ip}]&port=${novnc-instance:port}&encrypt=1&password=${kvm-instance:vnc-passwd}
backend-url = https://[${novnc-instance:ip}]:${novnc-instance:port}/vnc_auto.html?host=[${novnc-instance:ip}]&port=${novnc-instance:port}&encrypt=1&password=${kvm-instance:vnc-passwd}
url = ${request-slave-frontend:connection-url}/vnc_auto.html?host=${request-slave-frontend:connection-domainname}&port=${request-slave-frontend:connection-port}&encrypt=1&path=${request-slave-frontend:connection-resource}&password=${kvm-instance:vnc-passwd}
url = ${request-slave-frontend:connection-url}/vnc_auto.html?host=${request-slave-frontend:connection-domainname}&port=${request-slave-frontend:connection-port}&encrypt=1&path=${request-slave-frontend:connection-resource}&password=${kvm-instance:vnc-passwd}
ipv6 = ${slap-network-information:global-ipv6}
# Publish NAT port mapping status
# XXX: hardcoded value from [slap-parameter]
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') %}
{% for port in nat_rule_list.split(' ') -%}
{% set external_port = 10000 + port|int() -%}
nat-rule-port-{{port}} = ${slap-network-information:global-ipv6} : {{external_port}}
{% endfor -%}
[slap-parameter]
[slap-parameter]
...
...
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