openedx-unsupported / wg-developer-experience

Old issue repository for the former Developer Experience Working Group
4 stars 0 forks source link

Implement a persistent mounting interface #71

Closed kdmccormick closed 1 year ago

kdmccormick commented 2 years ago

Context

The --mount command line option was introduced recently and made available on start, run, init, and quickstart. We've gotten positive feedback on this, but it is clear that manually specifying all mounts on every command invocation is quite a departure from what Devstack users are used to (Devstack mounts all repo folders, always).

Perhaps defining a stateful mounting interface would be a better UX:

# Auto-mount a repo.
tutor dev mount ../edx-platform

# Or, manual-mount a folder. Folders can be mounted in multple places, of course.
tutor dev mount ../myfolder --target /openedx/myfolder1 --service lms,cms
tutor dev mount ../myfolder --target /openedx/myfolder2 --service lms,cms

# Show active mounts.
tutor dev listmounts
HOSTPATH                    SERVICE      CONTAINER PATH
/home/bob/edx-platform      cms          /openedx/edx-platform
/home/bob/edx-platform      cms-worker   /openedx/edx-platform
/home/bob/edx-platform      lms          /openedx/edx-platform
/home/bob/edx-platform      lms-worker   /openedx/edx-platform
/home/bob/myfolder          cms         /openedx/myfolder1
/home/bob/myfolder          cms         /openedx/myfolder2
/home/bob/myfolder          lms         /openedx/myfolder1
/home/bob/myfolder          lms         /openedx/myfolder2

# Disable CMS edx-platform mounts. Would leave LMS mounts in place.
tutor dev unmount ../edx-platform --services cms,cms-worker  

# Disable mount of myfolder to myfolder2. Would leave mount of myfolder to myfolder1 in place.
tutor dev unmount ../myfolder --target /openedx/myfolder2

# List mounts again.
tutor dev listmounts
HOSTPATH                    SERVICE      CONTAINER PATH
/home/bob/edx-platform      lms          /openedx/edx-platform
/home/bob/edx-platform      lms-worker   /openedx/edx-platform
/home/bob/myfolder          cms         /openedx/myfolder1
/home/bob/myfolder          lms         /openedx/myfolder1

# Remove all edx-platform mounts.
tutor dev unmount ../edx-platform

# List mounts again.
tutor dev listmounts
HOSTPATH                    SERVICE      CONTAINER PATH
/home/bob/myfolder          cms         /openedx/myfolder1
/home/bob/myfolder          lms         /openedx/myfolder1

# Remove all remaining mounts.
tutor dev unmount

Acceptance Criteria

TBD, I think I'd rather experiment with this as a plugin and see whether or not it improves the UX before implementing it in the core. Let's call this "Blocked By https://github.com/overhangio/2u-tutor-adoption/issues/66"

regisb commented 1 year ago

I have come to the conclusion that persistent bind-mounts are better than repeating --mount options everywhere. Working on a pull request right now, to be integrated in Palm. Let's discuss around the actual implementation once it's ready for sharing. In the meantime, feel free to assign this issue to me.

kdmccormick commented 1 year ago

Cool šŸ‘šŸ»

kdmccormick commented 1 year ago

To do: review the palm branch

kdmccormick commented 1 year ago

Done in Palm! Run tutor mounts --help for details.