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

Github actions, deploy to local machine without SSH but via runner #433

Open
webbastelbude opened this issue Mar 3, 2024 · 1 comment
Open

Comments

@webbastelbude
Copy link

I love tomo, and it replaced mina and capistrano for me. But nowdays things like Github actions are getting more popular and SSH based deplyoments seem to be moving to the background.
Thats why im asking if there is any way to use tomo without the remote SSH part. Because we already have a GitHub runner on the machine that can execute commands, so there is no need to have a separate SSH authentication. Sometimes the host can't even be reached via SSH. Still i would not want to rewrite what tomo currently does completely in some GitHub Actions but use tomo instead to setup the machine and deploy new versions.

@mattbrictson
Copy link
Owner

Hi @webbastelbude , thanks for opening this issue. Sorry for not responding sooner.

I think tomo could support local execution. Most of the SSH-specific logic is contained within Tomo::Runtime::TaskRunner#connect, which initializes and yields a Remote object. The connectRemote API contract could probably be satisfied by an alternate implementation acts locally instead of using SSH.

That said, opening the door to local execution would make tomo's core user-facing APIs a bit confusing. For example, the pattern of implementing tasks is:

def clone
  require_setting :git_url
  remote.run "git", "clone", settings[:git_url]
end

If remote is not "remote" at all, but is running on localhost without SSH, then this API is misleading at best.

Is there a word other than remote that would make sense in both an SSH and non-SSH scenario? Maybe target?

So my biggest concern is keeping tomo easy to understand and intuitive to use. I wouldn't want local execution to feel like it was hacked in.

Is this something you'd be willing to help with, in terms of code contributions? It would be great to have another maintainer/contributor on the project.

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