summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xci/installer/osa/files/ansible-role-requirements.yml2
-rw-r--r--xci/opnfv-scenario-requirements.yml1
-rw-r--r--xci/playbooks/roles/configure-network/tasks/main.yml29
-rw-r--r--xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j29
-rw-r--r--xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j210
-rw-r--r--xci/playbooks/roles/configure-nfs/vars/redhat.yml (renamed from xci/playbooks/roles/configure-nfs/vars/centos.yml)0
-rw-r--r--xci/var/RedHat.yml1
-rwxr-xr-xxci/xci-deploy.sh8
8 files changed, 54 insertions, 6 deletions
diff --git a/xci/installer/osa/files/ansible-role-requirements.yml b/xci/installer/osa/files/ansible-role-requirements.yml
index 329d24a0..195244a0 100644
--- a/xci/installer/osa/files/ansible-role-requirements.yml
+++ b/xci/installer/osa/files/ansible-role-requirements.yml
@@ -28,7 +28,7 @@
- name: galera_server
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-galera_server
- version: aa452989d7295111962f67a3f3a96d96bc408846
+ version: f2bfbd38513ac8d61ba4e02a4d5ef6cbbca259cc
- name: ceph_client
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-ceph_client
diff --git a/xci/opnfv-scenario-requirements.yml b/xci/opnfv-scenario-requirements.yml
index 929d88eb..3388b803 100644
--- a/xci/opnfv-scenario-requirements.yml
+++ b/xci/opnfv-scenario-requirements.yml
@@ -40,6 +40,7 @@
distros:
- opensuse
- ubuntu
+ - centos
- scenario: os-odl-nofeature
scm: git
diff --git a/xci/playbooks/roles/configure-network/tasks/main.yml b/xci/playbooks/roles/configure-network/tasks/main.yml
index 9a08cfb7..65abaa40 100644
--- a/xci/playbooks/roles/configure-network/tasks/main.yml
+++ b/xci/playbooks/roles/configure-network/tasks/main.yml
@@ -72,3 +72,32 @@
- name: restart network service
shell: "/usr/sbin/wicked ifreload all"
when: ansible_os_family | lower == "suse"
+
+- block:
+ - name: Configure networking on CentOS for interfaces
+ template:
+ src: "{{ ansible_os_family | lower }}/interface.ifcfg.j2"
+ dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}"
+ with_items:
+ - { name: "{{ interface }}" , bridge: "br-vlan" }
+ - { name: "{{ interface }}.10", bridge: "br-mgmt" , vlan_id: 10 }
+ - { name: "{{ interface }}.20", bridge: "br-storage", vlan_id: 20 }
+ - { name: "{{ interface }}.30", bridge: "br-vxlan" , vlan_id: 30 }
+ - name: Configure networking on CentOS for bridges
+ template:
+ src: "{{ ansible_os_family | lower }}/bridge.ifcfg.j2"
+ dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}"
+ with_items:
+ - { name: "br-vlan" , ip: "{{ host_info[inventory_hostname].VLAN_IP }}", prefix: 24 }
+ - { name: "br-mgmt" , ip: "{{ host_info[inventory_hostname].MGMT_IP }}", prefix: 22 }
+ - { name: "br-storage", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}", prefix: 22 }
+ - { name: "br-vxlan" , ip: "{{ host_info[inventory_hostname].VXLAN_IP }}", prefix: 22 }
+ - name: Add default route through br-vlan
+ lineinfile:
+ path: "/etc/sysconfig/network-scripts/ifcfg-br-vlan"
+ line: "GATEWAY=192.168.122.1"
+ - name: Restart networking
+ command: "systemctl restart network"
+ - name: wait for the server to come back
+ wait_for_connection:
+ when: ansible_os_family | lower == "redhat"
diff --git a/xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2 b/xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2
new file mode 100644
index 00000000..06b5f177
--- /dev/null
+++ b/xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2
@@ -0,0 +1,9 @@
+DEVICE={{ item.name }}
+NM_CONTROLLED=no
+IPADDR={{ item.ip }}
+PREFIX={{ item.prefix }}
+ONBOOT=yes
+BOOTPROTO=none
+TYPE=Bridge
+DELAY=0
+STP=off
diff --git a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 b/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2
new file mode 100644
index 00000000..b0dea0f5
--- /dev/null
+++ b/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2
@@ -0,0 +1,10 @@
+DEVICE={{ item.name }}
+NM_CONTROLLED=no
+ONBOOT=yes
+BOOTPROTO=none
+{% if item.vlan_id is defined %}
+VLAN=yes
+ETHERDEVICE={{ interface }}
+VLAN_ID={{ item.vlan_id }}
+{% endif %}
+BRIDGE={{ item.bridge }}
diff --git a/xci/playbooks/roles/configure-nfs/vars/centos.yml b/xci/playbooks/roles/configure-nfs/vars/redhat.yml
index 89a71ce7..89a71ce7 100644
--- a/xci/playbooks/roles/configure-nfs/vars/centos.yml
+++ b/xci/playbooks/roles/configure-nfs/vars/redhat.yml
diff --git a/xci/var/RedHat.yml b/xci/var/RedHat.yml
index 8ea2e15a..814d060e 100644
--- a/xci/var/RedHat.yml
+++ b/xci/var/RedHat.yml
@@ -8,6 +8,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
# this is placeholder and left blank intentionally to complete later on
+interface: "ens3"
python_crypto_package_name: python-crypto
docker_package_name: docker
docker_service_name: docker
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index 99053c7e..ec2598f8 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -121,13 +121,11 @@ case ${XCI_DISTRO,,} in
;;
esac
-# There is no CentOS support at all
if [[ ${XCI_DISTRO,,} == centos ]]; then
echo ""
- echo "Error: Sorry, only Ubuntu and SUSE hosts are supported for now!"
- echo "Error: CentOS 7 support is still work in progress."
- echo ""
- exit 1
+ echo "Warning: Only Ubuntu and SUSE hosts are fully supported for now!"
+ echo "Warning: CentOS 7 support is still work in progress."
+ echo
fi
# Clone OPNFV scenario repositories