forked from overhangio/tutor
-
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.
feat: full edx-platform setup with
tutor dev launch -m ...
Before this commit, setting up an edx-platform development environment took multiple steps: tutor dev launch tutor dev run --mount=/path/to/edx-platform lms bash >> pip install -e . >> npm clean-install >> openedx-assets build --env=dev This commit moves the steps under ``run`` into an init task, which is automatically run by ``launch``. Thus, setup is now one command: tutor dev launch --mount=edx-platform These extra init steps are only applicable when bind-mounting edx-platform (because bind-mounting the repository overrides some important artifacts that exist on the image, which must be re-generated). Thus, the new init tasks exists early if it detects that it is *not* operating on a bind-mounted repository. Finally, we try to simplify the Open edX development docs so that it is clearer how bind-mounting fits into the development process. Part of: openedx-unsupported/wg-developer-experience#146 Closes: openedx-unsupported/wg-developer-experience#152 This works around (but does not close) these related issues: * openedx-unsupported/wg-developer-experience#150 * https://github.com/openedx/wg-developer-experience/issues/151
- Loading branch information
1 parent
4e7c3ee
commit ebab66a
Showing
5 changed files
with
96 additions
and
49 deletions.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
- [Improvement] Running ``tutor dev launch --mount=edx-platform`` now performs all necessary setup for a local edx-platform development. This includes running setup.py, installing node modules, and building assets; previously, those steps had to be run explicitly after bind-mounting a local copy of edx-platform (by @kdmccormick). |
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,27 @@ | ||
# When a new local copy of edx-platform is bind-mounted, certain build | ||
# artifacts from the openedx image's edx-platform directory are lost. | ||
# We regenerate them here. | ||
|
||
if [ -f /openedx/edx-platform/bindmount-canary ] ; then | ||
# If this file exists, then edx-platform has not been bind-mounted, | ||
# so no build artifacts need to be regenerated. | ||
echo "Using edx-platform from image (not bind-mount)." | ||
echo "No extra setup is required." | ||
exit | ||
fi | ||
|
||
echo "Performing additional setup for bind-mounted edx-platform." | ||
set -x # Echo out executed lines | ||
|
||
# Regenerate Open_edX.egg-info | ||
pip install -e . | ||
|
||
# Regenerate node_modules | ||
npm clean-install | ||
|
||
# Regenerate static assets. | ||
openedx-assets build --env=dev | ||
|
||
set -x | ||
echo "Done setting up bind-mounted edx-platform." | ||
|