Skip to content

Install GitHub runner on startup in a tmpfs - #10318

Merged
GMNGeoffrey merged 1 commit into
iree-org:mainfrom
GMNGeoffrey:root-dir
Sep 7, 2022
Merged

GMNGeoffrey merged 1 commit into
iree-org:mainfrom
GMNGeoffrey:root-dir

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented Sep 7, 2022 •

Copy link
Copy Markdown
Member

The installation is just extracting an archive, so is not costly. This
makes the runner more decoupled from its boot disk. It allows us to
upgrade the runner version (which we'll need to do frequently) without
creating a whole new VM image (which is a pain and requires full VM
replacement to update). The tmpfs also gives us better IO performance,
which should speed a few things along (though we already give Docker a
tmpfs, so the difference won't be huge). It should allow us to switch
to a much simpler base image that just has a few dependencies
installed, rather than the current image, which I accidentally made 1TB
and is the product of much messing around.

Tested: #10298 targets the testing
runners which are using this config.

skip-ci

This is the last bit of #10133

Closes #10133

@GMNGeoffrey
GMNGeoffrey marked this pull request as ready for review September 7, 2022 18:02
chmod +x ~runner/config/deregister.sh
echo "Creating tmpfs for runner"
mkdir /runner-root
mount -t tmpfs -o size=50g tmpfs /runner-root

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on my local machine, looks like by default it gives 0777 file permission. Do we want to restrict the access a little?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it really matters? The runner has passwordless sudo

@GMNGeoffrey
GMNGeoffrey merged commit da96ec9 into iree-org:main Sep 7, 2022
@GMNGeoffrey
GMNGeoffrey deleted the root-dir branch September 7, 2022 18:42
@GMNGeoffrey GMNGeoffrey added the infrastructure Relating to build systems, CI, or testing label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Relating to build systems, CI, or testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants