sdslabs/gasper

Add Virtual Terminal using gotty

alphadose opened this issue · 0 comments

Steps:-

  1. Add gotty dependency to gasper via go get github.com/yudai/gotty
  2. Add a route to kaze service named /apps/:app/term which will be a GET request
  3. 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"
}
  1. 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.
  2. Get the port defined above using utils.GetFreePort function in gasper itself
  3. The ip of the node where the application is deployed can be retrieved using redis.FetchAppNode()