diff options
-rw-r--r-- | xci/installer/osa/playbooks/configure-opnfvhost.yml | 24 | ||||
-rw-r--r-- | xci/playbooks/prepare-functest.yml | 3 | ||||
-rw-r--r-- | xci/playbooks/roles/prepare-functest/tasks/main.yml | 26 | ||||
-rw-r--r-- | xci/playbooks/roles/prepare-functest/vars/main.yml | 14 | ||||
-rw-r--r-- | xci/var/Debian.yml | 2 | ||||
-rw-r--r-- | xci/var/RedHat.yml | 2 | ||||
-rw-r--r-- | xci/var/Suse.yml | 2 | ||||
-rw-r--r-- | xci/var/opnfv.yml | 9 |
8 files changed, 44 insertions, 38 deletions
diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml index deeab182..2996236b 100644 --- a/xci/installer/osa/playbooks/configure-opnfvhost.yml +++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml @@ -11,6 +11,7 @@ remote_user: root vars_files: - "{{ XCI_PATH }}/xci/var/opnfv.yml" + - "{{ XCI_PATH }}/xci/installer/osa/files/openstack_services.yml" pre_tasks: - name: Load distribution variables @@ -103,10 +104,15 @@ - name: install python Crypto module package: name: "{{ python_crypto_package_name }}" - - name: install PyYAML + - name: install opnfv pip required packages pip: - name: pyyaml + name: "{{ item }}" state: present + extra_args: '-c https://raw.githubusercontent.com/openstack/requirements/{{ requirements_git_install_branch }}/upper-constraints.txt' + with_items: + - pyyaml + - python-neutronclient + - python-openstackclient - name: generate password token command: "python pw-token-gen.py --file {{OPENSTACK_OSA_ETC_PATH}}/user_secrets.yml" args: @@ -135,20 +141,6 @@ content: "{{ xci_ssl_key }}" dest: "/etc/ssl/private/xci.key" become: true - - name: install opnfv required packages - package: - name: "{{ opnfv_required_packages }}" - state: latest - # Docker is needed for functest - - name: Ensure Docker service is started and enabled - service: - name: "{{ docker_service_name }}" - state: started - enabled: yes - - name: install opnfv required pip packages - pip: - name: "{{ opnfv_required_pip }}" - state: present - hosts: localhost remote_user: root diff --git a/xci/playbooks/prepare-functest.yml b/xci/playbooks/prepare-functest.yml index 6d5b01c6..a4cb664b 100644 --- a/xci/playbooks/prepare-functest.yml +++ b/xci/playbooks/prepare-functest.yml @@ -16,5 +16,8 @@ - name: Prepare the environment for functest hosts: opnfv user: root + vars_files: + - ../var/opnfv.yml + - ../installer/osa/files/openstack_services.yml roles: - role: "prepare-functest" diff --git a/xci/playbooks/roles/prepare-functest/tasks/main.yml b/xci/playbooks/roles/prepare-functest/tasks/main.yml index 243358fc..2797ce43 100644 --- a/xci/playbooks/roles/prepare-functest/tasks/main.yml +++ b/xci/playbooks/roles/prepare-functest/tasks/main.yml @@ -7,6 +7,25 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## + +- name: install functest required packages + package: + name: "{{ functest_required_packages[ansible_pkg_mgr] }}" + state: present + +# Docker is needed for functest +- name: Ensure Docker service is started and enabled + service: + name: docker + state: started + enabled: yes + +- name: install functest required pip packages + pip: + name: "{{ functest_required_pip }}" + state: present + extra_args: '-c https://raw.githubusercontent.com/openstack/requirements/{{ requirements_git_install_branch }}/upper-constraints.txt' + - name: check if the gateway was already set shell: "ip a | grep {{ gateway_ip }}" register: gateway_ip_result @@ -27,10 +46,3 @@ src: run-functest.sh.j2 dest: /root/run-functest.sh mode: 0755 - -- name: install required packages - package: - name: "{{ item }}" - state: present - with_items: - - wget diff --git a/xci/playbooks/roles/prepare-functest/vars/main.yml b/xci/playbooks/roles/prepare-functest/vars/main.yml new file mode 100644 index 00000000..3a6c8a4d --- /dev/null +++ b/xci/playbooks/roles/prepare-functest/vars/main.yml @@ -0,0 +1,14 @@ +--- +functest_required_packages: + apt: + - docker.io + - wget + zypper: + - docker + - wget + yum: + - docker + - wget + +functest_required_pip: + - docker-py diff --git a/xci/var/Debian.yml b/xci/var/Debian.yml index ad3621b6..c785c65c 100644 --- a/xci/var/Debian.yml +++ b/xci/var/Debian.yml @@ -9,5 +9,3 @@ ############################################################################## # this is the interface the VM nodes are connected to libvirt network "default" 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 8ea2e15a..eae7d127 100644 --- a/xci/var/RedHat.yml +++ b/xci/var/RedHat.yml @@ -9,5 +9,3 @@ ############################################################################## # this is placeholder and left blank intentionally to complete later on 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 5066defa..5891aee9 100644 --- a/xci/var/Suse.yml +++ b/xci/var/Suse.yml @@ -9,5 +9,3 @@ ############################################################################## # this is the interface the VM nodes are connected to libvirt network "default" 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 d3924bf0..f438e577 100644 --- a/xci/var/opnfv.yml +++ b/xci/var/opnfv.yml @@ -43,12 +43,3 @@ OPENSTACK_OSA_HAPROXY_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_HAPROXY_GIT_URL') HAPROXY_VERSION: "{{ lookup('env','HAPROXY_VERSION') }}" KEEPALIVED_GIT_URL: "{{ lookup('env','KEEPALIVED_GIT_URL') }}" KEEPALIVED_VERSION: "{{ lookup('env','KEEPALIVED_VERSION') }}" - -# install docker on opnfv host only if we are running as part of CI -opnfv_required_packages: - - "{{ docker_package_name }}" - -opnfv_required_pip: - - python-openstackclient - - python-neutronclient - - docker-py |