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

Enable Tartelet to update the virtual machines from a registry. #13

Open
jaylyerly opened this issue May 3, 2023 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@jaylyerly
Copy link

We've just set up Tartelet and learned a lot about tart. This whole project is fantastic!

We're trying to figure out how to manage several physical machines running VMs with Tartelet and keep everything in sync.

We're using a registry to store our VM image which tart can access via pull / clone. But I'm not sure of the best way to propagate changes through the system automatically.

Would it be feasible to have Tartelet run a shell script before launching a runner when it's restarted? That would provide a hook to run some tart commands to pull the latest image from the registry.

Of course it would be nice to have a UI for this, but I'm afraid it's going to be specific to the registry. For example, we're using Amazon's ECR registry which requires authenticating via the aws cli tool before accessing the registry. It's simple enough to script, but impossible to build a UI around.

I think this is a feature request to be able to run a script between stopping a runner and restarting it.

@fkorotkov
Copy link

fkorotkov commented May 3, 2023

Tart supports Docker credentials helpers so you can install and configure one for ECR and Tart will call it automatically for pull. I think Tartelet can always just call tart pull before starting a worker to make sure the image is up-to-date.

We do it everywhere at Cirrus Labs for our CI and for Cirrus Runners.

@jaylyerly
Copy link
Author

That sounds like a great solution!

@simonbs
Copy link
Contributor

simonbs commented May 10, 2023

When setting up our host machines I looked into using tart push and tart pull to update images through an OCI registry, specifically GitHub Packages but I found that it took hours upon hours to update an image and decided not to proceed with it. Instead I am using the workflow build on tart export and tart import described in the wiki.

If anyone has any ideas as to how tart push and tart pull can be used without operations taking ages, I'd love to hear about it and build some functionality on top of this in Tartelet.

@jaylyerly
Copy link
Author

With an AWS ECR registry, it does indeed take hours to pull a new update, but I just chalked that up to pushing a 40GB image over the internet. In our workflow, it wouldn't happen very frequently, so I'm not really concerned if it takes a while, as long as it was reliable.

@simonbs When you propagate changes using import/export, how does that fit into your process? Is that a manual step or is there a hook in Tartelet?

@simonbs simonbs added documentation Improvements or additions to documentation enhancement New feature or request and removed documentation Improvements or additions to documentation labels Jul 17, 2023
@simonbs
Copy link
Contributor

simonbs commented Jul 17, 2023

@jaylyerly There is no hooks in Tartelet. Our workflow is described in the wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants