Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move setup_environment commands to image generation #1533

Merged
merged 1 commit into from May 7, 2024

Conversation

enescakir
Copy link
Member

The setup_environment step involves commands to convert a standard VM into a runner. Over time, the number of commands has increased in response to various customer issues, which has also lengthened the run time.

We previously tried this, but certain commands had to run at runtime because the runner user was created by cloud-init. Recently, we separated the runner and runneradmin users. Now, cloud-init creates the runneradmin user, and we create the runner user in setup_environment. This allows us to move runner user related commands to image generation.

If the latest image is used, we only run the short version of the setup_environment script. If an older image is used, we run the long version of the setup_environment script. It allows us to deploy the new image to some hosts and test it before deploying it to all hosts.

The new version saves the ".setup_info" file using "tee" instead of the ">" redirect, as the file should have different ownership.

The `setup_environment` step involves commands to convert a standard VM
into a runner. Over time, the number of commands has increased in
response to various customer issues, which has also lengthened the run
time.

We previously tried this, but certain commands had to run at runtime
because the runner user was created by cloud-init. Recently, we
separated the runner and runneradmin users. Now, cloud-init creates the
runneradmin user, and we create the runner user in setup_environment.
This allows us to move runner user related commands to image generation.

If the latest image is used, we only run the short version of the
setup_environment script. If an older image is used, we run the long
version of the `setup_environment` script. It allows us to deploy the
new image to some hosts and test it before deploying it to all hosts.

The new version saves the ".setup_info" file using "tee" instead of the
">" redirect, as the file should have different ownership.
@enescakir
Copy link
Member Author

'Hide whitespace' makes reviewing easier.

Screenshot 2024-05-03 at 10 55 48

@enescakir enescakir merged commit 604cc3d into main May 7, 2024
6 checks passed
@enescakir enescakir deleted the runner-user-image branch May 7, 2024 15:09
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants