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

Commit ebabced

Browse files
authored
feat!: Rename studio service to cms (#957)
1 parent 0db599a commit ebabced

25 files changed

+117
-118
lines changed

Makefile

+21-21
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# and SERVICES is a plus-sign-separated list of services.
77
# Examples:
88
# make dev.attach.credentials
9-
# make dev.pull.registrar+studio
9+
# make dev.pull.registrar+cms
1010
# make dev.up.lms
1111
# make dev.up.without-deps.lms+forum+discovery+mysql57+elasticsearch+memcached
1212
# make dev.restart-container.mysql57+lms
@@ -45,15 +45,15 @@
4545
create-test-course dev.attach dev.backup dev.cache-programs dev.check \
4646
dev.check-memory dev.checkout dev.clone dev.clone.https dev.clone.ssh \
4747
dev.dbshell dev.destroy dev.down dev.drop-db dev.kill dev.logs \
48-
dev.migrate dev.migrate.lms dev.migrate.studio \
48+
dev.migrate dev.migrate.lms dev.migrate.cms \
4949
devpi-password dev.provision dev.ps dev.pull dev.pull.without-deps \
5050
dev.reset dev.reset-repos dev.restart-container dev.restart-devserver \
5151
dev.restart-devserver.forum dev.restore dev.rm-stopped dev.shell \
5252
dev.shell.credentials dev.shell.discovery \
5353
dev.shell.ecommerce dev.shell.lms dev.shell.lms_watcher \
54-
dev.shell.registrar dev.shell.studio \
55-
dev.shell.studio_watcher dev.shell.xqueue dev.shell.xqueue_consumer \
56-
dev.static dev.static.lms dev.static.studio dev.stats dev.status \
54+
dev.shell.registrar dev.shell.cms \
55+
dev.shell.cms_watcher dev.shell.xqueue dev.shell.xqueue_consumer \
56+
dev.static dev.static.lms dev.static.cms dev.stats dev.status \
5757
dev.stop dev.up dev.up.attach dev.up.shell \
5858
dev.up.without-deps dev.up.without-deps.shell dev.up.with-programs \
5959
dev.up.with-watchers dev.validate docs \
@@ -254,9 +254,9 @@ $(foreach db_service,$(DB_SERVICES_LIST),\
254254

255255
dev.migrate: | $(_db_migration_targets) ## Run migrations for applicable default services.
256256

257-
dev.migrate.studio:
258-
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'
259-
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'
257+
dev.migrate.cms:
258+
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'
259+
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'
260260

261261
dev.migrate.lms:
262262
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
293293

294294
dev.up.with-programs.%: dev.up.$* dev.cache-programs ## Bring up services and their dependencies + cache programs in LMS.
295295

296-
dev.up.with-watchers: dev.up.$(DEFAULT_SERVICES)+lms_watcher+studio_watcher ## Bring up default services + asset watcher containers.
296+
dev.up.with-watchers: dev.up.$(DEFAULT_SERVICES)+lms_watcher+cms_watcher ## Bring up default services + asset watcher containers.
297297

298298
dev.up.with-watchers.%: ## Bring up services and their dependencies + asset watcher containers.
299299
make dev.up.$*
300-
make dev.up.lms_watcher+studio_watcher
300+
make dev.up.lms_watcher+cms_watcher
301301

302302
dev.up.without-deps: _expects-service-list.dev.up.without-deps
303303

@@ -442,11 +442,11 @@ dev.shell.lms:
442442
dev.shell.lms_watcher:
443443
docker-compose exec lms_watcher env TERM=$(TERM) bash -c '/bin/bash'
444444

445-
dev.shell.studio:
446-
docker-compose exec studio env TERM=$(TERM) bash -c '/bin/bash'
445+
dev.shell.cms:
446+
docker-compose exec cms env TERM=$(TERM) bash -c '/bin/bash'
447447

448-
dev.shell.studio_watcher:
449-
docker-compose exec studio_watcher env TERM=$(TERM) bash -c '/bin/bash'
448+
dev.shell.cms_watcher:
449+
docker-compose exec cms_watcher env TERM=$(TERM) bash -c '/bin/bash'
450450

451451
dev.shell.xqueue_consumer:
452452
docker-compose exec xqueue_consumer env TERM=$(TERM) /bin/bash
@@ -479,8 +479,8 @@ dev.static: | $(_asset_compilation_targets)
479479
dev.static.lms:
480480
docker-compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets lms'
481481

482-
dev.static.studio:
483-
docker-compose exec -T studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets studio'
482+
dev.static.cms:
483+
docker-compose exec -T cms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && paver update_assets cms'
484484

485485
dev.static.%: ## Rebuild static assets for the specified service's container.
486486
docker-compose exec -T $* bash -c 'source /edx/app/$*/$*_env && cd /edx/app/$*/$*/ && make static'
@@ -574,7 +574,7 @@ _expects-service-list.%:
574574
@echo "For example:"
575575
@echo " make $*.lms"
576576
@echo "Or:"
577-
@echo " make $*.registrar+ecommerce+studio"
577+
@echo " make $*.registrar+ecommerce+cms"
578578

579579
_expects-database.%:
580580
@echo "'make $*' on its own has no effect."
@@ -617,11 +617,11 @@ devpi-password: ## Get the root devpi password for the devpi container.
617617
hadoop-application-logs-%: ## View hadoop logs by application Id.
618618
docker-compose exec nodemanager yarn logs -applicationId $*
619619

620-
create-test-course: ## Provisions studio, and ecommerce with course(s) in test-course.json.
621-
$(WINPTY) bash ./course-generator/create-courses.sh --studio --ecommerce course-generator/test-course.json
620+
create-test-course: ## Provisions cms, and ecommerce with course(s) in test-course.json.
621+
$(WINPTY) bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/test-course.json
622622

623-
build-courses: ## Build course and provision studio, and ecommerce with it.
623+
build-courses: ## Build course and provision cms, and ecommerce with it.
624624
# Modify test-course.json before running this make target to generate a custom course
625625
$(WINPTY) bash ./course-generator/build-course-json.sh course-generator/tmp-config.json
626-
$(WINPTY) bash ./course-generator/create-courses.sh --studio --ecommerce course-generator/tmp-config.json
626+
$(WINPTY) bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/tmp-config.json
627627
rm course-generator/tmp-config.json

check.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ if should_check lms; then
6464
run_check lms_heartbeat lms \
6565
"curl --fail -L http://localhost:18000/heartbeat"
6666

67-
echo "Checking Studio heartbeat:"
68-
run_check studio_heartbeat lms \
67+
echo "Checking CMS heartbeat:"
68+
run_check cms_heartbeat lms \
6969
"curl --fail -L http://localhost:18010/heartbeat"
7070

7171
echo "Validating LMS volume:"

compatibility.mk

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
healthchecks lms-restart \
1818
lms-watcher-shell logs provision pull \
1919
pull.xqueue restore static stats stop stop.all \
20-
stop.watchers stop.xqueue studio-restart \
21-
studio-watcher-shell validate \
20+
stop.watchers stop.xqueue cms-restart \
21+
cms-watcher-shell validate \
2222
xqueue_consumer-restart xqueue-restart
2323

2424
#####################################################################
@@ -53,7 +53,7 @@ dev.repo.reset: dev.reset-repos
5353

5454
dev.up.all: dev.up.with-watchers
5555

56-
dev.up.watchers: dev.up.lms_watcher+studio_watcher
56+
dev.up.watchers: dev.up.lms_watcher+cms_watcher
5757

5858
down: dev.down
5959

@@ -81,13 +81,13 @@ stop.all: dev.stop
8181

8282
stop: dev.stop
8383

84-
stop.watchers: dev.stop.lms_watcher+studio_watcher
84+
stop.watchers: dev.stop.lms_watcher+cms_watcher
8585

8686
stop.xqueue: dev.stop.xqueue+xqueue_consumer
8787

88-
studio-restart: dev.restart-devserver.studio
88+
cms-restart: dev.restart-devserver.cms
8989

90-
studio-watcher-shell: dev.shell.studio_watcher
90+
cms-watcher-shell: dev.shell.cms_watcher
9191

9292
validate: dev.validate
9393

course-generator/create-courses.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#!/usr/bin/env bash
2-
# Script that provisions studio, and ecommerce with courses
3-
# USAGE: ./create-courses [--studio] [--ecommerce] course-config.json
4-
studio=false
2+
# Script that provisions cms, and ecommerce with courses
3+
# USAGE: ./create-courses [--cms] [--ecommerce] course-config.json
4+
cms=false
55
ecommerce=false
66
echo "Parsing options"
77
container_error=false
88
for arg in "$@"; do
9-
if [ $arg == "--studio" ]; then
10-
if [ ! "$(docker-compose exec lms bash -c 'echo "Course will be created for studio"; exit $?')" ]; then
11-
echo "Issue with studio container"
9+
if [ $arg == "--cms" ]; then
10+
if [ ! "$(docker-compose exec lms bash -c 'echo "Course will be created for cms"; exit $?')" ]; then
11+
echo "Issue with cms container"
1212
container_error=true
1313
else
14-
studio=true
14+
cms=true
1515
fi
1616
elif [ $arg == "--ecommerce" ]; then
1717
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
4040
course_json=$course_json${line/"\"number\": null"/"\"number\": \""$RANDOM"\""}
4141
done < "${@: -1}"
4242

43-
if $studio ; then
44-
echo "Creating courses on studio."
43+
if $cms ; then
44+
echo "Creating courses on cms."
4545
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'"
4646
fi
4747

docker-compose-host.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ services:
4141
registrar-worker:
4242
volumes:
4343
- ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar
44-
studio:
44+
cms:
4545
volumes:
4646
- ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform
4747
- edxapp_media:/edx/var/edxapp/media

docker-compose-themes.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ services:
1010
lms:
1111
volumes:
1212
- ${DEVSTACK_WORKSPACE}/edx-themes:/edx/app/edx-themes
13-
studio:
13+
cms:
1414
volumes:
1515
- ${DEVSTACK_WORKSPACE}/edx-themes:/edx/app/edx-themes

docker-compose-watchers.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ services:
1919
aliases:
2020
- edx.devstack.lms_watcher
2121

22-
studio_watcher:
22+
cms_watcher:
2323
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'
24-
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.studio_watcher"
24+
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.cms_watcher"
2525
environment:
26-
BOK_CHOY_HOSTNAME: edx.devstack.studio_watcher
26+
BOK_CHOY_HOSTNAME: edx.devstack.cms_watcher
2727
ASSET_WATCHER_TIMEOUT: 12
2828
image: openedx/lms-dev:${OPENEDX_RELEASE:-latest}
2929
volumes:
30-
- edxapp_studio_assets:/edx/var/edxapp/staticfiles/
30+
- edxapp_cms_assets:/edx/var/edxapp/staticfiles/
3131
- ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform
3232
- edxapp_node_modules:/edx/app/edxapp/edx-platform/node_modules
3333
- ${DEVSTACK_WORKSPACE}/src:/edx/src
3434
- ${DEVSTACK_WORKSPACE}/edx-themes:/edx/app/edx-themes
3535
networks:
3636
default:
3737
aliases:
38-
- edx.devstack.studio_watcher
38+
- edx.devstack.cms_watcher
3939

4040
volumes:
4141
edxapp_lms_assets:
42-
edxapp_studio_assets:
42+
edxapp_cms_assets:
4343
edxapp_node_modules:

docker-compose.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -623,22 +623,22 @@ services:
623623
volumes:
624624
- /edx/var/registrar/
625625

626-
studio:
626+
cms:
627627
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'
628-
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.studio"
629-
hostname: studio.devstack.edx
628+
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.cms"
629+
hostname: cms.devstack.edx
630630
depends_on:
631631
- devpi
632632
- elasticsearch710
633633
- lms
634634
- memcached
635635
- mongo
636636
- mysql57
637-
# Allows attachment to the Studio service using 'docker attach <containerID>'.
637+
# Allows attachment to the CMS service using 'docker attach <containerID>'.
638638
stdin_open: true
639639
tty: true
640640
environment:
641-
BOK_CHOY_HOSTNAME: edx.devstack.studio
641+
BOK_CHOY_HOSTNAME: edx.devstack.cms
642642
BOK_CHOY_LMS_PORT: 18103
643643
BOK_CHOY_CMS_PORT: 18131
644644
EDXAPP_TEST_MONGO_HOST: edx.devstack.mongo
@@ -653,15 +653,15 @@ services:
653653
networks:
654654
default:
655655
aliases:
656-
- edx.devstack.studio
657-
- studio.devstack.edx
656+
- edx.devstack.cms
657+
- cms.devstack.edx
658658
ports:
659659
- "18010:18010"
660660
- "19877:19877" # JS test debugging
661661
# - "18103:18103"
662662
# - "18131:18131"
663663
volumes:
664-
- edxapp_studio_assets:/edx/var/edxapp/staticfiles/
664+
- edxapp_cms_assets:/edx/var/edxapp/staticfiles/
665665

666666
xqueue:
667667
container_name: "edx.${COMPOSE_PROJECT_NAME:-devstack}.xqueue"
@@ -763,7 +763,7 @@ services:
763763
ports:
764764
- "2001:2001"
765765
depends_on:
766-
- studio
766+
- cms
767767

768768
frontend-app-gradebook:
769769
extends:
@@ -824,7 +824,7 @@ services:
824824
- "3001:3001"
825825
depends_on:
826826
- lms
827-
- studio
827+
- cms
828828

829829
frontend-app-payment:
830830
extends:
@@ -877,7 +877,7 @@ volumes:
877877
discovery_assets:
878878
devpi_data:
879879
edxapp_lms_assets:
880-
edxapp_studio_assets:
880+
edxapp_cms_assets:
881881
elasticsearch_data:
882882
elasticsearch7_data:
883883
elasticsearch710_data:

docs/decisions/0001-avoid-default-service-set.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Approved
99
Context
1010
-------
1111

12-
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.
12+
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.
1313

1414
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.
1515

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ However, it can be argued that the opposite dependency relationship also makes s
4747
Decision
4848
========
4949

50-
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.
50+
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.
5151

5252
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.
5353

docs/devpi.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ could not be done while offline due to not being able to contact PyPI.
99
To help speed up those tasks and bring us close to being able to use
1010
Devstack entirely offline we have introduced a devpi PyPI cache container
1111
to Devstack. Currently it is only configured as a package cache for LMS
12-
and Studio, but the hope is to expand its use to the other Devstack
12+
and CMS, but the hope is to expand its use to the other Devstack
1313
applications and to move to a state where it comes pre-populated with the
1414
requirements of all Devstack applications.
1515

@@ -28,7 +28,7 @@ https://www.devpi.net/
2828
What is cached?
2929
---------------
3030

31-
devpi will cache anything that LMS or Studio pull from PyPI via pip,
31+
devpi will cache anything that LMS or CMS pull from PyPI via pip,
3232
including things from the various requirements files. It will not cache
3333
requirements given as URLs (ex. ``git+https`` style links) or local
3434
packages (ex. ``-e common/lib/calc``). When these types of packages are
@@ -52,7 +52,7 @@ Disabling devpi
5252
---------------
5353

5454
To temporarily remove devpi caching from an edxapp container, start a
55-
shell (``dev.shell.lms`` or ``dev.shell.studio``) and move or delete
55+
shell (``dev.shell.lms`` or ``dev.shell.cms``) and move or delete
5656
``/root/.pip/pip.conf``. This will be undone on the next container
5757
restart unless the container state is persisted.
5858

0 commit comments

Comments
 (0)