Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cirruslabs/terminal
A service that powers Cirrus CI's task terminal access
https://github.com/cirruslabs/terminal
golang grpc protocol-buffers
Last synced: 3 months ago
JSON representation
A service that powers Cirrus CI's task terminal access
- Host: GitHub
- URL: https://github.com/cirruslabs/terminal
- Owner: cirruslabs
- License: apache-2.0
- Created: 2021-06-11T14:43:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T08:08:23.000Z (10 months ago)
- Last Synced: 2024-06-19T20:50:21.230Z (8 months ago)
- Topics: golang, grpc, protocol-buffers
- Language: Go
- Homepage:
- Size: 374 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cirrus Terminal
A service that powers [Cirrus CI](https://cirrus-ci.org/)'s task terminal access.
It's used as follows:
* `pkg/host` package is used in the [Cirrus CI agent](https://github.com/cirruslabs/cirrus-ci-agent) and acts as a terminal host
* `internal/server` is running in the cloud and provides the server functionality
* [Cirrus CI web frontend](https://github.com/cirruslabs/cirrus-ci-web) acts as a terminal guest## Architecture
The whole system consists of three components:
* `host` — provides terminal sessions by registering itself on the `server`
* currently works over gRPC
* `server` — acts as a rendezvous point between `host ` and `guest `
* `guest` — connects to the `hosts` through a `server` 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` via `server` using a standard SSH clientThe most up-to-date protocol specification can be found in the [`terminal.proto`](proto/terminal.proto), but to give a bit more visual picture, the overall data flow looks like this:
![](doc/diagram.png)
## Development
Development is done as you'd do normally, however, in case you need to make [`terminal.proto`](proto/terminal.proto) changes, you will need re-generate the `internal/api` package contents.
To do this, make sure [Protocol Buffers Compiler](https://grpc.io/docs/protoc-installation/) (`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`](.cirrus.yml).