Update documentation and build configuration
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -14,3 +14,4 @@ dist/
|
|||||||
*.key
|
*.key
|
||||||
*.csr
|
*.csr
|
||||||
*.srl
|
*.srl
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -1,17 +1,34 @@
|
|||||||
builds:
|
builds:
|
||||||
- goos:
|
- id: speedrun
|
||||||
|
main: ./cmd/speedrun
|
||||||
|
binary: speedrun
|
||||||
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
|
||||||
- darwin
|
- darwin
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
- arm64
|
||||||
ldflags:
|
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:
|
archives:
|
||||||
- replacements:
|
- id: speedrun
|
||||||
amd64: x86_64
|
|
||||||
format: zip
|
format: zip
|
||||||
|
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||||
|
builds:
|
||||||
|
- speedrun
|
||||||
|
- id: portal
|
||||||
|
format: zip
|
||||||
|
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||||
|
builds:
|
||||||
|
- portal
|
||||||
checksum:
|
checksum:
|
||||||
name_template: "checksums.txt"
|
name_template: "checksums.txt"
|
||||||
snapshot:
|
snapshot:
|
||||||
|
|||||||
@@ -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)
|
## 0.2.2 (2021-08-01)
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
GITCOMMIT=$(shell git rev-parse --short HEAD 2>/dev/null)
|
GITCOMMIT=$(shell git rev-parse --short HEAD 2>/dev/null)
|
||||||
DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
VERSION=$(shell git branch --show-current)
|
VERSION=$(shell git describe --tags)
|
||||||
DIST=dist
|
DIST=dist
|
||||||
LINUX_PATH=$(DIST)/linux
|
LINUX_PATH=$(DIST)/linux
|
||||||
DARWIN_PATH=$(DIST)/darwin
|
DARWIN_PATH=$(DIST)/darwin
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -32,7 +32,7 @@ This project satisfies a simple need: to be able to perform certain type of oper
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
#### MacOS, Linux, Windows
|
#### MacOS, Linux
|
||||||
|
|
||||||
Download the precompiled binaries from here: [Releases](https://github.com/dpogorzelski/speedrun/releases)
|
Download the precompiled binaries from here: [Releases](https://github.com/dpogorzelski/speedrun/releases)
|
||||||
|
|
||||||
@@ -63,12 +63,12 @@ speedrun run whoami --insecure
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
#### Speedrun
|
#### 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
|
||||||
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.
|
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
|
#### 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.
|
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.
|
||||||

|

|
||||||
|
|
||||||
@@ -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).
|
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
|
#### Plugins
|
||||||
TODO
|
Plugins will allow you to add custom commands without altering the source code. This is not implemented yet.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
Stop Nginx on VMs that have a label `role` with value `nginx` and a label named `project` with value `someproject`
|
Stop Nginx on VMs that have a label `role` with value `nginx` and a label named `project` with value `someproject`
|
||||||
|
|
||||||
```bash
|
```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.
|
Run arbitrary shell command on the target machines. Ignore Portal's certificate and connect via private IP address.
|
||||||
|
|
||||||
```bash
|
```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
|
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`.
|
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
|
#### Run Portal as a systemd service
|
||||||
TODO
|
Find a sample unit [here](init/portal.service)
|
||||||
|
|
||||||
#### Use self signed certificates during testing
|
#### Use self signed certificates during testing
|
||||||
In the [scripts](scripts/) folder you can find scripts that will help you generate:
|
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 |
Reference in New Issue
Block a user