forked from openedx-unsupported/devstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add portal-designer in devstack services
- Loading branch information
1 parent
3c79ad3
commit 173e049
Showing
10 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name="designer" | ||
port="18808" | ||
|
||
docker-compose up -d --build | ||
|
||
# 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 designer.mysql mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null | ||
do | ||
printf "." | ||
sleep 1 | ||
done | ||
sleep 5 | ||
|
||
# Run migrations | ||
echo -e "${GREEN}Running migrations for ${name}...${NC}" | ||
docker exec -t designer.app bash -c "cd /edx/app/${name}/ && make migrate" | ||
|
||
# Create superuser | ||
echo -e "${GREEN}Creating super-user for ${name}...${NC}" | ||
docker exec -t designer.app 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" | ||
|
||
# Restart designer app | ||
docker-compose stop designer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ xqueue \ | |
coursegraph \ | ||
insights \ | ||
analyticsapi \ | ||
designer \ | ||
" | ||
|
||
# What should we provision? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ repos=( | |
"https://github.com/openedx/frontend-app-publisher.git" | ||
"https://github.com/edx/edx-analytics-dashboard.git" | ||
"https://github.com/edx/edx-analytics-data-api.git" | ||
"https://github.com/edx/portal-designer.git" | ||
) | ||
|
||
non_release_repos=( | ||
|
@@ -66,6 +67,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" | ||
) | ||
|
||
non_release_ssh_repos=( | ||
|