Commit fdad0b89 by Troy Sankey

bake pip requirements into the loadtest worker AMI

This follows the same pattern as with the platform workers: (1) clone
the repo, (2) install requirements, (3) package the virtualenv into a
tarball which becomes part of the AMI.

PERF-393
parent 8c863448
---
# Create a virtualenv for edx-load-tests by installing the requirements and
# packaging the virtualenv.
- name: Create shallow clone of edx-load-tests
git:
repo: https://github.com/edx/edx-load-tests.git
dest: "{{ jenkins_home }}/shallow-clone"
version: "master"
depth: 1
become_user: "{{ jenkins_user }}"
- name: Install most edx-load-tests requirements using pip
pip:
requirements: "{{ jenkins_home }}/shallow-clone/requirements/{{ item }}"
extra_args: "--exists-action=w"
virtualenv: "{{ jenkins_home }}/edx-venv"
virtualenv_command: virtualenv
with_items:
- base.txt
become_user: "{{ jenkins_user }}"
# Archive the current state of the virtualenv as a starting point for new
# builds. The edx-venv directory is deleted and then recreated cleanly from
# the archive by the jenkins build scripts.
#
# TODO: after we migrate to ansible 2.3+, change this task to use the archive
# module. http://docs.ansible.com/ansible/archive_module.html
- name: Create a clean virtualenv archive
command: "tar -cpzf edx-venv_clean.tar.gz edx-venv"
args:
chdir: "{{ jenkins_home }}"
become_user: "{{ jenkins_user }}"
- name: Remove the shallow-clone
file: path={{ jenkins_home }}/shallow-clone state=absent
......@@ -14,6 +14,10 @@
- include: python_platform_worker.yml
when: platform_worker is defined
# only loadtest driver workers
- include: loadtest_driver_worker.yml
when: loadtest_driver_worker is defined
# Run appropriate tests
- include: test.yml
- include: test_platform_worker.yml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment