diff --git a/Makefile b/Makefile index ab342031f2..3bec786162 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # and SERVICES is a plus-sign-separated list of services. # Examples: # make dev.attach.credentials -# make dev.pull.registrar+studio +# make dev.pull.registrar+cms # make dev.up.lms # make dev.up.without-deps.lms+forum+discovery+mysql57+elasticsearch+memcached # make dev.restart-container.mysql57+lms @@ -45,15 +45,15 @@ create-test-course dev.attach dev.backup dev.cache-programs dev.check \ dev.check-memory dev.checkout dev.clone dev.clone.https dev.clone.ssh \ dev.dbshell dev.destroy dev.down dev.drop-db dev.kill dev.logs \ - dev.migrate dev.migrate.lms dev.migrate.studio \ + dev.migrate dev.migrate.lms dev.migrate.cms \ devpi-password dev.provision dev.ps dev.pull dev.pull.without-deps \ dev.reset dev.reset-repos dev.restart-container dev.restart-devserver \ dev.restart-devserver.forum dev.restore dev.rm-stopped dev.shell \ dev.shell.credentials dev.shell.discovery \ dev.shell.ecommerce dev.shell.lms dev.shell.lms_watcher \ - dev.shell.registrar dev.shell.studio \ - dev.shell.studio_watcher dev.shell.xqueue dev.shell.xqueue_consumer \ - dev.static dev.static.lms dev.static.studio dev.stats dev.status \ + dev.shell.registrar dev.shell.cms \ + dev.shell.cms_watcher dev.shell.xqueue dev.shell.xqueue_consumer \ + dev.static dev.static.lms dev.static.cms dev.stats dev.status \ dev.stop dev.up dev.up.attach dev.up.shell \ dev.up.without-deps dev.up.without-deps.shell dev.up.with-programs \ dev.up.with-watchers dev.validate docs \ @@ -254,9 +254,9 @@ $(foreach db_service,$(DB_SERVICES_LIST),\ dev.migrate: | $(_db_migration_targets) ## Run migrations for applicable default services. -dev.migrate.studio: - docker-compose exec -T -u root studio bash -e -c '/edx/app/edxapp/venvs/edxapp/bin/python manage.py cms showmigrations --database default --traceback --pythonpath=. --settings devstack_docker' - docker-compose exec -T -u root studio bash -e -c '/edx/app/edxapp/venvs/edxapp/bin/python manage.py cms migrate --database default --noinput --traceback --pythonpath=. --settings devstack_docker' +dev.migrate.cms: + docker-compose exec -T -u root cms bash -e -c '/edx/app/edxapp/venvs/edxapp/bin/python manage.py cms showmigrations --database default --traceback --pythonpath=. --settings devstack_docker' + docker-compose exec -T -u root cms bash -e -c '/edx/app/edxapp/venvs/edxapp/bin/python manage.py cms migrate --database default --noinput --traceback --pythonpath=. --settings devstack_docker' dev.migrate.lms: docker-compose exec -T -u root lms bash -e -c '/edx/app/edxapp/venvs/edxapp/bin/python manage.py lms showmigrations --database default --traceback --pythonpath=. --settings devstack_docker' @@ -293,11 +293,11 @@ dev.up.with-programs: dev.up dev.cache-programs ## Bring up default services + c dev.up.with-programs.%: dev.up.$* dev.cache-programs ## Bring up services and their dependencies + cache programs in LMS. -dev.up.with-watchers: dev.up.$(DEFAULT_SERVICES)+lms_watcher+studio_watcher ## Bring up default services + asset watcher containers. +dev.up.with-watchers: dev.up.$(DEFAULT_SERVICES)+lms_watcher+cms_watcher ## Bring up default services + asset watcher containers. dev.up.with-watchers.%: ## Bring up services and their dependencies + asset watcher containers. make dev.up.$* - make dev.up.lms_watcher+studio_watcher + make dev.up.lms_watcher+cms_watcher dev.up.without-deps: _expects-service-list.dev.up.without-deps @@ -442,11 +442,11 @@ dev.shell.lms: dev.shell.lms_watcher: docker-compose exec lms_watcher env TERM=$(TERM) bash -c '/bin/bash' -dev.shell.studio: - docker-compose exec studio env TERM=$(TERM) bash -c '/bin/bash' +dev.shell.cms: + docker-compose exec cms env TERM=$(TERM) bash -c '/bin/bash' -dev.shell.studio_watcher: - docker-compose exec studio_watcher env TERM=$(TERM) bash -c '/bin/bash' +dev.shell.cms_watcher: + docker-compose exec cms_watcher env TERM=$(TERM) bash -c '/bin/bash' dev.shell.xqueue_consumer: docker-compose exec xqueue_consumer env TERM=$(TERM) /bin/bash @@ -479,8 +479,8 @@ dev.static: | $(_asset_compilation_targets) dev.static.lms: docker-compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets lms' -dev.static.studio: - docker-compose exec -T studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets studio' +dev.static.cms: + docker-compose exec -T cms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets cms' dev.static.%: ## Rebuild static assets for the specified service's container. docker-compose exec -T $* bash -c 'source /edx/app/$*/$*_env && cd /edx/app/$*/$*/ && make static' @@ -574,7 +574,7 @@ _expects-service-list.%: @echo "For example:" @echo " make $*.lms" @echo "Or:" - @echo " make $*.registrar+ecommerce+studio" + @echo " make $*.registrar+ecommerce+cms" _expects-database.%: @echo "'make $*' on its own has no effect." @@ -617,11 +617,11 @@ devpi-password: ## Get the root devpi password for the devpi container. hadoop-application-logs-%: ## View hadoop logs by application Id. docker-compose exec nodemanager yarn logs -applicationId $* -create-test-course: ## Provisions studio, and ecommerce with course(s) in test-course.json. - $(WINPTY) bash ./course-generator/create-courses.sh --studio --ecommerce course-generator/test-course.json +create-test-course: ## Provisions cms, and ecommerce with course(s) in test-course.json. + $(WINPTY) bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/test-course.json -build-courses: ## Build course and provision studio, and ecommerce with it. +build-courses: ## Build course and provision cms, and ecommerce with it. # Modify test-course.json before running this make target to generate a custom course $(WINPTY) bash ./course-generator/build-course-json.sh course-generator/tmp-config.json - $(WINPTY) bash ./course-generator/create-courses.sh --studio --ecommerce course-generator/tmp-config.json + $(WINPTY) bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/tmp-config.json rm course-generator/tmp-config.json diff --git a/check.sh b/check.sh index 8afcb1a076..0113cb6263 100755 --- a/check.sh +++ b/check.sh @@ -64,8 +64,8 @@ if should_check lms; then run_check lms_heartbeat lms \ "curl --fail -L http://localhost:18000/heartbeat" - echo "Checking Studio heartbeat:" - run_check studio_heartbeat lms \ + echo "Checking CMS heartbeat:" + run_check cms_heartbeat lms \ "curl --fail -L http://localhost:18010/heartbeat" echo "Validating LMS volume:" diff --git a/compatibility.mk b/compatibility.mk index cbe2093cc2..1de8df832b 100644 --- a/compatibility.mk +++ b/compatibility.mk @@ -17,8 +17,8 @@ healthchecks lms-restart \ lms-watcher-shell logs provision pull \ pull.xqueue restore static stats stop stop.all \ - stop.watchers stop.xqueue studio-restart \ - studio-watcher-shell validate \ + stop.watchers stop.xqueue cms-restart \ + cms-watcher-shell validate \ xqueue_consumer-restart xqueue-restart ##################################################################### @@ -53,7 +53,7 @@ dev.repo.reset: dev.reset-repos dev.up.all: dev.up.with-watchers -dev.up.watchers: dev.up.lms_watcher+studio_watcher +dev.up.watchers: dev.up.lms_watcher+cms_watcher down: dev.down @@ -81,13 +81,13 @@ stop.all: dev.stop stop: dev.stop -stop.watchers: dev.stop.lms_watcher+studio_watcher +stop.watchers: dev.stop.lms_watcher+cms_watcher stop.xqueue: dev.stop.xqueue+xqueue_consumer -studio-restart: dev.restart-devserver.studio +cms-restart: dev.restart-devserver.cms -studio-watcher-shell: dev.shell.studio_watcher +cms-watcher-shell: dev.shell.cms_watcher validate: dev.validate diff --git a/course-generator/create-courses.sh b/course-generator/create-courses.sh index b71d660dcf..861ce50d27 100755 --- a/course-generator/create-courses.sh +++ b/course-generator/create-courses.sh @@ -1,17 +1,17 @@ #!/usr/bin/env bash -# Script that provisions studio, and ecommerce with courses -# USAGE: ./create-courses [--studio] [--ecommerce] course-config.json -studio=false +# Script that provisions cms, and ecommerce with courses +# USAGE: ./create-courses [--cms] [--ecommerce] course-config.json +cms=false ecommerce=false echo "Parsing options" container_error=false for arg in "$@"; do - if [ $arg == "--studio" ]; then - if [ ! "$(docker-compose exec lms bash -c 'echo "Course will be created for studio"; exit $?')" ]; then - echo "Issue with studio container" + if [ $arg == "--cms" ]; then + if [ ! "$(docker-compose exec lms bash -c 'echo "Course will be created for cms"; exit $?')" ]; then + echo "Issue with cms container" container_error=true else - studio=true + cms=true fi elif [ $arg == "--ecommerce" ]; then if [ ! "$(docker-compose exec ecommerce bash -c 'echo "Course will be created for ecommerce"; exit $?')" ]; then @@ -40,8 +40,8 @@ while IFS='' read -r line || [[ -n "$line" ]]; do course_json=$course_json${line/"\"number\": null"/"\"number\": \""$RANDOM"\""} done < "${@: -1}" -if $studio ; then - echo "Creating courses on studio." +if $cms ; then + echo "Creating courses on cms." docker-compose exec lms bash -c "source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py cms --settings=devstack_docker generate_courses '$course_json'" fi diff --git a/docker-compose-host.yml b/docker-compose-host.yml index f91abf43ff..ca09f22c5b 100644 --- a/docker-compose-host.yml +++ b/docker-compose-host.yml @@ -41,7 +41,7 @@ services: registrar-worker: volumes: - ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar - studio: + cms: volumes: - ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform - edxapp_media:/edx/var/edxapp/media diff --git a/docker-compose-themes.yml b/docker-compose-themes.yml index 94de501d94..b377f45c40 100644 --- a/docker-compose-themes.yml +++ b/docker-compose-themes.yml @@ -10,6 +10,6 @@ services: lms: volumes: - ${DEVSTACK_WORKSPACE}/edx-themes:/edx/app/edx-themes - studio: + cms: volumes: - ${DEVSTACK_WORKSPACE}/edx-themes:/edx/app/edx-themes diff --git a/docker-compose-watchers.yml b/docker-compose-watchers.yml index e65bdf7cdd..0a9da2a88c 100644 --- a/docker-compose-watchers.yml +++ b/docker-compose-watchers.yml @@ -19,15 +19,15 @@ services: aliases: - edx.devstack.lms_watcher - studio_watcher: + cms_watcher: command: bash -c 'cd /edx/app/edxapp/edx-platform && source ../edxapp_env && while true; do paver watch_assets --w=$$ASSET_WATCHER_TIMEOUT; sleep 2; done' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.studio_watcher" + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.cms_watcher" environment: - BOK_CHOY_HOSTNAME: edx.devstack.studio_watcher + BOK_CHOY_HOSTNAME: edx.devstack.cms_watcher ASSET_WATCHER_TIMEOUT: 12 image: openedx/lms-dev:${OPENEDX_RELEASE:-latest} volumes: - - edxapp_studio_assets:/edx/var/edxapp/staticfiles/ + - edxapp_cms_assets:/edx/var/edxapp/staticfiles/ - ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform - edxapp_node_modules:/edx/app/edxapp/edx-platform/node_modules - ${DEVSTACK_WORKSPACE}/src:/edx/src @@ -35,9 +35,9 @@ services: networks: default: aliases: - - edx.devstack.studio_watcher + - edx.devstack.cms_watcher volumes: edxapp_lms_assets: - edxapp_studio_assets: + edxapp_cms_assets: edxapp_node_modules: diff --git a/docker-compose.yml b/docker-compose.yml index 88af8dfbed..6bb61e2cb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -656,10 +656,10 @@ services: volumes: - /edx/var/registrar/ - studio: + cms: command: bash -c 'source /edx/app/edxapp/edxapp_env && while true; do python /edx/app/edxapp/edx-platform/manage.py cms runserver 0.0.0.0:18010 --settings devstack_docker; sleep 2; done' - container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.studio" - hostname: studio.devstack.edx + container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.cms" + hostname: cms.devstack.edx depends_on: - devpi - elasticsearch710 @@ -667,11 +667,11 @@ services: - memcached - mongo - mysql57 - # Allows attachment to the Studio service using 'docker attach '. + # Allows attachment to the CMS service using 'docker attach '. stdin_open: true tty: true environment: - BOK_CHOY_HOSTNAME: edx.devstack.studio + BOK_CHOY_HOSTNAME: edx.devstack.cms BOK_CHOY_LMS_PORT: 18103 BOK_CHOY_CMS_PORT: 18131 EDXAPP_TEST_MONGO_HOST: edx.devstack.mongo @@ -686,15 +686,15 @@ services: networks: default: aliases: - - edx.devstack.studio - - studio.devstack.edx + - edx.devstack.cms + - cms.devstack.edx ports: - "18010:18010" - "19877:19877" # JS test debugging # - "18103:18103" # - "18131:18131" volumes: - - edxapp_studio_assets:/edx/var/edxapp/staticfiles/ + - edxapp_cms_assets:/edx/var/edxapp/staticfiles/ xqueue: container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue" @@ -796,7 +796,7 @@ services: ports: - "2001:2001" depends_on: - - studio + - cms frontend-app-gradebook: extends: @@ -857,7 +857,7 @@ services: - "3001:3001" depends_on: - lms - - studio + - cms frontend-app-payment: extends: @@ -910,7 +910,7 @@ volumes: discovery_assets: devpi_data: edxapp_lms_assets: - edxapp_studio_assets: + edxapp_cms_assets: elasticsearch_data: elasticsearch7_data: elasticsearch710_data: diff --git a/docs/decisions/0001-avoid-default-service-set.rst b/docs/decisions/0001-avoid-default-service-set.rst index 23f38e9d37..6b8721785f 100644 --- a/docs/decisions/0001-avoid-default-service-set.rst +++ b/docs/decisions/0001-avoid-default-service-set.rst @@ -9,7 +9,7 @@ Approved Context ------- -Commands like ``make dev.pull`` and ``make dev.up`` operate by default on a large subset of the services that devstack supports (via overridable variable ``DEFAULT_SERVICES``). There are also variants such as ``make dev.up.studio+credentials`` which will operate on a more constrained subset. However, many developers are not aware of these variants or are not in the habit of using them. By not constraining the command to selected services, developers pull down Docker images that they do not need for their current workflow, or find that devstack is using more memory and CPU than needed due to running unnecessary services. These issues have been repeatedly observed in supporting fellow edX devs in internal communications, and are likely an issue in the community as well. We also see people run into bugs in unrelated services, distracting them from their main task. +Commands like ``make dev.pull`` and ``make dev.up`` operate by default on a large subset of the services that devstack supports (via overridable variable ``DEFAULT_SERVICES``). There are also variants such as ``make dev.up.cms+credentials`` which will operate on a more constrained subset. However, many developers are not aware of these variants or are not in the habit of using them. By not constraining the command to selected services, developers pull down Docker images that they do not need for their current workflow, or find that devstack is using more memory and CPU than needed due to running unnecessary services. These issues have been repeatedly observed in supporting fellow edX devs in internal communications, and are likely an issue in the community as well. We also see people run into bugs in unrelated services, distracting them from their main task. Several people and teams have made efforts to improve the documentation and offer these better-scoped commands, but we still see complaints about memory, CPU, and network usage that can be solved by avoiding the default set. diff --git a/docs/decisions/0004-backends-depend-on-frontends.rst b/docs/decisions/0004-backends-depend-on-frontends.rst index 86fb3855e3..9e8a7b613d 100644 --- a/docs/decisions/0004-backends-depend-on-frontends.rst +++ b/docs/decisions/0004-backends-depend-on-frontends.rst @@ -47,7 +47,7 @@ However, it can be argued that the opposite dependency relationship also makes s 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. +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.cms`` 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. diff --git a/docs/devpi.rst b/docs/devpi.rst index 6e7d61101b..4d0f69d631 100644 --- a/docs/devpi.rst +++ b/docs/devpi.rst @@ -9,7 +9,7 @@ could not be done while offline due to not being able to contact PyPI. To help speed up those tasks and bring us close to being able to use Devstack entirely offline we have introduced a devpi PyPI cache container to Devstack. Currently it is only configured as a package cache for LMS -and Studio, but the hope is to expand its use to the other Devstack +and CMS, but the hope is to expand its use to the other Devstack applications and to move to a state where it comes pre-populated with the requirements of all Devstack applications. @@ -28,7 +28,7 @@ https://www.devpi.net/ What is cached? --------------- -devpi will cache anything that LMS or Studio pull from PyPI via pip, +devpi will cache anything that LMS or CMS pull from PyPI via pip, including things from the various requirements files. It will not cache requirements given as URLs (ex. ``git+https`` style links) or local packages (ex. ``-e common/lib/calc``). When these types of packages are @@ -52,7 +52,7 @@ Disabling devpi --------------- To temporarily remove devpi caching from an edxapp container, start a -shell (``dev.shell.lms`` or ``dev.shell.studio``) and move or delete +shell (``dev.shell.lms`` or ``dev.shell.cms``) and move or delete ``/root/.pip/pip.conf``. This will be undone on the next container restart unless the container state is persisted. diff --git a/docs/devstack_faq.rst b/docs/devstack_faq.rst index b4cb2f1f92..13ecd9fd9c 100644 --- a/docs/devstack_faq.rst +++ b/docs/devstack_faq.rst @@ -62,7 +62,7 @@ starts, you have a few options: for more information. * You can temporarily modify the main service command in ``docker-compose.yml`` to first install your new package(s) each time the - container is started. For example, the part of the studio command which + container is started. For example, the part of the cms command which reads ``...&& while true; do...`` could be changed to ``...&& pip install my-new-package && while true; do...``. * In order to work on locally pip-installed repos like edx-ora2, first clone @@ -178,8 +178,8 @@ To run Django migrations for a particular service, bring up the service and use .. code:: sh - make dev.up.studio - make dev.migrate.studio + make dev.up.cms + make dev.migrate.cms To run migrations for all services at once, run: @@ -231,11 +231,11 @@ For LMS, log into the LMS shell and run the make dev.shell.lms ./manage.py lms makemigrations --settings=devstack_docker -For Studio, it is similar: +For CMS, it is similar: .. code:: sh - make dev.shell.studio + make dev.shell.cms ./manage.py cms makemigrations --settings=devstack_docker Finally, for any other service, run: @@ -266,31 +266,31 @@ in order to recreate up-to-date databases, static assets, etc. If making a patch to a named release, you should pull and use Docker images which were tagged for that release. -Changing LMS/Studio settings +Changing LMS/CMS settings ---------------------------- -LMS and Studio (a.k.a. CMS) read many configuration settings from the container filesystem +LMS and CMS read many configuration settings from the container filesystem in the following locations: - ``/edx/etc/lms.yml`` -- ``/edx/etc/studio.yml`` +- ``/edx/etc/cms.yml`` Changes to these files will *not* persist over a container restart, as they are part of the layered container filesystem and not a mounted volume. However, you -may need to change these settings and then have the LMS or Studio pick up the changes. +may need to change these settings and then have the LMS or CMS pick up the changes. -After changing settings, you can restart the LMS/Studio process without restarting the container by running the following on your host machine: +After changing settings, you can restart the LMS/CMS process without restarting the container by running the following on your host machine: .. code:: sh make dev.restart-devserver.lms # For LMS - make dev.restart-devserver.studio # For Studio/CMS + make dev.restart-devserver.cms # For CMS What is DevPI and how does it affect Devstack? ---------------------------------------------- -LMS and Studio use a devpi container to cache PyPI dependencies, which speeds up several Devstack operations. +LMS and CMS use a devpi container to cache PyPI dependencies, which speeds up several Devstack operations. See the `devpi documentation`_. .. _edxops Docker image: https://hub.docker.com/r/edxops/ diff --git a/docs/pycharm_integration.rst b/docs/pycharm_integration.rst index 93a53eb560..ffabbef0f0 100644 --- a/docs/pycharm_integration.rst +++ b/docs/pycharm_integration.rst @@ -63,13 +63,13 @@ use the following options: - ``/edx/app/ecommerce/venvs/ecommerce/bin/python`` - Note: The Credentials Service might not have a virtualenv set up in the container. - - For either lms or studio, you need to use edxapp: + - For either lms or cms, you need to use edxapp: - ``/edx/app/edxapp/venvs/edxapp/bin/python`` - PyCharm helpers path: Keep the default. -**Note**: For lms and studio (edx-platform), it will take a long time to +**Note**: For lms and cms (edx-platform), it will take a long time to update skeletons (10 or more minutes). If you want to try a different set of configuration (compose) files, we recommend you create a new one so you can easily switch back to old without this delay. @@ -83,7 +83,7 @@ Setup Django Support -------------------- Before setting up a Server/Debug configuration you will need to setup Django -Support for the specific Project (e.g. LMS and Studio, or ecommerce) +Support for the specific Project (e.g. LMS and CMS, or ecommerce) PyCharm -> Preferences -> Languages & Frameworks -> Django @@ -113,7 +113,7 @@ Setup a Server Run/Debug Configuration The setup for Server Run/Debug Configurations depends on the service. -Server Run/Debug Configuration for an IDA (not LMS or Studio) +Server Run/Debug Configuration for an IDA (not LMS or CMS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ After configuring the interpreter, add a new `Django Server Run/Debug @@ -124,7 +124,7 @@ requests from external clients (e.g. your Docker host). The port should be set to the service-specific port from the table above. *Note*: See next section for additional changes needed for LMS and -Studio. +CMS. Setup a Server Run/Debug Configuration for ecommerce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -139,10 +139,10 @@ defined on the ecommerce server in /edx/app/ecommerce/ecommerce_env export DJANGO_SETTINGS_MODULE="ecommerce.settings.devstack" -Setup a Server Run/Debug Configuration for LMS or Studio +Setup a Server Run/Debug Configuration for LMS or CMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For LMS and Studio, the setup is a hack because we (unfortunately) +For LMS and CMS, the setup is a hack because we (unfortunately) modified ``manage.py``. After configuring the interpreter, add a new `Django Server Run/Debug @@ -155,7 +155,7 @@ Configuration`_, with the following specific values. 3. Custom run command: lms (or cms) -4. Environment variables, add the following for lms/studio: +4. Environment variables, add the following for lms/cms: - ``DJANGO_SETTINGS_MODULE=lms.envs.devstack_docker`` (or cms.envs.devstack_docker) @@ -209,7 +209,7 @@ service. **Tip**: You can adjust the default configuration with settings you are most likely to replicate. -Setup a Run/Debug Configuration for python tests for an IDA (not LMS or Studio) +Setup a Run/Debug Configuration for python tests for an IDA (not LMS or CMS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To run and debug unit tests, create a **"Django tests"** type Run/Dubug @@ -232,7 +232,7 @@ configuration with the following options: 5. Deselect "Add content..." and "Add source..." -Setup a Run/Debug Configuration for python tests for LMS or Studio +Setup a Run/Debug Configuration for python tests for LMS or CMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To run and debug unit tests, edit the **"Defaults -> Python tests -> py.test"** type Run/Dubug @@ -300,7 +300,7 @@ This issue has been fixed in PyCharm 2017.1.2. Cannot open the manage.py file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The error happens when you try to run a stack (lms or studio for example):: +The error happens when you try to run a stack (lms or cms for example):: Attaching to edx.devstack.lms edx.devstack.lms | /edx/app/edxapp/venvs/edxapp/bin/python: can't open file '/edx/app/edxapp/edx-platform/manage.py': [Errno 2] No such file or directory diff --git a/docs/service_list.rst b/docs/service_list.rst index fa63f07b9a..8dd2cccf4e 100644 --- a/docs/service_list.rst +++ b/docs/service_list.rst @@ -6,7 +6,7 @@ Each service is accessible at ``localhost`` on a specific port. The table below provides links to the homepage, API root, or API docs of each service, as well as links to the repository where each service's code lives. -Most developers will be best served by working with specific combinations of these services, for example ``make dev.pull.studio`` or ``make dev.up.ecommerce``. These will pull in dependencies as needed—starting ecommerce will also start lms, and lms will pull in forums, discovery, and others. If you need multiple, they can be listed like ``make dev.up.studio+ecommerce``. After the service table below there is a list of some common combinations. +Most developers will be best served by working with specific combinations of these services, for example ``make dev.pull.cms`` or ``make dev.up.ecommerce``. These will pull in dependencies as needed—starting ecommerce will also start lms, and lms will pull in forums, discovery, and others. If you need multiple, they can be listed like ``make dev.up.cms+ecommerce``. After the service table below there is a list of some common combinations. Instead of a service name or list, you can also run commands like ``make dev.provision`` / ``make dev.pull.large-and-slow`` / ``make dev.up.large-and-slow``. This is a larger list than most people will need for most of their work, and includes all of the services marked "Default" in the below table. (Some of these targets use ``large-and-slow`` in their name as a warning; others may be changed to use this over time.) However, you can change this list by modifying the ``DEFAULT_SERVICES`` option as described in :doc:`advanced_configuration`. @@ -15,7 +15,7 @@ Instead of a service name or list, you can also run commands like ``make dev.pro +====================================+=====================================+================+==============+ | `lms`_ | http://localhost:18000/ | Python/Django | Default | +------------------------------------+-------------------------------------+----------------+--------------+ -| `studio`_ | http://localhost:18010/ | Python/Django | Default | +| `cms`_ | http://localhost:18010/ | Python/Django | Default | +------------------------------------+-------------------------------------+----------------+--------------+ | `forum`_ | http://localhost:44567/api/v1/ | Ruby/Sinatra | Default | +------------------------------------+-------------------------------------+----------------+--------------+ @@ -64,7 +64,7 @@ Some common service combinations include: * ``lms``: LMS, along with dependencies ``forum``, ``discovery``, ``Authn`` and some databases * ``ecommerce``: Ecommerce, but also LMS as a dependency (for auth) -* ``studio+credentials``: Services can be combined to affect both at once +* ``cms+credentials``: Services can be combined to affect both at once .. _credentials: https://github.com/openedx/credentials .. _discovery: https://github.com/openedx/course-discovery @@ -77,8 +77,7 @@ Some common service combinations include: .. _lms: https://github.com/openedx/edx-platform .. _frontend-app-program-console: https://github.com/openedx/frontend-app-program-console .. _registrar: https://github.com/openedx/registrar -.. _studio: https://github.com/openedx/edx-platform -.. _lms: https://github.com/openedx/edx-platform +.. _cms: https://github.com/openedx/edx-platform .. _frontend-app-learning: https://github.com/openedx/frontend-app-learning .. _frontend-app-library-authoring: https://github.com/openedx/frontend-app-library-authoring .. _frontend-app-course-authoring: https://github.com/openedx/frontend-app-course-authoring diff --git a/docs/testing_and_debugging.rst b/docs/testing_and_debugging.rst index 5e0118486c..85ab10089d 100644 --- a/docs/testing_and_debugging.rst +++ b/docs/testing_and_debugging.rst @@ -45,11 +45,11 @@ You can bring that same service back up with: make dev.up. -Running LMS and Studio Tests +Running LMS and CMS Tests ---------------------------- After entering a shell for the appropriate service via ``make lms-shell`` or -``make studio-shell``, you can run any of the usual paver commands from the +``make cms-shell``, you can run any of the usual paver commands from the `edx-platform testing documentation`_. Examples: .. code:: sh diff --git a/docs/troubleshoot_general_tips.rst b/docs/troubleshoot_general_tips.rst index 00e2e53768..88ee4ee2b9 100644 --- a/docs/troubleshoot_general_tips.rst +++ b/docs/troubleshoot_general_tips.rst @@ -201,7 +201,7 @@ erratically. Missing module -------------- -Occasionally, you'll get errors like 'Cannot import name Name from module xyz'. This usually happens because the code and the image are out of sync. To fix this, first make sure you have the latest images and the latest code. These instructions are written using the LMS as an example. Replace lms with studio, credentials, discovery, etc. as appropriate. +Occasionally, you'll get errors like 'Cannot import name Name from module xyz'. This usually happens because the code and the image are out of sync. To fix this, first make sure you have the latest images and the latest code. These instructions are written using the LMS as an example. Replace lms with cms, credentials, discovery, etc. as appropriate. #. Run ``make dev.stop.lms`` from devstack #. To update your image, you can run ``make dev.pull.lms`` from devstack. diff --git a/docs/workflow.rst b/docs/workflow.rst index d8b27e3209..00eefdf808 100644 --- a/docs/workflow.rst +++ b/docs/workflow.rst @@ -3,7 +3,7 @@ Workflow Here's a common workflow you might use in devstack for feature development or debugging in an IDA. -These instructions are written using the LMS as an example. Replace ``lms`` with ``studio``, ``credentials``, ``discovery``, etc. as appropriate. +These instructions are written using the LMS as an example. Replace ``lms`` with ``cms``, ``credentials``, ``discovery``, etc. as appropriate. #. Get your IDA's repo ready for development. @@ -40,9 +40,9 @@ Variations Multiple services ~~~~~~~~~~~~~~~~~ -If you're working on multiple services at a time, you can use Make targets of a different form that take a list of services. For example, if you want to pull images for ``lms``, ``studio``, and ``credentials``, you can run ``make dev.pull.lms+studio+credentials``. This will pull down images for the three services, as well as for all of their runtime dependencies. +If you're working on multiple services at a time, you can use Make targets of a different form that take a list of services. For example, if you want to pull images for ``lms``, ``cms``, and ``credentials``, you can run ``make dev.pull.lms+cms+credentials``. This will pull down images for the three services, as well as for all of their runtime dependencies. -You can also use the more tab-completion-friendly commands separately: ``make lms-pull studio-pull credentials-pull``. +You can also use the more tab-completion-friendly commands separately: ``make lms-pull cms-pull credentials-pull``. Time-savers ~~~~~~~~~~~ diff --git a/options.mk b/options.mk index dc2b453001..95deff2b7a 100644 --- a/options.mk +++ b/options.mk @@ -61,13 +61,13 @@ ALWAYS_CACHE_PROGRAMS ?= false # 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-authn+frontend-app-gradebook+frontend-app-payment+frontend-app-publisher+frontend-app-learning+lms+studio +credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-authn+frontend-app-gradebook+frontend-app-payment+frontend-app-publisher+frontend-app-learning+lms+cms # 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 ?= \ -analyticsapi+credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-account+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_watcher+registrar+registrar-worker+studio+studio_watcher+xqueue+xqueue_consumer +analyticsapi+credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-account+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_watcher+registrar+registrar-worker+cms+cms_watcher+xqueue+xqueue_consumer # Services with database migrations. # Should be a subset of $(EDX_SERVICES). @@ -76,7 +76,7 @@ analyticsapi+credentials+discovery+ecommerce+edx_notes_api+forum+frontend-app-ac # Note: This list should contain _all_ db-backed services, even if not # configured to run; the list will be filtered later against $(DEFAULT_SERVICES). DB_SERVICES ?= \ -credentials+discovery+ecommerce+lms+registrar+studio +credentials+discovery+ecommerce+lms+registrar+cms # Services with static assets to be built. # Should be a subset of $(EDX_SERVICES). @@ -85,7 +85,7 @@ credentials+discovery+ecommerce+lms+registrar+studio # Note: This list should contain _all_ services with static asse to compile ts, even if not # configured to run; the list will be filtered later against $(DEFAULT_SERVICES). ASSET_SERVICES ?= \ -credentials+discovery+ecommerce+insights+lms+registrar+studio +credentials+discovery+ecommerce+insights+lms+registrar+cms # All third-party services. # Separated by plus signs. Listed in alphabetical order for clarity. diff --git a/provision-coursegraph.sh b/provision-coursegraph.sh index c10cf712cf..4bbc5d0602 100755 --- a/provision-coursegraph.sh +++ b/provision-coursegraph.sh @@ -13,10 +13,10 @@ docker-compose rm --force --stop coursegraph docker-compose pull coursegraph echo -e "${GREEN} Starting Coursegraph and CMS...${NC}" -docker-compose up -d coursegraph studio +docker-compose up -d coursegraph cms sleep 10 # Give Neo4j some time to boot up. echo -e "${GREEN} Updating CMS courses in Coursegraph...${NC}" -docker-compose exec studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && ./manage.py cms dump_to_neo4j --host coursegraph.devstack.edx --user neo4j --password edx' +docker-compose exec cms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && ./manage.py cms dump_to_neo4j --host coursegraph.devstack.edx --user neo4j --password edx' echo -e "${GREEN} Coursegraph is now up-to-date with CMS!${NC}" diff --git a/provision-discovery.sh b/provision-discovery.sh index f34606f025..04f959d619 100755 --- a/provision-discovery.sh +++ b/provision-discovery.sh @@ -4,14 +4,14 @@ set -eu -o pipefail set -x docker-compose up -d lms -docker-compose up -d studio +docker-compose up -d cms docker-compose up -d ecommerce sleep 5 # Give above services some time to boot up ./provision-ida.sh discovery discovery 18381 docker-compose exec -T discovery bash -e -c 'rm -rf /edx/var/discovery/*' -docker-compose exec -T discovery bash -e -c 'source /edx/app/discovery/discovery_env && python /edx/app/discovery/discovery/manage.py create_or_update_partner --site-id 1 --site-domain localhost:18381 --code edx --name edX --courses-api-url "http://edx.devstack.lms:18000/api/courses/v1/" --lms-coursemode-api-url "http://edx.devstack.lms:18000/api/course_modes/v1/" --ecommerce-api-url "http://edx.devstack.ecommerce:18130/api/v2/" --organizations-api-url "http://edx.devstack.lms:18000/api/organizations/v0/" --lms-url "http://edx.devstack.lms:18000/" --studio-url "http://edx.devstack.studio:18010/" --publisher-url "http://edx.devstack.frontend-app-publisher:18400/"' +docker-compose exec -T discovery bash -e -c 'source /edx/app/discovery/discovery_env && python /edx/app/discovery/discovery/manage.py create_or_update_partner --site-id 1 --site-domain localhost:18381 --code edx --name edX --courses-api-url "http://edx.devstack.lms:18000/api/courses/v1/" --lms-coursemode-api-url "http://edx.devstack.lms:18000/api/course_modes/v1/" --ecommerce-api-url "http://edx.devstack.ecommerce:18130/api/v2/" --organizations-api-url "http://edx.devstack.lms:18000/api/organizations/v0/" --lms-url "http://edx.devstack.lms:18000/" --studio-url "http://edx.devstack.cms:18010/" --publisher-url "http://edx.devstack.frontend-app-publisher:18400/"' set +e # FIXME[bash-e]: Bash scripts should use -e -- but this script fails diff --git a/provision-e2e.sh b/provision-e2e.sh new file mode 100755 index 0000000000..e69de29bb2 diff --git a/provision-lms.sh b/provision-lms.sh index d85bed2e6b..dbfa220c49 100755 --- a/provision-lms.sh +++ b/provision-lms.sh @@ -2,9 +2,9 @@ set -eu -o pipefail set -x -apps=( lms studio ) +apps=( lms cms ) -studio_port=18010 +cms_port=18010 # Load database dumps for the largest databases to save time ./load-db.sh edxapp @@ -15,7 +15,7 @@ for app in "${apps[@]}"; do docker-compose up -d $app done -# install git for both LMS and Studio +# install git for both LMS and CMS for app in "${apps[@]}"; do docker-compose exec -T $app bash -e -c 'apt-get update && apt-get -y install --no-install-recommends git' @@ -33,10 +33,10 @@ docker-compose exec -T lms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx docker-compose exec -T lms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py lms showmigrations --database student_module_history --traceback --pythonpath=. --settings devstack_docker' docker-compose exec -T lms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py lms migrate --database student_module_history --noinput --traceback --pythonpath=. --settings devstack_docker' -docker-compose exec -T studio bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms showmigrations --database default --traceback --pythonpath=. --settings devstack_docker' -docker-compose exec -T studio bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms migrate --database default --noinput --traceback --pythonpath=. --settings devstack_docker' -docker-compose exec -T studio bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms showmigrations --database student_module_history --traceback --pythonpath=. --settings devstack_docker' -docker-compose exec -T studio bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms migrate --database student_module_history --noinput --traceback --pythonpath=. --settings devstack_docker' +docker-compose exec -T cms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms showmigrations --database default --traceback --pythonpath=. --settings devstack_docker' +docker-compose exec -T cms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms migrate --database default --noinput --traceback --pythonpath=. --settings devstack_docker' +docker-compose exec -T cms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms showmigrations --database student_module_history --traceback --pythonpath=. --settings devstack_docker' +docker-compose exec -T cms bash -e -c 'source /edx/app/edxapp/edxapp_env && /edx/app/edxapp/venvs/edxapp/bin/python /edx/app/edxapp/edx-platform/manage.py cms migrate --database student_module_history --noinput --traceback --pythonpath=. --settings devstack_docker' # Create a superuser for edxapp docker-compose exec -T lms bash -e -c 'source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms --settings=devstack_docker manage_user edx edx@example.com --superuser --staff' @@ -80,13 +80,13 @@ done # Fix missing vendor file by clearing the cache docker-compose exec -T lms bash -e -c 'rm /edx/app/edxapp/edx-platform/.prereqs_cache/Node_prereqs.sha1' -# Create static assets for both LMS and Studio +# Create static assets for both LMS and CMS for app in "${apps[@]}"; do docker-compose exec -T $app bash -e -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_assets --settings devstack_docker' done -# Allow LMS SSO for Studio -./provision-ida-user.sh studio studio "$studio_port" +# Allow LMS SSO for CMS +./provision-ida-user.sh cms cms "$cms_port" # Provision a retirement service account user ./provision-retirement-user.sh retirement retirement_service_worker diff --git a/provision.sh b/provision.sh index afb33e4f11..9e63f23c02 100755 --- a/provision.sh +++ b/provision.sh @@ -87,8 +87,8 @@ needs_mongo() { to_provision=" " for serv in $requested_services; do case "$serv" in - studio) - echo -e "${YELLOW}Studio is provisioned alongside LMS.\nPass 'lms' as an argument to ensure that Studio is provisioned.${NC}" + cms) + echo -e "${YELLOW}CMS is provisioned alongside LMS.\nPass 'lms' as an argument to ensure that CMS is provisioned.${NC}" continue ;; edx_notes_api) diff --git a/scripts/README.txt b/scripts/README.txt index 03abcbc383..7446880206 100644 --- a/scripts/README.txt +++ b/scripts/README.txt @@ -53,5 +53,5 @@ All Operating Systems --------------------- Done! Try visiting http://localhost:18000/ for the LMS and -http://localhost:18010/ for Studio. It may take a minute or two for the +http://localhost:18010/ for CMS. It may take a minute or two for the services to finish initializing and start responding to requests. diff --git a/scripts/snapshot.py b/scripts/snapshot.py index 24033c8ae4..0cd098b52c 100755 --- a/scripts/snapshot.py +++ b/scripts/snapshot.py @@ -75,7 +75,7 @@ def process_compose_file(filename, output_dir): image = service['image'] image = re.sub(r'\$.*', 'latest', image) container_name = service['container_name'] - # Don't save the same image twice, like edxapp for lms and studio + # Don't save the same image twice, like edxapp for lms and cms if image not in saved_images: output = os.path.join(images_dir, '{}.tar'.format(service_name)) print('Saving image {}'.format(service_name))