Skip to content

Commit

Permalink
Make a better README
Browse files Browse the repository at this point in the history
- Fix up README
- Add installation instructions and show how to build from source
- Move docs to source
- Add colorful picture from https://carbon.now.sh/.

Things still missing
- Some examples
- Build instructions for Windows

Fixes #93
  • Loading branch information
bkircher committed Feb 8, 2021
1 parent e0a9048 commit 7de0dd0
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 42 deletions.
61 changes: 21 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
# gscloud

`gscloud` is the command-line tool which let you manage your virtual infrastructure on the [gridscale](https://gridscale.io)'s cloud platform. It's also possible to make use of it to work with Kubernetes clusters running on top of the platform as well.

It's entirely written in Go, so everything you need is just the `gscloud` binary! Compile it all by yourself or get the tool at the [release](https://github.com/gridscale/gscloud/releases) page.

```txt
Usage:
gscloud [command]
Available Commands:
completion Generate shell completion scripts
help Help about any command
ip Operations on IP addresses
iso-image Operations on ISO images
kubernetes Operate managed Kubernetes clusters
make-config Create a new configuration file
manpage Create man-pages for gscloud
network Operations on networks
server Operations on servers
ssh-key Operations on SSH keys
storage Operations on storages
template Operations on templates
version Print the version
Flags:
--account string Specify the account used (default "default")
--config string Path to configuration file (default "$XDG_CONFIG_HOME/gscloud/config.yaml")
--debug Debug mode
-h, --help Print usage
-j, --json Print JSON to stdout instead of a table
--noheading Do not print column headings
-q, --quiet Print only object IDs
Use "gscloud [command] --help" for more information about a command.
```
gscloud is a command-line tool that lets you manage your virtual infrastructure on [gridscale.io](https://gridscale.io).

gscloud is written in Go, so everything you need is just the gscloud binary. Compile it all by yourself or get the official release from the [release page](https://github.com/gridscale/gscloud/releases).

![Create and destroy servers](docs/terminal-1x.png "Create new servers from the command-line")

## Installation

### Official releases for Windows, macOS, Linux

Download packaged binaries from the [releases page](https://github.com/gridscale/gscloud/releases).

### Build from source

See [here](docs/source.md) on how to build gscloud from source.

## Configuration

Expand All @@ -56,7 +37,7 @@ accounts:
## Kubernetes
To use `gscloud` combined with `kubectl`, here is an example configuration (~/.kubeconfig/config):
You can use gscloud to retrieve the kubeconfig of your managed Kubernetes cluster. Here is an example configuration (`~/.kubeconfig/config`):

```yml
apiVersion: v1
Expand Down Expand Up @@ -91,16 +72,16 @@ users:
- "9489f3a7-c8f8-4b38-bc9b-aa472a1c0d2a"
```

## Exit Codes
## Exit codes

`gscloud` returns zero exit code on success, non-zero on failure. Following exit codes map to these failure modes:
gscloud returns zero exit code on success, non-zero on failure. Following exit codes map to these failure modes:

1. The requested command failed.
2. Reading the configuration file failed.
3. The configuration could not be parsed.
4. The account specified does not exist in the configuration file.

## Shell Completions
## Shell completions

Generate shell completion scripts for zsh and bash.

Expand All @@ -124,10 +105,10 @@ Generate man-pages and install them. Example:
$ sudo gscloud manpage /usr/local/share/man/man1/
```

## Development
## Contributing

Please create an [issue](https://github.com/gridscale/gscloud/issues) if you have questions, want to start a discussion, or want to start work on something.

[Pull requests](https://github.com/gridscale/gscloud/pulls) are always welcome. Make sure to create an issue first to signal others that you are working on something. Also make sure to take a look at the [Development Notes](development.md).
[Pull requests](https://github.com/gridscale/gscloud/pulls) are always welcome. Make sure to create an issue first to signal others that you are working on something. Also make sure to take a look at the [Development Notes](docs/development.md).

Have fun!
4 changes: 2 additions & 2 deletions development.md → docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Most notably:
- Run `make` to build and `make test` to run tests for your platform.
- Run `goreleaser build --snapshot --rm-dist` to test build for all supported platforms. Make sure to install [GoReleaser](https://goreleaser.com/) before.

## Don't hesitate to communicate
## Don't hesitate to get in touch

There are no stupid questions. Use GitHub issues to ask if you have a problem or question. If you want to work on something, make sure to create an issue first to let others know.
There are no stupid questions. Feel free to use GitHub issues if you have a problem or question. If you want to work on something, make sure to create an issue first to let others know.
39 changes: 39 additions & 0 deletions docs/source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Installation from source

## Prerequisites

Verify that you have Go 1.14+ installed

$ go version
go version go1.15.7 linux/amd64

If Go is not installed, follow instructions on the [Go website](https://golang.org/doc/install) or, on Linux, download with your package manager.

## Get the source

Clone this repository:

$ git clone https://github.com/gridscale/gscloud.git
$ cd gsloud/

## Build and install

### Unix-like systems

```sh
# Installs to $GOPATH/bin by default
$ make
$ go install
```

### Windows

TODO

## Test

Run `gscloud version` to check if everything worked.

$ gscloud version
Version: v0.7.1-14-g28b968e
Git commit: 28b968e01ba1a89102e3637412846d2e0dbe7a9c
Binary file added docs/terminal-1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7de0dd0

Please sign in to comment.