gossh
gossh copied to clipboard
Great project, can run in parallel
Hello, great project !!! I wrote a something similar for Kubernetes state in https://github.com/atakanyenel/Passa.
-
One improvement I realised so far, you can use goroutines in
state.Apply()
. All machines are connected separately and don't need to wait for each other. This will improve the setup time when there are many machines with slower connections. -
One extension process can be to use golang plugins, instead of compiling the state in the binary itself. That way , you deploy a single binary and people can give their state via plugins. Your interface for now is pretty stable, so it would be easy. It might contradict with your way of "no YAML", but it's still go code with type safe.
-
One configuration you can do is to get sudopass for ssh through env variable. Because currently a decompilation of the executable will give the plaintext password with the address.
I will be following this project and contribute to it if I can :)
Hey Atakan Thanks for opening an issue!
-
Yes, machines should definitely run in parallel. Marking this as an enhancement and I'll get back to it once I'm more confident in the general feel of this experiment.
-
Regarding plugins. This is not something that I've ever touched up, but sounds interesting. You are talking about https://golang.org/pkg/plugin/ or https://github.com/hashicorp/go-plugin ? Do you have any experience with either of these? Know any good tutorials? I do want to keep things simple, but I will have a look into this.
-
Agreed! I was actually thinking about these three options:
- cli flag
- env vars
- terminal promt https://github.com/howeyc/gopass
Hey,
I mean the normal go plugins, your first link. Hashicorp also builds its product on top of it. I wrote a plugin before, I can create a PR with plugins enabled and you can explore from there. If it doesn't go along with your vision, feel free to discard it.
I think currently two commands can be implemented. Basically show
, deploy
. Shows just prints out the State
, similar to plan
of terraform and deploy
deploys them.
One idea I have is to also give the Apt packages version field. I know you want to do this project to see if it's possible to represent states with go code, so it should be good experiment.
Thanks, that would be great! Be advised, tho, I probably will discard it - it seems like something that would add complexity (and work), but wouldn't add that much value. Then again, I haven't looked into it that much.
Apt version would definitely have to be added if I go forward with this experiment. Currently my main focus is to get a feel for what the API could be and how that would be to work with. I'm still not confident that this experiment will succeed..