-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: Be able to login to bare-metal studio easily. #35172
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,18 +124,47 @@ sites):: | |
./manage.py lms collectstatic | ||
./manage.py cms collectstatic | ||
|
||
Set up CMS SSO (for Development):: | ||
|
||
./manage.py lms manage_user studio_worker [email protected] --unusable-password | ||
kdmccormick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# DO NOT DO THIS IN PRODUCTION. It will make your auth insecure. | ||
./manage.py lms create_dot_application studio-sso-id studio_worker \ | ||
--grant-type authorization-code \ | ||
--skip-authorization \ | ||
--redirect-uris 'http://localhost:18010/complete/edx-oauth2/' \ | ||
--scopes user_id \ | ||
--client-id 'studio-sso-id' \ | ||
--client-secret 'studio-sso-secret' | ||
|
||
Set up CMS SSO (for Production): | ||
|
||
* Create the CMS user and the OAuth application:: | ||
|
||
./manage.py lms manage_user studio_worker <[email protected]> --unusable-password | ||
./manage.py lms create_dot_application studio-sso-id studio_worker \ | ||
--grant-type authorization-code \ | ||
--skip-authorization \ | ||
--redirect-uris 'http://localhost:18010/complete/edx-oauth2/' \ | ||
--scopes user_id | ||
|
||
* Log into Django admin (eg. http://localhost:18000/admin/oauth2_provider/application/), | ||
click into the application you created above (``studio-sso-id``), and copy its "Client secret". | ||
* In your private LMS_CFG yaml file or your private Django settings module: | ||
|
||
* Set ``SOCIAL_AUTH_EDX_OAUTH2_KEY`` to the client ID (``studio-sso-id``). | ||
* Set ``SOCIAL_AUTH_EDX_OAUTH2_SECRET`` to the client secret (which you copied). | ||
Run the Platform | ||
---------------- | ||
|
||
First, ensure MySQL, Mongo, and Memcached are running. | ||
|
||
Start the LMS:: | ||
|
||
./manage.py lms runserver | ||
./manage.py lms runserver 18000 | ||
|
||
Start the CMS:: | ||
|
||
./manage.py cms runserver | ||
./manage.py cms runserver 18010 | ||
|
||
This will give you a mostly-headless Open edX platform. Most frontends have | ||
been migrated to "Micro-Frontends (MFEs)" which need to be installed and run | ||
|
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,3 +36,6 @@ LMS_INTERNAL_ROOT_URL: "http://localhost" | |
|
||
# So that Swagger config code doesn't complain | ||
API_ACCESS_MANAGER_EMAIL: "[email protected]" | ||
|
||
# So that you can login to studio on bare-metal | ||
SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT: 'http://localhost:18000' | ||
kdmccormick marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
commit should be
docs:
notfeat:
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.
It's feat because of the change to devstack.py which adds new behavior being able to take a setting from the config file but happy to split them if you'd like.
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.
Fair enough