summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xxci/config/pinned-versions5
-rw-r--r--xci/installer/kubespray/playbooks/configure-opnfvhost.yml1
-rwxr-xr-xxci/playbooks/dynamic_inventory.py20
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml6
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml8
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml10
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml10
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j212
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j27
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j24
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j22
-rwxr-xr-xxci/xci-deploy.sh4
12 files changed, 43 insertions, 46 deletions
diff --git a/xci/config/pinned-versions b/xci/config/pinned-versions
index 72a0ff61..ccfc2704 100755
--- a/xci/config/pinned-versions
+++ b/xci/config/pinned-versions
@@ -43,6 +43,5 @@ export KEEPALIVED_VERSION=$(grep -E '.*name: keepalived' -A 3 \
export HAPROXY_VERSION=$(grep -E '.*name: haproxy_server' -A 3 \
${XCI_PATH}/xci/installer/osa/files/ansible-role-requirements.yml \
| tail -n1 | sed -n 's/\(^.*: \)\([0-9a-z].*$\)/\2/p')
-# HEAD of kubspray "master" as of 27.02.2018
-# kubespray's bug Reference: https://github.com/kubernetes-incubator/kubespray/issues/2400
-export KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-"5d9bb300d716880610c34dd680c167d2d728984d"}
+# HEAD of kubspray "master" as of 16.05.2018
+export KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-"38e727dbe1bdf5316fae8d645718cc8279fbda20"}
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
index 01904ba3..0b38060b 100644
--- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
@@ -74,6 +74,7 @@
with_items:
- { name: 'ansible', version: "{{ xci_kube_ansible_pip_version }}" }
- { name: 'netaddr' }
+ - { name: 'ansible-modules-hashivault' }
- name: Configure SSL certificates
include_tasks: "{{ xci_path }}/xci/playbooks/manage-ssl-certs.yml"
diff --git a/xci/playbooks/dynamic_inventory.py b/xci/playbooks/dynamic_inventory.py
index 8f498742..552a1337 100755
--- a/xci/playbooks/dynamic_inventory.py
+++ b/xci/playbooks/dynamic_inventory.py
@@ -39,10 +39,15 @@ class XCIInventory(object):
self.opnfv_networks = {}
self.opnfv_networks['opnfv'] = {}
- self.opnfv_networks['opnfv']['admin'] = '172.29.236.10'
- self.opnfv_networks['opnfv']['public'] = '192.168.122.2'
- self.opnfv_networks['opnfv']['private'] = '172.29.240.10'
- self.opnfv_networks['opnfv']['storage'] = '172.29.244.10'
+ self.opnfv_networks['opnfv']['admin'] = {}
+ self.opnfv_networks['opnfv']['admin']['address'] = '172.29.236.10/22'
+ self.opnfv_networks['opnfv']['public'] = {}
+ self.opnfv_networks['opnfv']['public']['address'] = '192.168.122.2/24'
+ self.opnfv_networks['opnfv']['public']['gateway'] = '192.168.122.1'
+ self.opnfv_networks['opnfv']['private'] = {}
+ self.opnfv_networks['opnfv']['private']['address'] = '172.29.240.10/22'
+ self.opnfv_networks['opnfv']['storage'] = {}
+ self.opnfv_networks['opnfv']['storage']['address'] = '172.29.244.10/24'
self.read_pdf_idf()
@@ -95,9 +100,12 @@ class XCIInventory(object):
self.add_hostvar(hostname, 'ansible_host', native_vlan_if[0]['address'])
host_networks[hostname] = {}
# And now record the rest of the information
- for network in idf['idf']['net_config'].keys():
+ for network, ndata in idf['idf']['net_config'].items():
network_interface_num = idf['idf']['net_config'][network]['interface']
- host_networks[hostname][network] = pdf_host_info['interfaces'][int(network_interface_num)]['address']
+ host_networks[hostname][network] = {}
+ host_networks[hostname][network]['address'] = pdf_host_info['interfaces'][int(network_interface_num)]['address'] + "/" + str(ndata['mask'])
+ if 'gateway' in ndata.keys():
+ host_networks[hostname][network]['gateway'] = str(ndata['gateway']) + "/" + str(ndata['mask'])
host_networks.update(self.opnfv_networks)
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml
index 945a7802..a9165709 100644
--- a/xci/playbooks/get-opnfv-scenario-requirements.yml
+++ b/xci/playbooks/get-opnfv-scenario-requirements.yml
@@ -86,8 +86,6 @@
state: directory
become: true
- # NOTE(hwoarang) We have to check all levels of the local fact before we add it
- # otherwise Ansible will fail.
- name: Record scenario information
ini_file:
create: yes
@@ -97,10 +95,6 @@
value: "{{ xci_scenario.role | basename }}"
path: "/etc/ansible/facts.d/xci.fact"
become: true
- when: ansible_local is not defined
- or (ansible_local is defined and ansible_local.xci is not defined)
- or (ansible_local is defined and ansible_local.xci is defined and ansible_local.xci.scenarios is not defined)
- or (ansible_local is defined and ansible_local.xci is defined and ansible_local.xci.scenarios is defined and ansible_local.xci.scenarios.role is not defined)
- name: Fail if {{ deploy_scenario }} is not supported
fail:
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml b/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml
index 380e4c52..3cac1e22 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml
@@ -45,10 +45,10 @@
- { name: "{{ ansible_local.xci.network.xci_interface }}.10", vlan_id: 10 }
- { name: "{{ ansible_local.xci.network.xci_interface }}.30", vlan_id: 30 }
- { name: "{{ ansible_local.xci.network.xci_interface }}.20", vlan_id: 20 }
- - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", ip: "{{ host_info[inventory_hostname].admin }}", prefix: "255.255.252.0" }
- - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", ip: "{{ host_info[inventory_hostname].private }}", prefix: "255.255.252.0" }
- - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", ip: "{{ host_info[inventory_hostname].public }}", prefix: "255.255.255.0", gateway: "192.168.122.1" }
- - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", ip: "{{ host_info[inventory_hostname].storage }}", prefix: "255.255.252.0" }
+ - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", network: "{{ host_info[inventory_hostname].admin }}" }
+ - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", network: "{{ host_info[inventory_hostname].private }}" }
+ - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", network: "{{ host_info[inventory_hostname].public }}" }
+ - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", network: "{{ host_info[inventory_hostname].storage }}" }
loop_control:
label: "{{ item.name }}"
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml b/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml
index 9dce50b6..b06a8695 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml
@@ -17,17 +17,17 @@
- { name: "{{ ansible_local.xci.network.xci_interface }}.10", bridge: "br-mgmt" , vlan_id: 10 }
- { name: "{{ ansible_local.xci.network.xci_interface }}.20", bridge: "br-storage", vlan_id: 20 }
- { name: "{{ ansible_local.xci.network.xci_interface }}.30", bridge: "br-vxlan" , vlan_id: 30 }
- - { name: "br-vlan" , ip: "{{ host_info[inventory_hostname].public }}", prefix: 24 }
- - { name: "br-mgmt" , ip: "{{ host_info[inventory_hostname].admin }}", prefix: 22 }
- - { name: "br-storage", ip: "{{ host_info[inventory_hostname].storage }}", prefix: 22 }
- - { name: "br-vxlan" , ip: "{{ host_info[inventory_hostname].private}}", prefix: 22 }
+ - { name: "br-vlan" , network: "{{ host_info[inventory_hostname].public }}" }
+ - { name: "br-mgmt" , network: "{{ host_info[inventory_hostname].admin }}" }
+ - { name: "br-storage", network: "{{ host_info[inventory_hostname].storage }}" }
+ - { name: "br-vxlan" , network: "{{ host_info[inventory_hostname].private }}" }
loop_control:
label: "{{ item.name }}"
- name: Add default route through br-vlan
lineinfile:
path: "/etc/sysconfig/network-scripts/ifcfg-br-vlan"
- line: "GATEWAY=192.168.122.1"
+ line: "GATEWAY={{ host_info[inventory_hostname]['public']['gateway'] | ipaddr('address') }}"
- name: restart network service
service:
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml b/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml
index b1059c81..c9c9d83c 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml
@@ -17,10 +17,10 @@
- { name: "{{ ansible_local.xci.network.xci_interface }}.10", vlan_id: 10 }
- { name: "{{ ansible_local.xci.network.xci_interface }}.30", vlan_id: 30 }
- { name: "{{ ansible_local.xci.network.xci_interface }}.20", vlan_id: 20 }
- - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", ip: "{{ host_info[inventory_hostname].admin }}/22" }
- - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", ip: "{{ host_info[inventory_hostname].private }}/22" }
- - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", ip: "{{ host_info[inventory_hostname].public }}/24" }
- - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", ip: "{{ host_info[inventory_hostname].storage }}/22" }
+ - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", network: "{{ host_info[inventory_hostname].admin }}" }
+ - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", network: "{{ host_info[inventory_hostname].private }}" }
+ - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", network: "{{ host_info[inventory_hostname].public }}" }
+ - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", network: "{{ host_info[inventory_hostname].storage }}" }
loop_control:
label: "{{ item.name }}"
@@ -35,7 +35,7 @@
src: "{{ installer_type }}/{{ ansible_os_family | lower }}.routes.j2"
dest: "/etc/sysconfig/network/ifroute-{{ item.name }}"
with_items:
- - { name: "br-vlan", gateway: "192.168.122.1", route: "default" }
+ - { name: "br-vlan", gateway: "{{ host_info[inventory_hostname]['public']['gateway'] }}", route: "default" }
- name: restart network service
service:
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
index 56db509b..3eddce45 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
@@ -25,14 +25,12 @@ iface {{ item.name }} inet static
post-down ip link del br-vlan-veth || true
bridge_ports br-vlan-veth
{% endif %}
-{% if item.ip is defined %}
- address {{ item.ip }}
+{% if item.network is defined %}
+ address {{ item.network.address | ipaddr('address') }}
+ netmask {{ item.network.address | ipaddr('netmask') }}
{% endif %}
-{% if item.prefix is defined %}
- netmask {{ item.prefix }}
-{% endif %}
-{% if item.gateway is defined %}
- gateway {{ item.gateway }}
+{% if item.network is defined and item.network.gateway is defined %}
+ gateway {{ item.network.gateway | ipaddr('address') }}
{% endif %}
{% endif %}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
index d3364385..fa957764 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
@@ -14,9 +14,6 @@ TYPE=Bridge
DELAY=0
STP=off
{% endif %}
-{% if item.ip is defined %}
-IPADDR={{ item.ip }}
-{% endif %}
-{% if item.prefix is defined %}
-PREFIX={{ item.prefix }}
+{% if item.network is defined %}
+IPADDR={{ item.network.address }}
{% endif %}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
index 27b01eb4..70811a09 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
@@ -10,8 +10,8 @@ BRIDGE_FORWARDDELAY='0'
BRIDGE_STP=off
BRIDGE_PORTS={{ item.bridge_ports }}
{% endif %}
-{% if item.ip is defined %}
-IPADDR={{ item.ip }}
+{% if item.network is defined %}
+IPADDR={{ item.network.address }}
{% endif %}
PRE_UP_SCRIPT="compat:suse:network-config-suse"
POST_DOWN_SCRIPT="compat:suse:network-config-suse"
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2
index 7c868447..93941fad 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2
@@ -1 +1 @@
-{{ item.route }} {{ item.gateway }}
+{{ item.route }} {{ item.gateway | ipaddr('address') }}
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index a04fb21e..07f4d39d 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -164,8 +164,8 @@ echo "-------------------------------------------------------------------------"
# Get scenario variables overrides
#-------------------------------------------------------------------------------
-source $(find $XCI_PATH/xci/scenarios/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null || \
- source $(find $XCI_SCENARIOS_CACHE/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null || :
+source $(find $XCI_SCENARIOS_CACHE/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null &&
+ echo "Sourced ${DEPLOY_SCENARIO} overrides files successfully!" || :
#-------------------------------------------------------------------------------
# Log info to console