Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions playbooks/roles/analytics_api/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
edx_django_service_name: '{{ analytics_api_service_name }}'
edx_django_service_user: '{{ analytics_api_user }}'
edx_django_service_home: '{{ COMMON_APP_DIR }}/{{ analytics_api_service_name }}'
edx_django_service_pip_install_args: '-r {{ COMMON_APP_DIR }}/{{ analytics_api_service_name }}/{{ analytics_api_service_name }}/requirements/pip.txt'
edx_django_service_config_overrides: '{{ analytics_api_service_config_overrides }}'
edx_django_service_nginx_port: '{{ ANALYTICS_API_NGINX_PORT }}'
edx_django_service_nginx_read_timeout: 300
Expand Down
3 changes: 3 additions & 0 deletions playbooks/roles/edx_django_service/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ edx_django_service_app_config_file: "{{ COMMON_CFG_DIR }}/{{ edx_django_service
edx_django_service_code_dir: '{{ edx_django_service_home }}/{{ edx_django_service_name }}'
edx_django_service_venv_dir: '{{ edx_django_service_home }}/venvs/{{ edx_django_service_name }}'
edx_django_service_venv_bin_dir: '{{ edx_django_service_venv_dir }}/bin'
# Arguments for the "Pin pip" step. Services can override this, for example
# with "-r <code_dir>/requirements/pip.txt" to follow the repo's own pin.
edx_django_service_pip_install_args: 'pip=={{ COMMON_PIP_VERSION }}'

edx_django_service_nodeenv_dir: '{{ edx_django_service_home }}/nodeenvs/{{ edx_django_service_name }}'
edx_django_service_nodeenv_bin: '{{ edx_django_service_nodeenv_dir }}/bin'
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/edx_django_service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
- install:system-requirements

- name: Pin pip to a specific version.
command: "{{ edx_django_service_venv_dir }}/bin/pip install pip=={{ COMMON_PIP_VERSION }}"
command: "{{ edx_django_service_venv_dir }}/bin/pip install {{ edx_django_service_pip_install_args }}"
become_user: "{{ edx_django_service_user }}"
when: not edx_django_service_enable_experimental_docker_shim
tags:
Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/insights/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ insights_manage: "{{ insights_code_dir }}/manage.py"

insights_requirements_base: "{{ insights_code_dir }}/requirements"
insights_requirements:
- pip.txt
- production.txt
- optional.txt

Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/xqueue/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ xqueue_environment:
XQUEUE_CFG: '{{ COMMON_CFG_DIR }}/xqueue.yml'

xqueue_requirements_file: "{{ xqueue_code_dir }}/requirements.txt"
xqueue_pip_requirements_file: "{{ xqueue_code_dir }}/requirements/pip.txt"
xqueue_openstack_requirements_file: "{{ xqueue_code_dir }}/openstack-requirements.txt"

# These packages are required for the xqueue server,
Expand Down
15 changes: 15 additions & 0 deletions playbooks/roles/xqueue/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@
- install
- install:system-requirements

# The venv gets whatever pip python3.12's ensurepip bundles, so install the
# repo's pinned pip before the app requirements.
- name: "Install pinned pip into the python3.12 venv"
pip:
requirements: "{{ xqueue_pip_requirements_file }}"
virtualenv: "{{ xqueue_venv_dir }}"
virtualenv_command: 'python3.12 -m venv'
state: present
extra_args: "-i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w"
become_user: "{{ xqueue_user }}"
when: xqueue_use_python312
tags:
- install
- install:app-requirements

- name: "Install python3.12 requirements"
pip:
requirements: "{{ xqueue_requirements_file }}"
Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/xqwatcher/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ xqwatcher_use_python312: true
xqwatcher_conf_dir: "{{ xqwatcher_app_dir }}"

xqwatcher_requirements_file: "{{ xqwatcher_code_dir }}/requirements/production.txt"
xqwatcher_pip_requirements_file: "{{ xqwatcher_code_dir }}/requirements/pip.txt"
xqwatcher_log_dir: "{{ COMMON_LOG_DIR }}/{{ xqwatcher_service_name }}"
xqwatcher_module: "xqueue_watcher"

Expand Down
14 changes: 14 additions & 0 deletions playbooks/roles/xqwatcher/tasks/deploy_watcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
# The watcher can watch one or many queues and dispatch submissions
# to the appropriate grader which lives in a separate SCM repository.

# Install the repo's pinned pip first, rather than keeping the pip that
# virtualenv bundles.
- name: Install pinned pip
pip:
requirements: "{{ xqwatcher_pip_requirements_file }}"
virtualenv: "{{ xqwatcher_app_dir }}/venvs/{{ xqwatcher_service_name }}"
virtualenv_python: "{{ xqwatcher_python_version }}"
state: present
become: true
become_user: "{{ xqwatcher_user }}"
tags:
- install
- install:app-requirements

- name: Install application requirements
pip:
requirements: "{{ xqwatcher_requirements_file }}"
Expand Down
Loading