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

refactor: paver deprecation #104

Merged
merged 2 commits into from
Nov 18, 2024
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
2 changes: 1 addition & 1 deletion playbooks/roles/aws_devstack/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
cd edx-repos/devstack/
make dev.pull.large-and-slow
make dev.up.lms
. /home/ubuntu/.profile && docker compose exec lms env TERM=xterm-256color bash -c 'make requirements && npm ci && paver update_assets && python manage.py lms migrate'
. /home/ubuntu/.profile && docker compose exec lms env TERM=xterm-256color bash -c 'make requirements && npm ci && npm run build && ./manage.py lms collectstatic --noinput && ./manage.py cms collectstatic && python manage.py lms migrate'
async: 1800
poll: 10
become_user: ubuntu
Expand Down
3 changes: 0 additions & 3 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,6 @@ EDXAPP_CMS_STATIC_URL_BASE: "{{ EDXAPP_STATIC_URL_BASE }}"
# does not affect verified students
EDXAPP_PAID_COURSE_REGISTRATION_CURRENCY: ['usd', '$']

# Configure paver tasks in edx-platform to skip Python/Ruby/Node installation
EDXAPP_NO_PREREQ_INSTALL: 1

# whether to setup the python codejail or not
EDXAPP_PYTHON_SANDBOX: true
# this next setting, if true, turns on actual sandbox enforcement. If not true,
Expand Down
9 changes: 0 additions & 9 deletions playbooks/roles/edxapp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@
- devstack
- devstack:install

- name: add paver autocomplete to bashrc
lineinfile:
dest: /root/.bashrc
line: "source {{ edxapp_code_dir }}/scripts/paver_autocomplete.sh"
when: devstack is defined and devstack
tags:
- devstack
- devstack:install

- name: create edxapp log dir
file:
path: "{{ edxapp_log_dir }}"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/roles/edxapp/tasks/service_variant_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@
- gather_static_assets
- assets

# Gather assets using paver if possible
- name: "gather static assets with paver and pull translations"
# Build static assets if possible
- name: "gather static assets"
command: "{{ COMMON_BIN_DIR }}/edxapp-update-assets"
when: celery_worker is not defined and not devstack
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
{% for override in edxapp_staticfiles_storage_overrides %}
sudo -E -H -u {{ edxapp_user }} \
env "PATH=$PATH" "STATICFILES_STORAGE={{ override }}" \
{{ edxapp_venv_bin }}/paver update_assets --debug-collect --settings=$EDX_PLATFORM_SETTINGS
{{ edxapp_venv_bin }}/npm run build && {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --debug-collect --settings=$EDX_PLATFORM_SETTINGS && {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --debug-collect --settings=$EDX_PLATFORM_SETTINGS
{% endfor %}
{% else %}
sudo -E -H -u {{ edxapp_user }} \
env "PATH=$PATH" \
{{ edxapp_venv_bin }}/paver update_assets --debug-collect --settings $EDX_PLATFORM_SETTINGS
{{ edxapp_venv_bin }}/npm run build && {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --debug-collect --settings=$EDX_PLATFORM_SETTINGS && {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --debug-collect --settings=$EDX_PLATFORM_SETTINGS
{% endif %}

19 changes: 0 additions & 19 deletions playbooks/roles/test_build_server/defaults/main.yml

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions playbooks/roles/test_build_server/meta/main.yml

This file was deleted.

48 changes: 0 additions & 48 deletions playbooks/roles/test_build_server/tasks/main.yml

This file was deleted.

2 changes: 1 addition & 1 deletion util/jenkins/app-container-provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fi
if [[ ${app_service_name} == 'lms' ]]; then
# temporary hack, create npm-install.log file
touch /edx/app/edxapp/edx-platform/test_root/log/npm-install.log
docker run --network=host --rm -u='root' -e NO_PREREQ_INSTALL="1" -e SKIP_WS_MIGRATIONS="1" -e LMS_CFG=/edx/etc/${app_service_name}.yml -e CMS_CFG=/edx/etc/cms.yml -e DJANGO_SETTINGS_MODULE=${app_service_name}.envs.docker-production -e SERVICE_VARIANT=${app_service_name} -e EDX_PLATFORM_SETTINGS=docker-production -v /edx/etc/${app_service_name}.yml:/edx/etc/${app_service_name}.yml -v /var/tmp/cms.yml:/edx/etc/cms.yml -v /edx/var/edx-themes:/edx/var/edx-themes -v /edx/var/${app_name}:/edx/var/${app_name} -v /edx/app/edxapp/edx-platform/test_root/log/npm-install.log:/edx/app/edxapp/edx-platform/test_root/log/npm-install.log -v /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock ${app_repo}:latest paver update_assets --debug-collect --settings=docker-production
docker run --network=host --rm -u='root' -e NO_PREREQ_INSTALL="1" -e SKIP_WS_MIGRATIONS="1" -e LMS_CFG=/edx/etc/${app_service_name}.yml -e CMS_CFG=/edx/etc/cms.yml -e DJANGO_SETTINGS_MODULE=${app_service_name}.envs.docker-production -e SERVICE_VARIANT=${app_service_name} -e EDX_PLATFORM_SETTINGS=docker-production -e STATIC_ROOT_LMS=/edx/var/edxapp/staticfiles -e STATIC_ROOT_CMS=/edx/var/edxapp/staticfiles/studio -v /edx/etc/${app_service_name}.yml:/edx/etc/${app_service_name}.yml -v /var/tmp/cms.yml:/edx/etc/cms.yml -v /edx/var/edx-themes:/edx/var/edx-themes -v /edx/var/${app_name}:/edx/var/${app_name} -v /edx/app/edxapp/edx-platform/test_root/log/npm-install.log:/edx/app/edxapp/edx-platform/test_root/log/npm-install.log -v /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock ${app_repo}:latest npm run build && ./manage.py lms collectstatic --noinput --debug-collect --settings=docker-production && ./manage.py cms collectstatic --noinput --debug-collect --settings=docker-production
fi

# Generate docker-compose file for app service
Expand Down
Loading