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
2 changes: 1 addition & 1 deletion .github/workflows/provisioning-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
os:
- ubuntu-24.04
python-version: [ '3.11' ]
services: [ discovery+lms+forum ,registrar+lms, ecommerce+lms, edx_notes_api+lms, credentials+lms, xqueue, analyticsapi+insights+lms, designer+lms, enterprise-subsidy+enterprise-catalog+enterprise-access+lms, license-manager+lms]
services: [ discovery+lms+forum ,registrar+lms, ecommerce+lms, edx_notes_api+lms, credentials+lms, xqueue, analyticsapi+insights+lms, designer+lms, enterprise-subsidy+enterprise-catalog+enterprise-access+lms, license-manager+lms, edx-exams+lms]
fail-fast: false # some services can be flaky; let others run to completion even if one fails

steps:
Expand Down
6 changes: 6 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ if should_check license-manager; then
"curl --fail -L http://localhost:18170/health/"
fi

if should_check edx-exams; then
echo "Running edX Exam Devstack tests: "
run_check edx-exams_heartbeat edx-exams \
"curl --fail -L http://localhost:18740/health/"
fi

echo "Successful checks:${succeeded:- NONE}"
echo "Failed checks:${failed:- NONE}"
if [[ -z "$succeeded" ]] && [[ -z "$failed" ]]; then
Expand Down
5 changes: 5 additions & 0 deletions docker-compose-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ services:
- ${DEVSTACK_WORKSPACE}/license-manager:/edx/app/license_manager
- ${DEVSTACK_WORKSPACE}/src:/edx/src:cached
- ${PWD}/py_configuration_files/license_manager.py:/edx/app/license_manager/license_manager/settings/devstack.py
edx-exams:
volumes:
- ${DEVSTACK_WORKSPACE}/edx-exams:/edx/app/edx-exams
- ${DEVSTACK_WORKSPACE}/src:/edx/src
- ${PWD}/py_configuration_files/edx_exams.py:/edx/app/edx-exams/edx_exams/settings/devstack.py

# Note that frontends mount `src` to /edx/app/src instead of /edx/src.
# See ADR #5 for rationale.
Expand Down
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,29 @@ services:
- "18281:18281"
stdin_open: true

edx-exams:
image: edxops/edx-exams-dev
container_name: edx.devstack.edx_exams
hostname: edx_exams.devstack.edx
depends_on:
- lms
- mysql80
command: bash -c 'while true; do python /edx/app/edx-exams/manage.py runserver 0.0.0.0:18740; sleep 2; done'
stdin_open: true
tty: true
environment:
DB_HOST: edx.devstack.mysql80
DB_PORT: 3306
DB_NAME: edx_exams
DB_USER: exams001
DB_PASSWORD: password
DJANGO_SETTINGS_MODULE: edx_exams.settings.devstack
working_dir: /edx/app/edx-exams/
ports:
- "18740:18740"
volumes:
- /edx/var/edx-exams

# ==========================================================================
# edX Microfrontends
#
Expand Down
3 changes: 3 additions & 0 deletions docs/service_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Instead of a service name or list, you can also run commands like ``make dev.pro
+------------------------------------+-------------------------------------+----------------+--------------+
| `enterprise-subsidy`_ | http://localhost:18280 | Python/Django | Extra |
+------------------------------------+-------------------------------------+----------------+--------------+
| `edx-exams`_ | http://localhost:18740 | Python/Django | Extra |
+------------------------------------+-------------------------------------+----------------+--------------+

Some common service combinations include:

Expand Down Expand Up @@ -113,3 +115,4 @@ Some common service combinations include:
.. _license-manager: https://github.com/openedx/license-manager
.. _enterprise-access: https://github.com/openedx/enterprise-access
.. _enterprise-subsidy: https://github.com/openedx/enterprise-subsidy
.. _edx-exams: https://github.com/edx/edx-exams
2 changes: 1 addition & 1 deletion options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-authn+frontend-
# Separated by plus signs.
# Separated by plus signs. Listed in alphabetical order for clarity.
EDX_SERVICES ?= \
analyticsapi+codejail+enterprise-subsidy+credentials+cms+cms-worker+cms_watcher+discovery+ecommerce+edx_notes_api+forum+frontend-app-account+frontend-app-learner-dashboard+frontend-app-learner-record+frontend-app-profile+frontend-app-authn+frontend-app-course-authoring+frontend-app-gradebook+frontend-app-ora-grading+frontend-app-learning+frontend-app-library-authoring+frontend-app-payment+frontend-app-program-console+frontend-app-publisher+insights+lms+lms-worker+lms_watcher+registrar+registrar-worker+xqueue+xqueue_consumer+enterprise-catalog+license-manager+designer+enterprise-access
analyticsapi+codejail+enterprise-subsidy+credentials+cms+cms-worker+cms_watcher+discovery+ecommerce+edx-exams+edx_notes_api+forum+frontend-app-account+frontend-app-learner-dashboard+frontend-app-learner-record+frontend-app-profile+frontend-app-authn+frontend-app-course-authoring+frontend-app-gradebook+frontend-app-ora-grading+frontend-app-learning+frontend-app-library-authoring+frontend-app-payment+frontend-app-program-console+frontend-app-publisher+insights+lms+lms-worker+lms_watcher+registrar+registrar-worker+xqueue+xqueue_consumer+enterprise-catalog+license-manager+designer+enterprise-access

# Services with database migrations.
# Should be a subset of $(EDX_SERVICES).
Expand Down
30 changes: 30 additions & 0 deletions provision-edx-exams.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -eu -o pipefail

. scripts/colors.sh
set -x

name="edx-exams"
port="18740"

docker compose up -d lms
docker compose up -d ${name}

# Install requirements
echo -e "${GREEN}Installing requirements for ${name}...${NC}"
docker compose exec -T ${name} bash -e -c 'cd /edx/app/edx-exams/ && make requirements' -- f"$name"

# Run migrations
echo -e "${GREEN}Running migrations for ${name}...${NC}"
docker compose exec -T ${name} bash -e -c "cd /edx/app/edx-exams/ && make migrate"

# Create superuser
echo -e "${GREEN}Creating super-user for ${name}...${NC}"
docker compose exec -T ${name} bash -e -c "echo 'from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser(\"edx\", \"[email protected]\", \"edx\") if not User.objects.filter(username=\"edx\").exists() else None' | python /edx/app/edx-exams/manage.py shell"

# Provision IDA User in LMS and
# create the DOT applications - one for single sign-on and one for backend service IDA-to-IDA authentication.
echo -e "${GREEN}Provisioning ${name}_worker in LMS...${NC}"
./provision-ida-user.sh ${name} ${name} ${port}

make dev.restart-devserver.${name}
4 changes: 4 additions & 0 deletions provision-mysql80.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ CREATE DATABASE IF NOT EXISTS enterprise_subsidy;
CREATE USER IF NOT EXISTS 'subsidy001'@'%' IDENTIFIED BY 'password';
GRANT ALL ON enterprise_subsidy.* TO 'subsidy001'@'%';

CREATE DATABASE IF NOT EXISTS `edx_exams`;
CREATE USER IF NOT EXISTS 'exams001'@'%' IDENTIFIED BY 'password';
GRANT ALL ON `edx_exams`.* TO 'exams001'@'%';

FLUSH PRIVILEGES;
1 change: 1 addition & 0 deletions provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ license-manager \
designer \
enterprise-access \
enterprise-subsidy \
edx-exams \
"

# What should we provision?
Expand Down
2 changes: 2 additions & 0 deletions repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ non_release_repos=(
"https://github.com/openedx/frontend-app-profile.git"
"https://github.com/openedx/frontend-app-ora-grading.git"
"https://github.com/openedx/enterprise-subsidy.git"
"https://github.com/edx/edx-exams.git"
)

ssh_repos=(
Expand Down Expand Up @@ -90,6 +91,7 @@ non_release_ssh_repos=(
"[email protected]:openedx/frontend-app-profile.git"
"[email protected]:openedx/frontend-app-ora-grading.git"
"[email protected]:openedx/enterprise-subsidy.git"
"[email protected]:edx/edx-exams.git"
)

if [ -n "${OPENEDX_RELEASE}" ]; then
Expand Down
Loading