Add Virtual Terminal using gotty
alphadose opened this issue · 0 comments
alphadose commented
Steps:-
- Add gotty dependency to gasper via
go get github.com/yudai/gotty
- Add a route to kaze service named
/apps/:app/term
which will be a GET request - The response will be a link to the virtual terminal which can be opened in the browser.
Ex:-
{
"success":true,
"url": "kaze.sdslabs.co:41000"
}
- Call gotty functions directly instead of using the binary. You need to mimic this operation via function calls
gotty -w -p port --reconnect --timeout 120 --once ssh -p 2222 app_name@ip
. Exec is not allowed at any cost. - Get the port defined above using utils.GetFreePort function in gasper itself
- The ip of the node where the application is deployed can be retrieved using
redis.FetchAppNode()