diff options
30 files changed, 121 insertions, 97 deletions
diff --git a/bifrost/scripts/bifrost-provision.sh b/bifrost/scripts/bifrost-provision.sh index 4de2ad2b..d641d506 100755 --- a/bifrost/scripts/bifrost-provision.sh +++ b/bifrost/scripts/bifrost-provision.sh @@ -46,7 +46,7 @@ export VM_DOMAIN_TYPE=${VM_DOMAIN_TYPE:-kvm} export VM_CPU=${VM_CPU:-4} export VM_DISK=${VM_DISK:-100} export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-8192} -export VM_DISK_CACHE=${VM_DISK_CACHE:-none} +export VM_DISK_CACHE=${VM_DISK_CACHE:-unsafe} # Settings for bifrost TEST_PLAYBOOK="opnfv-virtual.yaml" @@ -107,7 +107,7 @@ ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \ -i inventory/localhost \ test-bifrost-create-vm.yaml \ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \ - -e test_vm_cpu='host-passthrough' \ + -e test_vm_cpu='host-model' \ -e test_vm_memory_size=${VM_MEMORY_SIZE} \ -e enable_venv=${ENABLE_VENV} \ -e test_vm_domain_type=${VM_DOMAIN_TYPE} \ @@ -120,7 +120,7 @@ ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \ -e use_cirros=${USE_CIRROS} \ -e testing_user=${TESTING_USER} \ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \ - -e test_vm_cpu='host-passthrough' \ + -e test_vm_cpu='host-model' \ -e inventory_dhcp=${INVENTORY_DHCP} \ -e inventory_dhcp_static_ip=${INVENTORY_DHCP_STATIC_IP} \ -e enable_venv=${ENABLE_VENV} \ diff --git a/xci/config/aio-vars b/xci/config/aio-vars index e5a1aee9..1d2e4f96 100755 --- a/xci/config/aio-vars +++ b/xci/config/aio-vars @@ -15,4 +15,3 @@ export VM_DOMAIN_TYPE=${VM_DOMAIN_TYPE:-kvm} export VM_CPU=${VM_CPU:-8} export VM_DISK=${VM_DISK:-80} export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-8192} -export VM_DISK_CACHE=none diff --git a/xci/config/env-vars b/xci/config/env-vars index f188149f..04c10c0e 100755 --- a/xci/config/env-vars +++ b/xci/config/env-vars @@ -2,14 +2,18 @@ # !!! Changing or overriding these will most likely break everything altogether !!! # Please do not change these settings if you are not developing for XCI! #------------------------------------------------------------------------------- -export OPNFV_RELENG_GIT_URL=https://gerrit.opnfv.org/gerrit/releng-xci.git -export OPENSTACK_BIFROST_GIT_URL=https://git.openstack.org/openstack/bifrost -export OPENSTACK_OSA_GIT_URL=https://git.openstack.org/openstack/openstack-ansible -export OPENSTACK_OSA_OPENRC_GIT_URL=https://git.openstack.org/openstack/openstack-ansible-openstack_openrc + +# Repositories +export OPNFV_RELENG_GIT_URL=${OPNFV_RELENG_GIT_URL:-https://gerrit.opnfv.org/gerrit/releng-xci.git} +export OPENSTACK_BIFROST_GIT_URL=${OPENSTACK_BIFROST_GIT_URL:-https://git.openstack.org/openstack/bifrost} +export OPENSTACK_OSA_GIT_URL=${OPENSTACK_OSA_GIT_URL:-https://git.openstack.org/openstack/openstack-ansible} +export OPENSTACK_OSA_OPENRC_GIT_URL=${OPENSTACK_OSA_OPENRC_GIT_URL:-https://git.openstack.org/openstack/openstack-ansible-openstack_openrc} +export KUBESPRAY_GIT_URL=${KUBESPRAY_GIT_URL:-https://github.com/kubernetes-incubator/kubespray.git} +export OPENSTACK_OSA_HAPROXY_GIT_URL=${OPENSTACK_OSA_HAPROXY_GIT_URL:-https://git.openstack.org/openstack/openstack-ansible-haproxy_server} +export KEEPALIVED_GIT_URL=${KEEPALIVED_GIT_URL:-https://github.com/evrardjp/ansible-keepalived} + +# Configuration export OPENSTACK_OSA_ETC_PATH=/etc/openstack_deploy -export KUBESPRAY_GIT_URL=https://github.com/kubernetes-incubator/kubespray.git -export OPENSTACK_OSA_HAPROXY_GIT_URL=https://git.openstack.org/openstack/openstack-ansible-haproxy_server -export KEEPALIVED_GIT_URL=https://github.com/evrardjp/ansible-keepalived export OPNFV_HOST_IP=192.168.122.2 export XCI_FLAVOR_ANSIBLE_FILE_PATH=$XCI_PATH/xci/installer/$XCI_INSTALLER/files/$XCI_FLAVOR export CI_LOOP=${CI_LOOP:-daily} diff --git a/xci/config/ha-vars b/xci/config/ha-vars index 4c7cd872..32616ab3 100755 --- a/xci/config/ha-vars +++ b/xci/config/ha-vars @@ -15,4 +15,3 @@ export VM_DOMAIN_TYPE=${VM_DOMAIN_TYPE:-kvm} export VM_CPU=${VM_CPU:-6} export VM_DISK=${VM_DISK:-80} export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-16384} -export VM_DISK_CACHE=none diff --git a/xci/config/mini-vars b/xci/config/mini-vars index 48b38ce8..142e8868 100755 --- a/xci/config/mini-vars +++ b/xci/config/mini-vars @@ -15,4 +15,3 @@ export VM_DOMAIN_TYPE=${VM_DOMAIN_TYPE:-kvm} export VM_CPU=${VM_CPU:-6} export VM_DISK=${VM_DISK:-80} export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-12288} -export VM_DISK_CACHE=none diff --git a/xci/config/noha-vars b/xci/config/noha-vars index cb8901b8..4610b32a 100755 --- a/xci/config/noha-vars +++ b/xci/config/noha-vars @@ -15,4 +15,3 @@ export VM_DOMAIN_TYPE=${VM_DOMAIN_TYPE:-kvm} export VM_CPU=${VM_CPU:-6} export VM_DISK=${VM_DISK:-80} export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-12288} -export VM_DISK_CACHE=none diff --git a/xci/config/pinned-versions b/xci/config/pinned-versions index 760d2d55..304c192a 100755 --- a/xci/config/pinned-versions +++ b/xci/config/pinned-versions @@ -28,7 +28,7 @@ export OPNFV_RELENG_VERSION="master" # HEAD of bifrost "master" as of 13.02.2018 export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-"f3cf0d9fff6ec08ba0e46cbde5bfebfd77a26752"} # HEAD of ironic "master" as of 13.02.2018 -export BIFROST_IRONIC_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-"9b8440aa318e4883a74ef8640ad5409dd22858a9"} +export BIFROST_IRONIC_VERSION=${BIFROST_IRONIC_VERSION:-"9b8440aa318e4883a74ef8640ad5409dd22858a9"} # HEAD of ironic-client "master" as of 13.02.2018 export BIFROST_IRONIC_CLIENT_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-"1da269b0e99601f8f6395b2ce3f436f5600e8140"} # HEAD of ironic-inspector "master" as of 13.02.2018 diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml index 23f93852..9fb4da19 100644 --- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml +++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml @@ -56,11 +56,11 @@ - name: copy k8s_cluster.yml shell: "cp -rf {{ remote_xci_path }}/xci/installer/kubespray/files/k8s-cluster.yml \ {{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory/group_vars" - - name: install dbus and ptyhon-netaddr - apt: - name: "{{item}}" - update_cache: yes - with_items: "{{ kube_require_packages }}" + - name: Install required packages + package: + name: "{{ kube_require_packages[ansible_pkg_mgr] }}" + state: present + update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" when: XCI_FLAVOR == 'aio' - name: pip install ansible pip: diff --git a/xci/installer/kubespray/playbooks/configure-targethosts.yml b/xci/installer/kubespray/playbooks/configure-targethosts.yml index 7e29025b..08c735b4 100644 --- a/xci/installer/kubespray/playbooks/configure-targethosts.yml +++ b/xci/installer/kubespray/playbooks/configure-targethosts.yml @@ -6,11 +6,11 @@ copy: src: "{{ XCI_PATH }}/xci/files/authorized_keys" dest: /root/.ssh/authorized_keys - - name: install dbus and ptyhon-netaddr - apt: - name: "{{item}}" - update_cache: yes - with_items: "{{ kube_require_packages }}" + - name: Install required packages + package: + name: "{{ kube_require_packages[ansible_pkg_mgr] }}" + state: present + update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" - hosts: kube-master remote_user: root diff --git a/xci/installer/kubespray/playbooks/group_vars/all b/xci/installer/kubespray/playbooks/group_vars/all index 06dccb68..87ed63bd 100644 --- a/xci/installer/kubespray/playbooks/group_vars/all +++ b/xci/installer/kubespray/playbooks/group_vars/all @@ -1,6 +1,13 @@ kube_require_packages: - - "python-netaddr" - - "dbus" + apt: + - python-netaddr + - dbus + yum: + - python-netaddr + - dbus + zypper: + - python-netaddr + - dbus-1 keepalived_ubuntu_src: "uca" keepalived_uca_apt_repo_url: "{{ uca_apt_repo_url | default('http://ubuntu-cloud.archive.canonical.com/ubuntu') }}" @@ -10,7 +17,7 @@ keepalived_sync_groups: instances: - external -haproxy_keepalived_external_interface: "{{ interface }}" +haproxy_keepalived_external_interface: "{{ ansible_default_ipv4.interface }}" haproxy_keepalived_authentication_password: 'keepalived' keepalived_instances: external: diff --git a/xci/installer/osa/files/ha/user_variables.yml b/xci/installer/osa/files/ha/user_variables.yml index 72960a01..ea349456 100644 --- a/xci/installer/osa/files/ha/user_variables.yml +++ b/xci/installer/osa/files/ha/user_variables.yml @@ -62,6 +62,7 @@ barbican_wsgi_processes: 2 barbican_wsgi_threads: 1 ## Cinder +cinder_volume_clear: none cinder_wsgi_processes_max: 2 cinder_wsgi_threads: 1 cinder_wsgi_buffer_size: 16384 diff --git a/xci/installer/osa/files/mini/user_variables.yml b/xci/installer/osa/files/mini/user_variables.yml index 9ec9e405..c812f1df 100644 --- a/xci/installer/osa/files/mini/user_variables.yml +++ b/xci/installer/osa/files/mini/user_variables.yml @@ -62,6 +62,7 @@ barbican_wsgi_processes: 2 barbican_wsgi_threads: 1 ## Cinder +cinder_volume_clear: none cinder_wsgi_processes_max: 2 cinder_wsgi_threads: 1 cinder_wsgi_buffer_size: 16384 diff --git a/xci/installer/osa/files/noha/user_variables.yml b/xci/installer/osa/files/noha/user_variables.yml index 66573428..91ceba2d 100644 --- a/xci/installer/osa/files/noha/user_variables.yml +++ b/xci/installer/osa/files/noha/user_variables.yml @@ -62,6 +62,7 @@ barbican_wsgi_processes: 2 barbican_wsgi_threads: 1 ## Cinder +cinder_volume_clear: none cinder_wsgi_processes_max: 2 cinder_wsgi_threads: 1 cinder_wsgi_buffer_size: 16384 diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml index de922d3c..4d75f115 100644 --- a/xci/installer/osa/playbooks/configure-opnfvhost.yml +++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml @@ -28,6 +28,8 @@ roles: - role: configure-network when: XCI_FLAVOR != "aio" + # we need to force sync time with ntp or the nodes will be out of sync timewise + - role: synchronize-time tasks: - name: generate SSH keys diff --git a/xci/opnfv-scenario-requirements.yml b/xci/opnfv-scenario-requirements.yml index ece4caea..36415d3f 100644 --- a/xci/opnfv-scenario-requirements.yml +++ b/xci/opnfv-scenario-requirements.yml @@ -71,3 +71,4 @@ - noha distros: - ubuntu + - centos diff --git a/xci/playbooks/roles/.gitignore b/xci/playbooks/roles/.gitignore index e0b47770..5e72578c 100644 --- a/xci/playbooks/roles/.gitignore +++ b/xci/playbooks/roles/.gitignore @@ -3,6 +3,6 @@ !clone-repository/ !configure-network/ !configure-nfs/ -!prepare-functest/ +!run-functest/ !remote-folders/ !synchronize-time/ diff --git a/xci/playbooks/roles/configure-network/tasks/main.yml b/xci/playbooks/roles/configure-network/tasks/main.yml index 65abaa40..adcb8669 100644 --- a/xci/playbooks/roles/configure-network/tasks/main.yml +++ b/xci/playbooks/roles/configure-network/tasks/main.yml @@ -30,7 +30,7 @@ src: "{{ ansible_os_family | lower }}/{{ ansible_hostname }}.interface.j2" dest: "/etc/network/interfaces" - name: restart network service - shell: "/sbin/ifconfig {{ interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a" + shell: "/sbin/ifconfig {{ ansible_default_ipv4.interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a" when: ansible_os_family | lower == "debian" - block: @@ -47,14 +47,14 @@ src: "{{ ansible_os_family | lower }}/suse.interface.j2" dest: "/etc/sysconfig/network/ifcfg-{{ item.name }}" with_items: - - { name: "{{ interface }}" } - - { name: "{{ interface }}.10", vlan_id: 10 } - - { name: "{{ interface }}.30", vlan_id: 30 } - - { name: "{{ interface }}.20", vlan_id: 20 } - - { name: "br-mgmt", bridge_ports: "{{ interface }}.10", ip: "{{ host_info[inventory_hostname].MGMT_IP }}/22" } - - { name: "br-vxlan", bridge_ports: "{{ interface }}.30", ip: "{{ host_info[inventory_hostname].VXLAN_IP }}/22" } - - { name: "br-vlan", bridge_ports: "{{ interface }}", ip: "{{ host_info[inventory_hostname].VLAN_IP }}/24" } - - { name: "br-storage", bridge_ports: "{{ interface }}.20", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}/22" } + - { name: "{{ ansible_default_ipv4.interface }}" } + - { name: "{{ ansible_default_ipv4.interface }}.10", vlan_id: 10 } + - { name: "{{ ansible_default_ipv4.interface }}.30", vlan_id: 30 } + - { name: "{{ ansible_default_ipv4.interface }}.20", vlan_id: 20 } + - { name: "br-mgmt", bridge_ports: "{{ ansible_default_ipv4.interface }}.10", ip: "{{ host_info[inventory_hostname].MGMT_IP }}/22" } + - { name: "br-vxlan", bridge_ports: "{{ ansible_default_ipv4.interface }}.30", ip: "{{ host_info[inventory_hostname].VXLAN_IP }}/22" } + - { name: "br-vlan", bridge_ports: "{{ ansible_default_ipv4.interface }}", ip: "{{ host_info[inventory_hostname].VLAN_IP }}/24" } + - { name: "br-storage", bridge_ports: "{{ ansible_default_ipv4.interface }}.20", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}/22" } - name: Add postup/postdown scripts on SUSE copy: @@ -79,10 +79,10 @@ 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: "{{ ansible_default_ipv4.interface }}" , bridge: "br-vlan" } + - { name: "{{ ansible_default_ipv4.interface }}.10", bridge: "br-mgmt" , vlan_id: 10 } + - { name: "{{ ansible_default_ipv4.interface }}.20", bridge: "br-storage", vlan_id: 20 } + - { name: "{{ ansible_default_ipv4.interface }}.30", bridge: "br-vxlan" , vlan_id: 30 } - name: Configure networking on CentOS for bridges template: src: "{{ ansible_os_family | lower }}/bridge.ifcfg.j2" diff --git a/xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 b/xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 index 6d6a3835..2da12f20 100644 --- a/xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 +++ b/xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 @@ -5,23 +5,23 @@ auto lo iface lo inet loopback # Physical interface -auto {{ interface }} -iface {{ interface }} inet manual +auto {{ ansible_default_ipv4.interface }} +iface {{ ansible_default_ipv4.interface }} inet manual # Container/Host management VLAN interface -auto {{ interface }}.10 -iface {{ interface }}.10 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.10 +iface {{ ansible_default_ipv4.interface }}.10 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # OpenStack Networking VXLAN (tunnel/overlay) VLAN interface -auto {{ interface }}.30 -iface {{ interface }}.30 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.30 +iface {{ ansible_default_ipv4.interface }}.30 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # Storage network VLAN interface -auto {{ interface }}.20 -iface {{ interface }}.20 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.20 +iface {{ ansible_default_ipv4.interface }}.20 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # Container/Host management bridge auto br-mgmt @@ -29,7 +29,7 @@ iface br-mgmt inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.10 + bridge_ports {{ ansible_default_ipv4.interface }}.10 address {{host_info[inventory_hostname].MGMT_IP}} netmask 255.255.252.0 @@ -39,7 +39,7 @@ iface br-vxlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.30 + bridge_ports {{ ansible_default_ipv4.interface }}.30 address {{host_info[inventory_hostname].VXLAN_IP}} netmask 255.255.252.0 @@ -49,7 +49,7 @@ iface br-vlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }} + bridge_ports {{ ansible_default_ipv4.interface }} address {{host_info[inventory_hostname].VLAN_IP}} netmask 255.255.255.0 gateway 192.168.122.1 @@ -70,6 +70,6 @@ iface br-storage inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.20 + bridge_ports {{ ansible_default_ipv4.interface }}.20 address {{host_info[inventory_hostname].STORAGE_IP}} netmask 255.255.252.0 diff --git a/xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 b/xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 index b461b201..c540f66e 100644 --- a/xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 +++ b/xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 @@ -5,23 +5,23 @@ auto lo iface lo inet loopback # Physical interface -auto {{ interface }} -iface {{ interface }} inet manual +auto {{ ansible_default_ipv4.interface }} +iface {{ ansible_default_ipv4.interface }} inet manual # Container/Host management VLAN interface -auto {{ interface }}.10 -iface {{ interface }}.10 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.10 +iface {{ ansible_default_ipv4.interface }}.10 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # OpenStack Networking VXLAN (tunnel/overlay) VLAN interface -auto {{ interface }}.30 -iface {{ interface }}.30 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.30 +iface {{ ansible_default_ipv4.interface }}.30 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # Storage network VLAN interface (optional) -auto {{ interface }}.20 -iface {{ interface }}.20 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.20 +iface {{ ansible_default_ipv4.interface }}.20 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # Container/Host management bridge auto br-mgmt @@ -29,7 +29,7 @@ iface br-mgmt inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.10 + bridge_ports {{ ansible_default_ipv4.interface }}.10 address {{host_info[inventory_hostname].MGMT_IP}} netmask 255.255.252.0 @@ -39,7 +39,7 @@ iface br-vxlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.30 + bridge_ports {{ ansible_default_ipv4.interface }}.30 address {{host_info[inventory_hostname].VXLAN_IP}} netmask 255.255.252.0 @@ -49,7 +49,7 @@ iface br-vlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }} + bridge_ports {{ ansible_default_ipv4.interface }} address {{host_info[inventory_hostname].VLAN_IP}} netmask 255.255.255.0 gateway 192.168.122.1 @@ -69,6 +69,6 @@ iface br-storage inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.20 + bridge_ports {{ ansible_default_ipv4.interface }}.20 address {{host_info[inventory_hostname].STORAGE_IP}} netmask 255.255.252.0 diff --git a/xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 b/xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 index 42826414..03f81dbb 100644 --- a/xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 +++ b/xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 @@ -5,23 +5,23 @@ auto lo iface lo inet loopback # Physical interface -auto {{ interface }} -iface {{ interface }} inet manual +auto {{ ansible_default_ipv4.interface }} +iface {{ ansible_default_ipv4.interface }} inet manual # Container/Host management VLAN interface -auto {{ interface }}.10 -iface {{ interface }}.10 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.10 +iface {{ ansible_default_ipv4.interface }}.10 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # OpenStack Networking VXLAN (tunnel/overlay) VLAN interface -auto {{ interface }}.30 -iface {{ interface }}.30 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.30 +iface {{ ansible_default_ipv4.interface }}.30 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # Storage network VLAN interface (optional) -auto {{ interface }}.20 -iface {{ interface }}.20 inet manual - vlan-raw-device {{ interface }} +auto {{ ansible_default_ipv4.interface }}.20 +iface {{ ansible_default_ipv4.interface }}.20 inet manual + vlan-raw-device {{ ansible_default_ipv4.interface }} # Container/Host management bridge auto br-mgmt @@ -29,7 +29,7 @@ iface br-mgmt inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.10 + bridge_ports {{ ansible_default_ipv4.interface }}.10 address {{host_info[inventory_hostname].MGMT_IP}} netmask 255.255.252.0 @@ -39,7 +39,7 @@ iface br-vxlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.30 + bridge_ports {{ ansible_default_ipv4.interface }}.30 address {{ host_info[inventory_hostname].VXLAN_IP }} netmask 255.255.252.0 @@ -49,7 +49,7 @@ iface br-vlan inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }} + bridge_ports {{ ansible_default_ipv4.interface }} address {{host_info[inventory_hostname].VLAN_IP}} netmask 255.255.255.0 gateway 192.168.122.1 @@ -61,6 +61,6 @@ iface br-storage inet static bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{ interface }}.20 + bridge_ports {{ ansible_default_ipv4.interface }}.20 address {{host_info[inventory_hostname].STORAGE_IP}} netmask 255.255.252.0 diff --git a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 b/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 index b0dea0f5..a97ad0cf 100644 --- a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 +++ b/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 @@ -4,7 +4,7 @@ ONBOOT=yes BOOTPROTO=none {% if item.vlan_id is defined %} VLAN=yes -ETHERDEVICE={{ interface }} +ETHERDEVICE={{ ansible_default_ipv4.interface }} VLAN_ID={{ item.vlan_id }} {% endif %} BRIDGE={{ item.bridge }} diff --git a/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 b/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 index ffa418d4..27b01eb4 100644 --- a/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 +++ b/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 @@ -1,7 +1,7 @@ STARTMODE='auto' BOOTPROTO='static' {% if item.vlan_id is defined %} -ETHERDEVICE={{ interface }} +ETHERDEVICE={{ ansible_default_ipv4.interface }} VLAN_ID={{ item.vlan_id }} {% endif %} {% if item.bridge_ports is defined %} diff --git a/xci/playbooks/roles/run-functest/templates/env.j2 b/xci/playbooks/roles/run-functest/templates/env.j2 index edf4872a..43a581bd 100644 --- a/xci/playbooks/roles/run-functest/templates/env.j2 +++ b/xci/playbooks/roles/run-functest/templates/env.j2 @@ -2,4 +2,6 @@ INSTALLER_TYPE=osa INSTALLER_IP=192.168.122.2 EXTERNAL_NETWORK={{ external_network }} DEPLOY_SCENARIO="os-nosdn-nofeature-noha" +CI_LOOP=daily TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results +ENERGY_RECORDER_API_URL=http://energy.opnfv.fr/resources diff --git a/xci/playbooks/roles/run-functest/templates/run-functest.sh.j2 b/xci/playbooks/roles/run-functest/templates/run-functest.sh.j2 index 00892ed1..016df8ef 100644 --- a/xci/playbooks/roles/run-functest/templates/run-functest.sh.j2 +++ b/xci/playbooks/roles/run-functest/templates/run-functest.sh.j2 @@ -11,9 +11,11 @@ openstack --insecure subnet create --network {{ external_network }} \ --subnet-range {{ subnet_cidr }} --gateway {{ gateway_ip }} \ --no-dhcp {{ subnet_name }} +mkdir ~/results/ mkdir ~/images && cd ~/images && wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img && cd ~ sudo docker run --env-file env \ -v $(pwd)/openrc:/home/opnfv/functest/conf/env_file \ -v $(pwd)/images:/home/opnfv/functest/images \ + -v $(pwd)/results:/home/opnfv/functest/results \ opnfv/functest-healthcheck diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index 6a877143..5f7fe590 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -83,7 +83,7 @@ update_clean_vm_files() { [[ $# -ne 1 ]] && usage && exit 1 -declare -r CPU=${XCI_CPU_TYPE:-host-passthrough} +declare -r CPU=${XCI_CPU_TYPE:-host-model} declare -r NCPUS=${XCI_NCPUS:-24} declare -r MEMORY=${XCI_MEMORY_SIZE:-65536} declare -r DISK=${XCI_DISK_SIZE:-500} @@ -215,12 +215,12 @@ if sudo vgscan | grep -q xci-vm-vg; then } echo "Flusing the ${OS_IMAGE_FILE} image to ${lv_dev}..." sudo qemu-img convert -O raw ${OS_IMAGE_FILE} ${lv_dev} - disk_config="${lv_dev},cache=directsync,bus=virtio" + disk_config="${lv_dev},cache=unsafe,io=threads,bus=virtio" else echo "Using file backend..." echo "Resizing disk image '${OS}' to ${DISK}G..." qemu-img resize ${OS_IMAGE_FILE} ${DISK}G - disk_config="${OS_IMAGE_FILE},cache=none,bus=virtio" + disk_config="${OS_IMAGE_FILE},cache=unsafe,io=threads,bus=virtio" fi echo "Installing virtual machine '${VM_NAME}'..." @@ -328,6 +328,9 @@ rm ${BASE_PATH}/vm_hosts.txt $vm_ssh ${VM_NAME} "cp --preserve=all ~/releng-xci/xci/scripts/vm/id_rsa_for_dib /home/devuser/.ssh/id_rsa" $vm_ssh ${VM_NAME} "cp --preserve=all ~/releng-xci/xci/scripts/vm/id_rsa_for_dib.pub /home/devuser/.ssh/id_rsa.pub" $vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/vm_hosts.txt /etc/hosts" +# Disable 3-level nested virtualization since it makes things terribly slow +$vm_ssh ${VM_NAME} "sudo bash -c 'echo \"options kvm_intel nested=0\" > /etc/modprobe.d/qemu-system-x86.conf'" +$vm_ssh ${VM_NAME} "sudo modprobe -r kvm_intel && sudo modprobe -a kvm_intel" set +e @@ -340,9 +343,10 @@ if [[ $? != 0 ]]; then echo "Creating a default test case to run xci-deploy.sh" cat > ${BASE_PATH}/run_jenkins_test.sh <<EOF #!/bin/bash +set -o pipefail export XCI_FLAVOR=mini cd ~/releng-xci/xci -./xci-deploy.sh +./xci-deploy.sh | ts EOF # Copy again do_copy diff --git a/xci/var/Debian.yml b/xci/var/Debian.yml index bd07473a..ad3621b6 100644 --- a/xci/var/Debian.yml +++ b/xci/var/Debian.yml @@ -8,7 +8,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## # this is the interface the VM nodes are connected to libvirt network "default" -interface: "ens3" python_crypto_package_name: python-crypto docker_package_name: docker.io docker_service_name: docker diff --git a/xci/var/RedHat.yml b/xci/var/RedHat.yml index 814d060e..8ea2e15a 100644 --- a/xci/var/RedHat.yml +++ b/xci/var/RedHat.yml @@ -8,7 +8,6 @@ # 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/var/Suse.yml b/xci/var/Suse.yml index a041e18b..5066defa 100644 --- a/xci/var/Suse.yml +++ b/xci/var/Suse.yml @@ -8,7 +8,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## # this is the interface the VM nodes are connected to libvirt network "default" -interface: "eth0" python_crypto_package_name: python-pycrypto docker_package_name: docker docker_service_name: docker diff --git a/xci/var/opnfv.yml b/xci/var/opnfv.yml index 158b1dfe..ae0f061c 100644 --- a/xci/var/opnfv.yml +++ b/xci/var/opnfv.yml @@ -23,7 +23,7 @@ XCI_CACHE: "{{ lookup('env', 'XCI_CACHE') }}" XCI_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}" XCI_DISTRO: "{{ lookup('env', 'XCI_DISTRO') }}" XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}" -XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}" +CI_LOOP: "{{ lookup('env','CI_LOOP') }}" XCI_PATH: "{{ lookup('env', 'XCI_PATH') }}" XCI_SCENARIOS_CACHE: "{{ lookup('env', 'XCI_SCENARIOS_CACHE') }}" LOG_PATH: "{{ lookup('env','LOG_PATH') }}" diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 18c8bb22..1eeaf3b2 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -168,4 +168,10 @@ echo "Info: Deploying '${XCI_INSTALLER}' installer" echo "-----------------------------------------------------------------------" source ${XCI_PATH}/xci/installer/${XCI_INSTALLER}/deploy.sh +# Deployment time +xci_deploy_time=$SECONDS +echo "-------------------------------------------------------------------------------------------------------------" +echo "Info: xci_deploy.sh deployment took $(($xci_deploy_time / 60)) minutes and $(($xci_deploy_time % 60)) seconds" +echo "-------------------------------------------------------------------------------------------------------------" + # vim: set ts=4 sw=4 expandtab: |