How to Push and Pull Customized Images with ECR Using tutor images Commands

Hi everyone,

I’m currently working with Open edX and using Tutor for my setup, running on an EC2 instance. I need to push and pull customized Docker images with AWS Elastic Container Registry (ECR). While I understand the basic commands tutor images pull and tutor images push, I’m having trouble figuring out the exact steps and configurations required to integrate them with ECR.

Here are the specific issues I’m facing:

  1. Authentication with ECR: How do I authenticate Tutor with AWS ECR to allow for pulling and pushing images?
  2. Customizing Image Names: What are the steps to customize the image names so they correspond to my ECR repository?
  3. Configuration Files: Are there specific configuration files or environment variables that need to be set for Tutor to recognize and interact with ECR?
  4. Command Usage: What is the exact usage of the tutor images pull and tutor images push commands in the context of ECR? Are there additional options or flags required?

Any detailed guidance or step-by-step instructions would be greatly appreciated. Thank you in advance for your help!

Best regards,

Tutor issues normal docker commands to handle most of it’s task so you simply need to authenticate to your registry (ECR) via docker login and Tutor should work just fine.

The main configuration file for Tutor is the config.yml you can edit this file to customize your Tutor installation. This file is usually stored in a directory known as TUTOR_ROOT (by default $HOME/.local/share/tutor). You can change the location of this directory by setting the $TUTOR_ROOT env variable and you can print it’s current value by running tutor config printroot.

Among many other things, the config.yml file allows to define the images that are going to be used by Tutor. Tutor alongside it’s different plugins define variables for the images of the different micro-services they are deploying, for example the openedx image has the default value of (the link show some jinja templating but I just put the final value to make it easier to read). You can edit your config.yml to use your own image (DOCKER_IMAGE_OPENEDX:

In summary you only need to authenticate via docker login and edit your config.yml with your own image name.

1 Like

Thanks for the help. It looks quite easy now!

If I translate and brand an MFE, how do I push this customized container to ECR and pull it to another machine using Tutor commands as I do with the edX platform? What configurations are needed for that? I don’t see a configuration for "DOCKER_IMAGE_MFE

MFEs are handled via the Tutor plugin system, the official plugin is tutor-mfe, the variable would be MFE_DOCKER_IMAGE (The values in the dictionary are prefixed with MFE_ later in the python file).

The tutor-mfe readme explains how to perform some common actions. You probably want to read a little bit about the plugin system too.

1 Like