Is there a method to containerize Tutor itself? Or a method to deploy edX with no changes to the host?

Hello, I would like to deploy edX on a server, but I do not want to be changing anything on the host itself or installing any new packages. It seems like all of the rest of edX is containerized but not Tutor itself. I was looking at the dev stack but even there is seems the compose relies on software being installed on the host. I was also looking into the possibility of creating a container for tutor itself using the docker socket to allow it to spin up sibling containers but I would first like to get the communities input.
I was wondering if anyone has any suggestions on the easiest way to go about this.

You can build your own containerized version of tutor if you want. Pick a base image that includes python, then add a pip install tutor==version step to the Dockerfile. You’ll probably also want the tutor root dir (tutor config printroot) to be mounted into the container from the host so that it’s persistent.

One challenge is that enabling it to run docker commands can work in a couple different ways, so it’s best to customize to your specific environment. An example I know of is for our deployment manager Grove, we build a container that has docker, terraform, aws-cli, kubectl, helm, and tutor, all of which are useful for setting up our production environments on kubernetes.

Keep in mind, although Tutor isn’t containerized, it can be installed into a python virtual environment, and the only files it will ever modify are within the virtual environment itself, as well as the tutor config printroot directory. So it’s not containerized but it is nicely “contained” and is not going to make random changes to many different integration points all over your server. That’s why I think for many people, the hassle of dealing with docker-in-docker etc. is not worth the effort of containerizing it. The python venv keeps it isolated, and only thing outside of the venv (the tutor root dir) will need to be present on your host whether tutor is containerized or not.

One last note: if you choose to deploy onto Kubernetes, then you run tutor from a remote machine and it never gets installed on to the “server” (k8s node[s]) at all. Though this way of deploying it is much more complex.

1 Like