Update documentation and build configuration

This commit is contained in:
2022-01-13 23:15:00 +01:00
parent 3931b61dd1
commit c267b47e59
7 changed files with 37 additions and 14 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored
View File

@@ -14,3 +14,4 @@ dist/
*.key
*.csr
*.srl
.DS_Store

View File

@@ -1,17 +1,34 @@
builds:
- goos:
- id: speedrun
main: ./cmd/speedrun
binary: speedrun
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X speedrun/cmd.version={{.Version}} -X speedrun/cmd.commit={{.ShortCommit}} -X speedrun/cmd.date={{.Date}}
- -s -w -X github.com/speedrunsh/speedrun/cmd/speedrun/cli.version={{.Version}} -X github.com/speedrunsh/speedrun/cmd/speedrun/cli.commit={{.ShortCommit}} -X github.com/speedrunsh/speedrun/cmd/speedrun/cli.date={{.Date}}
- id: portal
main: ./cmd/portal
binary: portal
goos:
- linux
goarch:
- amd64
- arm64
archives:
- replacements:
amd64: x86_64
- id: speedrun
format: zip
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- speedrun
- id: portal
format: zip
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- portal
checksum:
name_template: "checksums.txt"
snapshot:

View File

@@ -1,3 +1,8 @@
## 0.3.0-beta1 (2022-01-13)
### Breaking changes
Pretty much complete project pivot and no retro compatibility with previous versions. SSH support was dropped completely and an agent (Portal) was introduced.
You can refer to the README for updated installation and usage info.
## 0.2.2 (2021-08-01)

View File

@@ -1,6 +1,6 @@
GITCOMMIT=$(shell git rev-parse --short HEAD 2>/dev/null)
DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
VERSION=$(shell git branch --show-current)
VERSION=$(shell git describe --tags)
DIST=dist
LINUX_PATH=$(DIST)/linux
DARWIN_PATH=$(DIST)/darwin

View File

@@ -32,7 +32,7 @@ This project satisfies a simple need: to be able to perform certain type of oper
## Installation
#### MacOS, Linux, Windows
#### MacOS, Linux
Download the precompiled binaries from here: [Releases](https://github.com/dpogorzelski/speedrun/releases)
@@ -63,12 +63,12 @@ speedrun run whoami --insecure
</p>
#### Speedrun
Speedrun is the client. Speedrun is the CLI tool you run on your computer to send commands to your servers.
Speedrun is the client. Speedrun is the CLI tool you run on your computer to send commands to your VMs.
#### Portal
Portal is the agent running on each server you want to send commands to. It will receive commands sent from Speedrun and respond with the outcome details accordingly.
#### Service Discovery
There is no server component in Speedrun's architecture. Service discovery is performed against native facilities of each supported provider such as GCP,AWS or Consul.
There is no server component in Speedrun's architecture. Service discovery is performed against native facilities of each supported provider such as GCP, AWS or Consul.
This eliminates the need to deploy,maintain and operate a server and all problems that would come with it as a consequence, such as: scalability, failure tolerance, redundancy, agent lifecycle management etc.
![Service Discovery](assets/service-discovery-sequence.png)
@@ -80,20 +80,20 @@ Communication between Speedrun and Portals is performed via [dRPC](https://githu
Speedrun supports a flexible yet simple expression language to filter Service Discovery results (`--target`), it's based on [antonmedv/expr](https://github.com/antonmedv/expr). Full language definition can be found [here](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md).
#### Plugins
TODO
Plugins will allow you to add custom commands without altering the source code. This is not implemented yet.
## Examples
Stop Nginx on VMs that have a label `role` with value `nginx` and a label named `project` with value `someproject`
```bash
speedrun service stop nginx --target "labels.role == 'nginx' and labels.project == 'someproject'"
speedrun service stop nginx --target "Labels.role == 'nginx' and Labels.project == 'someproject'"
```
Run arbitrary shell command on the target machines. Ignore Portal's certificate and connect via private IP address.
```bash
speedrun run "ls -la" --target "labels.env != 'prod'" --insecure --use-private-ip
speedrun run "ls -la" --target "Labels.env != 'prod'" --insecure --use-private-ip
```
Use a different config file
@@ -106,8 +106,8 @@ speedrun run whoami -c /path/to/config.toml
Instead of supplying certain flags repeatedly you can persist their behavior in the config file. Default config file is located at `~/.speedrun/config.toml` and default settings can be fetched via `speedrun init --print`.
#### Run portal as a systemd unit
TODO
#### Run Portal as a systemd service
Find a sample unit [here](init/portal.service)
#### Use self signed certificates during testing
In the [scripts](scripts/) folder you can find scripts that will help you generate:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 206 KiB