Short answer: This is worth doing and very possible. I’m not sure that anyone within edX will be able do it in the near future. We would likely review such a PR, though.
Long answer: I definitely think it would be worth supporting multiple Devstack instances on one machine.
Docker Compose actually supports this out-of-the-box via the COMPOSE_PROJECT_NAME
environment variable. Currently it’s set to "devstack"
in options.mk
. Ideally, changing the value of that to "devstack-hawthorn"
or something would “just work”, having the effect of namespacing all your containers and volumes.
Unfortunately, this only will work if we replace all the hard-coded container references like:
docker [exec|run|...] edx.devstack.<service>
with calls to docker-compose:
docker-compose [exec|run|...] <service>
This change would need to be made in the Makefile and all of the assorted shell scripts in the repository. We’d also need to stop explictly naming the containers in the docker-compose-*.yml
files, and let Docker Compose choose names such as devstack-hawthorn_mysql
and devstack-master_studio
.
As @jmbowman mentioned in Slack, edX is focusing its efforts on improving deployments before turning to focus on developer tooling. While we’re not likely to make this change ourselves right now, we’re open to accepting PRs towards it.