Skip to content

Commit 1714325

Browse files
committed
fix: Many fixes for enterprise IDAs
It seems like the various enterprise-specific devstack settings are a mix of legacy stuff combined with failed attempts to port repo-specific devstack configs into this central devstack repo. As a result, the various hostnames and paths are completely broken. This hasn't impacted us because we normally don't use enterprise inside of devstack, but this is will hopefully be our future.
1 parent fa6c178 commit 1714325

File tree

7 files changed

+27
-26
lines changed

7 files changed

+27
-26
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ dev.shell.insights:
406406
docker compose exec insights env TERM=$(TERM) bash -c 'eval $$(source /edx/app/insights/insights_env; echo PATH="$$PATH";) && /bin/bash'
407407

408408
dev.shell.%: ## Run a shell on the specified service's container.
409-
docker compose exec $* /bin/bash
409+
docker compose exec -u 0 $* /bin/bash
410410

411411
dev.dbshell:
412412
docker compose exec mysql80 bash -c "mysql"

docker-compose-host.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ services:
9898

9999
enterprise-catalog:
100100
volumes:
101-
- ${DEVSTACK_WORKSPACE}/enterprise-catalog:/edx/app/enterprise_catalog/enterprise_catalog
102-
- ${PWD}/py_configuration_files/enterprise_catalog.py:/edx/app/enterprise_catalog/enterprise_catalog/settings/devstack.py
101+
- ${DEVSTACK_WORKSPACE}/enterprise-catalog:/edx/app/enterprise-catalog
102+
- ${PWD}/py_configuration_files/enterprise_catalog.py:/edx/app/enterprise-catalog/enterprise_catalog/settings/devstack.py
103103
enterprise-catalog-worker:
104104
volumes:
105-
- ${DEVSTACK_WORKSPACE}/enterprise-catalog:/edx/app/enterprise_catalog/enterprise_catalog
106-
- ${PWD}/py_configuration_files/enterprise_catalog.py:/edx/app/enterprise_catalog/enterprise_catalog/settings/devstack.py
105+
- ${DEVSTACK_WORKSPACE}/enterprise-catalog:/edx/app/enterprise-catalog
106+
- ${PWD}/py_configuration_files/enterprise_catalog.py:/edx/app/enterprise-catalog/enterprise_catalog/settings/devstack.py
107107
enterprise-catalog-curations-worker:
108108
volumes:
109-
- ${DEVSTACK_WORKSPACE}/enterprise-catalog:/edx/app/enterprise_catalog/enterprise_catalog
109+
- ${DEVSTACK_WORKSPACE}/enterprise-catalog:/edx/app/enterprise-catalog
110110
license-manager:
111111
volumes:
112112
- ${DEVSTACK_WORKSPACE}/license-manager:/edx/app/license_manager

docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ services:
744744
image: edxops/enterprise-catalog-dev
745745
container_name: edx.devstack.enterprise-catalog
746746
hostname: enterprise-catalog.devstack.edx
747-
command: bash -c 'while true; do python /edx/app/enterprise_catalog/enterprise_catalog/manage.py runserver 0.0.0.0:18160; sleep 2; done'
747+
command: bash -c 'while true; do python /edx/app/enterprise-catalog/enterprise_catalog/manage.py runserver 0.0.0.0:18160; sleep 2; done'
748748
ports:
749749
- "18160:18160"
750750
depends_on:
@@ -774,9 +774,10 @@ services:
774774

775775
enterprise-catalog-worker:
776776
image: edxops/enterprise-catalog-dev
777-
command: bash -c 'cd /edx/app/enterprise_catalog/enterprise_catalog && celery -A enterprise_catalog worker -Q enterprise_catalog.default -l DEBUG'
777+
command: bash -c 'cd /edx/app/enterprise-catalog && celery -A enterprise_catalog worker -Q enterprise_catalog.default -l DEBUG'
778778
container_name: edx.devstack.enterprise.catalog.worker
779779
depends_on:
780+
- memcached
780781
- mysql80
781782
environment:
782783
CELERY_ALWAYS_EAGER: 'false'
@@ -796,7 +797,7 @@ services:
796797

797798
enterprise-catalog-curations-worker:
798799
image: edxops/enterprise-catalog-dev
799-
command: bash -c 'cd /edx/app/enterprise_catalog/enterprise_catalog && celery -A enterprise_catalog worker -Q enterprise_catalog.curations -l DEBUG'
800+
command: bash -c 'cd /edx/app/enterprise-catalog && celery -A enterprise_catalog worker -Q enterprise_catalog.curations -l DEBUG'
800801
container_name: enterprise.catalog.curations
801802
depends_on:
802803
- mysql80

py_configuration_files/enterprise_access.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
'default': {
55
'ENGINE': 'django.db.backends.mysql',
66
'NAME': os.environ.get('DB_NAME', 'enterprise_access'),
7-
'USER': os.environ.get('DB_USER', 'root'),
8-
'PASSWORD': os.environ.get('DB_PASSWORD', ''),
9-
'HOST': os.environ.get('DB_HOST', 'enterprise_access.mysql80'),
7+
'USER': os.environ.get('DB_USER', 'enterprise_access001'),
8+
'PASSWORD': os.environ.get('DB_PASSWORD', 'password'),
9+
'HOST': os.environ.get('DB_HOST', 'edx.devstack.mysql80'),
1010
'PORT': os.environ.get('DB_PORT', 3306),
1111
'ATOMIC_REQUESTS': False,
1212
'CONN_MAX_AGE': 60,
@@ -91,13 +91,13 @@
9191
# END CSRF CONFIG
9292

9393
ECOMMERCE_URL = 'http://edx.devstack.ecommerce:18130'
94-
LICENSE_MANAGER_URL = 'http://license-manager.app:18170'
94+
LICENSE_MANAGER_URL = 'http://edx.devstack.license-manager:18170'
9595
LMS_URL = 'http://edx.devstack.lms:18000'
9696
DISCOVERY_URL = 'http://edx.devstack.discovery:18381'
9797
ENTERPRISE_LEARNER_PORTAL_URL = 'http://localhost:8734'
9898
ENTERPRISE_ADMIN_PORTAL_URL = 'http://localhost:1991'
99-
ENTERPRISE_CATALOG_URL = 'http://enterprise.catalog.app:18160'
100-
ENTERPRISE_SUBSIDY_URL = 'http://enterprise-subsidy.app:18280'
99+
ENTERPRISE_CATALOG_URL = 'http://edx.devstack.enterprise-catalog:18160'
100+
ENTERPRISE_SUBSIDY_URL = 'http://edx.devstack.enterprise-subsidy:18280'
101101
ENTERPRISE_ACCESS_URL = 'http://localhost:18270'
102102

103103
# shell_plus

py_configuration_files/enterprise_catalog.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
)
1515

1616
# OAuth2 variables specific to backend service API calls.
17-
BACKEND_SERVICE_EDX_OAUTH2_KEY = os.environ.get('BACKEND_SERVICE_EDX_OAUTH2_KEY', 'enterprise_catalog-backend-service-key')
18-
BACKEND_SERVICE_EDX_OAUTH2_SECRET = os.environ.get('BACKEND_SERVICE_EDX_OAUTH2_SECRET', 'enterprise_catalog-backend-service-secret')
17+
BACKEND_SERVICE_EDX_OAUTH2_KEY = os.environ.get('BACKEND_SERVICE_EDX_OAUTH2_KEY', 'enterprise-catalog-backend-service-key')
18+
BACKEND_SERVICE_EDX_OAUTH2_SECRET = os.environ.get('BACKEND_SERVICE_EDX_OAUTH2_SECRET', 'enterprise-catalog-backend-service-secret')
1919

2020
JWT_AUTH.update({
2121
'JWT_SECRET_KEY': 'lms-secret',
@@ -39,9 +39,9 @@
3939
'default': {
4040
'ENGINE': 'django.db.backends.mysql',
4141
'NAME': os.environ.get('DB_NAME', 'enterprise_catalog'),
42-
'USER': os.environ.get('DB_USER', 'root'),
43-
'PASSWORD': os.environ.get('DB_PASSWORD', ''),
44-
'HOST': os.environ.get('DB_HOST', 'enterprise.catalog.mysql'),
42+
'USER': os.environ.get('DB_USER', 'enterprise_catalog001'),
43+
'PASSWORD': os.environ.get('DB_PASSWORD', 'password'),
44+
'HOST': os.environ.get('DB_HOST', 'edx.devstack.mysql80'),
4545
'PORT': os.environ.get('DB_PORT', 3306),
4646
'ATOMIC_REQUESTS': False,
4747
'CONN_MAX_AGE': 60,
@@ -84,7 +84,7 @@
8484
CACHES = {
8585
'default': {
8686
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
87-
'LOCATION': 'enterprise.catalog.memcached:11211',
87+
'LOCATION': 'edx.devstack.memcached:11211',
8888
}
8989
}
9090

py_configuration_files/enterprise_subsidy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
'default': {
1717
'ENGINE': 'django.db.backends.mysql',
1818
'NAME': os.environ.get('DB_NAME', 'enterprise_subsidy'),
19-
'USER': os.environ.get('DB_USER', 'root'),
20-
'PASSWORD': os.environ.get('DB_PASSWORD', ''),
21-
'HOST': os.environ.get('DB_HOST', 'enterprise-subsidy.mysql80'),
19+
'USER': os.environ.get('DB_USER', 'enterprise_subsidy001'),
20+
'PASSWORD': os.environ.get('DB_PASSWORD', 'password'),
21+
'HOST': os.environ.get('DB_HOST', 'edx.devstack.mysql80'),
2222
'PORT': os.environ.get('DB_PORT', 3306),
2323
'ATOMIC_REQUESTS': False,
2424
'CONN_MAX_AGE': 60,
@@ -77,7 +77,7 @@
7777
})
7878

7979
LMS_URL = 'http://edx.devstack.lms:18000'
80-
ENTERPRISE_CATALOG_URL = 'http://enterprise.catalog.app:18160'
80+
ENTERPRISE_CATALOG_URL = 'http://edx.devstack.enterprise-catalog:18160'
8181
ENTERPRISE_SUBSIDY_URL = 'http://localhost:18280'
8282
FRONTEND_APP_LEARNING_URL = 'http://localhost:2000'
8383

py_configuration_files/license_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
# END CSRF CONFIG
7575

7676
ENTERPRISE_LEARNER_PORTAL_BASE_URL = 'http://localhost:8734'
77-
ENTERPRISE_CATALOG_URL = 'http://enterprise.catalog.app:18160'
77+
ENTERPRISE_CATALOG_URL = 'http://edx.devstack.enterprise-catalog:18160'
7878
LMS_URL = 'http://edx.devstack.lms:18000'
7979
SUPPORT_SITE_URL = 'https://support.edx.org'
8080

0 commit comments

Comments
 (0)