forked from openedx-unsupported/devstack
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add enterprise subsidy service to Devstack
- Loading branch information
1 parent
7e14f5b
commit 78c0dd1
Showing
9 changed files
with
64 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,21 @@ | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
set -x | ||
|
||
. scripts/colors.sh | ||
|
||
name="enterprise-subsidy" | ||
port="18280" | ||
|
||
# Run migrations | ||
echo -e "${GREEN}Running migrations for ${name}...${NC}" | ||
docker exec -t edx.devstack.enterprise-subsidy bash -c "cd /edx/app/${name}/ && make migrate" | ||
|
||
# Create superuser | ||
echo -e "${GREEN}Creating super-user for ${name}...${NC}" | ||
docker exec -t edx.devstack.enterprise-subsidy 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}" | ||
|
||
./provision-ida-user.sh ${name} ${name} ${port} |
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 \ | ||
enterprise-subsidy \ | ||
" | ||
|
||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ non_release_repos=( | |
"https://github.com/openedx/frontend-app-account.git" | ||
"https://github.com/openedx/frontend-app-profile.git" | ||
"https://github.com/openedx/frontend-app-ora-grading.git" | ||
"https://github.com/openedx/enterprise-subsidy.git" | ||
) | ||
|
||
ssh_repos=( | ||
|
@@ -78,6 +79,7 @@ non_release_ssh_repos=( | |
"[email protected]:openedx/frontend-app-account.git" | ||
"[email protected]:openedx/frontend-app-profile.git" | ||
"[email protected]:openedx/frontend-app-ora-grading.git" | ||
"[email protected]:openedx/enterprise-subsidy.git" | ||
) | ||
|
||
if [ -n "${OPENEDX_RELEASE}" ]; then | ||
|