-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add portal-designer to devstack #82
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ services: | |
- edxapp_tox:/edx/app/edxapp/edx-platform/.tox | ||
- edxapp_uploads:/edx/var/edxapp/uploads | ||
- ${DEVSTACK_WORKSPACE}/src:/edx/src | ||
- ${PWD}/py_configuration_files/cms.py:/edx/app/edxapp/edx-platform/cms/envs/devstack.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this being removed? |
||
- ${PWD}/py_configuration_files/lms.py:/edx/app/edxapp/edx-platform/lms/envs/devstack.py | ||
lms-worker: | ||
volumes: | ||
|
@@ -45,6 +44,11 @@ services: | |
volumes: | ||
- ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar | ||
- ${PWD}/py_configuration_files/registrar.py:/edx/app/registrar/registrar/registrar/settings/devstack.py | ||
designer: | ||
volumes: | ||
- ${DEVSTACK_WORKSPACE}/portal-designer:/edx/app/designer | ||
- ${PWD}/py_configuration_files/portal_designer.py:/edx/app/designer/designer/settings/devstack.py | ||
- ${PWD}/py_configuration_files/registrar.py:/edx/app/registrar/registrar/registrar/settings/devstack.py | ||
registrar-worker: | ||
volumes: | ||
- ${DEVSTACK_WORKSPACE}/registrar:/edx/app/registrar | ||
|
@@ -57,7 +61,6 @@ services: | |
- edxapp_uploads:/edx/var/edxapp/uploads | ||
- ${DEVSTACK_WORKSPACE}/src:/edx/src | ||
- ${PWD}/py_configuration_files/cms.py:/edx/app/edxapp/edx-platform/cms/envs/devstack.py | ||
- ${PWD}/py_configuration_files/lms.py:/edx/app/edxapp/edx-platform/lms/envs/devstack.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar, why is this being removed? |
||
cms-worker: | ||
volumes: | ||
- ${DEVSTACK_WORKSPACE}/edx-platform:/edx/app/edxapp/edx-platform | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,8 @@ Instead of a service name or list, you can also run commands like ``make dev.pro | |
+------------------------------------+-------------------------------------+----------------+--------------+ | ||
| `frontend-app-ora-grading`_ | http://localhost:1993 | MFE (React.js) | Extra | | ||
+------------------------------------+-------------------------------------+----------------+--------------+ | ||
| `designer`_ | http://localhost:3307 | Python/Django | Extra | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong port mentioned here. |
||
+------------------------------------+-------------------------------------+----------------+--------------+ | ||
| `enterprise-catalog`_ | http://localhost:18160/ | Python/Django | Extra | | ||
+------------------------------------+-------------------------------------+----------------+--------------+ | ||
|
||
|
@@ -102,5 +104,6 @@ Some common service combinations include: | |
.. _frontend-app-ora-grading: https://github.com/edx/frontend-app-ora-grading | ||
.. _insights: https://github.com/edx/edx-analytics-dashboard | ||
.. _analyticsapi: https://github.com/edx/edx-analytics-data-api | ||
.. _designer: https://github.com/edx/portal-designer | ||
.. _enterprise-catalog: https://github.com/openedx/enterprise-catalog | ||
.. _license-manager: https://github.com/openedx/license-manager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name="designer" | ||
port="18808" | ||
|
||
docker compose up -d $name --build | ||
docker compose up -d lms | ||
|
||
# Install requirements | ||
# Can be skipped right now because we're using the --build flag on docker compose. This will need to be changed once we move to devstack. | ||
|
||
# Wait for MySQL | ||
echo "Waiting for MySQL" | ||
until docker exec -i edx.devstack.mysql80 mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null | ||
do | ||
printf "." | ||
sleep 1 | ||
done | ||
sleep 5 | ||
|
||
echo -e "${GREEN}Installing requirements for ${name}...${NC}" | ||
docker compose exec -T ${name} bash -e -c 'cd /edx/app/designer/ && make requirements' -- f"$name" | ||
|
||
# Run migrations | ||
echo -e "${GREEN}Running migrations for ${name}...${NC}" | ||
docker exec -t edx.devstack.designer bash -c "cd /edx/app/${name}/ && make migrate" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can use docker compose exec with ${name} for a similar command pattern. Also in next commands as well. |
||
|
||
# Create superuser | ||
echo -e "${GREEN}Creating super-user for ${name}...${NC}" | ||
docker exec -t edx.devstack.designer bash -c "echo 'from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser(\"edx\", \"[email protected]\", \"edx\") if not User.objects.filter(username=\"edx\").exists() else None' | python /edx/app/${name}/manage.py shell" | ||
|
||
# Provision IDA User in LMS | ||
echo -e "${GREEN}Provisioning ${name}_worker in LMS...${NC}" | ||
docker exec -t edx.devstack.lms bash -c "source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms --settings=devstack_docker manage_user ${name}_worker ${name}[email protected] --staff --superuser" | ||
|
||
# Create the DOT applications - one for single sign-on and one for backend service IDA-to-IDA authentication. | ||
docker exec -t edx.devstack.lms bash -c "source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms --settings=devstack_docker create_dot_application --grant-type authorization-code --skip-authorization --redirect-uris 'http://localhost:${port}/complete/edx-oauth2/' --client-id '${name}-sso-key' --client-secret '${name}-sso-secret' --scopes 'user_id' ${name}-sso ${name}_worker" | ||
docker exec -t edx.devstack.lms bash -c "source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms --settings=devstack_docker create_dot_application --grant-type client-credentials --client-id '${name}-backend-service-key' --client-secret '${name}-backend-service-secret' ${name}-backend-service ${name}_worker" | ||
Comment on lines
+30
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can call provison-ida-user.sh script here. |
||
|
||
# Restart designer app | ||
docker compose stop designer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we restart instead of stopping, as indicated by comment. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ repos=( | |
"https://github.com/edx/edx-analytics-dashboard.git" | ||
"https://github.com/edx/edx-analytics-data-api.git" | ||
"https://github.com/openedx/enterprise-catalog.git" | ||
"https://github.com/edx/portal-designer.git" | ||
"https://github.com/openedx/license-manager.git" | ||
"https://github.com/openedx/codejail-service.git" | ||
) | ||
|
@@ -70,6 +71,7 @@ ssh_repos=( | |
"[email protected]:openedx/frontend-app-publisher.git" | ||
"[email protected]:edx/edx-analytics-dashboard.git" | ||
"[email protected]:edx/edx-analytics-data-api.git" | ||
"[email protected]:edx/portal-designer.git" | ||
"[email protected]:openedx/license-manager.git" | ||
"[email protected]:openedx/codejail-service.git" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed