Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 9c274e2

Browse files
authored
revert: feat!: invert dependencies so that backends now depend on frontends (#815)
This commit made it so frontend services were started as dependencies whenever LMS (or other services) were started. The increased number of Docker containers is causing resource depletion for at least one developer. As a short-term fix, we will revert this commit. This reverts most of commit 54fb57f, although it leaves in place the changes to docs/workflow.rst, as they are still relevant. It also keeps ADR #4, but amends it.
1 parent f61ba4b commit 9c274e2

4 files changed

Lines changed: 46 additions & 28 deletions

File tree

README.rst

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,27 @@ The Devstack runs as multiple containers with `Docker Compose`_ at its core.
1313

1414
A Devstack installation includes the following Open edX components by default:
1515

16-
* The Learning Management System (LMS).
17-
* LMS micro-frontends, including Gradebook and Learning (a.k.a. the "new courseware experience").
16+
* The Learning Management System (LMS)
17+
* The Learning micro-frontend (A.K.A the new Courseware experience)
1818
* Open Response Assessments (ORA2), among other LMS plug-ins.
19-
* Discussion Forums.
20-
* Open edX Studio, including the Library- and Course-Authoring micro-frontends.
21-
* E-Commerce, including the Payment micro-frontend.
22-
* Course Discovery, including the Publisher micro-frontend.
23-
* Credentials.
24-
* Notes.
25-
* Open edX Search.
26-
* A demonstration Open edX course.
19+
* Open edX Studio
20+
* Discussion Forums
21+
* E-Commerce
22+
* Credentials
23+
* Notes
24+
* Course Discovery
25+
* Open edX Search
26+
* A demonstration Open edX course
27+
* The Publisher and Gradebook micro-frontends
2728

2829
It also includes the following extra components:
2930

30-
* XQueue and an example XQueue consumer.
31-
* Registrar, including the Program Console micro-frontend.
31+
* XQueue
32+
* The Program Console micro-frontend
33+
* The Library Authoring micro-frontend
34+
* edX Registrar service.
35+
* The course-authoring micro-frontend
36+
3237

3338
.. contents:: **Table of Contents:**
3439

@@ -297,13 +302,13 @@ Instead of a service name or list, you can also run commands like ``make dev.pro
297302
+------------------------------------+-------------------------------------+----------------+--------------+
298303
| `frontend-app-gradebook`_ | http://localhost:1994/ | MFE (React.js) | Default |
299304
+------------------------------------+-------------------------------------+----------------+--------------+
300-
| `frontend-app-library-authoring`_ | http://localhost:3001/ | MFE (React.js) | Default |
301-
+------------------------------------+-------------------------------------+----------------+--------------+
302-
| `frontend-app-course-authoring`_ | http://localhost:2001/ | MFE (React.js) | Default |
305+
| `registrar`_ | http://localhost:18734/api-docs/ | Python/Django | Extra |
303306
+------------------------------------+-------------------------------------+----------------+--------------+
304307
| `frontend-app-program-console`_ | http://localhost:1976/ | MFE (React.js) | Extra |
305308
+------------------------------------+-------------------------------------+----------------+--------------+
306-
| `registrar`_ | http://localhost:18734/api-docs/ | Python/Django | Extra |
309+
| `frontend-app-library-authoring`_ | http://localhost:3001/ | MFE (React.js) | Extra |
310+
+------------------------------------+-------------------------------------+----------------+--------------+
311+
| `frontend-app-course-authoring`_ | http://localhost:2001/ | MFE (React.js) | Extra |
307312
+------------------------------------+-------------------------------------+----------------+--------------+
308313
| `xqueue`_ | http://localhost:18040/api/v1/ | Python/Django | Extra |
309314
+------------------------------------+-------------------------------------+----------------+--------------+

docker-compose.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ services:
220220
hostname: discovery.devstack.edx
221221
depends_on:
222222
- elasticsearch710
223-
- frontend-app-publisher
224223
- memcached
225224
- mysql57
226225
# Allows attachment to the discovery service using 'docker attach <containerID>'.
@@ -249,7 +248,6 @@ services:
249248
hostname: ecommerce.devstack.edx
250249
depends_on:
251250
- discovery
252-
- frontend-app-payment
253251
- lms
254252
- memcached
255253
- mysql57
@@ -323,8 +321,6 @@ services:
323321
- discovery
324322
- elasticsearch710
325323
- forum
326-
- frontend-app-gradebook
327-
- frontend-app-learning
328324
- memcached
329325
- mongo
330326
- mysql57
@@ -358,7 +354,6 @@ services:
358354
hostname: registrar.devstack.edx
359355
depends_on:
360356
- discovery
361-
- frontend-app-program-console
362357
- lms
363358
- mysql57
364359
- memcached
@@ -433,9 +428,6 @@ services:
433428
depends_on:
434429
- devpi
435430
- elasticsearch710
436-
- frontend-app-course-authoring
437-
- frontend-app-library-authoring
438-
- frontend-app-publisher
439431
- lms
440432
- memcached
441433
- mongo
@@ -512,6 +504,8 @@ services:
512504
- edx.devstack.frontend-app-course-authoring
513505
ports:
514506
- "2001:2001"
507+
depends_on:
508+
- studio
515509

516510
frontend-app-gradebook:
517511
extends:
@@ -525,6 +519,8 @@ services:
525519
- edx.devstack.frontend-app-gradebook
526520
ports:
527521
- "1994:1994"
522+
depends_on:
523+
- lms
528524

529525
frontend-app-learning:
530526
extends:
@@ -538,6 +534,8 @@ services:
538534
- edx.devstack.frontend-app-learning
539535
ports:
540536
- "2000:2000"
537+
depends_on:
538+
- lms
541539

542540
frontend-app-library-authoring:
543541
extends:
@@ -551,6 +549,9 @@ services:
551549
- edx.devstack.frontend-app-library-authoring
552550
ports:
553551
- "3001:3001"
552+
depends_on:
553+
- lms
554+
- studio
554555

555556
frontend-app-payment:
556557
extends:
@@ -564,6 +565,8 @@ services:
564565
- edx.devstack.frontend-app-payment
565566
ports:
566567
- "1998:1998"
568+
depends_on:
569+
- ecommerce
567570

568571
frontend-app-program-console:
569572
extends:
@@ -577,6 +580,9 @@ services:
577580
- edx.devstack.frontend-app-program-console
578581
ports:
579582
- "1976:1976"
583+
depends_on:
584+
- lms
585+
- registrar
580586

581587
frontend-app-publisher:
582588
extends:
@@ -590,6 +596,8 @@ services:
590596
- edx.devstack.frontend-app-publisher
591597
ports:
592598
- "18400:18400"
599+
depends_on:
600+
- lms
593601

594602
volumes:
595603
discovery_assets:

docs/decisions/0004-backends-depend-on-frontends.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
Status
55
======
66

7-
Approved
7+
**Reverted** due to resource depletion concerns.
88

9+
A consequence of implementing this decision was that an increased number of containers (specifically, frontend containers) were started by common commands like ``make dev.provision`` and ``make dev.up.lms``. Unfortunately, the increased system resource consumption was leading to blocking workflow disruptions such as Docker network timeouts.
10+
11+
In absence of an immediately obvious way of reducing the additional resource burden that this decision's implementation requires, we have decided to revert it. Future work could include:
12+
13+
* Revisit the *Rejected Alternatives* listed at the bottom of this decision record. Both of those alternatives allow smaller groups of containers to be started for different situtations.
14+
* Investigate how the memory and CPU footprints of the micro-frontend Docker containers could be reduced.
15+
* Investigate running all micro-frontends from a singular Docker container.
916

1017
Context
1118
=======

options.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ FS_SYNC_STRATEGY ?= local-mounts
5858
# Services that are to be pulled, provisioned, run, and checked by default
5959
# when no services are specified manually.
6060
# Should be a subset of $(EDX_SERVICES).
61-
# frontend-apps are not included here, but several of them are dependencies of default
62-
# services.
6361
# Separated by plus signs. Listed in alphabetical order for clarity.
6462
# WARNING: You may remove services from this list in order to make Devstack lighter,
6563
# but beware that some services have implicit, undocumented dependencies on
@@ -70,7 +68,7 @@ FS_SYNC_STRATEGY ?= local-mounts
7068
# The current value was chosen such that it would not change the existing
7169
# Devstack behavior.
7270
DEFAULT_SERVICES ?= \
73-
credentials+discovery+ecommerce+edx_notes_api+forum+lms+studio
71+
credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-gradebook+frontend-app-payment+frontend-app-publisher+frontend-app-learning+lms+studio
7472

7573
# All edX services, whether or not they are run by default.
7674
# Separated by plus signs.

0 commit comments

Comments
 (0)