A service that powers Cirrus CI's task terminal access.
It's used as follows:
pkg/host
package is used in the Cirrus CI agent and acts as a terminal hostinternal/server
is running in the cloud and provides the server functionality- Cirrus CI web frontend acts as a terminal guest
The whole system consists of three components:
host
— provides terminal sessions by registering itself on theserver
- currently works over gRPC
server
— acts as a rendezvous point betweenhost
andguest
guest
— connects to thehosts
through aserver
and consumes terminal sessions- currently works over gRPC-Web, however, in the future, it's technically possible to provide an ability to connect to the
hosts
viaserver
using a standard SSH client
- currently works over gRPC-Web, however, in the future, it's technically possible to provide an ability to connect to the
The most up-to-date protocol specification can be found in the terminal.proto
, but to give a bit more visual picture, the overall data flow looks like this:
Development is done as you'd do normally, however, in case you need to make terminal.proto
changes, you will need re-generate the internal/api
package contents.
To do this, make sure Protocol Buffers Compiler (protoc
) is installed, and run the following command from the root of the project:
make
The JavaScript stubs are generated automatically by the JavaScript Protocol Buffers and gRPC code-generation
task in the .cirrus.yml
.