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

build should allow local build when on the machine to be built; same for apply? #206

Open
Atemu opened this issue May 5, 2024 · 1 comment

Comments

@Atemu
Copy link

Atemu commented May 5, 2024

When running colmena build --on A,B on machine A in order to sanity check the current config, Colmena fails to build because machine A is a desktop machine that I intend to only deploy locally.

What I would like to happen here is for Colmena to build config B on machine B remotely but build config A locally on machine A.

The same applies to apply actually; when I'm on the machine being applied itself, I'd expect Colmena to do apply-local on this particular machine and apply remotely on all the others I've specified.
I never understood why the distinction between apply and apply-local has to even exist though: apply-local can only ever be done when on the machine itself, so it never makes sense to use when hostname != target. Reversely, it never makes sense to use remote deployment when local to the machine you intend to deploy.
Am I missing something? What is the rationale behind this design decision?

If there is concern about edge-cases, this could perhaps be alleviated via a flag instead; apply --force-local to allow/force local deployment even if the hostname does not match and apply --force-remote to do the opposite.

A workaround for both of these issues would be to allow local "remote" builds via SSH and always use apply but I don't really want my local SSH key to be able to log into my machine to mitigate privilege escalations.

@fpringle
Copy link

Seconded! This restriction doesn't make sense to me either; if I want to build my entire fleet I have to do colmena apply switch --on '@not-local' && colmena apply-local switch, which isn't very ergonomic.

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

No branches or pull requests

2 participants