Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
Add any new changes to the top (right below this line).

- 2021-10-19
- Role: edxapp
- Added a new task to create all required MongoDB indexes by using ensure_indexes lms command
- Role: forum
- Added a new task to rebuild MongoDB indexes

- 2021-07-19
- Role: edx_django_service
- Allows writing extra requirements to an 'extra.txt' requirements file in the service's requirements directory.
Expand Down
4 changes: 4 additions & 0 deletions playbooks/roles/edxapp/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -519,3 +519,7 @@
tags:
- manage
- manage:db

- name: Create required MongoDB indexes
shell: ". {{ edxapp_app_dir }}/edxapp_env && {{ edxapp_venv_bin }}/python {{ edxapp_code_dir }}/manage.py lms ensure_indexes"
become_user: "{{ edxapp_user }}"
7 changes: 7 additions & 0 deletions playbooks/roles/forum/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@
- migrate
- migrate:db

- name: rebuild MongoDB indexes
shell:
cmd: bundle exec rake db:init
chdir: "{{ forum_code_dir }}"
become_user: "{{ forum_user }}"
environment: "{{ forum_base_env }}"

# call supervisorctl update. this reloads
# the supervisorctl config and restarts
# the services if any of the configurations
Expand Down