Skip to content

Commit

Permalink
Added cli documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Noble <[email protected]>
  • Loading branch information
AverageMarcus committed Apr 26, 2024
1 parent c0c442a commit 32de9db
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 2 deletions.
90 changes: 89 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,92 @@ Documentation can be found at: [pkg.go.dev/github.com/giantswarm/cluster-standup

## CLI Documentation

// TODO
### standup

Create a workload cluster using the same known-good configuration as the E2E test suites.

Once the workload cluster is ready two files will be produced:

* a `kubeconfig` to use to access the cluster
* a `results.json` that contains details about the cluster created and can be used by `teardown` to cleanup the cluster when done

#### Install

```shell
go install github.com/giantswarm/cluster-standup-teardown/cmd/standup@latest
```

#### Usage

```
$ standup --help
Standup create a test workload cluster in a standard, reproducible way.
A valid Management Cluster kubeconfig must be available and set to the `E2E_KUBECONFIG` environment variable.
Usage:
standup [flags]
Examples:
standup --provider aws --context capa
Flags:
--cluster-values string The path to the cluster app values
--cluster-version string The version of the cluster app to install (default "latest")
--context string The kubernetes context to use (required)
--control-plane-nodes int The number of control plane nodes to wait for being ready (default 1)
--default-apps-values string The path to the default-apps app values
--default-apps-version string The version of the default-apps app to install (default "latest")
-h, --help help for standup
--output string The directory to store the results.json and kubeconfig in (default "./")
--provider string The provider (required)
--worker-nodes int The number of worker nodes to wait for being ready (default 1)
```

##### Example

```
export E2E_KUBECONFIG=/path/to/kubeconfig
standup --provider aws --context capa
```

### teardown

Cleans up a workload cluster previously created by `standup`. Makes use of the `kubeconfig` and `results.json` produced by `standup`.

#### Install

```shell
go install github.com/giantswarm/cluster-standup-teardown/cmd/teardown@latest
```

#### Usage

```
$ teardown --help
Teardown completely removes a previously created test cluster.
Can take in the results.json produced by `standup` to quickly clean up a test cluster.
A valid Management Cluster kubeconfig must be available and set to the `E2E_KUBECONFIG` environment variable.
Usage:
teardown [flags]
Examples:
teardown --context capa --standup-directory ./
Flags:
--cleanup-standup-results Remove the results and kubeconfig generated by 'standup' (default true)
--cluster-name string The name of the cluster to tear down
--context string The kubernetes context to use (required)
-h, --help help for teardown
--org-name string The org the cluster belongs to
--provider string The provider
--standup-directory string The directory containing the results from 'standup'
```

##### Example

```
teardown --provider aws --context capa --standup-directory ./
```
2 changes: 1 addition & 1 deletion cmd/standup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
standupCmd = &cobra.Command{
Use: "standup",
Long: "Standup create a test workload cluster in a standard, reproducible way.\nA valid Management Cluster kubeconfig must be available and set to the `E2E_KUBECONFIG` environment variable.",
Example: "standup --provider aws --context capa --cluster-values ./cluster_values.yaml --default-apps-values ./default-apps_values.yaml",
Example: "standup --provider aws --context capa",
Args: cobra.NoArgs,
RunE: run,
}
Expand Down

0 comments on commit 32de9db

Please sign in to comment.