Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for private npm installs into edxapp. #185

Closed
Changes from 1 commit
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
Next Next commit
feat: first attempt
michaelroytman committed Mar 18, 2025
commit f9609bcbc6478db0e8914b18c66f4c352dbbb85b
11 changes: 11 additions & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -585,6 +585,17 @@ EDXAPP_PRIVATE_REQUIREMENTS:
# Caliper and xAPI event routing plugin
- name: edx-event-routing-backends==5.5.6

# List of additional npm packages that should be installed into the
# edxapp virtual environment.
# `name` (required) and `version_range` (optional) are supported and
# correspond to the options of ansible's pip module.
# Example:
# EDXAPP_EXTRA_NPM_REQUIREMENTS:
# - name: mypackage
# version_range: ^1.0.0
# - name: git+https://git.myproject.org/MyProject#egg=MyProject
EDXAPP_EXTRA_NPM_REQUIREMENTS: []

# List of custom middlewares that should be used in edxapp to process
# incoming HTTP resquests. Should be a list of plain strings that fully
# qualify Python classes or functions that can be used as Django middleware.
11 changes: 11 additions & 0 deletions playbooks/roles/edxapp/tasks/deploy.yml
Original file line number Diff line number Diff line change
@@ -317,6 +317,17 @@
- install
- install:app-requirements

- name: Install private node dependencies
shell: "easy_install --version && npm install {{ item.name }}{{ '@' + item.version_range if item.version_range is defined else '' }}"
with_items: "{{ EDXAPP_EXTRA_NPM_REQUIREMENTS }}"
args:
chdir: "{{ edxapp_code_dir }}"
environment: "{{ edxapp_environment | combine(git_ssh_environment_mixin) }}"
become_user: "{{ edxapp_user }}"
tags:
- install
- install:app-requirements

# The next few tasks set up the python code sandbox

# need to disable this profile, otherwise the pip inside the sandbox venv has no permissions