-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
SSHExec is an object in cmdeploy.py
, which we can use to get the result of bash commands on the relay. Since it was last reworked in #396, our needs have evolved. Obstacles of the current implementation:
- it always invariably connects to
mail_domain
, the relay host - it is initialized in cmdeploy.py's
main()
function, so the functions which come afterwards can hardly modify it - it doesn't offer to simply pass a bash command, you need to pass a function to it which calls a
remote.rshell
method - it offers two different callback functions for console output, but no option to suppress it completely
- the various functions which execute the bash command on the target system are spread out over many different files:
cmdeploy.py
,dns.py
,sshexec.py
,remote/rdns.py
, andremote/rshell.py
Situations in which we need it to work differently:
- in WIP: cmdeploy command to deploy a reverse proxy #628, we want to run commands on a reverse-proxy
- in Add installation using Docker Compose and many other improvements for implementation in Docker. #614, we want to run commands locally
- in Make
cmdeploy dns
work on localhost/in docker containers Keonik1/relay#3, we want to run DNS queries locally instead of on the relay - in docker-dns...docker-tests, we want to run commands in a docker container
- in cmdeploy: print echobot link at the end of cmdeploy run #620 we need to suppress the "[ssh] login to..." output
The current implementation has a certain elegance to it, to make it easier to test; I wonder whether it can be enhanced to fit all these needs. At the same time it would be nice to make it simpler and more maintainable (it took me a few weeks to understand the current obstacles well enough to write down this issue).
Metadata
Metadata
Assignees
Labels
No labels