Skip to content

Commit

Permalink
Incorporates changes to make MITxOnline work with Tutor (#1376)
Browse files Browse the repository at this point in the history
Changes to support running MITx Online while pointed at a Tutor edX instance: 
* Updates to docker-compose.yml to support a Tutor instance
* Tutor docs. Also removed the Refine setup docs since they're outdated.
* Updated README.md
* Updated the configure_instance command to have a specific tutor dev/nightly flag
  • Loading branch information
jkachel authored May 26, 2023
1 parent f4dac2e commit be7dc2f
Show file tree
Hide file tree
Showing 7 changed files with 274 additions and 102 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Run through those steps **including the addition of `/etc/hosts` aliases and the

### Configure mitxonline and Open edX

**Open edX Tutor** can be used with MITx Online instead of the traditional devstack release. See [Local Open edX Tutor and MITx Online Deployment](docs/source/configuration/tutor.rst) for details.

See [MITx Online Quick Start](docs/source/configuration/quickstart.rst) and [Configure Open edX](docs/source/configuration/open_edx.rst)

### Configuring the CMS
Expand All @@ -23,13 +25,9 @@ to be usable. You can apply all of those changes by running a management command
docker-compose run --rm web ./manage.py configure_wagtail
```

### Configuring Refine Admin

See [Configure Refine Admin](docs/source/configuration/refine_admin.rst)

# Running, testing, and administering the app

Running, testing, and administering this app follows the same patterns as our other web apps.
Running, testing, and administering this app follows the same patterns as our other web apps.

*Note: for js tests, run the commands in `frontend/public`, or run via `yarn workspaces foreach run <command>` from the root.

Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ x-extra-hosts:
&default-extra-hosts
- "edx.odl.local:${OPENEDX_IP:-172.22.0.1}"
- "host.docker.internal:host-gateway"
- "local.overhang.io:host-gateway"

services:
db:
Expand Down Expand Up @@ -68,7 +69,7 @@ services:
links:
- db
- redis
# these are links instead of `depends_on`
# these are links instead of `depends_on`
# because if we just want a shell for `web` we don't want to run these
- watch
- refine
Expand All @@ -79,7 +80,7 @@ services:

watch:
image: node:17.8
working_dir: /app
working_dir: /app
command: ./scripts/run-watch-dev.sh
ports:
- "8012:8012"
Expand Down Expand Up @@ -163,9 +164,9 @@ services:

varnish:
image: varnish:fresh
links:
links:
- nginx
ports:
ports:
- "8013:80"
volumes:
- ./config/default.vcl:/etc/varnish/default.vcl:ro
Expand All @@ -175,4 +176,4 @@ services:
volumes:
npm-cache: {}
django_media: {}
yarn-cache: {}
yarn-cache: {}
12 changes: 8 additions & 4 deletions docs/source/commands/configure_instance.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
``configure_instance``
======================

Configures a fresh MITx Online instance. For more information, see :doc:`MITx Online Quick Start<../configuration/quickstart>`.
Configures a fresh MITx Online instance. For more information, see :doc:`MITx Online Quick Start<../configuration/quickstart>` and :doc:`Local Open edX Tutor and MITx Online Deployment<../configuration/tutor>`.

For Tutor deployments, this will use ``local.overhang.io`` for URLs for the edX platform. If you're running a dev deployment, or are using Tutor Nightly, ``--tutor-dev`` will additionally add the proper ports (as Caddy is disabled in these cases). In either case, the two demo courses will still be created but only the Demonstration Course (``course-v1:edX+DemoX+Demo_Course``) will exist in edX, and then only if you import the demo course using the relevant Tutor command.

Syntax
------

``configure_instance <platform> [--dont-enroll|-D] [--dont-create-superuser|-S] [--edx-oauth-client <client id>] [--edx-oauth-secret <client secret>] [--gateway <ip>]``
``configure_instance <platform> [--dont-enroll|-D] [--dont-create-superuser|-S] [--edx-oauth-client <client id>] [--edx-oauth-secret <client secret>] [--gateway <ip>] [--tutor|-T] [--tutor-dev]``

Options
-------
Expand All @@ -15,5 +17,7 @@ Options
* ``--dont-enroll|-D`` - Don't enroll the test learner account in any courses. (Defaults to enrolling the account in ``course-v1:edX+DemoX+Demo_Course``.)
* ``--dont-create-superuser|-S`` - Don't create a superuser account.
* ``--gateway <ip>`` - The Docker gateway IP. Required on Linux. See :doc:`Configure Open edX<../configuration/open_edx>` for more info.
* ``--edx-oauth-client <client id>`` - Use the specified client ID for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--edx-oauth-secret <client secret>`` - Use the specified client secret for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--edx-oauth-client <client id>`` - Use the specified client ID for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--edx-oauth-secret <client secret>`` - Use the specified client secret for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--tutor|-T`` - Configure the instance for use with a Tutor edX deployment.
* ``--tutor-dev`` - Configure the instnace for use with Tutor dev or nightly.
4 changes: 2 additions & 2 deletions docs/source/configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Configuration
:maxdepth: 2

open_edx
tutor
ecommerce
refine_admin
quickstart
quickstart
80 changes: 0 additions & 80 deletions docs/source/configuration/refine_admin.rst

This file was deleted.

Loading

0 comments on commit be7dc2f

Please sign in to comment.