83
README.md
83
README.md
@@ -1,77 +1,80 @@
|
||||
<p align="center">
|
||||
<a rel="nofollow">
|
||||
<img src="docs/logo.png?raw=true" width="200" style="max-width:100%;">
|
||||
<img src="assets/logo.png?raw=true" width="200" style="max-width:100%;">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
# Speedrun
|
||||
|
||||
[](https://github.com/dpogorzelski/speedrun/blob/master/LICENSE)
|
||||
[](https://goreportcard.com/report/github.com/dpogorzelski/speedrun)
|
||||
[](https://github.com/dpogorzelski/speedrun/actions/workflows/go.yml)
|
||||
|
||||
Speedrun is an action execution framework that works at scale.
|
||||
Speedrun helps you control your compute fleet with minimal effort.
|
||||
|
||||
It allows you to run any action/command across any number of servers, projects and cloud vendors with ease and fast (currently GCP only but AWS and Azure will be supported as well), example:
|
||||
Example (stop nginx across 3k machines):
|
||||
|
||||
```bash
|
||||
speedrun run systemctl stop nginx
|
||||
speedrun service stop nginx
|
||||
```
|
||||
|
||||
to stop nginx across 3k machines.
|
||||
|
||||
No hassles with setting up and maintaining a server with agents as speedrun has none. Single self-contained binary. Speedrun leverages SSH as transport with tight cloud vendor integration to take the burden of mundane things like key generation and propagation/revocation away from the user.
|
||||
|
||||
Server targeting (`--target`) is made as intuitive as possible, currently based on [gcloud topic filters](https://cloud.google.com/sdk/gcloud/reference/topic/filters) but in the future will be replaced by a generic selection mechanism to provide a seamless experience across different cloud vendors.
|
||||
|
||||
|
||||
Features:
|
||||
|
||||
* native cloud integration (currently Google Cloud only, AWS and Azure coming up!)
|
||||
* stateless and agentless
|
||||
* stateless
|
||||
* serverless
|
||||
* idempotent
|
||||
* no complex configuration required
|
||||
* single self-contained binary
|
||||
* can run against any number of servers and projects seamlessly
|
||||
* a plugin system is in the plan to allow anyone to integrate execution modules that will wrap complex functionality instead of running raw shell commands
|
||||
|
||||
* server discovery via native cloud integration (currently Google Cloud only, AWS and Azure coming up!)
|
||||
* extensible (plugin system is in the works)
|
||||
|
||||
## Installation
|
||||
|
||||
#### Homebrew (MacOS, Linux)
|
||||
```bash
|
||||
brew install dpogorzelski/tap/speedrun
|
||||
```
|
||||
#### MacOS, Linux, Windows
|
||||
|
||||
Download the precompiled binaries from here: [Releases](https://github.com/dpogorzelski/speedrun/releases)
|
||||
|
||||
#### Manual (MacOS, Linux, Windows)
|
||||
Download the precompiled binary from here: [Releases](https://github.com/dpogorzelski/speedrun/releases)
|
||||
## Usage
|
||||
|
||||
#### Quickstart
|
||||
|
||||
On a server:
|
||||
|
||||
`sudo ./portal --insecure`
|
||||
|
||||
On your machine:
|
||||
|
||||
```bash
|
||||
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceaccount.json
|
||||
speedrun init
|
||||
speedrun key new
|
||||
speedrun key authorize
|
||||
speedrun run whoami
|
||||
speedrun run whoami --insecure
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
* picture first here
|
||||
|
||||
* speedrun client
|
||||
|
||||
* portal
|
||||
|
||||
* protocols
|
||||
|
||||
* service discovery
|
||||
|
||||
* language definition [expr/Language-Definition.md at master · antonmedv/expr · GitHub](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md)
|
||||
|
||||
## Examples
|
||||
|
||||
Use 1000 concurrent SSH workers
|
||||
Stop Nginx on VMs that have a label `role` with value `nginx` and a label named `project` with value `someproject`
|
||||
|
||||
```bash
|
||||
speedrun run "uname -r" --concurrency 1000
|
||||
speedrun service stop nginx --target "labels.role == 'nginx' and labels.project == 'someproject'r"
|
||||
```
|
||||
|
||||
Stop Nginx on VMs matching the target selector
|
||||
Run arbitrary shell command on the target machines. Ignore Portal's certificate and connect via private IP address.
|
||||
|
||||
```bash
|
||||
speedrun run sudo systemctl stop nginx --target "labels.env=staging AND labels.app=foobar"
|
||||
```
|
||||
|
||||
Ignore SSH fingerprint mismatch and connect via private IP addresses
|
||||
|
||||
```bash
|
||||
speedrun run "ls -la" --target "labels.env != prod" --ignore-fingerprint --concurrency 1000 --use-private-ip
|
||||
speedrun run "ls -la" --target "labels.env != 'prod'" --insecure --use-private-ip
|
||||
```
|
||||
|
||||
Use a different config file
|
||||
@@ -82,7 +85,11 @@ speedrun run whoami -c /path/to/config.toml
|
||||
|
||||
## Configuration
|
||||
|
||||
Using certain flags repeteadly can be annoying, it's possible to persist their behavior via config file. Default config file is located at `~/.speedrun/config.toml` and can be re-initialized to it's default form via `speedrun init`.
|
||||
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
|
||||
|
||||
#### Use self signed certificates during testing
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user