Issues with Tutor AMI

I ran into several issues after trying to get started with the Tutor AMI. I just want to report on my experience to get feedback about whether this is surprising or not since the documentation seems to suggest that I shouldn’t have had these problems. I’d also like to get some reassurance that things will be stable going forward, or suggestions for how I can either avoid problems in the future or recover from the problems I ran into without having to terminate the EC2 instance and start over again. Based on my experience so far, I’m a little worried about using this in production. Here’s a list of the issues I ran into:

4 GB RAM was not enough

  • The build never got past the Django migrations.
  • This is the free memory on EC2 after launching tutor:
tutor@ip-172-31-4-25:/root$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7.7Gi       3.6Gi       1.1Gi       2.0Mi       3.0Gi       3.6Gi
Swap:            0B          0B          0B

Questions

  • Is it the case that 4 GB is sufficient to run tutor but not enough to build it?

Default EBS volume size of 25 GB was not enough

20 GB storage was used up after the build
tutor@ip-172-31-4-25:/root$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        67G   20G   48G  30% /
devtmpfs        4.2G     0  4.2G   0% /dev
tmpfs           4.2G     0  4.2G   0% /dev/shm
tmpfs           826M  2.0M  824M   1% /run
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs           4.2G     0  4.2G   0% /sys/fs/cgroup
/dev/loop0       59M   59M     0 100% /snap/core18/1885
/dev/loop2       75M   75M     0 100% /snap/lxd/16922
/dev/loop3       30M   30M     0 100% /snap/amazon-ssm-agent/2012
/dev/loop4       59M   59M     0 100% /snap/core18/2785
/dev/loop5      123M  123M     0 100% /snap/core/14946
/dev/loop6       67M   67M     0 100% /snap/core20/1891
/dev/loop7       27M   27M     0 100% /snap/amazon-ssm-agent/6563
/dev/loop8       97M   97M     0 100% /snap/lxd/24061
/dev/loop1       67M   67M     0 100% /snap/core20/1950
tmpfs           826M     0  826M   0% /run/user/0
tutor@ip-172-31-4-25:/root$ docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          43        12        10.13GB   3.716GB (36%)
Containers      22        15        11.14MB   0B (0%)
Local Volumes   6         6         2.444GB   0B (0%)
Build Cache     0         0         0B        0B
  • This caused the site to become unavailable from a web browser. I also observed the following errors after accessing the EC2 instance via ssh:
    • Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    • sudo: unable to resolve host ip-172-31-4-157: Temporary failure in name resolution
    • Job for docker.service failed because the control process exited with error code.

This was the state after

  • Doing an initial build
  • Importing the demo course
  • Trying to install the indigo theme and rebuild

Solutions

After realizing that my failed deployments were due to inadequate memory and storage requirements, I took the following steps:

  • I launched the AMI with a t3a.large instance (8 GB RAM)
  • After that, I resized the EBS volume to 64 GB

We would need to run some minimal hardward requirement tests again. It’s quite possible that more than 4GB is now required. Note that the recommended configuration to run the Tutor AMI is a t3a.large instance.
Those 8GB of RAM should only be strictly required to run migrations. Thus, you should get along just fine by creating a swap file for cheap extra memory.

Did you rebuild all images? You should only have to rebuild the openedx Docker image, which should use less disk space.

Extending the filesystem, like you did, was the right solution to your problem. Alternatively, you could have added an EBS when you launched your EC2 instance – though I agree it’s not obvious for new users.

1 Like

Thanks so much for the response, @regis.

I believe I ran tutor images build openedx, but I’m not totally sure.

It looks like everything has been fine since using t3a.large with a larger volume.

There are two other issues I noticed with the AMI.

  • tutor was not up to date.
    I assumed that the docs were outdated because the available CLI commands did not much up with the docs. But it was tutor that was outdated.
  • Docker and the Docker Compose Plugin were outdated.
    After noticing the first issue, I tried updating tutor, but ran into some of the issues mentioned in Upgrading tutor to Palm. Luckily, just upgrading docker and the compose plugin were sufficient to upgrade tutor.

Sorry for my very late response. I was absolutely convinced that v16.0.0 had been released to the marketplace, but it turns out that my request was rejected because of a security issue in Ubuntu 22.04. I do not believe I received any notification whatsoever about that, so I assumed that the new version had been published and forgot about it. I’ll publish 16.1.1 ASAP.

My issue with installing the Tutor AMI is that there is no “Choose Action” heading with a “Launch from Website” option that I can choose. If there is one, I can’t find it. And because of that, I can’t seem to launch the website even after setting up the DNS records.

1 Like

I am having this exact same issue while following the tutorial on YouTube.

1 Like

I ended up creating a whole new fake gmail account, used that to set up a new AWS Console account, followed the directions and got an instance up. I’m using the current fake one as a proof of concept for my managers but eventually will need to go back our production account and I will not be able to set up the Tutor AMI over there bc only the first attempt gives you the right options.

I figured out that I needed to delete my AWS AMI Subscription in order to start over. Once I did that, I had access to the Launch page again and was able to get a new instance up and running.

Two modifications to the otherwise excellent video:

At [5:22] - Don’t type [ local quickstart ] , type [ local launch ] (then return to following the video)
At [8:31] - Don’t type [ local createuser ], type [ local do createuser ] (then add the --superuser and other text as shown.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.