diff --git a/cmd/baremetal/baremetal.go b/cmd/baremetal/baremetal.go index 50e780292..9f71d28a8 100644 --- a/cmd/baremetal/baremetal.go +++ b/cmd/baremetal/baremetal.go @@ -76,7 +76,7 @@ func NewBaremetalCommand(cfgFactory config.Factory) *cobra.Command { baremetalRootCmd := &cobra.Command{ Use: "baremetal", Short: "Airshipctl command to manage bare metal host(s)", - Long: baremetalLong, + Long: baremetalLong[1:], } baremetalRootCmd.AddCommand(NewEjectMediaCommand(cfgFactory, options)) diff --git a/cmd/baremetal/testdata/TestBaremetalGoldenOutput/baremetal-with-help.golden b/cmd/baremetal/testdata/TestBaremetalGoldenOutput/baremetal-with-help.golden index 5228e16b2..2dda1d574 100644 --- a/cmd/baremetal/testdata/TestBaremetalGoldenOutput/baremetal-with-help.golden +++ b/cmd/baremetal/testdata/TestBaremetalGoldenOutput/baremetal-with-help.golden @@ -1,4 +1,3 @@ - Provides commands that can be performed on bare metal host(s). The commands help in performing the basic boot and power operations on the bare metal host(s). diff --git a/cmd/cluster/list.go b/cmd/cluster/list.go index 298128a4b..58216a47c 100755 --- a/cmd/cluster/list.go +++ b/cmd/cluster/list.go @@ -41,7 +41,7 @@ func NewListCommand(cfgFactory config.Factory) *cobra.Command { cmd := &cobra.Command{ Use: "list", Short: "Airshipctl command to get and list defined clusters", - Long: listLong, + Long: listLong[1:], Example: listExample, RunE: listRunE(o), } diff --git a/cmd/cluster/testdata/TestNewListCommandGoldenOutput/cluster-list-cmd-with-help.golden b/cmd/cluster/testdata/TestNewListCommandGoldenOutput/cluster-list-cmd-with-help.golden index d998bd3e0..6b90a22ab 100644 --- a/cmd/cluster/testdata/TestNewListCommandGoldenOutput/cluster-list-cmd-with-help.golden +++ b/cmd/cluster/testdata/TestNewListCommandGoldenOutput/cluster-list-cmd-with-help.golden @@ -1,4 +1,3 @@ - Retrieve and list the defined clusters in table form or display just the cluster names. The contents of the table would include cluster name, kubeconfig context and parent cluster name. diff --git a/cmd/config/config.go b/cmd/config/config.go index fd6bd92c3..508608405 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -30,7 +30,7 @@ func NewConfigCommand(cfgFactory config.Factory) *cobra.Command { Use: "config", DisableFlagsInUseLine: true, Short: "Airshipctl command to manage airshipctl config file", - Long: configLong, + Long: configLong[1:], } configRootCmd.AddCommand(NewGetContextCommand(cfgFactory)) diff --git a/cmd/config/get_management_config.go b/cmd/config/get_management_config.go index 56244dbb2..9fa196c64 100644 --- a/cmd/config/get_management_config.go +++ b/cmd/config/get_management_config.go @@ -43,7 +43,7 @@ func NewGetManagementConfigCommand(cfgFactory config.Factory) *cobra.Command { cmd := &cobra.Command{ Use: "get-management-config MGMT_CONFIG_NAME", Short: "Airshipctl command to view management config(s) defined in the airshipctl config", - Long: getManagementConfigLong, + Long: getManagementConfigLong[1:], Example: getManagementConfigExample, Args: cobra.MaximumNArgs(1), Aliases: []string{"get-management-configs"}, diff --git a/cmd/config/set_management_configuration.go b/cmd/config/set_management_configuration.go index 9ad58c5cf..34035b7cf 100644 --- a/cmd/config/set_management_configuration.go +++ b/cmd/config/set_management_configuration.go @@ -62,7 +62,7 @@ func NewSetManagementConfigCommand(cfgFactory config.Factory) *cobra.Command { cmd := &cobra.Command{ Use: "set-management-config MGMT_CONFIG_NAME", Short: "Airshipctl command to create/modify out-of-band management configuration in airshipctl config file", - Long: setManagementConfigLong, + Long: setManagementConfigLong[1:], Example: setManagementConfigExample, Args: cobra.ExactArgs(1), RunE: setManagementConfigRunE(cfgFactory, o), diff --git a/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden b/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden index 9de5d349d..0f2853a34 100644 --- a/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden +++ b/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden @@ -1,4 +1,3 @@ - Provides commands which can be used to manage the airshipctl config file. Usage: diff --git a/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden b/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden index d8266ac3d..a5397b951 100644 --- a/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden +++ b/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden @@ -1,4 +1,3 @@ - Creates or modifies management config information based on the MGMT_CONFIG_NAME passed. The allowed set of optional flags are management-type, system-action-retries and system-reboot-delay. Use --use-proxy and --insecure to enable proxy and insecure options respectively. diff --git a/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden b/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden index 9ff1e025a..ea9d86a80 100644 --- a/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden +++ b/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden @@ -1,4 +1,3 @@ - Displays a specific management config information, or all defined management configs if no name is provided. The information relates to reboot-delays and retry in seconds along with management-type that has to be used. diff --git a/cmd/document/document.go b/cmd/document/document.go index 1cd89a54b..c74e0097d 100644 --- a/cmd/document/document.go +++ b/cmd/document/document.go @@ -29,7 +29,7 @@ func NewDocumentCommand(cfgFactory config.Factory) *cobra.Command { documentRootCmd := &cobra.Command{ Use: "document", Short: "Airshipctl command to manage site manifest documents", - Long: documentLong, + Long: documentLong[1:], } documentRootCmd.AddCommand(NewPullCommand(cfgFactory)) diff --git a/cmd/document/testdata/TestDocumentGoldenOutput/document-with-help.golden b/cmd/document/testdata/TestDocumentGoldenOutput/document-with-help.golden index d3076c6c1..78d2bef96 100644 --- a/cmd/document/testdata/TestDocumentGoldenOutput/document-with-help.golden +++ b/cmd/document/testdata/TestDocumentGoldenOutput/document-with-help.golden @@ -1,4 +1,3 @@ - Provides commands which help in management of site manifest documents. Usage: diff --git a/cmd/phase/render.go b/cmd/phase/render.go index 9c9f1cdf8..48e3c5ffb 100644 --- a/cmd/phase/render.go +++ b/cmd/phase/render.go @@ -47,7 +47,7 @@ func NewRenderCommand(cfgFactory config.Factory) *cobra.Command { renderCmd := &cobra.Command{ Use: "render PHASE_NAME", Short: "Airshipctl command to render phase documents from model", - Long: renderLong, + Long: renderLong[1:], Example: renderExample, Args: RenderArgs(filterOptions), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/phase/run.go b/cmd/phase/run.go index b4d5e1458..eef974e71 100644 --- a/cmd/phase/run.go +++ b/cmd/phase/run.go @@ -44,7 +44,7 @@ func NewRunCommand(cfgFactory config.Factory) *cobra.Command { runCmd := &cobra.Command{ Use: "run PHASE_NAME", Short: "Airshipctl command to run phase", - Long: runLong, + Long: runLong[1:], Args: cobra.ExactArgs(1), Example: runExample, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/phase/status.go b/cmd/phase/status.go index 39b4f60d8..74888d6e4 100644 --- a/cmd/phase/status.go +++ b/cmd/phase/status.go @@ -42,7 +42,7 @@ func NewStatusCommand(cfgFactory config.Factory) *cobra.Command { statusCmd := &cobra.Command{ Use: "status PHASE_NAME", Short: "Airshipctl command to show status of the phase", - Long: statusLong, + Long: statusLong[1:], Args: cobra.ExactArgs(1), Example: statusExample, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/phase/testdata/TestRenderGoldenOutput/render-with-help.golden b/cmd/phase/testdata/TestRenderGoldenOutput/render-with-help.golden index 4b0d313a3..084c85c71 100644 --- a/cmd/phase/testdata/TestRenderGoldenOutput/render-with-help.golden +++ b/cmd/phase/testdata/TestRenderGoldenOutput/render-with-help.golden @@ -1,4 +1,3 @@ - Render documents for a phase. Usage: diff --git a/cmd/phase/testdata/TestRunGoldenOutput/run-with-help.golden b/cmd/phase/testdata/TestRunGoldenOutput/run-with-help.golden index cc8c4d15b..fa2576593 100644 --- a/cmd/phase/testdata/TestRunGoldenOutput/run-with-help.golden +++ b/cmd/phase/testdata/TestRunGoldenOutput/run-with-help.golden @@ -1,4 +1,3 @@ - Run a phase such as controlplane-ephemeral, remotedirect-ephemeral, initinfra-ephemeral, etc... To list the phases associated with a site, run 'airshipctl phase list'. diff --git a/cmd/phase/testdata/TestStatusGoldenOutput/run-with-help.golden b/cmd/phase/testdata/TestStatusGoldenOutput/run-with-help.golden index 006a2eb62..431e41ff0 100644 --- a/cmd/phase/testdata/TestStatusGoldenOutput/run-with-help.golden +++ b/cmd/phase/testdata/TestStatusGoldenOutput/run-with-help.golden @@ -1,4 +1,3 @@ - Get the status of a phase such as ephemeral-control-plane, target-initinfra etc... To list the phases associated with a site, run 'airshipctl phase list'. diff --git a/cmd/phase/testdata/TestValidateGoldenOutput/validate-with-help.golden b/cmd/phase/testdata/TestValidateGoldenOutput/validate-with-help.golden index 7ab288fe8..7c94bd064 100644 --- a/cmd/phase/testdata/TestValidateGoldenOutput/validate-with-help.golden +++ b/cmd/phase/testdata/TestValidateGoldenOutput/validate-with-help.golden @@ -1,4 +1,3 @@ - Validates phase and its documents. To list the phases associated with a site, run 'airshipctl phase list'. Usage: diff --git a/cmd/phase/validate.go b/cmd/phase/validate.go index 7be65b46c..90967035f 100644 --- a/cmd/phase/validate.go +++ b/cmd/phase/validate.go @@ -41,7 +41,7 @@ func NewValidateCommand(cfgFactory config.Factory) *cobra.Command { validCmd := &cobra.Command{ Use: "validate PHASE_NAME", Short: "Airshipctl command to validate phase and its documents", - Long: validLong, + Long: validLong[1:], Args: cobra.ExactArgs(1), Example: validExample, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/docs/source/cli/airshipctl.md b/docs/source/cli/airshipctl.md deleted file mode 100644 index 584aae18e..000000000 --- a/docs/source/cli/airshipctl.md +++ /dev/null @@ -1,31 +0,0 @@ -## airshipctl - -A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. - -### Synopsis - -Command line utility for management of end-to-end kubernetes cluster deployment. - - Find more information at: https://docs.airshipit.org/airshipctl/ - - -### Options - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output - -h, --help help for airshipctl -``` - -### SEE ALSO - -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) -* [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters -* [airshipctl completion](airshipctl_completion.md) - Airshipctl command to generate completion script for the specified shell (bash or zsh) -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file -* [airshipctl document](airshipctl_document.md) - Airshipctl command to manage site manifest documents -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases -* [airshipctl plan](airshipctl_plan.md) - Airshipctl command to manage plans -* [airshipctl secret](airshipctl_secret.md) - Airshipctl command to manage secrets -* [airshipctl version](airshipctl_version.md) - Airshipctl command to display the current version number - diff --git a/docs/source/cli/airshipctl.rst b/docs/source/cli/airshipctl.rst new file mode 100644 index 000000000..a2a365d2f --- /dev/null +++ b/docs/source/cli/airshipctl.rst @@ -0,0 +1,38 @@ +.. _airshipctl: + +airshipctl +---------- + +A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. + +Synopsis +~~~~~~~~ + + +Command line utility for management of end-to-end kubernetes cluster deployment. + + Find more information at: https://docs.airshipit.org/airshipctl/ + + +Options +~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + -h, --help help for airshipctl + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl cluster ` - Airshipctl command to manage kubernetes clusters +* :ref:`airshipctl completion ` - Airshipctl command to generate completion script for the specified shell (bash or zsh) +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file +* :ref:`airshipctl document ` - Airshipctl command to manage site manifest documents +* :ref:`airshipctl phase ` - Airshipctl command to manage phases +* :ref:`airshipctl plan ` - Airshipctl command to manage plans +* :ref:`airshipctl secret ` - Airshipctl command to manage secrets +* :ref:`airshipctl version ` - Airshipctl command to display the current version number + diff --git a/docs/source/cli/airshipctl_baremetal.md b/docs/source/cli/airshipctl_baremetal.md deleted file mode 100644 index 74bfef503..000000000 --- a/docs/source/cli/airshipctl_baremetal.md +++ /dev/null @@ -1,34 +0,0 @@ -## airshipctl baremetal - -Airshipctl command to manage bare metal host(s) - -### Synopsis - - -Provides commands that can be performed on bare metal host(s). The commands help in -performing the basic boot and power operations on the bare metal host(s). - - -### Options - -``` - -h, --help help for baremetal -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl baremetal ejectmedia](airshipctl_baremetal_ejectmedia.md) - Airshipctl command to eject virtual media attached to a bare metal host -* [airshipctl baremetal poweroff](airshipctl_baremetal_poweroff.md) - Airshipctl command to shutdown bare metal host(s) -* [airshipctl baremetal poweron](airshipctl_baremetal_poweron.md) - Airshipctl command to power on host(s) -* [airshipctl baremetal powerstatus](airshipctl_baremetal_powerstatus.md) - Airshipctl command to retrieve the power status of a bare metal host -* [airshipctl baremetal reboot](airshipctl_baremetal_reboot.md) - Airshipctl command to reboot host(s) -* [airshipctl baremetal remotedirect](airshipctl_baremetal_remotedirect.md) - Airshipctl command to bootstrap the ephemeral host - diff --git a/docs/source/cli/airshipctl_cluster.md b/docs/source/cli/airshipctl_cluster.md deleted file mode 100644 index 35af97a56..000000000 --- a/docs/source/cli/airshipctl_cluster.md +++ /dev/null @@ -1,32 +0,0 @@ -## airshipctl cluster - -Airshipctl command to manage kubernetes clusters - -### Synopsis - -Provides capabilities for interacting with a Kubernetes cluster, -such as getting status and deploying initial infrastructure. - - -### Options - -``` - -h, --help help for cluster -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl cluster check-certificate-expiration](airshipctl_cluster_check-certificate-expiration.md) - Airshipctl command to check expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster -* [airshipctl cluster get-kubeconfig](airshipctl_cluster_get-kubeconfig.md) - Airshipctl command to retrieve kubeconfig for a desired cluster -* [airshipctl cluster list](airshipctl_cluster_list.md) - Airshipctl command to get and list defined clusters -* [airshipctl cluster rotate-sa-token](airshipctl_cluster_rotate-sa-token.md) - Airshipctl command to rotate tokens of Service Account(s) -* [airshipctl cluster status](airshipctl_cluster_status.md) - Retrieve statuses of deployed cluster components - diff --git a/docs/source/cli/airshipctl_cluster_check-certificate-expiration.md b/docs/source/cli/airshipctl_cluster_check-certificate-expiration.md deleted file mode 100644 index 22544f6c7..000000000 --- a/docs/source/cli/airshipctl_cluster_check-certificate-expiration.md +++ /dev/null @@ -1,59 +0,0 @@ -## airshipctl cluster check-certificate-expiration - -Airshipctl command to check expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster - -### Synopsis - -Displays a list of certificate along with expirations from both the management and workload clusters, or in a -self-managed cluster. Checks for TLS Secrets, kubeconf secrets (which gets created while creating the -workload cluster) and also the node certificates present inside /etc/kubernetes/pki directory for each node. - - -``` -airshipctl cluster check-certificate-expiration [flags] -``` - -### Examples - -``` - -To display all the expiring certificates in the cluster -# airshipctl cluster check-certificate-expiration --kubeconfig testconfig - -To display the certificates whose expiration is within threshold of 30 days -# airshipctl cluster check-certificate-expiration -t 30 --kubeconfig testconfig - -To output the contents in json format (default operation) -# airshipctl cluster check-certificate-expiration -o json --kubeconfig testconfig -or -# airshipctl cluster check-certificate-expiration --kubeconfig testconfig - -To output the contents in yaml format -# airshipctl cluster check-certificate-expiration -o yaml --kubeconfig testconfig - -To output the contents whose expiration is within 30 days in yaml format -# airshipctl cluster check-certificate-expiration -t 30 -o yaml --kubeconfig testconfig - -``` - -### Options - -``` - -h, --help help for check-certificate-expiration - --kubeconfig string path to kubeconfig associated with cluster being managed - --kubecontext string kubeconfig context to be used - -o, --output string convert output to yaml or json (default "json") - -t, --threshold int the max expiration threshold in days before a certificate is expiring. Displays all the certificates by default (default -1) -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters - diff --git a/docs/source/cli/airshipctl_cluster_get-kubeconfig.md b/docs/source/cli/airshipctl_cluster_get-kubeconfig.md deleted file mode 100644 index 329917a0b..000000000 --- a/docs/source/cli/airshipctl_cluster_get-kubeconfig.md +++ /dev/null @@ -1,58 +0,0 @@ -## airshipctl cluster get-kubeconfig - -Airshipctl command to retrieve kubeconfig for a desired cluster - -### Synopsis - -Retrieves kubeconfig of the cluster and prints it to stdout. - -If you specify CLUSTER_NAME, kubeconfig will have a CurrentContext set to CLUSTER_NAME and -will have its context defined. - -If you don't specify CLUSTER_NAME, kubeconfig will have multiple contexts for every cluster -in the airship site. Context names will correspond to cluster names. CurrentContext will be empty. - - -``` -airshipctl cluster get-kubeconfig CLUSTER_NAME [flags] -``` - -### Examples - -``` - -Retrieve target-cluster kubeconfig -# airshipctl cluster get-kubeconfig target-cluster - -Retrieve kubeconfig for the entire site; the kubeconfig will have context for every cluster -# airshipctl cluster get-kubeconfig - -Specify a file where kubeconfig should be written -# airshipctl cluster get-kubeconfig --file ~/my-kubeconfig - -Merge site kubeconfig with existing kubeconfig file. -Keep in mind that this can override a context if it has the same name -Airshipctl will overwrite the contents of the file, if you want merge with existing file, specify "--merge" flag -# airshipctl cluster get-kubeconfig --file ~/.airship/kubeconfig --merge - -``` - -### Options - -``` - -f, --file string specify where to write kubeconfig file. If flag isn't specified, airshipctl will write it to stdout - -h, --help help for get-kubeconfig - --merge specify if you want to merge kubeconfig with the one that exists at --file location -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters - diff --git a/docs/source/cli/airshipctl_cluster_init.md b/docs/source/cli/airshipctl_cluster_init.md deleted file mode 100644 index aedd58b2f..000000000 --- a/docs/source/cli/airshipctl_cluster_init.md +++ /dev/null @@ -1,77 +0,0 @@ -## airshipctl cluster init - -Deploy cluster-api provider components - -### Synopsis - - -Initialize cluster-api providers based on airshipctl document set. -document set must contain document of Kind: Clusterctl in phase initinfra. -Path to initinfra phase is defined in the initinfra phase document located -in the manifest repository. -Clusterctl document example: ---- -apiVersion: airshipit.org/v1alpha1 -kind: Clusterctl -metadata: - labels: - airshipit.org/deploy-k8s: "false" - name: clusterctl-v1 -init-options: - core-provider: "cluster-api:v0.3.3" - bootstrap-providers: - - "kubeadm:v0.3.3" - infrastructure-providers: - - "metal3:v0.3.1" - control-plane-providers: - - "kubeadm:v0.3.3" -providers: - - name: "metal3" - type: "InfrastructureProvider" - versions: - v0.3.1: manifests/function/capm3/v0.3.1 - - name: "kubeadm" - type: "BootstrapProvider" - versions: - v0.3.3: manifests/function/cabpk/v0.3.3 - - name: "cluster-api" - type: "CoreProvider" - versions: - v0.3.3: manifests/function/capi/v0.3.3 - - name: "kubeadm" - type: "ControlPlaneProvider" - versions: - v0.3.3: manifests/function/cacpk/v0.3.3 - - -``` -airshipctl cluster init [flags] -``` - -### Examples - -``` - -# Initialize clusterctl providers and components -airshipctl cluster init - -``` - -### Options - -``` - -h, --help help for init - --kubeconfig string Path to kubeconfig associated with cluster being managed -``` - -### Options inherited from parent commands - -``` - --airshipconf string Path to file for airshipctl configuration. (default "$HOME/.airship/config") - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl cluster](airshipctl_cluster.md) - Manage Kubernetes clusters - diff --git a/docs/source/cli/airshipctl_cluster_move.md b/docs/source/cli/airshipctl_cluster_move.md deleted file mode 100644 index 83eed598b..000000000 --- a/docs/source/cli/airshipctl_cluster_move.md +++ /dev/null @@ -1,44 +0,0 @@ -## airshipctl cluster move - -Move Cluster API objects, provider specific objects and all dependencies to the target cluster - -### Synopsis - -Move Cluster API objects, provider specific objects and all dependencies to the target cluster. - -Note: The destination cluster MUST have the required provider components installed. - - -``` -airshipctl cluster move [flags] -``` - -### Examples - -``` - -Move Cluster API objects, provider specific objects and all dependencies to the target cluster. - - airshipctl cluster move --target-context - -``` - -### Options - -``` - -h, --help help for move - --kubeconfig string Path to kubeconfig associated with cluster being managed - --target-context string Context to be used within the kubeconfig file for the target cluster. If empty, current context will be used. -``` - -### Options inherited from parent commands - -``` - --airshipconf string Path to file for airshipctl configuration. (default "$HOME/.airship/config") - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl cluster](airshipctl_cluster.md) - Manage Kubernetes clusters - diff --git a/docs/source/cli/airshipctl_completion.md b/docs/source/cli/airshipctl_completion.md deleted file mode 100644 index 6e480b6ce..000000000 --- a/docs/source/cli/airshipctl_completion.md +++ /dev/null @@ -1,42 +0,0 @@ -## airshipctl completion - -Airshipctl command to generate completion script for the specified shell (bash or zsh) - -### Synopsis - -Generate completion script for airshipctl for the specified shell (bash or zsh). - - -``` -airshipctl completion SHELL [flags] -``` - -### Examples - -``` - -Save shell completion to a file -# airshipctl completion bash > $HOME/.airship_completions - -Apply completions to the current shell -# source <(airshipctl completion bash) - -``` - -### Options - -``` - -h, --help help for completion -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. - diff --git a/docs/source/cli/airshipctl_config.md b/docs/source/cli/airshipctl_config.md deleted file mode 100644 index f82814e60..000000000 --- a/docs/source/cli/airshipctl_config.md +++ /dev/null @@ -1,35 +0,0 @@ -## airshipctl config - -Airshipctl command to manage airshipctl config file - -### Synopsis - - -Provides commands which can be used to manage the airshipctl config file. - - -### Options - -``` - -h, --help help for config -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl config get-context](airshipctl_config_get-context.md) - Airshipctl command to get context(s) information from the airshipctl config -* [airshipctl config get-management-config](airshipctl_config_get-management-config.md) - Airshipctl command to view management config(s) defined in the airshipctl config -* [airshipctl config get-manifest](airshipctl_config_get-manifest.md) - Airshipctl command to get a specific or all manifest(s) information from the airshipctl config -* [airshipctl config init](airshipctl_config_init.md) - Airshipctl command to generate initial configuration file for airshipctl -* [airshipctl config set-context](airshipctl_config_set-context.md) - Airshipctl command to create/modify context in airshipctl config file -* [airshipctl config set-management-config](airshipctl_config_set-management-config.md) - Airshipctl command to create/modify out-of-band management configuration in airshipctl config file -* [airshipctl config set-manifest](airshipctl_config_set-manifest.md) - Airshipctl command to create/modify manifests in airship config -* [airshipctl config use-context](airshipctl_config_use-context.md) - Airshipctl command to switch to a different context - diff --git a/docs/source/cli/airshipctl_config_get-management-config.md b/docs/source/cli/airshipctl_config_get-management-config.md deleted file mode 100644 index e855a88b5..000000000 --- a/docs/source/cli/airshipctl_config_get-management-config.md +++ /dev/null @@ -1,44 +0,0 @@ -## airshipctl config get-management-config - -Airshipctl command to view management config(s) defined in the airshipctl config - -### Synopsis - - -Displays a specific management config information, or all defined management configs if no name is provided. -The information relates to reboot-delays and retry in seconds along with management-type that has to be used. - - -``` -airshipctl config get-management-config MGMT_CONFIG_NAME [flags] -``` - -### Examples - -``` - -View all management configurations -# airshipctl config get-management-configs - -View a specific management configuration named "default" -# airshipctl config get-management-config default - -``` - -### Options - -``` - -h, --help help for get-management-config -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file - diff --git a/docs/source/cli/airshipctl_config_get-manifest.md b/docs/source/cli/airshipctl_config_get-manifest.md deleted file mode 100644 index a8eee2ee2..000000000 --- a/docs/source/cli/airshipctl_config_get-manifest.md +++ /dev/null @@ -1,43 +0,0 @@ -## airshipctl config get-manifest - -Airshipctl command to get a specific or all manifest(s) information from the airshipctl config - -### Synopsis - -Displays a specific manifest information, or all defined manifests if no name is provided. The information -includes the repository details related to site manifest along with the local targetPath for them. - - -``` -airshipctl config get-manifest MANIFEST_NAME [flags] -``` - -### Examples - -``` - -List all the manifests -# airshipctl config get-manifests - -Display a specific manifest -# airshipctl config get-manifest e2e - -``` - -### Options - -``` - -h, --help help for get-manifest -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file - diff --git a/docs/source/cli/airshipctl_config_import.md b/docs/source/cli/airshipctl_config_import.md deleted file mode 100644 index d02c2ebba..000000000 --- a/docs/source/cli/airshipctl_config_import.md +++ /dev/null @@ -1,40 +0,0 @@ -## airshipctl config import - -Merge information from a kubernetes config file - -### Synopsis - -Merge the clusters, contexts, and users from an existing kubeConfig file into the airshipctl config file. - - -``` -airshipctl config import [flags] -``` - -### Examples - -``` - -# Import from a kubeConfig file" -airshipctl config import $HOME/.kube/config - -``` - -### Options - -``` - -h, --help help for import -``` - -### Options inherited from parent commands - -``` - --airshipconf string Path to file for airshipctl configuration. (default "$HOME/.airship/config") - --debug enable verbose output - --kubeconfig string Path to kubeconfig associated with airshipctl configuration. (default "$HOME/.airship/kubeconfig") -``` - -### SEE ALSO - -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file - diff --git a/docs/source/cli/airshipctl_config_use-context.md b/docs/source/cli/airshipctl_config_use-context.md deleted file mode 100644 index 0d31fe4bf..000000000 --- a/docs/source/cli/airshipctl_config_use-context.md +++ /dev/null @@ -1,40 +0,0 @@ -## airshipctl config use-context - -Airshipctl command to switch to a different context - -### Synopsis - -Switch to a different context defined in the airshipctl config file. -This command doesn't change the context for the kubeconfig file. - - -``` -airshipctl config use-context CONTEXT_NAME [flags] -``` - -### Examples - -``` - -Switch to a context named "exampleContext" in airshipctl config file -# airshipctl config use-context exampleContext - -``` - -### Options - -``` - -h, --help help for use-context -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file - diff --git a/docs/source/cli/airshipctl_document.md b/docs/source/cli/airshipctl_document.md deleted file mode 100644 index 4b353d7ef..000000000 --- a/docs/source/cli/airshipctl_document.md +++ /dev/null @@ -1,28 +0,0 @@ -## airshipctl document - -Airshipctl command to manage site manifest documents - -### Synopsis - - -Provides commands which help in management of site manifest documents. - - -### Options - -``` - -h, --help help for document -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl document pull](airshipctl_document_pull.md) - Airshipctl command to pull manifests from remote git repositories - diff --git a/docs/source/cli/airshipctl_phase.md b/docs/source/cli/airshipctl_phase.md deleted file mode 100644 index abf5dc477..000000000 --- a/docs/source/cli/airshipctl_phase.md +++ /dev/null @@ -1,32 +0,0 @@ -## airshipctl phase - -Airshipctl command to manage phases - -### Synopsis - -Provides capabilities for interacting with phases, such as getting list of phases or applying a specific one. - - -### Options - -``` - -h, --help help for phase -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl phase list](airshipctl_phase_list.md) - Airshipctl command to list phases -* [airshipctl phase render](airshipctl_phase_render.md) - Airshipctl command to render phase documents from model -* [airshipctl phase run](airshipctl_phase_run.md) - Airshipctl command to run phase -* [airshipctl phase status](airshipctl_phase_status.md) - Airshipctl command to show status of the phase -* [airshipctl phase tree](airshipctl_phase_tree.md) - Airshipctl command to show tree view of kustomize entrypoints of phase -* [airshipctl phase validate](airshipctl_phase_validate.md) - Airshipctl command to validate phase and its documents - diff --git a/docs/source/cli/airshipctl_phase_list.md b/docs/source/cli/airshipctl_phase_list.md deleted file mode 100644 index 274064f2b..000000000 --- a/docs/source/cli/airshipctl_phase_list.md +++ /dev/null @@ -1,55 +0,0 @@ -## airshipctl phase list - -Airshipctl command to list phases - -### Synopsis - -List phases defined in site manifests by plan. Phases within a plan are -executed sequentially. Multiple phase plans are executed in parallel. - - -``` -airshipctl phase list PHASE_NAME [flags] -``` - -### Examples - -``` - -List phases of phasePlan -# airshipctl phase list --plan phasePlan - -To output the contents in table format (default operation) -# airshipctl phase list --plan phasePlan -o table - -To output the contents in yaml format -# airshipctl phase list --plan phasePlan -o yaml - -List all phases -# airshipctl phase list - -List phases with clustername -# airshipctl phase list --cluster-name clustername - -``` - -### Options - -``` - -c, --cluster-name string filter documents by cluster name - -h, --help help for list - -o, --output string output format. Supported formats are 'table' and 'yaml' (default "table") - --plan string plan name of a plan -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases - diff --git a/docs/source/cli/airshipctl_phase_plan.md b/docs/source/cli/airshipctl_phase_plan.md deleted file mode 100644 index e5dd6cff7..000000000 --- a/docs/source/cli/airshipctl_phase_plan.md +++ /dev/null @@ -1,32 +0,0 @@ -## airshipctl phase plan - -List phases - -### Synopsis - -List life-cycle phases which were defined in document model by group. -Phases within a group are executed sequentially. Multiple phase groups -are executed in parallel. - - -``` -airshipctl phase plan [flags] -``` - -### Options - -``` - -h, --help help for plan -``` - -### Options inherited from parent commands - -``` - --airshipconf string Path to file for airshipctl configuration. (default "$HOME/.airship/config") - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl phase](airshipctl_phase.md) - Manage phases - diff --git a/docs/source/cli/airshipctl_phase_status.md b/docs/source/cli/airshipctl_phase_status.md deleted file mode 100644 index b41538f76..000000000 --- a/docs/source/cli/airshipctl_phase_status.md +++ /dev/null @@ -1,41 +0,0 @@ -## airshipctl phase status - -Airshipctl command to show status of the phase - -### Synopsis - - -Get the status of a phase such as ephemeral-control-plane, target-initinfra etc... -To list the phases associated with a site, run 'airshipctl phase list'. - - -``` -airshipctl phase status PHASE_NAME [flags] -``` - -### Examples - -``` - -Status of initinfra phase -# airshipctl phase status ephemeral-control-plane - -``` - -### Options - -``` - -h, --help help for status -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases - diff --git a/docs/source/cli/airshipctl_phase_tree.md b/docs/source/cli/airshipctl_phase_tree.md deleted file mode 100644 index 1e9bb909b..000000000 --- a/docs/source/cli/airshipctl_phase_tree.md +++ /dev/null @@ -1,42 +0,0 @@ -## airshipctl phase tree - -Airshipctl command to show tree view of kustomize entrypoints of phase - -### Synopsis - -Get tree view of the kustomize entrypoints of a phase. - - -``` -airshipctl phase tree PHASE_NAME [flags] -``` - -### Examples - -``` - -yaml explorer of a phase with relative path -# airshipctl phase tree /manifests/site/test-site/ephemeral/initinfra - -yaml explorer of a phase with phase name -# airshipctl phase tree initinfra-ephemeral - -``` - -### Options - -``` - -h, --help help for tree -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases - diff --git a/docs/source/cli/airshipctl_phase_validate.md b/docs/source/cli/airshipctl_phase_validate.md deleted file mode 100644 index 9e7b8216b..000000000 --- a/docs/source/cli/airshipctl_phase_validate.md +++ /dev/null @@ -1,40 +0,0 @@ -## airshipctl phase validate - -Airshipctl command to validate phase and its documents - -### Synopsis - - -Validates phase and its documents. To list the phases associated with a site, run 'airshipctl phase list'. - - -``` -airshipctl phase validate PHASE_NAME [flags] -``` - -### Examples - -``` - -To validate initinfra phase -# airshipctl phase validate initinfra - -``` - -### Options - -``` - -h, --help help for validate -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases - diff --git a/docs/source/cli/airshipctl_plan.md b/docs/source/cli/airshipctl_plan.md deleted file mode 100644 index 8e8d4929d..000000000 --- a/docs/source/cli/airshipctl_plan.md +++ /dev/null @@ -1,29 +0,0 @@ -## airshipctl plan - -Airshipctl command to manage plans - -### Synopsis - -Provides capabilities for interacting with plan objects, responsible for execution of phases in groups. - - -### Options - -``` - -h, --help help for plan -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl plan list](airshipctl_plan_list.md) - Airshipctl command to list plans -* [airshipctl plan run](airshipctl_plan_run.md) - Airshipctl command to run plan -* [airshipctl plan validate](airshipctl_plan_validate.md) - Airshipctl command to validate plan - diff --git a/docs/source/cli/airshipctl_plan_list.md b/docs/source/cli/airshipctl_plan_list.md deleted file mode 100644 index a3dc870bd..000000000 --- a/docs/source/cli/airshipctl_plan_list.md +++ /dev/null @@ -1,45 +0,0 @@ -## airshipctl plan list - -Airshipctl command to list plans - -### Synopsis - -List plans defined in site manifest. - - -``` -airshipctl plan list [flags] -``` - -### Examples - -``` - -List plan -# airshipctl plan list - -List plan(yaml output format) -# airshipctl plan list -o yaml - -List plan(table output format) -# airshipctl plan list -o table -``` - -### Options - -``` - -h, --help help for list - -o, --output string output format. Supported formats are 'table' and 'yaml' (default "table") -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl plan](airshipctl_plan.md) - Airshipctl command to manage plans - diff --git a/docs/source/cli/airshipctl_plan_validate.md b/docs/source/cli/airshipctl_plan_validate.md deleted file mode 100644 index 1076f35cc..000000000 --- a/docs/source/cli/airshipctl_plan_validate.md +++ /dev/null @@ -1,40 +0,0 @@ -## airshipctl plan validate - -Airshipctl command to validate plan - -### Synopsis - -Validate a plan defined in the site manifest. Specify the plan using the mandatory parameter PLAN_NAME. -To get list of plans associated for a site, run 'airshipctl plan list'. - - -``` -airshipctl plan validate PLAN_NAME [flags] -``` - -### Examples - -``` - -Validate plan named iso -# airshipctl plan validate iso - -``` - -### Options - -``` - -h, --help help for validate -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl plan](airshipctl_plan.md) - Airshipctl command to manage plans - diff --git a/docs/source/cli/airshipctl_secret.md b/docs/source/cli/airshipctl_secret.md deleted file mode 100644 index a0ce694a0..000000000 --- a/docs/source/cli/airshipctl_secret.md +++ /dev/null @@ -1,26 +0,0 @@ -## airshipctl secret - -Airshipctl command to manage secrets - -### Synopsis - -Commands and sub-commnads defined can be used to manage secrets. - -### Options - -``` - -h, --help help for secret -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. -* [airshipctl secret generate](airshipctl_secret_generate.md) - Airshipctl command to generate secrets - diff --git a/docs/source/cli/airshipctl_secret_generate.md b/docs/source/cli/airshipctl_secret_generate.md deleted file mode 100644 index 6ebf84f9f..000000000 --- a/docs/source/cli/airshipctl_secret_generate.md +++ /dev/null @@ -1,26 +0,0 @@ -## airshipctl secret generate - -Airshipctl command to generate secrets - -### Synopsis - -Airshipctl command to generate secrets - -### Options - -``` - -h, --help help for generate -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl secret](airshipctl_secret.md) - Airshipctl command to manage secrets -* [airshipctl secret generate encryptionkey](airshipctl_secret_generate_encryptionkey.md) - Airshipctl command to generate a secure encryption key or passphrase - diff --git a/docs/source/cli/airshipctl_secret_generate_encryptionkey.md b/docs/source/cli/airshipctl_secret_generate_encryptionkey.md deleted file mode 100644 index 0d813365f..000000000 --- a/docs/source/cli/airshipctl_secret_generate_encryptionkey.md +++ /dev/null @@ -1,46 +0,0 @@ -## airshipctl secret generate encryptionkey - -Airshipctl command to generate a secure encryption key or passphrase - -### Synopsis - -Generates a secure encryption key or passphrase. - -If regex arguments are passed the encryption key created would match the regular expression passed. - - -``` -airshipctl secret generate encryptionkey [flags] -``` - -### Examples - -``` - -Generates a secure encryption key or passphrase. -# airshipctl secret generate encryptionkey - -Generates a secure encryption key or passphrase matching the regular expression -# airshipctl secret generate encryptionkey --regex Xy[a-c][0-9]!a* - -``` - -### Options - -``` - -h, --help help for encryptionkey - --limit int limit number of characters for + or * regex (default 5) - --regex string regular expression string -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl secret generate](airshipctl_secret_generate.md) - Airshipctl command to generate secrets - diff --git a/docs/source/cli/airshipctl_version.md b/docs/source/cli/airshipctl_version.md deleted file mode 100644 index 6f6e299ee..000000000 --- a/docs/source/cli/airshipctl_version.md +++ /dev/null @@ -1,29 +0,0 @@ -## airshipctl version - -Airshipctl command to display the current version number - -### Synopsis - -Airshipctl command to display the current version number - -``` -airshipctl version [flags] -``` - -### Options - -``` - -h, --help help for version -``` - -### Options inherited from parent commands - -``` - --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" - --debug enable verbose output -``` - -### SEE ALSO - -* [airshipctl](airshipctl.md) - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. - diff --git a/docs/source/cli/baremetal/airshipctl_baremetal.rst b/docs/source/cli/baremetal/airshipctl_baremetal.rst new file mode 100644 index 000000000..46bba02a7 --- /dev/null +++ b/docs/source/cli/baremetal/airshipctl_baremetal.rst @@ -0,0 +1,41 @@ +.. _airshipctl_baremetal: + +airshipctl baremetal +-------------------- + +Airshipctl command to manage bare metal host(s) + +Synopsis +~~~~~~~~ + + +Provides commands that can be performed on bare metal host(s). The commands help in +performing the basic boot and power operations on the bare metal host(s). + + +Options +~~~~~~~ + +:: + + -h, --help help for baremetal + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl baremetal ejectmedia ` - Airshipctl command to eject virtual media attached to a bare metal host +* :ref:`airshipctl baremetal poweroff ` - Airshipctl command to shutdown bare metal host(s) +* :ref:`airshipctl baremetal poweron ` - Airshipctl command to power on host(s) +* :ref:`airshipctl baremetal powerstatus ` - Airshipctl command to retrieve the power status of a bare metal host +* :ref:`airshipctl baremetal reboot ` - Airshipctl command to reboot host(s) +* :ref:`airshipctl baremetal remotedirect ` - Airshipctl command to bootstrap the ephemeral host + diff --git a/docs/source/cli/airshipctl_baremetal_ejectmedia.md b/docs/source/cli/baremetal/airshipctl_baremetal_ejectmedia.rst similarity index 52% rename from docs/source/cli/airshipctl_baremetal_ejectmedia.md rename to docs/source/cli/baremetal/airshipctl_baremetal_ejectmedia.rst index f7e0bb373..36313e258 100644 --- a/docs/source/cli/airshipctl_baremetal_ejectmedia.md +++ b/docs/source/cli/baremetal/airshipctl_baremetal_ejectmedia.rst @@ -1,55 +1,64 @@ -## airshipctl baremetal ejectmedia +.. _airshipctl_baremetal_ejectmedia: + +airshipctl baremetal ejectmedia +------------------------------- Airshipctl command to eject virtual media attached to a bare metal host -### Synopsis +Synopsis +~~~~~~~~ + Eject virtual media attached to a bare metal host. The command will target bare metal hosts from airship site inventory based on the --name, --namespace and --labels flags provided. If no flags are provided, airshipctl will select all bare metal hosts in the site inventory. -``` -airshipctl baremetal ejectmedia [flags] -``` +:: -### Examples + airshipctl baremetal ejectmedia [flags] -``` +Examples +~~~~~~~~ -Perform ejectmedia action against hosts with name rdm9r3s3 in all namespaces where the host is found -# airshipctl baremetal ejectmedia --name rdm9r3s3 +:: -Perform ejectmedia action against hosts with name rdm9r3s3 in metal3 namespace -# airshipctl baremetal ejectmedia --name rdm9r3s3 --namespace metal3 -Perform ejectmedia action against all hosts defined in inventory -# airshipctl baremetal ejectmedia --all + Perform ejectmedia action against hosts with name rdm9r3s3 in all namespaces where the host is found + # airshipctl baremetal ejectmedia --name rdm9r3s3 -Perform ejectmedia action against hosts with a label 'foo=bar' -# airshipctl baremetal ejectmedia --labels "foo=bar" + Perform ejectmedia action against hosts with name rdm9r3s3 in metal3 namespace + # airshipctl baremetal ejectmedia --name rdm9r3s3 --namespace metal3 -``` + Perform ejectmedia action against all hosts defined in inventory + # airshipctl baremetal ejectmedia --all -### Options + Perform ejectmedia action against hosts with a label 'foo=bar' + # airshipctl baremetal ejectmedia --labels "foo=bar" + + +Options +~~~~~~~ + +:: -``` --all specify this to target all hosts in the site inventory -h, --help help for ejectmedia -l, --labels string label(s) to filter desired bare metal host from site manifest documents --name string name to filter desired bare metal host from site manifest document -n, --namespace string airshipctl phase that contains the desired bare metal host from site manifest document(s) --timeout duration timeout on bare metal action (default 10m0s) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) diff --git a/docs/source/cli/airshipctl_baremetal_poweroff.md b/docs/source/cli/baremetal/airshipctl_baremetal_poweroff.rst similarity index 51% rename from docs/source/cli/airshipctl_baremetal_poweroff.md rename to docs/source/cli/baremetal/airshipctl_baremetal_poweroff.rst index 5de7ee053..d4f329804 100644 --- a/docs/source/cli/airshipctl_baremetal_poweroff.md +++ b/docs/source/cli/baremetal/airshipctl_baremetal_poweroff.rst @@ -1,55 +1,64 @@ -## airshipctl baremetal poweroff +.. _airshipctl_baremetal_poweroff: + +airshipctl baremetal poweroff +----------------------------- Airshipctl command to shutdown bare metal host(s) -### Synopsis +Synopsis +~~~~~~~~ + Power off bare metal host(s). The command will target bare metal hosts from airship site inventory based on the --name, --namespace and --labels flags provided. If no flags are provided, airshipctl will select all bare metal hosts in the site inventory. -``` -airshipctl baremetal poweroff [flags] -``` +:: -### Examples + airshipctl baremetal poweroff [flags] -``` +Examples +~~~~~~~~ -Perform poweroff action against hosts with name rdm9r3s3 in all namespaces where the host is found -# airshipctl baremetal poweroff --name rdm9r3s3 +:: -Perform poweroff action against hosts with name rdm9r3s3 in metal3 namespace -# airshipctl baremetal poweroff --name rdm9r3s3 --namespace metal3 -Perform poweroff action against all hosts defined in inventory -# airshipctl baremetal poweroff --all + Perform poweroff action against hosts with name rdm9r3s3 in all namespaces where the host is found + # airshipctl baremetal poweroff --name rdm9r3s3 -Perform poweroff action against hosts with a label 'foo=bar' -# airshipctl baremetal poweroff --labels "foo=bar" + Perform poweroff action against hosts with name rdm9r3s3 in metal3 namespace + # airshipctl baremetal poweroff --name rdm9r3s3 --namespace metal3 -``` + Perform poweroff action against all hosts defined in inventory + # airshipctl baremetal poweroff --all -### Options + Perform poweroff action against hosts with a label 'foo=bar' + # airshipctl baremetal poweroff --labels "foo=bar" + + +Options +~~~~~~~ + +:: -``` --all specify this to target all hosts in the site inventory -h, --help help for poweroff -l, --labels string label(s) to filter desired bare metal host from site manifest documents --name string name to filter desired bare metal host from site manifest document -n, --namespace string airshipctl phase that contains the desired bare metal host from site manifest document(s) --timeout duration timeout on bare metal action (default 10m0s) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) diff --git a/docs/source/cli/airshipctl_baremetal_poweron.md b/docs/source/cli/baremetal/airshipctl_baremetal_poweron.rst similarity index 51% rename from docs/source/cli/airshipctl_baremetal_poweron.md rename to docs/source/cli/baremetal/airshipctl_baremetal_poweron.rst index d41be8169..8a122965b 100644 --- a/docs/source/cli/airshipctl_baremetal_poweron.md +++ b/docs/source/cli/baremetal/airshipctl_baremetal_poweron.rst @@ -1,55 +1,64 @@ -## airshipctl baremetal poweron +.. _airshipctl_baremetal_poweron: + +airshipctl baremetal poweron +---------------------------- Airshipctl command to power on host(s) -### Synopsis +Synopsis +~~~~~~~~ + Power on bare metal host(s). The command will target bare metal hosts from airship site inventory based on the --name, --namespace and --labels flags provided. If no flags are provided, airshipctl will select all bare metal hosts in the site inventory. -``` -airshipctl baremetal poweron [flags] -``` +:: -### Examples + airshipctl baremetal poweron [flags] -``` +Examples +~~~~~~~~ -Perform poweron action against hosts with name rdm9r3s3 in all namespaces where the host is found -# airshipctl baremetal poweron --name rdm9r3s3 +:: -Perform poweron action against hosts with name rdm9r3s3 in metal3 namespace -# airshipctl baremetal poweron --name rdm9r3s3 --namespace metal3 -Perform poweron action against all hosts defined in inventory -# airshipctl baremetal poweron --all + Perform poweron action against hosts with name rdm9r3s3 in all namespaces where the host is found + # airshipctl baremetal poweron --name rdm9r3s3 -Perform poweron action against hosts with a label 'foo=bar' -# airshipctl baremetal poweron --labels "foo=bar" + Perform poweron action against hosts with name rdm9r3s3 in metal3 namespace + # airshipctl baremetal poweron --name rdm9r3s3 --namespace metal3 -``` + Perform poweron action against all hosts defined in inventory + # airshipctl baremetal poweron --all -### Options + Perform poweron action against hosts with a label 'foo=bar' + # airshipctl baremetal poweron --labels "foo=bar" + + +Options +~~~~~~~ + +:: -``` --all specify this to target all hosts in the site inventory -h, --help help for poweron -l, --labels string label(s) to filter desired bare metal host from site manifest documents --name string name to filter desired bare metal host from site manifest document -n, --namespace string airshipctl phase that contains the desired bare metal host from site manifest document(s) --timeout duration timeout on bare metal action (default 10m0s) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) diff --git a/docs/source/cli/airshipctl_baremetal_powerstatus.md b/docs/source/cli/baremetal/airshipctl_baremetal_powerstatus.rst similarity index 51% rename from docs/source/cli/airshipctl_baremetal_powerstatus.md rename to docs/source/cli/baremetal/airshipctl_baremetal_powerstatus.rst index 428ff01ba..8d81d4c69 100644 --- a/docs/source/cli/airshipctl_baremetal_powerstatus.md +++ b/docs/source/cli/baremetal/airshipctl_baremetal_powerstatus.rst @@ -1,50 +1,59 @@ -## airshipctl baremetal powerstatus +.. _airshipctl_baremetal_powerstatus: + +airshipctl baremetal powerstatus +-------------------------------- Airshipctl command to retrieve the power status of a bare metal host -### Synopsis +Synopsis +~~~~~~~~ + Retrieve the power status of a bare metal host. It targets a bare metal host from airship inventory based on the --name, --namespace, --label and --timeout flags provided. -``` -airshipctl baremetal powerstatus [flags] -``` +:: -### Examples + airshipctl baremetal powerstatus [flags] -``` +Examples +~~~~~~~~ -To get power status of host with name rdm9r3s3 in all namespaces where the host is found -# airshipctl baremetal powerstatus --name rdm9r3s3 +:: -To get power status of host with name rdm9r3s3 in metal3 namespace -# airshipctl baremetal powerstatus --name rdm9r3s3 --namespace metal3 -To get power status of host with a label 'foo=bar' -# airshipctl baremetal powerstatus --labels "foo=bar" + To get power status of host with name rdm9r3s3 in all namespaces where the host is found + # airshipctl baremetal powerstatus --name rdm9r3s3 -``` + To get power status of host with name rdm9r3s3 in metal3 namespace + # airshipctl baremetal powerstatus --name rdm9r3s3 --namespace metal3 -### Options + To get power status of host with a label 'foo=bar' + # airshipctl baremetal powerstatus --labels "foo=bar" + + +Options +~~~~~~~ + +:: -``` -h, --help help for powerstatus -l, --labels string label(s) to filter desired bare metal host from site manifest documents --name string name to filter desired bare metal host from site manifest document -n, --namespace string airshipctl phase that contains the desired bare metal host from site manifest document(s) --timeout duration timeout on bare metal action (default 10m0s) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) diff --git a/docs/source/cli/airshipctl_baremetal_reboot.md b/docs/source/cli/baremetal/airshipctl_baremetal_reboot.rst similarity index 51% rename from docs/source/cli/airshipctl_baremetal_reboot.md rename to docs/source/cli/baremetal/airshipctl_baremetal_reboot.rst index 0de3ccb59..ab3c343d5 100644 --- a/docs/source/cli/airshipctl_baremetal_reboot.md +++ b/docs/source/cli/baremetal/airshipctl_baremetal_reboot.rst @@ -1,55 +1,64 @@ -## airshipctl baremetal reboot +.. _airshipctl_baremetal_reboot: + +airshipctl baremetal reboot +--------------------------- Airshipctl command to reboot host(s) -### Synopsis +Synopsis +~~~~~~~~ + Reboot bare metal host(s). The command will target bare metal hosts from airship site inventory based on the --name, --namespace and --labels flags provided. If no flags are provided, airshipctl will select all bare metal hosts in the site inventory. -``` -airshipctl baremetal reboot [flags] -``` +:: -### Examples + airshipctl baremetal reboot [flags] -``` +Examples +~~~~~~~~ -Perform reboot action against hosts with name rdm9r3s3 in all namespaces where the host is found -# airshipctl baremetal reboot --name rdm9r3s3 +:: -Perform reboot action against hosts with name rdm9r3s3 in metal3 namespace -# airshipctl baremetal reboot --name rdm9r3s3 --namespace metal3 -Perform reboot action against all hosts defined in inventory -# airshipctl baremetal reboot --all + Perform reboot action against hosts with name rdm9r3s3 in all namespaces where the host is found + # airshipctl baremetal reboot --name rdm9r3s3 -Perform reboot action against hosts with a label 'foo=bar' -# airshipctl baremetal reboot --labels "foo=bar" + Perform reboot action against hosts with name rdm9r3s3 in metal3 namespace + # airshipctl baremetal reboot --name rdm9r3s3 --namespace metal3 -``` + Perform reboot action against all hosts defined in inventory + # airshipctl baremetal reboot --all -### Options + Perform reboot action against hosts with a label 'foo=bar' + # airshipctl baremetal reboot --labels "foo=bar" + + +Options +~~~~~~~ + +:: -``` --all specify this to target all hosts in the site inventory -h, --help help for reboot -l, --labels string label(s) to filter desired bare metal host from site manifest documents --name string name to filter desired bare metal host from site manifest document -n, --namespace string airshipctl phase that contains the desired bare metal host from site manifest document(s) --timeout duration timeout on bare metal action (default 10m0s) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) diff --git a/docs/source/cli/airshipctl_baremetal_remotedirect.md b/docs/source/cli/baremetal/airshipctl_baremetal_remotedirect.rst similarity index 50% rename from docs/source/cli/airshipctl_baremetal_remotedirect.md rename to docs/source/cli/baremetal/airshipctl_baremetal_remotedirect.rst index 22ba41323..37e18e770 100644 --- a/docs/source/cli/airshipctl_baremetal_remotedirect.md +++ b/docs/source/cli/baremetal/airshipctl_baremetal_remotedirect.rst @@ -1,51 +1,60 @@ -## airshipctl baremetal remotedirect +.. _airshipctl_baremetal_remotedirect: + +airshipctl baremetal remotedirect +--------------------------------- Airshipctl command to bootstrap the ephemeral host -### Synopsis +Synopsis +~~~~~~~~ + Bootstrap bare metal host. It targets bare metal host from airship inventory based on the --iso-url, --name, --namespace, --label and --timeout flags provided. -``` -airshipctl baremetal remotedirect [flags] -``` +:: -### Examples + airshipctl baremetal remotedirect [flags] -``` +Examples +~~~~~~~~ -Perform bootstrap action against hosts with name rdm9r3s3 in all namespaces where the host is found -# airshipctl baremetal remotedirect --name rdm9r3s3 +:: -Perform bootstrap action against hosts with name rdm9r3s3 in metal3 namespace -# airshipctl baremetal remotedirect --name rdm9r3s3 --namespace metal3 -Perform bootstrap action against hosts with a label 'foo=bar' -# airshipctl baremetal remotedirect --labels "foo=bar" + Perform bootstrap action against hosts with name rdm9r3s3 in all namespaces where the host is found + # airshipctl baremetal remotedirect --name rdm9r3s3 -``` + Perform bootstrap action against hosts with name rdm9r3s3 in metal3 namespace + # airshipctl baremetal remotedirect --name rdm9r3s3 --namespace metal3 -### Options + Perform bootstrap action against hosts with a label 'foo=bar' + # airshipctl baremetal remotedirect --labels "foo=bar" + + +Options +~~~~~~~ + +:: -``` -h, --help help for remotedirect --iso-url string specify iso url for host to boot from -l, --labels string label(s) to filter desired bare metal host from site manifest documents --name string name to filter desired bare metal host from site manifest document -n, --namespace string airshipctl phase that contains the desired bare metal host from site manifest document(s) --timeout duration timeout on bare metal action (default 10m0s) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) +* :ref:`airshipctl baremetal ` - Airshipctl command to manage bare metal host(s) diff --git a/docs/source/cli/baremetal/index.rst b/docs/source/cli/baremetal/index.rst new file mode 100644 index 000000000..7be005f57 --- /dev/null +++ b/docs/source/cli/baremetal/index.rst @@ -0,0 +1,14 @@ +#################### +baremetal +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_baremetal + airshipctl_baremetal_ejectmedia + airshipctl_baremetal_poweroff + airshipctl_baremetal_poweron + airshipctl_baremetal_powerstatus + airshipctl_baremetal_reboot + airshipctl_baremetal_remotedirect diff --git a/docs/source/cli/cluster/airshipctl_cluster.rst b/docs/source/cli/cluster/airshipctl_cluster.rst new file mode 100644 index 000000000..020136e6d --- /dev/null +++ b/docs/source/cli/cluster/airshipctl_cluster.rst @@ -0,0 +1,40 @@ +.. _airshipctl_cluster: + +airshipctl cluster +------------------ + +Airshipctl command to manage kubernetes clusters + +Synopsis +~~~~~~~~ + + +Provides capabilities for interacting with a Kubernetes cluster, +such as getting status and deploying initial infrastructure. + + +Options +~~~~~~~ + +:: + + -h, --help help for cluster + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl cluster check-certificate-expiration ` - Airshipctl command to check expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster +* :ref:`airshipctl cluster get-kubeconfig ` - Airshipctl command to retrieve kubeconfig for a desired cluster +* :ref:`airshipctl cluster list ` - Airshipctl command to get and list defined clusters +* :ref:`airshipctl cluster rotate-sa-token ` - Airshipctl command to rotate tokens of Service Account(s) +* :ref:`airshipctl cluster status ` - Retrieve statuses of deployed cluster components + diff --git a/docs/source/cli/cluster/airshipctl_cluster_check-certificate-expiration.rst b/docs/source/cli/cluster/airshipctl_cluster_check-certificate-expiration.rst new file mode 100644 index 000000000..d8cca1178 --- /dev/null +++ b/docs/source/cli/cluster/airshipctl_cluster_check-certificate-expiration.rst @@ -0,0 +1,68 @@ +.. _airshipctl_cluster_check-certificate-expiration: + +airshipctl cluster check-certificate-expiration +----------------------------------------------- + +Airshipctl command to check expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster + +Synopsis +~~~~~~~~ + + +Displays a list of certificate along with expirations from both the management and workload clusters, or in a +self-managed cluster. Checks for TLS Secrets, kubeconf secrets (which gets created while creating the +workload cluster) and also the node certificates present inside /etc/kubernetes/pki directory for each node. + + +:: + + airshipctl cluster check-certificate-expiration [flags] + +Examples +~~~~~~~~ + +:: + + + To display all the expiring certificates in the cluster + # airshipctl cluster check-certificate-expiration --kubeconfig testconfig + + To display the certificates whose expiration is within threshold of 30 days + # airshipctl cluster check-certificate-expiration -t 30 --kubeconfig testconfig + + To output the contents in json format (default operation) + # airshipctl cluster check-certificate-expiration -o json --kubeconfig testconfig + or + # airshipctl cluster check-certificate-expiration --kubeconfig testconfig + + To output the contents in yaml format + # airshipctl cluster check-certificate-expiration -o yaml --kubeconfig testconfig + + To output the contents whose expiration is within 30 days in yaml format + # airshipctl cluster check-certificate-expiration -t 30 -o yaml --kubeconfig testconfig + + +Options +~~~~~~~ + +:: + + -h, --help help for check-certificate-expiration + --kubeconfig string path to kubeconfig associated with cluster being managed + --kubecontext string kubeconfig context to be used + -o, --output string convert output to yaml or json (default "json") + -t, --threshold int the max expiration threshold in days before a certificate is expiring. Displays all the certificates by default (default -1) + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl cluster ` - Airshipctl command to manage kubernetes clusters + diff --git a/docs/source/cli/cluster/airshipctl_cluster_get-kubeconfig.rst b/docs/source/cli/cluster/airshipctl_cluster_get-kubeconfig.rst new file mode 100644 index 000000000..72c0ed381 --- /dev/null +++ b/docs/source/cli/cluster/airshipctl_cluster_get-kubeconfig.rst @@ -0,0 +1,67 @@ +.. _airshipctl_cluster_get-kubeconfig: + +airshipctl cluster get-kubeconfig +--------------------------------- + +Airshipctl command to retrieve kubeconfig for a desired cluster + +Synopsis +~~~~~~~~ + + +Retrieves kubeconfig of the cluster and prints it to stdout. + +If you specify CLUSTER_NAME, kubeconfig will have a CurrentContext set to CLUSTER_NAME and +will have its context defined. + +If you don't specify CLUSTER_NAME, kubeconfig will have multiple contexts for every cluster +in the airship site. Context names will correspond to cluster names. CurrentContext will be empty. + + +:: + + airshipctl cluster get-kubeconfig CLUSTER_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + Retrieve target-cluster kubeconfig + # airshipctl cluster get-kubeconfig target-cluster + + Retrieve kubeconfig for the entire site; the kubeconfig will have context for every cluster + # airshipctl cluster get-kubeconfig + + Specify a file where kubeconfig should be written + # airshipctl cluster get-kubeconfig --file ~/my-kubeconfig + + Merge site kubeconfig with existing kubeconfig file. + Keep in mind that this can override a context if it has the same name + Airshipctl will overwrite the contents of the file, if you want merge with existing file, specify "--merge" flag + # airshipctl cluster get-kubeconfig --file ~/.airship/kubeconfig --merge + + +Options +~~~~~~~ + +:: + + -f, --file string specify where to write kubeconfig file. If flag isn't specified, airshipctl will write it to stdout + -h, --help help for get-kubeconfig + --merge specify if you want to merge kubeconfig with the one that exists at --file location + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl cluster ` - Airshipctl command to manage kubernetes clusters + diff --git a/docs/source/cli/airshipctl_cluster_list.md b/docs/source/cli/cluster/airshipctl_cluster_list.rst similarity index 50% rename from docs/source/cli/airshipctl_cluster_list.md rename to docs/source/cli/cluster/airshipctl_cluster_list.rst index 5859e59d8..1b94be31d 100644 --- a/docs/source/cli/airshipctl_cluster_list.md +++ b/docs/source/cli/cluster/airshipctl_cluster_list.rst @@ -1,44 +1,52 @@ -## airshipctl cluster list +.. _airshipctl_cluster_list: + +airshipctl cluster list +----------------------- Airshipctl command to get and list defined clusters -### Synopsis +Synopsis +~~~~~~~~ Retrieve and list the defined clusters in table form or display just the cluster names. The contents of the table would include cluster name, kubeconfig context and parent cluster name. -``` -airshipctl cluster list [flags] -``` +:: -### Examples + airshipctl cluster list [flags] -``` +Examples +~~~~~~~~ -Retrieve list of clusters -# airshipctl cluster list --airshipconf /tmp/airconfig -# airshipctl cluster list -o table -# airshipctl cluster list -o name +:: -``` -### Options + Retrieve list of clusters + # airshipctl cluster list --airshipconf /tmp/airconfig + # airshipctl cluster list -o table + # airshipctl cluster list -o name + + +Options +~~~~~~~ + +:: -``` -h, --help help for list -o, --output string output formats. Supported options are 'table' and 'name' (default "name") -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters +* :ref:`airshipctl cluster ` - Airshipctl command to manage kubernetes clusters diff --git a/docs/source/cli/airshipctl_cluster_rotate-sa-token.md b/docs/source/cli/cluster/airshipctl_cluster_rotate-sa-token.rst similarity index 57% rename from docs/source/cli/airshipctl_cluster_rotate-sa-token.md rename to docs/source/cli/cluster/airshipctl_cluster_rotate-sa-token.rst index c6f9ac45e..d65da64d5 100644 --- a/docs/source/cli/airshipctl_cluster_rotate-sa-token.md +++ b/docs/source/cli/cluster/airshipctl_cluster_rotate-sa-token.rst @@ -1,8 +1,13 @@ -## airshipctl cluster rotate-sa-token +.. _airshipctl_cluster_rotate-sa-token: + +airshipctl cluster rotate-sa-token +---------------------------------- Airshipctl command to rotate tokens of Service Account(s) -### Synopsis +Synopsis +~~~~~~~~ + Reset/rotate the Service Account(SA) tokens and additionally restart the corresponding pods to get the latest token data reflected in the pod spec. @@ -11,39 +16,43 @@ Secret-namespace is a mandatory flag and secret-name is optional. If a secret-na tokens in the specified namespace are rotated, else only the specified secret-name. -``` -airshipctl cluster rotate-sa-token [flags] -``` +:: -### Examples + airshipctl cluster rotate-sa-token [flags] -``` +Examples +~~~~~~~~ -To rotate a particular SA token -# airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p +:: -To rotate all the SA tokens in cert-manager namespace -# airshipctl cluster rotate-sa-token -n cert-manager -``` + To rotate a particular SA token + # airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p -### Options + To rotate all the SA tokens in cert-manager namespace + # airshipctl cluster rotate-sa-token -n cert-manager + + +Options +~~~~~~~ + +:: -``` -h, --help help for rotate-sa-token --kubeconfig string path to kubeconfig associated with cluster being managed -s, --secret-name string name of the secret containing Service Account Token -n, --secret-namespace string namespace of the Service Account Token -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters +* :ref:`airshipctl cluster ` - Airshipctl command to manage kubernetes clusters diff --git a/docs/source/cli/airshipctl_cluster_status.md b/docs/source/cli/cluster/airshipctl_cluster_status.rst similarity index 52% rename from docs/source/cli/airshipctl_cluster_status.md rename to docs/source/cli/cluster/airshipctl_cluster_status.rst index d9b998b98..0805e8398 100644 --- a/docs/source/cli/airshipctl_cluster_status.md +++ b/docs/source/cli/cluster/airshipctl_cluster_status.rst @@ -1,30 +1,38 @@ -## airshipctl cluster status +.. _airshipctl_cluster_status: + +airshipctl cluster status +------------------------- Retrieve statuses of deployed cluster components -### Synopsis +Synopsis +~~~~~~~~ + Retrieve statuses of deployed cluster components -``` -airshipctl cluster status [flags] -``` +:: -### Options + airshipctl cluster status [flags] + +Options +~~~~~~~ + +:: -``` -h, --help help for status --kubeconfig string Path to kubeconfig associated with cluster being managed -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters +* :ref:`airshipctl cluster ` - Airshipctl command to manage kubernetes clusters diff --git a/docs/source/cli/cluster/index.rst b/docs/source/cli/cluster/index.rst new file mode 100644 index 000000000..bb83cbee7 --- /dev/null +++ b/docs/source/cli/cluster/index.rst @@ -0,0 +1,13 @@ +#################### +cluster +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_cluster + airshipctl_cluster_check-certificate-expiration + airshipctl_cluster_get-kubeconfig + airshipctl_cluster_list + airshipctl_cluster_rotate-sa-token + airshipctl_cluster_status diff --git a/docs/source/cli/completion/airshipctl_completion.rst b/docs/source/cli/completion/airshipctl_completion.rst new file mode 100644 index 000000000..fafe6aa2f --- /dev/null +++ b/docs/source/cli/completion/airshipctl_completion.rst @@ -0,0 +1,51 @@ +.. _airshipctl_completion: + +airshipctl completion +--------------------- + +Airshipctl command to generate completion script for the specified shell (bash or zsh) + +Synopsis +~~~~~~~~ + + +Generate completion script for airshipctl for the specified shell (bash or zsh). + + +:: + + airshipctl completion SHELL [flags] + +Examples +~~~~~~~~ + +:: + + + Save shell completion to a file + # airshipctl completion bash > $HOME/.airship_completions + + Apply completions to the current shell + # source <(airshipctl completion bash) + + +Options +~~~~~~~ + +:: + + -h, --help help for completion + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. + diff --git a/docs/source/cli/completion/index.rst b/docs/source/cli/completion/index.rst new file mode 100644 index 000000000..2174df279 --- /dev/null +++ b/docs/source/cli/completion/index.rst @@ -0,0 +1,8 @@ +#################### +completion +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_completion diff --git a/docs/source/cli/config/airshipctl_config.rst b/docs/source/cli/config/airshipctl_config.rst new file mode 100644 index 000000000..661156997 --- /dev/null +++ b/docs/source/cli/config/airshipctl_config.rst @@ -0,0 +1,42 @@ +.. _airshipctl_config: + +airshipctl config +----------------- + +Airshipctl command to manage airshipctl config file + +Synopsis +~~~~~~~~ + + +Provides commands which can be used to manage the airshipctl config file. + + +Options +~~~~~~~ + +:: + + -h, --help help for config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl config get-context ` - Airshipctl command to get context(s) information from the airshipctl config +* :ref:`airshipctl config get-management-config ` - Airshipctl command to view management config(s) defined in the airshipctl config +* :ref:`airshipctl config get-manifest ` - Airshipctl command to get a specific or all manifest(s) information from the airshipctl config +* :ref:`airshipctl config init ` - Airshipctl command to generate initial configuration file for airshipctl +* :ref:`airshipctl config set-context ` - Airshipctl command to create/modify context in airshipctl config file +* :ref:`airshipctl config set-management-config ` - Airshipctl command to create/modify out-of-band management configuration in airshipctl config file +* :ref:`airshipctl config set-manifest ` - Airshipctl command to create/modify manifests in airship config +* :ref:`airshipctl config use-context ` - Airshipctl command to switch to a different context + diff --git a/docs/source/cli/airshipctl_config_get-context.md b/docs/source/cli/config/airshipctl_config_get-context.rst similarity index 50% rename from docs/source/cli/airshipctl_config_get-context.md rename to docs/source/cli/config/airshipctl_config_get-context.rst index cd938e48c..ef3391084 100644 --- a/docs/source/cli/airshipctl_config_get-context.md +++ b/docs/source/cli/config/airshipctl_config_get-context.rst @@ -1,48 +1,57 @@ -## airshipctl config get-context +.. _airshipctl_config_get-context: + +airshipctl config get-context +----------------------------- Airshipctl command to get context(s) information from the airshipctl config -### Synopsis +Synopsis +~~~~~~~~ + Displays information about contexts such as associated manifests, users, and clusters. It would display a specific context information, or all defined context information if no name is provided. -``` -airshipctl config get-context CONTEXT_NAME [flags] -``` +:: -### Examples + airshipctl config get-context CONTEXT_NAME [flags] -``` +Examples +~~~~~~~~ -List all contexts -# airshipctl config get-contexts +:: -Display the current context -# airshipctl config get-context --current -Display a specific context -# airshipctl config get-context exampleContext + List all contexts + # airshipctl config get-contexts -``` + Display the current context + # airshipctl config get-context --current -### Options + Display a specific context + # airshipctl config get-context exampleContext + + +Options +~~~~~~~ + +:: -``` --current get the current context --format yaml supported output format yaml or `table`, default is `yaml` (default "yaml") -h, --help help for get-context -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/config/airshipctl_config_get-management-config.rst b/docs/source/cli/config/airshipctl_config_get-management-config.rst new file mode 100644 index 000000000..7d3e463a1 --- /dev/null +++ b/docs/source/cli/config/airshipctl_config_get-management-config.rst @@ -0,0 +1,52 @@ +.. _airshipctl_config_get-management-config: + +airshipctl config get-management-config +--------------------------------------- + +Airshipctl command to view management config(s) defined in the airshipctl config + +Synopsis +~~~~~~~~ + + +Displays a specific management config information, or all defined management configs if no name is provided. +The information relates to reboot-delays and retry in seconds along with management-type that has to be used. + + +:: + + airshipctl config get-management-config MGMT_CONFIG_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + View all management configurations + # airshipctl config get-management-configs + + View a specific management configuration named "default" + # airshipctl config get-management-config default + + +Options +~~~~~~~ + +:: + + -h, --help help for get-management-config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file + diff --git a/docs/source/cli/config/airshipctl_config_get-manifest.rst b/docs/source/cli/config/airshipctl_config_get-manifest.rst new file mode 100644 index 000000000..c3ab82948 --- /dev/null +++ b/docs/source/cli/config/airshipctl_config_get-manifest.rst @@ -0,0 +1,52 @@ +.. _airshipctl_config_get-manifest: + +airshipctl config get-manifest +------------------------------ + +Airshipctl command to get a specific or all manifest(s) information from the airshipctl config + +Synopsis +~~~~~~~~ + + +Displays a specific manifest information, or all defined manifests if no name is provided. The information +includes the repository details related to site manifest along with the local targetPath for them. + + +:: + + airshipctl config get-manifest MANIFEST_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + List all the manifests + # airshipctl config get-manifests + + Display a specific manifest + # airshipctl config get-manifest e2e + + +Options +~~~~~~~ + +:: + + -h, --help help for get-manifest + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file + diff --git a/docs/source/cli/airshipctl_config_init.md b/docs/source/cli/config/airshipctl_config_init.rst similarity index 50% rename from docs/source/cli/airshipctl_config_init.md rename to docs/source/cli/config/airshipctl_config_init.rst index 8e172d780..635df45c4 100644 --- a/docs/source/cli/airshipctl_config_init.md +++ b/docs/source/cli/config/airshipctl_config_init.rst @@ -1,8 +1,13 @@ -## airshipctl config init +.. _airshipctl_config_init: + +airshipctl config init +---------------------- Airshipctl command to generate initial configuration file for airshipctl -### Synopsis +Synopsis +~~~~~~~~ + Generates airshipctl config file. This file by default will be written to the $HOME/.airship directory, and will contain default configuration. In case if flag --airshipconf provided - the default configuration @@ -10,40 +15,44 @@ will be written to the file in the specified location instead. If a configuratio at the specified path, an error will be thrown; to overwrite it, specify the --overwrite flag. -``` -airshipctl config init [flags] -``` +:: -### Examples + airshipctl config init [flags] -``` +Examples +~~~~~~~~ -To create new airshipctl config file at the default location -# airshipctl config init +:: -To create new airshipctl config file at the custom location -# airshipctl config init --airshipconf path/to/config -To create new airshipctl config file at the custom location and overwrite it -# airshipctl config init --overwrite --airshipconf path/to/config + To create new airshipctl config file at the default location + # airshipctl config init -``` + To create new airshipctl config file at the custom location + # airshipctl config init --airshipconf path/to/config -### Options + To create new airshipctl config file at the custom location and overwrite it + # airshipctl config init --overwrite --airshipconf path/to/config + + +Options +~~~~~~~ + +:: -``` -h, --help help for init --overwrite overwrite config file -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_set-context.md b/docs/source/cli/config/airshipctl_config_set-context.rst similarity index 53% rename from docs/source/cli/airshipctl_config_set-context.md rename to docs/source/cli/config/airshipctl_config_set-context.rst index fa1f9b343..ee7d409f0 100644 --- a/docs/source/cli/airshipctl_config_set-context.md +++ b/docs/source/cli/config/airshipctl_config_set-context.rst @@ -1,46 +1,55 @@ -## airshipctl config set-context +.. _airshipctl_config_set-context: + +airshipctl config set-context +----------------------------- Airshipctl command to create/modify context in airshipctl config file -### Synopsis +Synopsis +~~~~~~~~ + Creates or modifies context in the airshipctl config file based on the CONTEXT_NAME passed or for the current context if --current flag is specified. It accepts optional flags which include manifest name and management-config name. -``` -airshipctl config set-context CONTEXT_NAME [flags] -``` +:: -### Examples + airshipctl config set-context CONTEXT_NAME [flags] -``` +Examples +~~~~~~~~ -To create a new context named "exampleContext" -# airshipctl config set-context exampleContext --manifest=exampleManifest +:: -To update the manifest of the current-context -# airshipctl config set-context --current --manifest=exampleManifest -``` + To create a new context named "exampleContext" + # airshipctl config set-context exampleContext --manifest=exampleManifest -### Options + To update the manifest of the current-context + # airshipctl config set-context --current --manifest=exampleManifest + + +Options +~~~~~~~ + +:: -``` --current update the current context -h, --help help for set-context --management-config string set the management config for the specified context --manifest string set the manifest for the specified context -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_set-management-config.md b/docs/source/cli/config/airshipctl_config_set-management-config.rst similarity index 58% rename from docs/source/cli/airshipctl_config_set-management-config.md rename to docs/source/cli/config/airshipctl_config_set-management-config.rst index bb49c4512..bf12c5a4e 100644 --- a/docs/source/cli/airshipctl_config_set-management-config.md +++ b/docs/source/cli/config/airshipctl_config_set-management-config.rst @@ -1,8 +1,12 @@ -## airshipctl config set-management-config +.. _airshipctl_config_set-management-config: + +airshipctl config set-management-config +--------------------------------------- Airshipctl command to create/modify out-of-band management configuration in airshipctl config file -### Synopsis +Synopsis +~~~~~~~~ Creates or modifies management config information based on the MGMT_CONFIG_NAME passed. The allowed set @@ -10,44 +14,48 @@ of optional flags are management-type, system-action-retries and system-reboot-d and --insecure to enable proxy and insecure options respectively. -``` -airshipctl config set-management-config MGMT_CONFIG_NAME [flags] -``` +:: -### Examples + airshipctl config set-management-config MGMT_CONFIG_NAME [flags] -``` +Examples +~~~~~~~~ -Create management configuration -# airshipctl config set-management-config default +:: -Create or update management configuration named "default" with retry and to enable insecure options -# airshipctl config set-management-config default --insecure --system-action-retries 40 -Enable proxy for "test" management configuration -# airshipctl config set-management-config test --use-proxy + Create management configuration + # airshipctl config set-management-config default -``` + Create or update management configuration named "default" with retry and to enable insecure options + # airshipctl config set-management-config default --insecure --system-action-retries 40 -### Options + Enable proxy for "test" management configuration + # airshipctl config set-management-config test --use-proxy + + +Options +~~~~~~~ + +:: -``` -h, --help help for set-management-config --insecure ignore SSL certificate verification on out-of-band management requests --management-type string set the out-of-band management type (default "redfish") --system-action-retries int set the number of attempts to poll a host for a status (default 30) --system-reboot-delay int set the number of seconds to wait between power actions (e.g. shutdown, startup) (default 30) --use-proxy use the proxy configuration specified in the local environment (default true) -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_set-manifest.md b/docs/source/cli/config/airshipctl_config_set-manifest.rst similarity index 64% rename from docs/source/cli/airshipctl_config_set-manifest.md rename to docs/source/cli/config/airshipctl_config_set-manifest.rst index b20fd4d2b..018f3659e 100644 --- a/docs/source/cli/airshipctl_config_set-manifest.md +++ b/docs/source/cli/config/airshipctl_config_set-manifest.rst @@ -1,8 +1,13 @@ -## airshipctl config set-manifest +.. _airshipctl_config_set-manifest: + +airshipctl config set-manifest +------------------------------ Airshipctl command to create/modify manifests in airship config -### Synopsis +Synopsis +~~~~~~~~ + Creates or modifies a manifests in the airshipctl config file based on the MANIFEST_NAME argument passed. The optional flags that can be passed to the command are repo name, url, branch name, tag name, commit hash, @@ -10,29 +15,32 @@ target-path and metadata-path. Use --force flag to enable force checkout of the to enable phase repository. -``` -airshipctl config set-manifest MANIFEST_NAME [flags] -``` +:: -### Examples + airshipctl config set-manifest MANIFEST_NAME [flags] -``` +Examples +~~~~~~~~ -Create a new manifest -# airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ - --branch master --phase --target-path exampleTargetpath +:: -Change the phase repo for manifest -# airshipctl config set-manifest e2e --repo exampleRepo --phase -Change the target-path for manifest -# airshipctl config set-manifest e2e --target-path /tmp/e2e + Create a new manifest + # airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ + --branch master --phase --target-path exampleTargetpath -``` + Change the phase repo for manifest + # airshipctl config set-manifest e2e --repo exampleRepo --phase -### Options + Change the target-path for manifest + # airshipctl config set-manifest e2e --target-path /tmp/e2e + + +Options +~~~~~~~ + +:: -``` --branch string the branch to be associated with repository in this manifest --commithash string the commit hash to be associated with repository in this manifest --force if set, enable force checkout in repository with this manifest @@ -43,16 +51,17 @@ Change the target-path for manifest --tag string the tag to be associated with repository in this manifest --target-path string the target path to be set for this manifest --url string the repository url to be associated with this manifest -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/config/airshipctl_config_use-context.rst b/docs/source/cli/config/airshipctl_config_use-context.rst new file mode 100644 index 000000000..cbd3c02c6 --- /dev/null +++ b/docs/source/cli/config/airshipctl_config_use-context.rst @@ -0,0 +1,49 @@ +.. _airshipctl_config_use-context: + +airshipctl config use-context +----------------------------- + +Airshipctl command to switch to a different context + +Synopsis +~~~~~~~~ + + +Switch to a different context defined in the airshipctl config file. +This command doesn't change the context for the kubeconfig file. + + +:: + + airshipctl config use-context CONTEXT_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + Switch to a context named "exampleContext" in airshipctl config file + # airshipctl config use-context exampleContext + + +Options +~~~~~~~ + +:: + + -h, --help help for use-context + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl config ` - Airshipctl command to manage airshipctl config file + diff --git a/docs/source/cli/config/index.rst b/docs/source/cli/config/index.rst new file mode 100644 index 000000000..54de95d29 --- /dev/null +++ b/docs/source/cli/config/index.rst @@ -0,0 +1,16 @@ +#################### +config +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_config + airshipctl_config_get-context + airshipctl_config_get-management-config + airshipctl_config_get-manifest + airshipctl_config_init + airshipctl_config_set-context + airshipctl_config_set-management-config + airshipctl_config_set-manifest + airshipctl_config_use-context diff --git a/docs/source/cli/document/airshipctl_document.rst b/docs/source/cli/document/airshipctl_document.rst new file mode 100644 index 000000000..fd8208f43 --- /dev/null +++ b/docs/source/cli/document/airshipctl_document.rst @@ -0,0 +1,35 @@ +.. _airshipctl_document: + +airshipctl document +------------------- + +Airshipctl command to manage site manifest documents + +Synopsis +~~~~~~~~ + + +Provides commands which help in management of site manifest documents. + + +Options +~~~~~~~ + +:: + + -h, --help help for document + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl document pull ` - Airshipctl command to pull manifests from remote git repositories + diff --git a/docs/source/cli/airshipctl_document_pull.md b/docs/source/cli/document/airshipctl_document_pull.rst similarity index 58% rename from docs/source/cli/airshipctl_document_pull.md rename to docs/source/cli/document/airshipctl_document_pull.rst index 708c30205..29efb73d3 100644 --- a/docs/source/cli/airshipctl_document_pull.md +++ b/docs/source/cli/document/airshipctl_document_pull.rst @@ -1,8 +1,13 @@ -## airshipctl document pull +.. _airshipctl_document_pull: + +airshipctl document pull +------------------------ Airshipctl command to pull manifests from remote git repositories -### Synopsis +Synopsis +~~~~~~~~ + The remote manifests repositories as well as the target path where the repositories will be cloned are defined in the airship config file. @@ -12,35 +17,39 @@ repository "https://opendev.org/airship/treasuremap" as a source of manifests and with the manifests target path "$HOME/.airship/default". -``` -airshipctl document pull [flags] -``` +:: -### Examples + airshipctl document pull [flags] -``` +Examples +~~~~~~~~ -Pull manifests from remote repos -# airshipctl document pull ->>>>>>> Updating cmd files for documentation +:: -``` -### Options + Pull manifests from remote repos + # airshipctl document pull + >>>>>>> Updating cmd files for documentation + + +Options +~~~~~~~ + +:: -``` -h, --help help for pull -n, --no-checkout no checkout is performed after the clone is complete. -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl document](airshipctl_document.md) - Airshipctl command to manage site manifest documents +* :ref:`airshipctl document ` - Airshipctl command to manage site manifest documents diff --git a/docs/source/cli/document/index.rst b/docs/source/cli/document/index.rst new file mode 100644 index 000000000..c3ef324a3 --- /dev/null +++ b/docs/source/cli/document/index.rst @@ -0,0 +1,9 @@ +#################### +document +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_document + airshipctl_document_pull diff --git a/docs/source/cli/help/airshipctl_help.rst b/docs/source/cli/help/airshipctl_help.rst new file mode 100644 index 000000000..2a6c59e27 --- /dev/null +++ b/docs/source/cli/help/airshipctl_help.rst @@ -0,0 +1,38 @@ +.. _airshipctl_help: + +airshipctl help +--------------- + +Help about any command + +Synopsis +~~~~~~~~ + + +Help provides help for any command in the application. +Simply type airshipctl help [path to command] for full details. + +:: + + airshipctl help [command] [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for help + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. + diff --git a/docs/source/cli/help/index.rst b/docs/source/cli/help/index.rst new file mode 100644 index 000000000..538db843d --- /dev/null +++ b/docs/source/cli/help/index.rst @@ -0,0 +1,8 @@ +#################### +help +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_help diff --git a/docs/source/cli/index.rst b/docs/source/cli/index.rst new file mode 100644 index 000000000..fef72a2bf --- /dev/null +++ b/docs/source/cli/index.rst @@ -0,0 +1,18 @@ +#################### +Commands +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl + baremetal/index + cluster/index + completion/index + config/index + document/index + help/index + phase/index + plan/index + secret/index + version/index diff --git a/docs/source/cli/phase/airshipctl_phase.rst b/docs/source/cli/phase/airshipctl_phase.rst new file mode 100644 index 000000000..185f49eca --- /dev/null +++ b/docs/source/cli/phase/airshipctl_phase.rst @@ -0,0 +1,40 @@ +.. _airshipctl_phase: + +airshipctl phase +---------------- + +Airshipctl command to manage phases + +Synopsis +~~~~~~~~ + + +Provides capabilities for interacting with phases, such as getting list of phases or applying a specific one. + + +Options +~~~~~~~ + +:: + + -h, --help help for phase + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl phase list ` - Airshipctl command to list phases +* :ref:`airshipctl phase render ` - Airshipctl command to render phase documents from model +* :ref:`airshipctl phase run ` - Airshipctl command to run phase +* :ref:`airshipctl phase status ` - Airshipctl command to show status of the phase +* :ref:`airshipctl phase tree ` - Airshipctl command to show tree view of kustomize entrypoints of phase +* :ref:`airshipctl phase validate ` - Airshipctl command to validate phase and its documents + diff --git a/docs/source/cli/phase/airshipctl_phase_list.rst b/docs/source/cli/phase/airshipctl_phase_list.rst new file mode 100644 index 000000000..c6e7fd330 --- /dev/null +++ b/docs/source/cli/phase/airshipctl_phase_list.rst @@ -0,0 +1,64 @@ +.. _airshipctl_phase_list: + +airshipctl phase list +--------------------- + +Airshipctl command to list phases + +Synopsis +~~~~~~~~ + + +List phases defined in site manifests by plan. Phases within a plan are +executed sequentially. Multiple phase plans are executed in parallel. + + +:: + + airshipctl phase list PHASE_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + List phases of phasePlan + # airshipctl phase list --plan phasePlan + + To output the contents in table format (default operation) + # airshipctl phase list --plan phasePlan -o table + + To output the contents in yaml format + # airshipctl phase list --plan phasePlan -o yaml + + List all phases + # airshipctl phase list + + List phases with clustername + # airshipctl phase list --cluster-name clustername + + +Options +~~~~~~~ + +:: + + -c, --cluster-name string filter documents by cluster name + -h, --help help for list + -o, --output string output format. Supported formats are 'table' and 'yaml' (default "table") + --plan string plan name of a plan + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl phase ` - Airshipctl command to manage phases + diff --git a/docs/source/cli/airshipctl_phase_render.md b/docs/source/cli/phase/airshipctl_phase_render.rst similarity index 52% rename from docs/source/cli/airshipctl_phase_render.md rename to docs/source/cli/phase/airshipctl_phase_render.rst index af3592fcc..95547cafe 100644 --- a/docs/source/cli/airshipctl_phase_render.md +++ b/docs/source/cli/phase/airshipctl_phase_render.rst @@ -1,38 +1,45 @@ -## airshipctl phase render +.. _airshipctl_phase_render: + +airshipctl phase render +----------------------- Airshipctl command to render phase documents from model -### Synopsis +Synopsis +~~~~~~~~ Render documents for a phase. -``` -airshipctl phase render PHASE_NAME [flags] -``` +:: -### Examples + airshipctl phase render PHASE_NAME [flags] -``` +Examples +~~~~~~~~ -Get all 'initinfra' phase documents containing labels "app=helm" and "service=tiller" -# airshipctl phase render initinfra -l app=helm,service=tiller +:: -Get all phase documents containing labels "app=helm" and "service=tiller" and kind 'Deployment' -# airshipctl phase render initinfra -l app=helm,service=tiller -k Deployment -Get all documents from config bundle -# airshipctl phase render --source config + Get all 'initinfra' phase documents containing labels "app=helm" and "service=tiller" + # airshipctl phase render initinfra -l app=helm,service=tiller -Get all documents executor rendered documents for a phase -# airshipctl phase render initinfra --source executor + Get all phase documents containing labels "app=helm" and "service=tiller" and kind 'Deployment' + # airshipctl phase render initinfra -l app=helm,service=tiller -k Deployment -``` + Get all documents from config bundle + # airshipctl phase render --source config -### Options + Get all documents executor rendered documents for a phase + # airshipctl phase render initinfra --source executor + + +Options +~~~~~~~ + +:: -``` -a, --annotation string filter documents by Annotations -g, --apiversion string filter documents by API version -d, --decrypt ensure that decryption of encrypted documents has finished successfully @@ -42,16 +49,17 @@ Get all documents executor rendered documents for a phase -s, --source string phase: phase entrypoint will be rendered by kustomize, if entrypoint is not specified error will be returned executor: rendering will be performed by executor if the phase config: this will render bundle containing phase and executor documents (default "phase") -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases +* :ref:`airshipctl phase ` - Airshipctl command to manage phases diff --git a/docs/source/cli/airshipctl_phase_run.md b/docs/source/cli/phase/airshipctl_phase_run.rst similarity index 54% rename from docs/source/cli/airshipctl_phase_run.md rename to docs/source/cli/phase/airshipctl_phase_run.rst index f987cab05..5620523d1 100644 --- a/docs/source/cli/airshipctl_phase_run.md +++ b/docs/source/cli/phase/airshipctl_phase_run.rst @@ -1,43 +1,51 @@ -## airshipctl phase run +.. _airshipctl_phase_run: + +airshipctl phase run +-------------------- Airshipctl command to run phase -### Synopsis +Synopsis +~~~~~~~~ Run a phase such as controlplane-ephemeral, remotedirect-ephemeral, initinfra-ephemeral, etc... To list the phases associated with a site, run 'airshipctl phase list'. -``` -airshipctl phase run PHASE_NAME [flags] -``` +:: -### Examples + airshipctl phase run PHASE_NAME [flags] -``` +Examples +~~~~~~~~ -Run initinfra phase -# airshipctl phase run ephemeral-control-plane +:: -``` -### Options + Run initinfra phase + # airshipctl phase run ephemeral-control-plane + + +Options +~~~~~~~ + +:: -``` --dry-run simulate phase execution -h, --help help for run --wait-timeout duration wait timeout -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl phase](airshipctl_phase.md) - Airshipctl command to manage phases +* :ref:`airshipctl phase ` - Airshipctl command to manage phases diff --git a/docs/source/cli/phase/airshipctl_phase_status.rst b/docs/source/cli/phase/airshipctl_phase_status.rst new file mode 100644 index 000000000..c2fd911ec --- /dev/null +++ b/docs/source/cli/phase/airshipctl_phase_status.rst @@ -0,0 +1,49 @@ +.. _airshipctl_phase_status: + +airshipctl phase status +----------------------- + +Airshipctl command to show status of the phase + +Synopsis +~~~~~~~~ + + +Get the status of a phase such as ephemeral-control-plane, target-initinfra etc... +To list the phases associated with a site, run 'airshipctl phase list'. + + +:: + + airshipctl phase status PHASE_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + Status of initinfra phase + # airshipctl phase status ephemeral-control-plane + + +Options +~~~~~~~ + +:: + + -h, --help help for status + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl phase ` - Airshipctl command to manage phases + diff --git a/docs/source/cli/phase/airshipctl_phase_tree.rst b/docs/source/cli/phase/airshipctl_phase_tree.rst new file mode 100644 index 000000000..2d763d9f1 --- /dev/null +++ b/docs/source/cli/phase/airshipctl_phase_tree.rst @@ -0,0 +1,51 @@ +.. _airshipctl_phase_tree: + +airshipctl phase tree +--------------------- + +Airshipctl command to show tree view of kustomize entrypoints of phase + +Synopsis +~~~~~~~~ + + +Get tree view of the kustomize entrypoints of a phase. + + +:: + + airshipctl phase tree PHASE_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + yaml explorer of a phase with relative path + # airshipctl phase tree /manifests/site/test-site/ephemeral/initinfra + + yaml explorer of a phase with phase name + # airshipctl phase tree initinfra-ephemeral + + +Options +~~~~~~~ + +:: + + -h, --help help for tree + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl phase ` - Airshipctl command to manage phases + diff --git a/docs/source/cli/phase/airshipctl_phase_validate.rst b/docs/source/cli/phase/airshipctl_phase_validate.rst new file mode 100644 index 000000000..a3bc811d5 --- /dev/null +++ b/docs/source/cli/phase/airshipctl_phase_validate.rst @@ -0,0 +1,48 @@ +.. _airshipctl_phase_validate: + +airshipctl phase validate +------------------------- + +Airshipctl command to validate phase and its documents + +Synopsis +~~~~~~~~ + + +Validates phase and its documents. To list the phases associated with a site, run 'airshipctl phase list'. + + +:: + + airshipctl phase validate PHASE_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + To validate initinfra phase + # airshipctl phase validate initinfra + + +Options +~~~~~~~ + +:: + + -h, --help help for validate + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl phase ` - Airshipctl command to manage phases + diff --git a/docs/source/cli/phase/index.rst b/docs/source/cli/phase/index.rst new file mode 100644 index 000000000..4392e4e48 --- /dev/null +++ b/docs/source/cli/phase/index.rst @@ -0,0 +1,14 @@ +#################### +phase +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_phase + airshipctl_phase_list + airshipctl_phase_render + airshipctl_phase_run + airshipctl_phase_status + airshipctl_phase_tree + airshipctl_phase_validate diff --git a/docs/source/cli/plan/airshipctl_plan.rst b/docs/source/cli/plan/airshipctl_plan.rst new file mode 100644 index 000000000..eb1f6f60e --- /dev/null +++ b/docs/source/cli/plan/airshipctl_plan.rst @@ -0,0 +1,37 @@ +.. _airshipctl_plan: + +airshipctl plan +--------------- + +Airshipctl command to manage plans + +Synopsis +~~~~~~~~ + + +Provides capabilities for interacting with plan objects, responsible for execution of phases in groups. + + +Options +~~~~~~~ + +:: + + -h, --help help for plan + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl plan list ` - Airshipctl command to list plans +* :ref:`airshipctl plan run ` - Airshipctl command to run plan +* :ref:`airshipctl plan validate ` - Airshipctl command to validate plan + diff --git a/docs/source/cli/plan/airshipctl_plan_list.rst b/docs/source/cli/plan/airshipctl_plan_list.rst new file mode 100644 index 000000000..ee0990c24 --- /dev/null +++ b/docs/source/cli/plan/airshipctl_plan_list.rst @@ -0,0 +1,54 @@ +.. _airshipctl_plan_list: + +airshipctl plan list +-------------------- + +Airshipctl command to list plans + +Synopsis +~~~~~~~~ + + +List plans defined in site manifest. + + +:: + + airshipctl plan list [flags] + +Examples +~~~~~~~~ + +:: + + + List plan + # airshipctl plan list + + List plan(yaml output format) + # airshipctl plan list -o yaml + + List plan(table output format) + # airshipctl plan list -o table + +Options +~~~~~~~ + +:: + + -h, --help help for list + -o, --output string output format. Supported formats are 'table' and 'yaml' (default "table") + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl plan ` - Airshipctl command to manage plans + diff --git a/docs/source/cli/airshipctl_plan_run.md b/docs/source/cli/plan/airshipctl_plan_run.rst similarity index 52% rename from docs/source/cli/airshipctl_plan_run.md rename to docs/source/cli/plan/airshipctl_plan_run.rst index 824bc552a..8239af19d 100644 --- a/docs/source/cli/airshipctl_plan_run.md +++ b/docs/source/cli/plan/airshipctl_plan_run.rst @@ -1,45 +1,54 @@ -## airshipctl plan run +.. _airshipctl_plan_run: + +airshipctl plan run +------------------- Airshipctl command to run plan -### Synopsis +Synopsis +~~~~~~~~ + Run a plan defined in the site manifest. Specify the plan using the mandatory parameter PLAN_NAME. To get list of plans associated for a site, run 'airshipctl plan list'. -``` -airshipctl plan run PLAN_NAME [flags] -``` +:: -### Examples + airshipctl plan run PLAN_NAME [flags] -``` +Examples +~~~~~~~~ -Run plan named iso -# airshipctl plan run iso +:: -Perform a dry run of a plan -# airshipctl plan run iso --dry-run -``` + Run plan named iso + # airshipctl plan run iso -### Options + Perform a dry run of a plan + # airshipctl plan run iso --dry-run + + +Options +~~~~~~~ + +:: -``` --dry-run simulate phase execution -h, --help help for run --wait-timeout duration wait timeout -``` -### Options inherited from parent commands +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: -``` --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" --debug enable verbose output -``` -### SEE ALSO +SEE ALSO +~~~~~~~~ -* [airshipctl plan](airshipctl_plan.md) - Airshipctl command to manage plans +* :ref:`airshipctl plan ` - Airshipctl command to manage plans diff --git a/docs/source/cli/plan/airshipctl_plan_validate.rst b/docs/source/cli/plan/airshipctl_plan_validate.rst new file mode 100644 index 000000000..e20a655ae --- /dev/null +++ b/docs/source/cli/plan/airshipctl_plan_validate.rst @@ -0,0 +1,49 @@ +.. _airshipctl_plan_validate: + +airshipctl plan validate +------------------------ + +Airshipctl command to validate plan + +Synopsis +~~~~~~~~ + + +Validate a plan defined in the site manifest. Specify the plan using the mandatory parameter PLAN_NAME. +To get list of plans associated for a site, run 'airshipctl plan list'. + + +:: + + airshipctl plan validate PLAN_NAME [flags] + +Examples +~~~~~~~~ + +:: + + + Validate plan named iso + # airshipctl plan validate iso + + +Options +~~~~~~~ + +:: + + -h, --help help for validate + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl plan ` - Airshipctl command to manage plans + diff --git a/docs/source/cli/plan/index.rst b/docs/source/cli/plan/index.rst new file mode 100644 index 000000000..8845b3901 --- /dev/null +++ b/docs/source/cli/plan/index.rst @@ -0,0 +1,11 @@ +#################### +plan +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_plan + airshipctl_plan_list + airshipctl_plan_run + airshipctl_plan_validate diff --git a/docs/source/cli/secret/airshipctl_secret.rst b/docs/source/cli/secret/airshipctl_secret.rst new file mode 100644 index 000000000..c448f7bf5 --- /dev/null +++ b/docs/source/cli/secret/airshipctl_secret.rst @@ -0,0 +1,34 @@ +.. _airshipctl_secret: + +airshipctl secret +----------------- + +Airshipctl command to manage secrets + +Synopsis +~~~~~~~~ + + +Commands and sub-commnads defined can be used to manage secrets. + +Options +~~~~~~~ + +:: + + -h, --help help for secret + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. +* :ref:`airshipctl secret generate ` - Airshipctl command to generate secrets + diff --git a/docs/source/cli/secret/airshipctl_secret_generate.rst b/docs/source/cli/secret/airshipctl_secret_generate.rst new file mode 100644 index 000000000..7efd3aab3 --- /dev/null +++ b/docs/source/cli/secret/airshipctl_secret_generate.rst @@ -0,0 +1,34 @@ +.. _airshipctl_secret_generate: + +airshipctl secret generate +-------------------------- + +Airshipctl command to generate secrets + +Synopsis +~~~~~~~~ + + +Airshipctl command to generate secrets + +Options +~~~~~~~ + +:: + + -h, --help help for generate + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl secret ` - Airshipctl command to manage secrets +* :ref:`airshipctl secret generate encryptionkey ` - Airshipctl command to generate a secure encryption key or passphrase + diff --git a/docs/source/cli/secret/airshipctl_secret_generate_encryptionkey.rst b/docs/source/cli/secret/airshipctl_secret_generate_encryptionkey.rst new file mode 100644 index 000000000..04f487a23 --- /dev/null +++ b/docs/source/cli/secret/airshipctl_secret_generate_encryptionkey.rst @@ -0,0 +1,55 @@ +.. _airshipctl_secret_generate_encryptionkey: + +airshipctl secret generate encryptionkey +---------------------------------------- + +Airshipctl command to generate a secure encryption key or passphrase + +Synopsis +~~~~~~~~ + + +Generates a secure encryption key or passphrase. + +If regex arguments are passed the encryption key created would match the regular expression passed. + + +:: + + airshipctl secret generate encryptionkey [flags] + +Examples +~~~~~~~~ + +:: + + + Generates a secure encryption key or passphrase. + # airshipctl secret generate encryptionkey + + Generates a secure encryption key or passphrase matching the regular expression + # airshipctl secret generate encryptionkey --regex Xy[a-c][0-9]!a* + + +Options +~~~~~~~ + +:: + + -h, --help help for encryptionkey + --limit int limit number of characters for + or * regex (default 5) + --regex string regular expression string + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl secret generate ` - Airshipctl command to generate secrets + diff --git a/docs/source/cli/secret/index.rst b/docs/source/cli/secret/index.rst new file mode 100644 index 000000000..5e4c39267 --- /dev/null +++ b/docs/source/cli/secret/index.rst @@ -0,0 +1,10 @@ +#################### +secret +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_secret + airshipctl_secret_generate + airshipctl_secret_generate_encryptionkey diff --git a/docs/source/cli/version/airshipctl_version.rst b/docs/source/cli/version/airshipctl_version.rst new file mode 100644 index 000000000..7bc758a06 --- /dev/null +++ b/docs/source/cli/version/airshipctl_version.rst @@ -0,0 +1,37 @@ +.. _airshipctl_version: + +airshipctl version +------------------ + +Airshipctl command to display the current version number + +Synopsis +~~~~~~~~ + + +Airshipctl command to display the current version number + +:: + + airshipctl version [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for version + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --airshipconf string path to the airshipctl configuration file. Defaults to "$HOME/.airship/config" + --debug enable verbose output + +SEE ALSO +~~~~~~~~ + +* :ref:`airshipctl ` - A unified command line tool for management of end-to-end kubernetes cluster deployment on cloud infrastructure environments. + diff --git a/docs/source/cli/version/index.rst b/docs/source/cli/version/index.rst new file mode 100644 index 000000000..3d37d6e81 --- /dev/null +++ b/docs/source/cli/version/index.rst @@ -0,0 +1,8 @@ +#################### +version +#################### + +.. toctree:: + :maxdepth: 2 + + airshipctl_version diff --git a/docs/source/index.rst b/docs/source/index.rst index 874c36f8a..19ed97602 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -32,7 +32,7 @@ Welcome to airshipctl's Documentation! testing-guidelines virtual_redfish_bmc hardware_profile - Commands + cli/index providers/cluster_api_docker providers/cluster_api_openstack providers/cluster_api_gcp diff --git a/docs/source/sphinx_build.md b/docs/source/sphinx_build.md new file mode 100644 index 000000000..36f408cb2 --- /dev/null +++ b/docs/source/sphinx_build.md @@ -0,0 +1,20 @@ +## Steps to Sphinx Document Generation + +This document outlines the steps to generate the html pages from the current .md or .rst files in this folder using sphinx build. These html pages can be rendered locally to get a view of how they would look in the https://docs.airshipit.org/airshipctl/ website finally. These steps can be used by the developer if he is making changes to files in this directory. The changed files then can be rendered locally using sphinx-build to get a view prior to merge. + +Pre-requisite: + +* Python3 +* git +* go + +Steps: + +* Install sphinx: `python3 -m pip install sphinx` +* Clone airshipctl: `git clone https://github.com/airshipit/airshipctl.git` +* Make necessary changes to the documents in the folder docs/source +* If adding any new command to airshipctl generate documents files for that command using the below make command. This step would internally run `make cli-docs` which would generate the documents in docs/source/cli folder along with the required golden files. The user can run the `make cli-docs` command alternatively to generate the documents alone. + `make update-golden` +* Build sphinx html pages: `cd docs/source; sphinx-build -b html . _build` +* Run local server: `cd _build; python3 -m http.server` +* Open URL to access the page: `http://localhost:8000/` navigate to the required section to validate the document(s) changed diff --git a/docs/tools/generate_cli_docs.go b/docs/tools/generate_cli_docs.go index 9e119630d..08ed37844 100644 --- a/docs/tools/generate_cli_docs.go +++ b/docs/tools/generate_cli_docs.go @@ -17,20 +17,165 @@ package main import ( "fmt" "os" + "path/filepath" + "strings" + "github.com/spf13/cobra" "github.com/spf13/cobra/doc" "opendev.org/airship/airshipctl/cmd" + "opendev.org/airship/airshipctl/pkg/fs" ) +var toctree = `#################### +%s +#################### + +.. toctree:: + :maxdepth: 2 + +` + func main() { rootCmd := cmd.NewAirshipCTLCommand(os.Stdout) + fs := fs.NewDocumentFs() + dir := "./docs/source/cli" // Remote auto-generated notice rootCmd.DisableAutoGenTag = true - if err := doc.GenMarkdownTree(rootCmd, "./docs/source/cli"); err != nil { + // Generating .rst file for airshipctl root command + if err := genReSTRoot(rootCmd, dir, fs); err != nil { + fmt.Fprintln(os.Stdout, err) + os.Exit(1) + } + + // Generating .rst files for airshipctl commands and sub-commands + if err := genReST(rootCmd, dir, fs); err != nil { fmt.Fprintln(os.Stdout, err) os.Exit(1) } } + +// Generate .rst file for airshipctl root command +func genReSTRoot(cmd *cobra.Command, dir string, fs fs.FileSystem) error { + basename := strings.Replace(cmd.CommandPath(), " ", "_", -1) + ".rst" + fileName := filepath.Join(dir, basename) + f, err := fs.Create(fileName) + if err != nil { + return err + } + defer f.Close() + + if err := fs.WriteFile(fileName, []byte(filePrepender(fileName))); err != nil { + return err + } + + // Invoking the doc.GenReSTCustom function to generate ReST file + // for the airshipctl root command + if err := doc.GenReSTCustom(cmd, f, linkHandler); err != nil { + return err + } + return nil +} + +// Default filePrepender +func filePrepender(filename string) string { + return "" +} + +// Custom linkHandler called when adding `SeeAlso` section +// to the document in the cobra.doc.GenReSTTreeCustom function +func linkHandler(name, ref string) string { + return fmt.Sprintf(":ref:`%s <%s>`", name, ref) +} + +// Generates .rst files for all the commands and subcommands in airshipctl +func genReST(cmd *cobra.Command, dir string, fs fs.FileSystem) error { + // Used to populate the top level index.rst with each airshipctl command folder names + fileName := filepath.Join(dir, "index.rst") + if _, err := fs.Create(fileName); err != nil { + return err + } + rootIndexRst := fmt.Sprintf(toctree, "Commands") + cmdFileName(cmd) + + // Loop over each airshipctl command like baremetal, phase, plan...etc + for _, c := range cmd.Commands() { + // Spliting the command to extract the command type + // which would be baremetal, phase, plan...etc + names := strings.Split(c.CommandPath(), " ") + cmdName := names[len(names)-1] + // Generates separate folder for current airshipctl command + cmdDir := filepath.Join(dir, cmdName) + if err := checkAndCreateDir(cmdDir, fs); err != nil { + return nil + } + // Generating .rst files for all subcommands in the current airshipctl command + if err := doc.GenReSTTreeCustom(c, cmdDir, filePrepender, linkHandler); err != nil { + return err + } + // Create index.rst file for the current airshipctl command + // This creates index.rst file in the appropriate folder + // Example: In case of baremetal it creates an index.rst in the + // baremetal folder. It adds the toctree details to file name. + if err := genIndexReST(c, cmdDir, cmdName, fs); err != nil { + return err + } + // Update the top-level index.rst file with the airshipctl command name + // to invoke the index.rst in the sub folders + // For example in case of baremetal: We create index.rst file for baremetal + // subcommands in baremetal directory. So we refer this index.rst in the + // top-level index.rst as below. + rootIndexRst = rootIndexRst + " " + cmdName + "/index\n" + } + if err := fs.WriteFile(fileName, []byte(rootIndexRst)); err != nil { + return err + } + return nil +} + +// Check the dir and if not present creates one +func checkAndCreateDir(dir string, fs fs.FileSystem) error { + if !fs.Exists(dir) { + if err := fs.Mkdir(dir); err != nil { + return err + } + } + if !fs.IsDir(dir) { + return fmt.Errorf("expecting %s to be a directory", dir) + } + return nil +} + +// Generates index.rst for a given airshipctl command +func genIndexReST(cmd *cobra.Command, cmdDir string, cmdName string, fs fs.FileSystem) error { + cmdIndexFileName := filepath.Join(cmdDir, "index.rst") + if _, err := fs.Create(cmdIndexFileName); err != nil { + return err + } + cmdIndexRst := fmt.Sprintf(toctree, cmdName) + // Updating the current index.rst with all the sub-commands file name details + cmdIndexRst = updateIndexReSt(cmdIndexRst, cmd) + if err := fs.WriteFile(cmdIndexFileName, []byte(cmdIndexRst)); err != nil { + return err + } + return nil +} + +// Updates the index.rst file with the subcommand file names +func updateIndexReSt(indexrst string, cmd *cobra.Command) string { + indexrst += cmdFileName(cmd) + for _, c := range cmd.Commands() { + // Skipping help commands as they are not documented by the doc.cobra library + if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() { + continue + } + indexrst = updateIndexReSt(indexrst, c) + } + return indexrst +} + +// Generate the file name corresponding to the cmd +func cmdFileName(cmd *cobra.Command) string { + return " " + strings.Replace(cmd.CommandPath(), " ", "_", -1) + "\n" +}