diff --git a/README.md b/README.md index 9497516..db53f8a 100644 --- a/README.md +++ b/README.md @@ -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 ./ +``` diff --git a/cmd/standup/main.go b/cmd/standup/main.go index 7536cdb..664bbe6 100644 --- a/cmd/standup/main.go +++ b/cmd/standup/main.go @@ -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, }