-
Notifications
You must be signed in to change notification settings - Fork 22
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: docker-based local work without lms #346
Conversation
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.
Hello @marlonkeating. I'm going to start some conversations to discuss this approach. I'll loop you in, and bring back thoughts to this PR, but just wanted to let you know. Thank you.
fix: edx-arch-experiments references
649a9ae
to
b10dcdb
Compare
Can you say more about the problems you're encountering that this helps with? Getting the right Python installed, setting up a virtualenv, etc. or maybe some particular workflow? To digress a bit, I've been thinking about our cookiecutter situation where we end up adding more and more build/dev code to each repo, but unevenly, and then can't readily upgrade/maintain all the copies. I'm at the point where I'm really reluctant to add more files to each repo if there's any possible alternative—especially when they're likely to diverge over time. An alternative approach would be using git subtrees to pull in the core of the Makefile, dramatically reducing boilerplate. Bringing this back around, one thing I've toyed with is having Makefile script blocks automatically run in a docker container. I'm curious if having one standard Docker image for all libraries, containing a standardized execution environment, would meet your needs—or if you're looking for something specific to this library. |
The goal of this solution was to solve the general problem of manual virtualenv setup and switching (spurred by my specific problem of not being able to get the repo's virtualenv setup instructions to work on my remote devstack). Using this dockerization solution has served us well in other repositories (openedx/edx-enterprise#1467) (edx/edx-arch-experiments#420), but I heartily agree it would be ideal to use a single docker/makefile template from a centralized location rather that copy-pasting solutions from repo to repo. @timmc-edx's makefile and docker solutions look promising in principle, but I haven't gotten them to work on my environment thus far. |
Ohhhhh, yeah. I'm definitely not a fan of all the READMEs that try to tell you how to set up a virtualenv -- I've never followed those instructions ever since figuring out my workflow. Personally, what works for me is to run But I'm pretty sure most of my teammates use the I really don't like the fragmentation, and putting the "how to do basic Python setup" documentation in the README just makes it hard to maintain. I think we should remove those instructions and either link to a centralized, standard workflow or just make it so devs don't have to manage the virtualenvs directly. |
I've filed an issue for changing the cookiecutter-generated README to not have detailed descriptions of how to set up for developing on repos and to instead link to a common page that we can keep up to date: openedx/edx-cookiecutters#396 -- does that cover some of what you're looking for? |
@marlonkeating I'm going to close this for now since we haven't heard back in a few weeks, but please let me know if you have further thoughts on what we can do to streamline development. I also got some feedback from some developers that having repos manage their own virtualenvs would likely cause some difficulty with Tutor, so that would require more thought. I'm definitely going to look into |
Description:
Adds a
make test-shell
which launches a dockerized version of the local dev environment - rather than using a local virtualenv.~ Working from openedx/edx-enterprise#1467 ~
There are sometimes benefits and conveniences to having a containerized local environment versus setting up and maintaining python, virtualenv, and system dependencies (mysql-dev, etc) natively. Sometimes installing your code into the LMS container extends your testing cycle past your patience. Here is some docker/makefile config to enable make test-shell to launch a containerized environment containing your local development code so you can make test / make upgrade / 'profit' / etc inside a container.
Installation instructions:
If running into issues with
make test-shell
, try running:docker-compose build --no-cache
Testing instructions:
make test-shell
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns:
List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.