diff options
Diffstat (limited to 'ansible/roles')
5 files changed, 36 insertions, 55 deletions
diff --git a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 index c049daf84..044f42acb 100644 --- a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 +++ b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 @@ -1,7 +1,7 @@ [uwsgi] master = true debug = true -chdir = {{ yardstick_dir }}api +chdir = {{ yardstick_dir }}/api module = server plugins = python processes = 10 @@ -15,4 +15,4 @@ close-on-exec = 1 daemonize = {{ log_dir }}uwsgi.log socket = {{ socket_file }} {# If virtual environment, we need to add: - virtualenv = <virtual_env> #}
\ No newline at end of file + virtualenv = <virtual_env> #} diff --git a/ansible/roles/download_samplevnfs/defaults/main.yml b/ansible/roles/download_samplevnfs/defaults/main.yml index e40eb67c0..c5e880e57 100644 --- a/ansible/roles/download_samplevnfs/defaults/main.yml +++ b/ansible/roles/download_samplevnfs/defaults/main.yml @@ -1,4 +1,4 @@ --- samplevnf_url: "https://git.opnfv.org/samplevnf" samplevnf_dest: "{{ clone_dest }}/samplevnf" -samplevnf_version: "stable/euphrates" +samplevnf_version: "stable/fraser" diff --git a/ansible/roles/install_yardstick/tasks/main.yml b/ansible/roles/install_yardstick/tasks/main.yml index ee1b83756..973b2b027 100644 --- a/ansible/roles/install_yardstick/tasks/main.yml +++ b/ansible/roles/install_yardstick/tasks/main.yml @@ -37,10 +37,39 @@ # name: pip # state: latest -- name: install yardstick without virtual environment - include_tasks: regular_install.yml +- name: Install Yardstick requirements (venv) + pip: + requirements: "{{ yardstick_dir }}/requirements.txt" + virtualenv: "{{ yardstick_dir }}/virtualenv" + async: 300 + poll: 0 + register: pip_installer + when: virtual_environment == True + +- name: Install Yardstick requirements + pip: + requirements: "{{ yardstick_dir }}/requirements.txt" + async: 300 + poll: 0 + register: pip_installer when: virtual_environment == False -- name: install yardstick with virtual environment - include_tasks: virtual_install.yml +- name: Check install Yardstick requirements + async_status: + jid: "{{ pip_installer.ansible_job_id }}" + register: job_result + until: job_result.finished + retries: 100 + +- name: Install Yardstick code (venv) + pip: + name: "{{ yardstick_dir }}/" + editable: True + virtualenv: "{{ yardstick_dir }}/virtualenv" when: virtual_environment == True + +- name: Install Yardstick code + pip: + name: "{{ yardstick_dir }}/" + editable: True + when: virtual_environment == False diff --git a/ansible/roles/install_yardstick/tasks/regular_install.yml b/ansible/roles/install_yardstick/tasks/regular_install.yml deleted file mode 100644 index cd0e86fb9..000000000 --- a/ansible/roles/install_yardstick/tasks/regular_install.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2018 Intel Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. ---- -- name: Install Yardstick requirements - pip: - requirements: "{{ yardstick_dir }}/requirements.txt" - -- name: Install Yardstick code - pip: - name: "." - extra_args: -e - chdir: "{{ yardstick_dir }}/" diff --git a/ansible/roles/install_yardstick/tasks/virtual_install.yml b/ansible/roles/install_yardstick/tasks/virtual_install.yml deleted file mode 100644 index 8545acbcb..000000000 --- a/ansible/roles/install_yardstick/tasks/virtual_install.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2018 Intel Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. ---- -- name: Install Yardstick requirements - pip: - requirements: "{{ yardstick_dir }}/requirements.txt" - virtualenv: "{{ yardstick_dir }}/virtualenv" - -- name: Install Yardstick code - pip: - name: "{{ yardstick_dir }}/." - extra_args: -e - virtualenv: "{{ yardstick_dir }}/virtualenv" - |