summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/virsh_net/net_pxebr.xml.j2
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-01-29 06:02:10 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-05 06:03:35 +0100
commit9c3ecbb5238fa815e3f6b46c1933d69d588a5430 (patch)
tree793f75e8e13cfe82d125f82c5d6732dcf3df539f /mcp/scripts/virsh_net/net_pxebr.xml.j2
parent5f95f52021fa08de3a0a46bdd98b0b711fec1ecc (diff)
[virtual] Split 'pxebr' from 'mcpcontrol' net
- add new virsh managed network 'pxebr' (to mimic baremetal behavior on virtual PODs, this will be the equivalent of PXE/admin network); - connect 'pxebr' to 3rd interface for cfg01, mas01 for all deploys (used to be baremetal-specific), replacing 'internal'; - keep 'mcpcontrol' connected only to 'cfg01' (+ 'mas01' if present) for initial infrastructure bring-up (1st interface); - switch all virtual cluster nodes to 'pxebr' (1st interface); - use 'pxebr' for all Salt cluster nodes traffic, 'mcpcontrol' only for mas01<=>cfg01 Salt traffic; - convert <user-data.template> to jinja2 and expand it based on PDF instead of using `envsubst`; - split <user-data.sh.j2> into two versions, one for each network used for Salt traffic; - ci/deploy.sh: Read scenario data before template parsing for cluster domain variable, needed in virsh network def; - leave docs diagram refresh to later after all possible deploy types have settled; - limit keyserver proxy usage to nodes where the configured http proxy matches the first nameserver (true for all MaaS-provisioned nodes), so we can re-use the same pillar for FN VMs and baremetal nodes; - add PXE/admin IP on cfg01's 3rd interface and switch other vnodes `salt_master_host` to point to it; JIRA: FUEL-322 Change-Id: Ie4f7aedddf2ef81046f1127b377d88dce79f0fda Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/virsh_net/net_pxebr.xml.j2')
-rw-r--r--mcp/scripts/virsh_net/net_pxebr.xml.j226
1 files changed, 26 insertions, 0 deletions
diff --git a/mcp/scripts/virsh_net/net_pxebr.xml.j2 b/mcp/scripts/virsh_net/net_pxebr.xml.j2
new file mode 100644
index 000000000..f82780cf7
--- /dev/null
+++ b/mcp/scripts/virsh_net/net_pxebr.xml.j2
@@ -0,0 +1,26 @@
+<!--
+ Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+-->
+{%- if conf.idf.net_config.admin is defined %}
+ {%- set pxebr_network = conf.idf.net_config.admin.network %}
+ {%- set pxebr_prefix = conf.idf.net_config.admin.mask %}
+{%- else %}
+ {%- set pxebr_network = '192.168.11.0' %}
+ {%- set pxebr_prefix = '24' %}
+{%- endif %}
+<network>
+ <name>pxebr</name>
+ <forward mode="nat"/>
+ <bridge name="pxebr"/>
+ <ip address="{{ pxebr_network | ipaddr_index(1) }}" netmask="{{ pxebr_prefix | netmask }}">
+ <!-- NOTE: .254 is harcoded for now (for /24 prefix), should be computed instead. -->
+ <dhcp>
+ <range start="{{ pxebr_network | ipaddr_index(4) }}" end="{{ pxebr_network | ipaddr_index(254) }}"/>
+ </dhcp>
+ </ip>
+</network>