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
Labels
Merge Requests
92
Merge Requests
92
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
8402aeb2
Commit
8402aeb2
authored
Mar 04, 2019
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[KVM] better information for IPv6
parent
a9e6aefa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
23 deletions
+29
-23
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+2
-2
software/kvm/instance-kvm-resilient.cfg.jinja2
software/kvm/instance-kvm-resilient.cfg.jinja2
+2
-0
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+25
-21
No files found.
software/kvm/buildout.hash.cfg
View file @
8402aeb2
...
...
@@ -19,7 +19,7 @@ md5sum = 028b6a6456d744c11b1bb2c51ecd51b2
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum =
e30912b1256bb093329ee3c108666f0
5
md5sum =
35e150b8aff690b780d42e9732df07a
5
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
...
...
@@ -27,7 +27,7 @@ md5sum = 63fa784d8946d0b6e3fbd6381e1ea9f4
[template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2
md5sum =
c189bce8b196a3b5bcb01526a3f9b2aa
md5sum =
6677ac6074f6be671fe8e8b8a6a4afe8
[template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in
...
...
software/kvm/instance-kvm-resilient.cfg.jinja2
View file @
8402aeb2
...
...
@@ -68,12 +68,14 @@ return =
# KVM related parameters
# XXX: return ALL parameters (like nat rules), through jinja
backend-url url ip
{{ ' ' }}ipv6-network-info
[publish-connection-information]
recipe = slapos.cookbook:publish
backend-url = ${request-kvm:connection-backend-url}
url = ${request-kvm:connection-url}
ipv6 = ${request-kvm:connection-ip}
ipv6-network-info = ${request-kvm:connection-ipv6-network-info}
monitor-password = ${publish-early:monitor-password}
monitor-user = ${monitor-publish-parameters:monitor-user}
{% if monitor_dict -%}
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
8402aeb2
...
...
@@ -133,7 +133,7 @@ external-disk-number = ${slap-parameter:external-disk-number}
external-disk-size = ${slap-parameter:external-disk-size}
external-disk-format = ${slap-parameter:external-disk-format}
{% if enable_http == 'true' or ( use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
, '') != ""
) -%}
{% if enable_http == 'true' or ( use_tap == 'true' and slap_configuration.get('tap-ipv4-addr') -%}
httpd-port = ${slap-parameter:httpd-port}
{% else -%}
httpd-port = 0
...
...
@@ -464,14 +464,14 @@ key_info = Get the publick key file in your VM with the command: wget {{ kvm_htt
{% endif %}
{% endif %}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
, '') != ""
-%}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
)
-%}
ipv4-network-info =
Use th
ese configurations below to configure IPv4
on interface {{ iface }} in your VM.
IFACE=
{{ iface }}
${network-config-ipv4:ifconfig}
${network-config-ipv4:route-iface
}
${network-config-ipv4:route-network
}
${network-config-ipv4:route-default
}
Use th
is configuration in /etc/network/interfaces to configure IPv6
on interface {{ iface }} in your VM.
auto
{{ iface }}
iface {{ iface }} inet6 static
address {{ slap_configuration.get('tap-ipv6-addr') }
}
netmask {{ slap_configuration.get('tap-ipv6-netmask') }
}
gateway {{ slap_configuration.get('tap-ipv6-gateway') }
}
{% if enable_http == 'true' %}
${helper:blank-line}
Or run in your VM the command: wget -O- {{ kvm_http }}/netconfig.sh | /bin/sh -
...
...
@@ -479,20 +479,21 @@ ipv4-network-info =
{% endif %}
ipv6-network-info =
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr', '') != "" %}
Use these configurations below to configure IPv6 on interface {{ iface }} in your VM.
IFACE={{ iface }}
ip link set dev $IFACE up
${network-config-ipv6:ipv6-add-address}
${network-config-ipv6:ipv6-add-default-route}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr') %}
Use this configuration in /etc/network/interfaces to configure IPv6 on interface {{ iface }} in your VM.
auto {{ iface }}
iface {{ iface }} inet6 static
address {{ slap_configuration.get('tap-ipv6-gateway') }}
netmask {{ slap_configuration.get('tap-ipv6-network').split('/')[1] }}
gateway {{ slap_configuration.get('tap-ipv6-addr') }}
{% if enable_http == 'true' %}
${helper:blank-line}
Or run in your VM the command: wget -O- {{ kvm_http }}/
ipv6_config.sh
| /bin/sh -
Or run in your VM the command: wget -O- {{ kvm_http }}/
${network-config-ipv6:filename}
| /bin/sh -
{% endif %}
{% endif %}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
, '') != ""
-%}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
)
-%}
[network-config-ipv4]
recipe = plone.recipe.command
path = ${directory:public}/netconfig.sh
...
...
@@ -521,19 +522,22 @@ command =
update-command = ${:command}
{% endif -%}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr'
, '') != ""
-%}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv6-addr'
)
-%}
[network-config-ipv6]
recipe = plone.recipe.command
path = ${directory:public}/ipv6_config.sh
ipv6-add-address = ip -6 address add {{ slap_configuration.get('tap-ipv6-network') }} dev \$IFACE
filename = ipv6_config.sh
path = ${directory:public}/${:filename}
ipv6-add-address = ip -6 address add {{ slap_configuration.get('tap-ipv6-gateway') }}/{{ slap_configuration.get('tap-ipv6-network').split('/')[1] }} dev \$IFACE
ipv6-add-default-route =
ip -6 route del default ; ip -6 route add default dev \$IFACE via {{ slap_configuration.get('tap-ipv6-gateway') }}
ip -6 route del default ; ip -6 route add default dev \$IFACE via {{ slap_configuration.get('tap-ipv6-addr') }}
ipv6-set-link-up = ip link set dev \$IFACE up
command =
cat > ${:path} << EOF
#!/bin/sh
IFACE={{ iface }}
${:ipv6-add-address}
${:ipv6-add-default-route}
${:ipv6-set-link-up}
EOF
update-command = ${:command}
{% endif -%}
...
...
@@ -565,7 +569,7 @@ mode = {{ mode }}
[publish-host-config]
recipe = plone.recipe.command
name = {{ slapparameter_dict.get('name', 'localhost') }}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
, '') != ""
-%}
{% if use_tap == 'true' and slap_configuration.get('tap-ipv4-addr'
)
-%}
local-ipv4 = {{ slap_configuration['tap-ipv4-addr'] }}
gateway = {{ slap_configuration.get('tap-ipv4-gateway') }}
netmask = {{ slap_configuration.get('tap-ipv4-network') }}
...
...
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