higanworks / knife-zero

Run chef-client/cinc-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.
https://knife-zero.github.io
Other
169 stars 30 forks source link

Using MOSH for flaky internet connection #158

Open leoc opened 3 years ago

leoc commented 3 years ago

Hello and thank you very much for this project.

Recently I have been traveling and had to deploy long running recipes with flaky internet connection. Unfotunately the connection dropped a lot, causing the output to stop. The jobs still run through, but I did not get the output from chef anymore.

How hard would it be to run all commands via some custom ssh command or maybe even MOSH (mobile shell), which reconnects automatically if the connection is lost?

Thanks again!

sawanoboly commented 3 years ago

Thanks for the feedback!

When running knife-zero, the recipe forwarding uses the port forwarding feature of SSH. I'm not familiar with mosh, so I looked it up, but it doesn't seem to have a port forwarding feature, so it would be difficult to implement as an SSH alternative.

As an alternative, you can prepare a stepping stone host on the target node's network, and use a terminal multiplexer such as tmux to run on that host.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.