flatcar / Flatcar

Flatcar project repository for issue tracking, project documentation, etc.
https://www.flatcar.org/
Apache License 2.0
751 stars 32 forks source link

[RFE] make `mayday` config input and targz output more flexible #1182

Open vbatts opened 1 year ago

vbatts commented 1 year ago

Current situation

Use-case is to use mayday more broadly than just for flatcar. Like scp mayday mylinuxhost:/tmp/ && ssh mylinuxhost /tmp/mayday to quickly get the collection from the machine.

Impact

currently it requires both the config file to be local and then outputs the collection to a local path. This means copying over a couple files, and then back another file. Not a big deal, but a couple moving parts.

Ideal future situation

I'm thinking that taking the config data in on stdin, and then outputting the tarball to stdout would be straightforward enough.

Additional information

maybe other ideas?

pothos commented 1 year ago

maybe other ideas?

When mayday would generate shell commands to execute (mayday | ssh host > output), it wouldn't even be needed as binary on the remote host. Another way is to make it an ssh wrapper like mayday --output /tmp/out ssh host and then it could copy itself over first before execution (or here again, use shell commands instead of a binary).