summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2018-08-13 15:43:34 +0200
committerManuel Buil <mbuil@suse.com>2018-08-21 15:08:36 +0000
commit06b538de8c14a96e8b44315136bd917f16126a87 (patch)
treee8b28af7f8b154190349a24f935a5f0c38165699
parent973920421d98159a3d91790859061ee718cd1e07 (diff)
Modify idf to be aligned with the rest of idfs
Change our idf to be more aligned with lf's idf. Adapt dynamic_inventory.py to the change Change-Id: Ib8f6d1684a00a8eb5ae06d5d04d308d4325cd444 Signed-off-by: Manuel Buil <mbuil@suse.com>
-rwxr-xr-xxci/playbooks/dynamic_inventory.py10
-rw-r--r--xci/var/idf.yml73
2 files changed, 42 insertions, 41 deletions
diff --git a/xci/playbooks/dynamic_inventory.py b/xci/playbooks/dynamic_inventory.py
index bf9483da..aee2a87a 100755
--- a/xci/playbooks/dynamic_inventory.py
+++ b/xci/playbooks/dynamic_inventory.py
@@ -93,15 +93,15 @@ class XCIInventory(object):
print(e)
sys.exit(1)
- valid_host = (host for host in idf['xci'][self.installer]['nodes_roles'] \
+ valid_host = (host for host in idf['xci']['installers'][self.installer]['nodes_roles'] \
if host in idf['xci']['flavors'][self.flavor] \
and host != 'opnfv')
for host in valid_host:
nodes.append(host)
- hostname = idf['xci'][self.installer]['hostnames'][host]
+ hostname = idf['xci']['installers'][self.installer]['hostnames'][host]
self.add_host(hostname)
- for role in idf['xci'][self.installer]['nodes_roles'][host]:
+ for role in idf['xci']['installers'][self.installer]['nodes_roles'][host]:
self.add_to_group(role, hostname)
pdf_host_info = filter(lambda x: x['name'] == host, pdf['nodes'])[0]
@@ -124,8 +124,8 @@ class XCIInventory(object):
self.add_groupvar('all', 'host_info', host_networks)
# Now add the additional groups
- for parent in idf['xci'][self.installer]['groups'].keys():
- map(lambda x: self.add_group(x, parent), idf['xci'][self.installer]['groups'][parent])
+ for parent in idf['xci']['installers'][self.installer]['groups'].keys():
+ map(lambda x: self.add_group(x, parent), idf['xci']['installers'][self.installer]['groups'][parent])
# Read additional group variables
self.read_additional_group_vars()
diff --git a/xci/var/idf.yml b/xci/var/idf.yml
index 4d743cda..7f2dbf34 100644
--- a/xci/var/idf.yml
+++ b/xci/var/idf.yml
@@ -30,29 +30,7 @@ idf:
interface: 3
network: 172.29.244.0
mask: 22
-
-xci:
- pod_name: vpod1
- net_config: *net_config
- flavors:
- mini:
- - opnfv
- - node1
- - node2
- noha:
- - opnfv
- - node1
- - node2
- - node3
- ha:
- - opnfv
- - node1
- - node2
- - node3
- - node4
- - node5
-
- osa:
+ osa: &idf_osa
nodes_roles:
opnfv: [deployment]
node1: [controller]
@@ -72,9 +50,20 @@ xci:
node3: compute01
node4: controller01
node5: controller02
- kubespray:
+ network:
+ # network mapping
+ network_mapping:
+ # Management network used by installer components to communicate
+ net-mgmt: admin
+ # Storage Network
+ net-storage: storage
+ # Internal network for communication between VNF
+ net-internal: private
+ # Public network for VNF remote acces (ext-net in Openstack)
+ net-vnf: public
+ kubespray: &idf_kubespray
nodes_roles:
- opnvf: [opnfv]
+ opnfv: [opnfv]
node1: [kube-master, etcd, vault]
node2: [kube-node]
node3: [kube-node]
@@ -91,7 +80,26 @@ xci:
node3: node2
node4: master2
node5: master3
-
+xci:
+ pod_name: vpod1
+ net_config: *net_config
+ flavors:
+ mini:
+ - opnfv
+ - node1
+ - node2
+ noha:
+ - opnfv
+ - node1
+ - node2
+ - node3
+ ha:
+ - opnfv
+ - node1
+ - node2
+ - node3
+ - node4
+ - node5
# net_config network to be used by the PXE
pxe_network: public
@@ -104,13 +112,6 @@ xci:
extra_addresses:
opnfv: 192.168.122.2
- # network mapping
- network_mapping:
- # Management network used by installer components to communicate
- net-mgmt: admin
- # Storage Network
- net-storage: storage
- # Internal network for communication between VNF
- net-internal: private
- # Public network for VNF remote acces (ext-net in Openstack)
- net-vnf: public
+ installers:
+ osa: *idf_osa
+ kubespray: *idf_kubespray