diff --git a/Makefile b/Makefile index 2ff634e0ed..eb74ad2eb4 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,6 @@ ifeq ($(FS_SYNC_STRATEGY),local-mounts) COMPOSE_FILE := docker-compose-host.yml COMPOSE_FILE := $(COMPOSE_FILE):docker-compose-themes.yml COMPOSE_FILE := $(COMPOSE_FILE):docker-compose-watchers.yml -COMPOSE_FILE := $(COMPOSE_FILE):docker-compose-xqueue.yml endif # Files for use with Network File System -based synchronization. diff --git a/README.rst b/README.rst index 1d986ce4f5..129a880e8f 100644 --- a/README.rst +++ b/README.rst @@ -329,15 +329,15 @@ Instead of a service name or list, you can also run commands like ``make dev.pro +------------------------------------+-------------------------------------+----------------+--------------+ | `frontend-app-publisher`_ | http://localhost:18400/ | MFE (React.js) | Default | +------------------------------------+-------------------------------------+----------------+--------------+ -| `gradebook`_ | http://localhost:1994/ | MFE (React.js) | Default | +| `frontend-app-gradebook`_ | http://localhost:1994/ | MFE (React.js) | Default | +------------------------------------+-------------------------------------+----------------+--------------+ -| `registrar`_ | http://localhost:18734/api-docs/ | Python/Django | Extra | +| `frontend-app-library-authoring`_ | http://localhost:3001/ | MFE (React.js) | Default | +------------------------------------+-------------------------------------+----------------+--------------+ -| `program-console`_ | http://localhost:1976/ | MFE (React.js) | Extra | +| `frontend-app-course-authoring`_ | http://localhost:2001/ | MFE (React.js) | Default | +------------------------------------+-------------------------------------+----------------+--------------+ -| `frontend-app-library-authoring`_ | http://localhost:3001/ | MFE (React.js) | Extra | +| `frontend-app-program-console`_ | http://localhost:1976/ | MFE (React.js) | Extra | +------------------------------------+-------------------------------------+----------------+--------------+ -| `course-authoring`_ | http://localhost:2001/ | MFE (React.js) | Extra | +| `registrar`_ | http://localhost:18734/api-docs/ | Python/Django | Extra | +------------------------------------+-------------------------------------+----------------+--------------+ | `xqueue`_ | http://localhost:18040/api/v1/ | Python/Django | Extra | +------------------------------------+-------------------------------------+----------------+--------------+ @@ -355,15 +355,15 @@ Some common service combinations include: .. _forum: https://github.com/edx/cs_comments_service .. _frontend-app-payment: https://github.com/edx/frontend-app-payment .. _frontend-app-publisher: https://github.com/edx/frontend-app-publisher -.. _gradebook: https://github.com/edx/frontend-app-gradebook +.. _frontend-app-gradebook: https://github.com/edx/frontend-app-gradebook .. _lms: https://github.com/edx/edx-platform -.. _program-console: https://github.com/edx/frontend-app-program-console +.. _frontend-app-program-console: https://github.com/edx/frontend-app-program-console .. _registrar: https://github.com/edx/registrar .. _studio: https://github.com/edx/edx-platform .. _lms: https://github.com/edx/edx-platform .. _frontend-app-learning: https://github.com/edx/frontend-app-learning .. _frontend-app-library-authoring: https://github.com/edx/frontend-app-library-authoring -.. _course-authoring: https://github.com/edx/frontend-app-course-authoring +.. _frontend-app-course-authoring: https://github.com/edx/frontend-app-course-authoring .. _xqueue: https://github.com/edx/xqueue diff --git a/docker-compose-host-nfs.yml b/docker-compose-host-nfs.yml index 3932616d8f..596aab294f 100644 --- a/docker-compose-host-nfs.yml +++ b/docker-compose-host-nfs.yml @@ -45,34 +45,34 @@ services: registrar-worker: volumes: - ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar/registrar - gradebook: + frontend-app-course-authoring: volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-gradebook:/edx/app/gradebook:cached - - gradebook_node_modules:/edx/app/gradebook/node_modules - program-console: + - ${DEVSTACK_WORKSPACE}/frontend-app-course-authoring:/edx/app/frontend-app-course-authoring:cached + - frontend_app_course_authoring_node_modules:/edx/app/frontend-app-course-authoring/node_modules + frontend-app-gradebook: volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-program-console:/edx/app/program-console:cached - - program_console_node_modules:/edx/app/program-console/node_modules + - ${DEVSTACK_WORKSPACE}/frontend-app-gradebook:/edx/app/frontend-app-gradebook:cached + - frontend_app_gradebook_node_modules:/edx/app/frontend-app-gradebook/node_modules frontend-app-learning: volumes: - ${DEVSTACK_WORKSPACE}/frontend-app-learning:/edx/app/frontend-app-learning:cached - frontend_app_learning_node_modules:/edx/app/frontend-app-learning/node_modules - course-authoring: + frontend-app-library-authoring: volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-course-authoring:/edx/app/frontend-app-course-authoring:cached - - course_authoring_node_modules:/edx/app/frontend-app-course-authoring/node_modules + - ${DEVSTACK_WORKSPACE}/frontend-app-library-authoring:/edx/app/frontend-app-library-authoring:cached + - frontend_app_library_authoring_node_modules:/edx/app/frontend-app-library-authoring/node_modules frontend-app-payment: volumes: - ${DEVSTACK_WORKSPACE}/frontend-app-payment:/edx/app/frontend-app-payment:cached - frontend_app_payment_node_modules:/edx/app/frontend-app-payment/node_modules + frontend-app-program-console: + volumes: + - ${DEVSTACK_WORKSPACE}/frontend-app-program-console:/edx/app/frontend-app-program-console:cached + - frontend_app_program_console_node_modules:/edx/app/frontend-app-program-console/node_modules frontend-app-publisher: volumes: - ${DEVSTACK_WORKSPACE}/frontend-app-publisher:/edx/app/frontend-app-publisher:cached - frontend_app_publisher_node_modules:/edx/app/frontend-app-publisher/node_modules - frontend-app-library-authoring: - volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-library-authoring:/edx/app/frontend-app-library-authoring:cached - - frontend_app_library_authoring_node_modules:/edx/app/frontend-app-library-authoring/node_modules volumes: credentials_node_modules: @@ -81,13 +81,13 @@ volumes: edxapp_media: edxapp_node_modules: edxapp_uploads: - gradebook_node_modules: - program_console_node_modules: + frontend_app_course_authoring_node_modules: + frontend_app_gradebook_node_modules: frontend_app_learning_node_modules: + frontend_app_library_authoring_node_modules: frontend_app_payment_node_modules: + frontend_app_program_console_node_modules: frontend_app_publisher_node_modules: - course_authoring_node_modules: - frontend_app_library_authoring_node_modules: edx-nfs: driver: local driver_opts: diff --git a/docker-compose-host.yml b/docker-compose-host.yml index 229caefbe3..5b58016be3 100644 --- a/docker-compose-host.yml +++ b/docker-compose-host.yml @@ -21,6 +21,9 @@ services: - ecommerce_node_modules:/edx/app/ecommerce/ecommerce/node_modules - ecommerce_tox:/edx/app/ecommerce/ecommerce/.tox - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached + forum: + volumes: + - ${DEVSTACK_WORKSPACE}/cs_comments_service:/edx/app/forum/cs_comments_service:cached lms: volumes: - ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform:cached @@ -33,6 +36,12 @@ services: volumes: - ${DEVSTACK_WORKSPACE}/edx-notes-api:/edx/app/edx_notes_api/edx_notes_api:cached - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached + registrar: + volumes: + - ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar/registrar + registrar-worker: + volumes: + - ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar/registrar studio: volumes: - ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform:cached @@ -41,45 +50,41 @@ services: - edxapp_tox:/edx/app/edxapp/edx-platform/.tox - edxapp_uploads:/edx/var/edxapp/uploads - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached - forum: + frontend-app-course-authoring: volumes: - - ${DEVSTACK_WORKSPACE}/cs_comments_service:/edx/app/forum/cs_comments_service:cached - registrar: - volumes: - - ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar/registrar - registrar-worker: + - ${DEVSTACK_WORKSPACE}/frontend-app-course-authoring:/edx/app/frontend-app-course-authoring:cached + - frontend_app_course_authoring_node_modules:/edx/app/frontend-app-course-authoring/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached + frontend-app-gradebook: volumes: - - ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar/registrar - gradebook: + - ${DEVSTACK_WORKSPACE}/frontend-app-gradebook:/edx/app/frontend-app-gradebook:cached + - frontend_app_gradebook_node_modules:/edx/app/frontend-app-gradebook/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached + frontend-app-learning: volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-gradebook:/edx/app/gradebook:cached - - gradebook_node_modules:/edx/app/gradebook/node_modules - - gradebook_tox:/edx/app/gradebook/.tox - program-console: + - ${DEVSTACK_WORKSPACE}/frontend-app-learning:/edx/app/frontend-app-learning:cached + - frontend_app_learning_node_modules:/edx/app/frontend-app-learning/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached + frontend-app-library-authoring: volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-program-console:/edx/app/program-console:cached - - program_console_node_modules:/edx/app/program-console/node_modules - - program_console_tox:/edx/app/program-console/.tox + - ${DEVSTACK_WORKSPACE}/frontend-app-library-authoring:/edx/app/frontend-app-library-authoring:cached + - frontend_app_library_authoring_node_modules:/edx/app/frontend-app-library-authoring/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached frontend-app-payment: volumes: - ${DEVSTACK_WORKSPACE}/frontend-app-payment:/edx/app/frontend-app-payment:cached - frontend_app_payment_node_modules:/edx/app/frontend-app-payment/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached + frontend-app-program-console: + volumes: + - ${DEVSTACK_WORKSPACE}/frontend-app-program-console:/edx/app/frontend-app-program-console:cached + - frontend_app_program_console_node_modules:/edx/app/frontend-app-program-console/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached frontend-app-publisher: volumes: - ${DEVSTACK_WORKSPACE}/frontend-app-publisher:/edx/app/frontend-app-publisher:cached - frontend_app_publisher_node_modules:/edx/app/frontend-app-publisher/node_modules - frontend-app-learning: - volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-learning:/edx/app/frontend-app-learning:cached - - frontend_app_learning_node_modules:/edx/app/frontend-app-learning/node_modules - course-authoring: - volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-course-authoring:/edx/app/frontend-app-course-authoring:cached - - course_authoring_node_modules:/edx/app/frontend-app-course-authoring/node_modules - frontend-app-library-authoring: - volumes: - - ${DEVSTACK_WORKSPACE}/frontend-app-library-authoring:/edx/app/frontend-app-library-authoring:cached - - frontend_app_library_authoring_node_modules:/edx/app/frontend-app-library-authoring/node_modules + - ${DEVSTACK_WORKSPACE}/src:/edx/src:cached volumes: credentials_node_modules: @@ -88,16 +93,14 @@ volumes: edxapp_media: edxapp_node_modules: edxapp_uploads: - gradebook_node_modules: - program_console_node_modules: - frontend_app_payment_node_modules: - frontend_app_publisher_node_modules: + frontend_app_course_authoring_node_modules: + frontend_app_gradebook_node_modules: frontend_app_learning_node_modules: - course_authoring_node_modules: frontend_app_library_authoring_node_modules: + frontend_app_payment_node_modules: + frontend_app_program_console_node_modules: + frontend_app_publisher_node_modules: credentials_tox: discovery_tox: ecommerce_tox: edxapp_tox: - gradebook_tox: - program_console_tox: diff --git a/docker-compose-sync.yml b/docker-compose-sync.yml index 2a1118b609..fb24c58815 100644 --- a/docker-compose-sync.yml +++ b/docker-compose-sync.yml @@ -29,22 +29,22 @@ services: volumes: - registrar-sync:/edx/app/registrar/registrar:nocopy - source-sync:/edx/src:nocopy - gradebook: + frontend-app-course-authoring: volumes: - - gradebook-sync:/edx/app/gradebook/gradebook:nocopy + - frontend-app-course-authoring-sync:/edx/app/frontend-app-course-authoring:nocopy - source-sync:/edx/src:nocopy - program-console: + frontend-app-gradebook: volumes: - - program-console-sync:/edx/app/program-console:nocopy - - source-sync:/edx/src:nocopy - course-authoring: - volumes: - - course-authoring-sync:/edx/app/frontend-app-course-authoring:nocopy + - frontend-app-gradebook-sync:/edx/app/frontend-app-gradebook:nocopy - source-sync:/edx/src:nocopy frontend-app-library-authoring: volumes: - frontend-app-library-authoring-sync:/edx/app/frontend-app-library-authoring:nocopy - source-sync:/edx/src:nocopy + frontend-app-program-console: + volumes: + - frontend-app-program-console-sync:/edx/app/frontend-app-program-console:nocopy + - source-sync:/edx/src:nocopy volumes: credentials-sync: @@ -59,13 +59,13 @@ volumes: external: true registrar-sync: external: true - gradebook-sync: - external: true - program-console-sync: + frontend-app-course-authoring-sync: external: true - course-authoring-sync: + frontend-app-gradebook-sync: external: true frontend-app-library-authoring-sync: external: true + frontend-app-program-console-sync: + external: true source-sync: external: true diff --git a/docker-compose-xqueue.yml b/docker-compose-xqueue.yml deleted file mode 100644 index 968221d858..0000000000 --- a/docker-compose-xqueue.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: "2.1" - -services: - xqueue: - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue" - image: edxops/xqueue:${OPENEDX_RELEASE:-latest} - command: bash -c 'source /edx/app/xqueue/xqueue_env && while true; do python /edx/app/xqueue/xqueue/manage.py runserver 0.0.0.0:18040 ; sleep 2; done' - volumes: - - ${DEVSTACK_WORKSPACE}/xqueue:/edx/app/xqueue/xqueue:cached - # depends_on: even though we need mysql, we can't refer to it because it's started in the other compose file - networks: - default: - aliases: - - edx.devstack.xqueue - ports: - - 18040:18040 - - xqueue_consumer: - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue_consumer" - image: edxops/xqueue:${OPENEDX_RELEASE:-latest} - command: bash -c 'source /edx/app/xqueue/xqueue_env && while true; do python /edx/app/xqueue/xqueue/manage.py run_consumer ; sleep 2; done' - volumes: - - ${DEVSTACK_WORKSPACE}/xqueue:/edx/app/xqueue/xqueue:cached - networks: - default: - aliases: - - edx.devstack.xqueue_consumer - # depends_on: even though we need mysql, we can't refer to it because it's started in the other compose file diff --git a/docker-compose.yml b/docker-compose.yml index df80534ff3..5b5045fff7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -194,9 +194,9 @@ services: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.credentials" hostname: credentials.devstack.edx depends_on: - - mysql57 - - memcached - lms + - memcached + - mysql57 # Allows attachment to the credentials service using 'docker attach '. stdin_open: true tty: true @@ -219,9 +219,10 @@ services: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.discovery" hostname: discovery.devstack.edx depends_on: - - mysql57 - elasticsearch7 + - frontend-app-publisher - memcached + - mysql57 # Allows attachment to the discovery service using 'docker attach '. stdin_open: true tty: true @@ -247,10 +248,11 @@ services: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.ecommerce" hostname: ecommerce.devstack.edx depends_on: - - mysql57 - - memcached - - lms - discovery + - frontend-app-payment + - lms + - memcached + - mysql57 # Allows attachment to the ecommerce service using 'docker attach '. stdin_open: true tty: true @@ -298,9 +300,9 @@ services: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.forum" hostname: forum.devstack.edx depends_on: - - mongo - - memcached - elasticsearch7 + - memcached + - mongo image: edxops/forum:${OPENEDX_RELEASE:-latest} stdin_open: true tty: true @@ -316,15 +318,17 @@ services: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.lms" hostname: lms.devstack.edx depends_on: + - chrome - devpi - - mysql57 - - memcached - - mongo - discovery - - forum - - firefox - - chrome - elasticsearch7 + - firefox + - forum + - frontend-app-gradebook + - frontend-app-learning + - memcached + - mongo + - mysql57 # Allows attachment to the LMS service using 'docker attach '. stdin_open: true tty: true @@ -355,6 +359,7 @@ services: hostname: registrar.devstack.edx depends_on: - discovery + - frontend-app-program-console - lms - mysql57 - memcached @@ -427,14 +432,17 @@ services: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.studio" hostname: studio.devstack.edx depends_on: + - chrome - devpi - - mysql57 - elasticsearch7 - - memcached - - mongo - firefox - - chrome + - frontend-app-course-authoring + - frontend-app-library-authoring + - frontend-app-publisher - lms + - memcached + - mongo + - mysql57 # Allows attachment to the Studio service using 'docker attach '. stdin_open: true tty: true @@ -459,6 +467,34 @@ services: volumes: - edxapp_studio_assets:/edx/var/edxapp/staticfiles/ + xqueue: + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue" + image: edxops/xqueue:${OPENEDX_RELEASE:-latest} + command: bash -c 'source /edx/app/xqueue/xqueue_env && while true; do python /edx/app/xqueue/xqueue/manage.py runserver 0.0.0.0:18040 ; sleep 2; done' + volumes: + - ${DEVSTACK_WORKSPACE}/xqueue:/edx/app/xqueue/xqueue:cached + depends_on: + - mysql57 + networks: + default: + aliases: + - edx.devstack.xqueue + ports: + - 18040:18040 + + xqueue_consumer: + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue_consumer" + image: edxops/xqueue:${OPENEDX_RELEASE:-latest} + command: bash -c 'source /edx/app/xqueue/xqueue_env && while true; do python /edx/app/xqueue/xqueue/manage.py run_consumer ; sleep 2; done' + volumes: + - ${DEVSTACK_WORKSPACE}/xqueue:/edx/app/xqueue/xqueue:cached + depends_on: + - mysql57 + networks: + default: + aliases: + - edx.devstack.xqueue_consumer + # ========================================================================== # edX Microfrontends # @@ -467,115 +503,100 @@ services: # for micro-frontends in devtack. # ========================================================================== - frontend-app-learning: + frontend-app-course-authoring: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/frontend-app-learning' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-learning" + working_dir: '/edx/app/frontend-app-course-authoring' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-course-authoring" networks: default: aliases: - - edx.devstack.frontend-app-learning + - edx.devstack.frontend-app-course-authoring ports: - - "2000:2000" - depends_on: - - lms + - "2001:2001" - frontend-app-payment: + frontend-app-gradebook: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/frontend-app-payment' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-payment" + working_dir: '/edx/app/frontend-app-gradebook' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-gradebook" networks: default: aliases: - - edx.devstack.frontend-app-payment + - edx.devstack.frontend-app-gradebook ports: - - "1998:1998" - depends_on: - - ecommerce + - "1994:1994" - frontend-app-publisher: + frontend-app-learning: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/frontend-app-publisher' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-publisher" + working_dir: '/edx/app/frontend-app-learning' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-learning" networks: default: aliases: - - edx.devstack.frontend-app-publisher + - edx.devstack.frontend-app-learning ports: - - "18400:18400" - depends_on: - - lms + - "2000:2000" - gradebook: + frontend-app-library-authoring: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/gradebook' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.gradebook" + working_dir: '/edx/app/frontend-app-library-authoring' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-library-authoring" networks: default: aliases: - - edx.devstack.gradebook + - edx.devstack.frontend-app-library-authoring ports: - - "1994:1994" - depends_on: - - lms + - "3001:3001" - program-console: + frontend-app-payment: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/program-console' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.program-console" + working_dir: '/edx/app/frontend-app-payment' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-payment" networks: default: aliases: - - edx.devstack.program-console + - edx.devstack.frontend-app-payment ports: - - "1976:1976" - depends_on: - - lms - - registrar + - "1998:1998" - course-authoring: + frontend-app-program-console: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/frontend-app-course-authoring' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.course-authoring" + working_dir: '/edx/app/frontend-app-program-console' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-program-console" networks: default: aliases: - - edx.devstack.course-authoring + - edx.devstack.frontend-app-program-console ports: - - "2001:2001" - depends_on: - - studio + - "1976:1976" - frontend-app-library-authoring: + frontend-app-publisher: extends: file: microfrontend.yml service: microfrontend - working_dir: '/edx/app/frontend-app-library-authoring' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-library-authoring" + working_dir: '/edx/app/frontend-app-publisher' + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.frontend-app-publisher" networks: default: aliases: - - edx.devstack.frontend-app-library-authoring + - edx.devstack.frontend-app-publisher ports: - - "3001:3001" - depends_on: - - lms - - studio + - "18400:18400" volumes: discovery_assets: + devpi_data: edxapp_lms_assets: edxapp_studio_assets: elasticsearch_data: @@ -584,4 +605,3 @@ volumes: mongo_data: mysql_data: mysql57_data: - devpi_data: diff --git a/docker-sync.yml b/docker-sync.yml index 790bba7cdc..7f4a32d924 100644 --- a/docker-sync.yml +++ b/docker-sync.yml @@ -35,31 +35,31 @@ syncs: src: '../registrar/' sync_excludes: [ '.git', '.idea' ] - gradebook-sync: + frontend-app-course-authoring-sync: host_disk_mount_mode: 'cached' - src: '../gradebook/' + src: '../frontend-app-course-authoring/' sync_excludes: [ '.git', '.idea' ] - program-console-sync: + frontend-app-gradebook-sync: host_disk_mount_mode: 'cached' - src: '../frontend-app-program-console/' + src: '../frontend-app-gradebook/' sync_excludes: [ '.git', '.idea' ] frontend-app-learning-sync: host_disk_mount_mode: 'cached' src: '../frontend-app-learning/' - course-authoring-sync: + frontend-app-library-authoring-sync: host_disk_mount_mode: 'cached' - src: '../frontend-app-course-authoring/' + src: '../frontend-app-library-authoring/' sync_excludes: [ '.git', '.idea' ] - source-sync: + frontend-app-program-console-sync: host_disk_mount_mode: 'cached' - src: '../src/' + src: '../frontend-app-program-console/' sync_excludes: [ '.git', '.idea' ] - frontend-app-library-authoring-sync: + source-sync: host_disk_mount_mode: 'cached' - src: '../frontend-app-library-authoring/' + src: '../src/' sync_excludes: [ '.git', '.idea' ] diff --git a/docs/decisions/0004-backends-depend-on-frontends.rst b/docs/decisions/0004-backends-depend-on-frontends.rst new file mode 100644 index 0000000000..90badba89f --- /dev/null +++ b/docs/decisions/0004-backends-depend-on-frontends.rst @@ -0,0 +1,60 @@ +4. Backend services now depend on frontend apps +----------------------------------------------- + +Status +====== + +Approved + + +Context +======= + +Micro-frontends as default experiences +************************************** + +As of mid June 2021 (between the Lilac and Maple releases), an Open edX instance with default configuration will now direct users to the Learning MFE (Micro-Frontend) for courseware, with a temporary opt-out flag existing to revert to legacy LMS-rendered frontend. Thus, to test a typical learner experience, Devstack users now require the frontend-app-learning container to be started alongside the LMS. This is in contrast to the previous state of affairs, in which MFE experiences were only available via an opt-IN flag, allowing reasonable Devstack usage without having to start any MFE containers. + +We anticipate that other learner, author, and administrator experiences will soon begin to use MFE features by default, requiring that more and more MFEs be started in order to simulate user experiences in Devstack. Thus, we anticipate an imminent developer experience issue, in which developers will need to type in convoluated commands like:: + + make dev.up.frontend-app-authn+frontend-app-discussions+frontend-app-gradebook+frontend-app-learning + + +in order to enable the feature set that was previously available using simply:: + + make dev.up.lms + + +Docker-compose service dependencies +*********************************** + +Devstack uses docker-compose to orchestrate containers by defining services in ``docker-compose.yml``. Note that "services" here encompasses backends, frontends, and generic resources like MySQL. + +Each service definition may indicate a list of depentent services using the ``depends_on`` key. Dependencies are transitive, and may not be cyclical. When a developer runs ``make dev.up.``, docker-compose is invoked in order to start both the service as well as its dependencies. For example, LMS depends on Mongo and Discovery, among other services. So, running ``make dev.up.lms`` will start not just LMS, but also Mongo, Discovery, all of Discovery's dependencies, and so on. + +Currently, micro-frontend services (those prefixed with ``frontend-app-``) are defined to depend on backends, but not vice versa. So, starting frontend-app-learning will automatically start LMS, but starting LMS will not automatically start frontend-app-learning. This makes sense under logic that "frontends depend on the APIs of backends in order to function". + +However, it can be argued that the opposite dependency relationship also makes sense. That is, one may assert that backends should depend on frontends in order to expose their APIs in a usable way. One could further assert that frontends shouldn't have hard dependencies on backend APIs, and should instead gracefully degrade when some or all of its APIs are unavailable. + + +Decision +======== + +Whichever dependency direction (frontends depend on backends, or vice versa) is more logically sound, we conclude that, for the purposes of Devstack, *asserting that backends depend on frontends is more useful to developers*. Specifically, it is beneficial to current and future developer workflows if ``make dev.up.lms`` automatically starts and learning-related frontends, ``make dev.up.studio`` automatically starts all authoring-related frontends, ``make dev.up.ecommerce`` starts all purchasing-related frontends, and so on. + +A necessary corollary to this decision is that *all micro-frontends required for default functionality must be included in devstack*. While it is encouraged that *all* new and existing micro-frontends are added to devstack using the pattern described above, it is absolutely necessary that MFEs which are required for out-of-the-box functionality be added to devstack. + +Consequences +============ + +* ``docker-compose.yml`` will be updated to reflect that backends services depend on frontend-app services, not the other way around. +* An email and Slack message will be sent out to explain this change and how we anticipate that it will impact developer workflows. +* A Community Engineering ticket will be submitted to address an issue ``webpack.config.js`` handling in Devstack, which is currently causing developers to run MFEs outside of Devstack. +* Arch-BOM will circulate a recommendation that squads add new and existing MFEs to Devstack, following the pattern established by the MFEs already in Devstack. + + +Rejected Alternatives +===================== + +* Keep the old dependency relationships, but add convenience targets (such as ``dev.up.domain.learning``) to start groups of related micro-frontends. We determine that this would increase the already-large congnitive overhead of the Devstack interface. +* Invert dependency relationships as described in this ADR, and also add targets such as ``make dev.up.lms-backend`` in order to start LMS without associated frontends. We determine that this would create a cascade of new inconsistencies in the Devstack interface: since only one of ``lms`` or ``lms-backend`` could exist as a docker-compose service, rules for the other would have to be hard-coded into the Makefile as special cases. diff --git a/docs/devstack_interface.rst b/docs/devstack_interface.rst index f5553faa68..88fdc4f165 100644 --- a/docs/devstack_interface.rst +++ b/docs/devstack_interface.rst @@ -15,8 +15,8 @@ Examples: make dev.shell.lms make lms-shell - make dev.logs.gradebook - make gradebook-logs + make dev.logs.frontend-app-gradebook + make frontend-app-gradebook-logs The user interface for devstack often also gives you both big hammers(``make dev.pull.large-and-slow``) and small hammers(``make dev.pull.``) to do things. It is recommend you opt for the small hammer commands, because they often tend to be alot faster. diff --git a/options.mk b/options.mk index 955d3a9fff..087dfbcf02 100644 --- a/options.mk +++ b/options.mk @@ -58,6 +58,8 @@ FS_SYNC_STRATEGY ?= local-mounts # Services that are to be pulled, provisioned, run, and checked by default # when no services are specified manually. # Should be a subset of $(EDX_SERVICES). +# frontend-apps are not included here, but several of them are dependencies of default +# services. # Separated by plus signs. Listed in alphabetical order for clarity. # WARNING: You may remove services from this list in order to make Devstack lighter, # but beware that some services have implicit, undocumented dependencies on @@ -68,13 +70,13 @@ FS_SYNC_STRATEGY ?= local-mounts # The current value was chosen such that it would not change the existing # Devstack behavior. DEFAULT_SERVICES ?= \ -credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-payment+frontend-app-publisher+frontend-app-learning+gradebook+lms+studio +credentials+discovery+ecommerce+edx_notes_api+forum+lms+studio # All edX services, whether or not they are run by default. # Separated by plus signs. # Separated by plus signs. Listed in alphabetical order for clarity. EDX_SERVICES ?= \ -course-authoring+credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-learning+frontend-app-library-authoring+frontend-app-payment+frontend-app-publisher+gradebook+lms+lms_watcher+program-console+registrar+registrar-worker+studio+studio_watcher+xqueue+xqueue_consumer +credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-course-authoring+frontend-app-gradebook+frontend-app-learning+frontend-app-library-authoring+frontend-app-payment+frontend-app-program-console+frontend-app-publisher+lms+lms_watcher+registrar+registrar-worker+studio+studio_watcher+xqueue+xqueue_consumer # Services with database migrations. # Should be a subset of $(EDX_SERVICES).