diff options
-rw-r--r-- | xci/file/aio/configure-opnfvhost.yml | 4 | ||||
-rw-r--r-- | xci/file/setup-openstack.yml | 2 | ||||
-rw-r--r-- | xci/playbooks/configure-opnfvhost.yml | 8 | ||||
-rwxr-xr-x | xci/scripts/vm/start-new-vm.sh | 3 | ||||
-rw-r--r-- | xci/var/opnfv.yml | 1 | ||||
-rwxr-xr-x | xci/xci-deploy.sh | 2 |
6 files changed, 15 insertions, 5 deletions
diff --git a/xci/file/aio/configure-opnfvhost.yml b/xci/file/aio/configure-opnfvhost.yml index 6b140c15..907e87de 100644 --- a/xci/file/aio/configure-opnfvhost.yml +++ b/xci/file/aio/configure-opnfvhost.yml @@ -18,11 +18,11 @@ command: "/bin/bash ./scripts/bootstrap-ansible.sh" args: chdir: "{{OPENSTACK_OSA_PATH}}" - - name: Disable AIO tempest + - name: Configure AIO tempest lineinfile: path: "{{ OPENSTACK_OSA_PATH }}/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2" regexp: "^{{ item }}.*" - line: "{{ item }}: false" + line: "{{ item }}: {{ RUN_TEMPEST | bool }}" state: present with_items: - "tempest_install" diff --git a/xci/file/setup-openstack.yml b/xci/file/setup-openstack.yml index 866a54f8..5d20adec 100644 --- a/xci/file/setup-openstack.yml +++ b/xci/file/setup-openstack.yml @@ -22,3 +22,5 @@ - include: os-horizon-install.yml - include: os-swift-install.yml - include: os-ironic-install.yml +- include: os-tempest-install.yml + when: (tempest_install | default(False)) | bool or (tempest_run | default(False)) | bool diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml index 12fb3a0f..fdf21786 100644 --- a/xci/playbooks/configure-opnfvhost.yml +++ b/xci/playbooks/configure-opnfvhost.yml @@ -79,6 +79,14 @@ shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/user_variables.yml {{OPENSTACK_OSA_ETC_PATH}}" - name: copy cinder.yml shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/xci/file/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d" + - name: Configure AIO tempest + lineinfile: + path: "{{ OPENSTACK_OSA_ETC_PATH }}/user_variables.yml" + line: "{{ item }}: {{ RUN_TEMPEST | bool }}" + state: present + with_items: + - "tempest_install" + - "tempest_run" - block: - name: copy ceph.yml shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/conf.d/" diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index e6c122cb..1b5ab038 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -283,8 +283,7 @@ echo "Preparing test environment..." # *_xci_vm hostname is invalid. Letst just use distro name $vm_ssh ${VM_NAME} "sudo hostname ${VM_NAME/_xci*}" # Start with good dns -$vm_ssh ${VM_NAME} 'sudo bash -c "echo nameserver 8.8.8.8 > /etc/resolv.conf"' -$vm_ssh ${VM_NAME} 'sudo bash -c "echo nameserver 8.8.4.4 >> /etc/resolv.conf"' +$vm_ssh ${VM_NAME} 'sudo bash -c "echo nameserver 192.168.140.1 > /etc/resolv.conf"' cat > ${BASE_PATH}/vm_hosts.txt <<EOF 127.0.0.1 localhost ${VM_NAME/_xci*} ::1 localhost ipv6-localhost ipv6-loopback diff --git a/xci/var/opnfv.yml b/xci/var/opnfv.yml index 7dd9b46c..0cca1170 100644 --- a/xci/var/opnfv.yml +++ b/xci/var/opnfv.yml @@ -33,6 +33,7 @@ OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}" XCI_EXTRA_VARS_PATH: "{{ lookup('env', 'XCI_EXTRA_VARS_PATH') }}" XCI_SSL_SUBJECT: "{{ lookup('env', 'XCI_SSL_SUBJECT') }}" XCI_CEPH_ENABLED: "{{ lookup('env', 'XCI_CEPH_ENABLED') }}" +RUN_TEMPEST: "{{ lookup('env', 'RUN_TEMPEST') }}" # install docker on opnfv host only if we are running as part of CI opnfv_required_packages: diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 20f3d95a..a7435e75 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -268,7 +268,7 @@ echo "Info: Setting up infrastructure" echo "-----------------------------------------------------------------------" echo "xci: running ansible playbook setup-infrastructure.yml" ssh root@$OPNFV_HOST_IP "openstack-ansible ${XCI_ANSIBLE_VERBOSITY} \ - $OPENSTACK_OSA_PATH/playbooks//setup-infrastructure.yml | tee setup-infrastructure.log" + $OPENSTACK_OSA_PATH/playbooks/setup-infrastructure.yml | tee setup-infrastructure.log" scp root@$OPNFV_HOST_IP:~/setup-infrastructure.log $LOG_PATH/setup-infrastructure.log echo "-----------------------------------------------------------------------" # check the log to see if we have any error |