forked from toolshed/abra
fix: remove cruft + readme pass + document forks
This commit is contained in:
80
README.md
80
README.md
@ -7,89 +7,33 @@
|
||||
|
||||
The Co-op Cloud utility belt 🎩🐇
|
||||
|
||||
`abra` is a command-line tool for managing your own [Co-op Cloud](https://coopcloud.tech). It can provision new servers, create applications, deploy them, run backup and restore operations and a whole lot of other things. It is the go-to tool for day-to-day operations when managing a Co-op Cloud instance.
|
||||
|
||||
## Install
|
||||
|
||||
### Arch-based Linux Distros
|
||||
|
||||
[abra (coming-soon)](https://aur.archlinux.org/packages/abra/) or for the latest version on git [abra-git](https://aur.archlinux.org/packages/abra-git/)
|
||||
|
||||
```sh
|
||||
yay -S abra-git # or abra
|
||||
```
|
||||
|
||||
### Debian-based Linux Distros
|
||||
|
||||
**Coming Soon**
|
||||
|
||||
### Homebrew
|
||||
|
||||
**Coming Soon**
|
||||
|
||||
### Build from source
|
||||
|
||||
```sh
|
||||
git clone https://git.coopcloud.tech/coop-cloud/abra
|
||||
cd abra
|
||||
go env -w GOPRIVATE=coopcloud.tech
|
||||
make install
|
||||
```
|
||||
|
||||
The abra binary will be in `$GOPATH/bin`.
|
||||
|
||||
## Autocompletion
|
||||
|
||||
**bash**
|
||||
|
||||
Copy `scripts/autocomplete/bash` into `/etc/bash_completion.d/` and rename
|
||||
it to abra.
|
||||
|
||||
```
|
||||
sudo cp scripts/autocomplete/bash /etc/bash_completion.d/abra
|
||||
source /etc/bash_completion.d/abra
|
||||
```
|
||||
|
||||
In development, you can source the script in your git checkout, just make sure
|
||||
to set `PROG=abra`, otherwise it'll add completion to the wrong command:
|
||||
|
||||
```
|
||||
PROG=abra source /path/to/abra/scripts/autocomplete/bash
|
||||
```
|
||||
|
||||
**(fi)zsh**
|
||||
|
||||
(fi)zsh doesn't have an autocompletion folder by default but you can create one, then copy `scripts/autocomplete/zsh` into it and add a couple lines to your `~/.zshrc` or `~/.fizsh/.fizshrc`
|
||||
|
||||
```
|
||||
sudo mkdir /etc/zsh/completion.d/
|
||||
sudo cp scripts/autocomplete/zsh /etc/zsh/completion.d/abra
|
||||
echo "PROG=abra\n_CLI_ZSH_AUTOCOMPLETE_HACK=1\nsource /etc/zsh/completion.d/abra" >> ~/.zshrc
|
||||
```
|
||||
|
||||
(replace .zshrc with ~/.fizsh/.fizshrc if you use fizsh)
|
||||
`abra` is a command-line tool for managing your own [Co-op Cloud](https://coopcloud.tech). It can provision new servers, create apps, deploy them, run backup and restore operations and a whole lot of other things. Please see [docs.coopcloud.tech](https://docs.coopcloud.tech) for more extensive documentation.
|
||||
|
||||
## Hacking
|
||||
|
||||
Install direnv, run `cp .envrc.sample .envrc`, then run `direnv allow` in this directory. This will set coopcloud repos as private due to [this bug.](https://git.coopcloud.tech/coop-cloud/coopcloud.tech/issues/20#issuecomment-8201). Or you can run `go env -w GOPRIVATE=coopcloud.tech` but I'm not sure how persistent this is.
|
||||
### Getting started
|
||||
|
||||
Install [direnv](https://direnv.net), run `cp .envrc.sample .envrc`, then run `direnv allow` in this directory. This will set coopcloud repos as private due to [this bug.](https://git.coopcloud.tech/coop-cloud/coopcloud.tech/issues/20#issuecomment-8201). Or you can run `go env -w GOPRIVATE=coopcloud.tech` but I'm not sure how persistent this is.
|
||||
|
||||
Install [Go >= 1.16](https://golang.org/doc/install) and then:
|
||||
|
||||
- `make build` to build
|
||||
- `./abra` to run commands
|
||||
- `make test` will run tests
|
||||
- `make install` will install it to `$GOPATH/bin`
|
||||
- `go get <package>` and `go mod tidy` to add a new dependency
|
||||
|
||||
Our [Drone CI configuration](.drone.yml) runs a number of sanity on each pushed commit. See the [Makefile](./Makefile) for more handy targets.
|
||||
|
||||
Please use the [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/) for your commits so we can automate our change log.
|
||||
|
||||
## Versioning
|
||||
### Versioning
|
||||
|
||||
We use [goreleaser](https://goreleaser.com) to help us automate releases. We use [semver](https://semver.org) for versioning all releases of the tool. While we are still in the public alpha release phase, we will maintain a `0.y.z-alpha` format. Change logs are generated from our commit logs. We are still working this out and aim to refine our release praxis as we go.
|
||||
|
||||
For developers, while using this `-alpha` format, the `y` part is the "major" version part. So, if you make breaking changes, you increment that and _not_ the `x` part. So, if you're on `0.1.0-alpha`, then you'd go to `0.1.1-alpha` for a backwards compatible change and `0.2.0-alpha` for a backwards incompatible change.
|
||||
|
||||
## Making a new release
|
||||
### Making a new release
|
||||
|
||||
- Change `ABRA_VERSION` to match the new tag in [`scripts`](./scripts/installer/installer) (use [semver](https://semver.org))
|
||||
- Commit that change (e.g. `git commit -m 'chore: publish next tag 0.3.1-alpha'`)
|
||||
@ -99,7 +43,9 @@ For developers, while using this `-alpha` format, the `y` part is the "major" ve
|
||||
- Deploy the new installer script (e.g. `cd ./scripts/installer && make`)
|
||||
- Check the release worked, (e.g. `abra upgrade; abra version`)
|
||||
|
||||
## Fork maintenance
|
||||
### Fork maintenance
|
||||
|
||||
#### `godotenv`
|
||||
|
||||
We maintain a fork of [godotenv](https://github.com/Autonomic-Cooperative/godotenv) for two features:
|
||||
|
||||
@ -109,3 +55,7 @@ We maintain a fork of [godotenv](https://github.com/Autonomic-Cooperative/godote
|
||||
You can upgrade the version here by running `go get github.com/Autonomic-Cooperative/godotenv@<commit>` where `<commit>` is the
|
||||
latest commit you want to pin to. We are aiming to migrate to YAML format for the environment configuration, so this should only
|
||||
be a temporary thing.
|
||||
|
||||
#### `docker/client`
|
||||
|
||||
A number of modules in [pkg/client](./pkg/client) are copy/pasta'd from the upstream [docker/docker/client](https://pkg.go.dev/github.com/docker/docker/client). We had to do this because upstream are not exposing their API as public.
|
||||
|
Reference in New Issue
Block a user