aws-samples / amazon-ec2-gitlab-runner

This repository contains code to deploy and manage Gitlab Runners on Amazon EC2.
MIT No Attribution
58 stars 36 forks source link

200 GB Volume is not partitioned or mounted #11

Open dghighfill opened 1 year ago

dghighfill commented 1 year ago

After running this through some testing with larger Docker containers that are built from Docker in Docker, I started to have space issues in /var/lib/docker. I found that images were being built on the 15 GB drive that was attached to the EC2. I knew there was configuration for a 200 GB drive but when SSHing into the Runner, I couldn't see where it was being utilized.

In the Cloud Formation Init, I had to add a configset to write a daemon.json file to set the property data-root which is the root directory of persistent Docker state (default "/var/lib/docker"). Then in the commands for that configset I needed to add the partition, all 200 GB of it, create a /docker folder and then mount the /docker folder to that volume. This now pushes all the Docker work to the 200 Gb drive that was configured.

So my question is did I miss something in the original setup or how was that 200 GB volume being utilized?

I'm now worried that just when doing a GitLab build itself, where are all the fetches and temp files for the actual build being written from the Docker Containers. Is that on the 15 GB drive or the 200 that I've now attached for Docker. I'll investigate that more next week.