From 39b3351b64dd3f4eedb6737896d49280ebceced8 Mon Sep 17 00:00:00 2001 From: Andy Cooper Date: Fri, 29 Jun 2018 11:52:57 -0400 Subject: [PATCH] Add docs generator and initial docs --- docs/astro.md | 25 +++++++++++++++++++++++++ docs/astro_airflow.md | 33 +++++++++++++++++++++++++++++++++ docs/astro_airflow_create.md | 29 +++++++++++++++++++++++++++++ docs/astro_airflow_deploy.md | 30 ++++++++++++++++++++++++++++++ docs/astro_airflow_init.md | 30 ++++++++++++++++++++++++++++++ docs/astro_airflow_kill.md | 29 +++++++++++++++++++++++++++++ docs/astro_airflow_list.md | 29 +++++++++++++++++++++++++++++ docs/astro_airflow_ps.md | 29 +++++++++++++++++++++++++++++ docs/astro_airflow_start.md | 29 +++++++++++++++++++++++++++++ docs/astro_airflow_stop.md | 29 +++++++++++++++++++++++++++++ docs/astro_auth.md | 27 +++++++++++++++++++++++++++ docs/astro_auth_login.md | 31 +++++++++++++++++++++++++++++++ docs/astro_auth_logout.md | 29 +++++++++++++++++++++++++++++ docs/astro_config.md | 27 +++++++++++++++++++++++++++ docs/astro_config_get.md | 29 +++++++++++++++++++++++++++++ docs/astro_config_set.md | 29 +++++++++++++++++++++++++++++ docs/astro_upgrade.md | 29 +++++++++++++++++++++++++++++ docs/astro_users.md | 28 ++++++++++++++++++++++++++++ docs/astro_users_create.md | 31 +++++++++++++++++++++++++++++++ docs/astro_users_delete.md | 29 +++++++++++++++++++++++++++++ docs/astro_users_list.md | 29 +++++++++++++++++++++++++++++ docs/astro_version.md | 29 +++++++++++++++++++++++++++++ gendocs/gendocs.go | 26 ++++++++++++++++++++++++++ 23 files changed, 665 insertions(+) create mode 100644 docs/astro.md create mode 100644 docs/astro_airflow.md create mode 100644 docs/astro_airflow_create.md create mode 100644 docs/astro_airflow_deploy.md create mode 100644 docs/astro_airflow_init.md create mode 100644 docs/astro_airflow_kill.md create mode 100644 docs/astro_airflow_list.md create mode 100644 docs/astro_airflow_ps.md create mode 100644 docs/astro_airflow_start.md create mode 100644 docs/astro_airflow_stop.md create mode 100644 docs/astro_auth.md create mode 100644 docs/astro_auth_login.md create mode 100644 docs/astro_auth_logout.md create mode 100644 docs/astro_config.md create mode 100644 docs/astro_config_get.md create mode 100644 docs/astro_config_set.md create mode 100644 docs/astro_upgrade.md create mode 100644 docs/astro_users.md create mode 100644 docs/astro_users_create.md create mode 100644 docs/astro_users_delete.md create mode 100644 docs/astro_users_list.md create mode 100644 docs/astro_version.md create mode 100644 gendocs/gendocs.go diff --git a/docs/astro.md b/docs/astro.md new file mode 100644 index 000000000..737d23e9b --- /dev/null +++ b/docs/astro.md @@ -0,0 +1,25 @@ +## astro + +Astronomer - CLI + +### Synopsis + +astro is a command line interface for working with the Astronomer Platform. + +### Options + +``` + -g, --global view or modify global config + -h, --help help for astro +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments +* [astro auth]({{< relref "docs/astro_auth.md" >}}) - Mangage astronomer identity +* [astro config]({{< relref "docs/astro_config.md" >}}) - Manage astro project configurations +* [astro upgrade]({{< relref "docs/astro_upgrade.md" >}}) - Check for newer version of Astronomer CLI +* [astro users]({{< relref "docs/astro_users.md" >}}) - Manage astronomer users +* [astro version]({{< relref "docs/astro_version.md" >}}) - Astronomer CLI version + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow.md b/docs/astro_airflow.md new file mode 100644 index 000000000..71050104c --- /dev/null +++ b/docs/astro_airflow.md @@ -0,0 +1,33 @@ +## astro airflow + +Manage airflow projects and deployments + +### Synopsis + +Manage airflow projects and deployments + +### Options + +``` + -h, --help help for airflow +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro]({{< relref "docs/astro.md" >}}) - Astronomer - CLI +* [astro airflow create]({{< relref "docs/astro_airflow_create.md" >}}) - Create a new airflow deployment +* [astro airflow deploy]({{< relref "docs/astro_airflow_deploy.md" >}}) - Deploy an airflow project +* [astro airflow init]({{< relref "docs/astro_airflow_init.md" >}}) - Scaffold a new airflow project +* [astro airflow kill]({{< relref "docs/astro_airflow_kill.md" >}}) - Kill a development airflow cluster +* [astro airflow list]({{< relref "docs/astro_airflow_list.md" >}}) - List airflow clusters +* [astro airflow ps]({{< relref "docs/astro_airflow_ps.md" >}}) - List airflow containers +* [astro airflow start]({{< relref "docs/astro_airflow_start.md" >}}) - Start a development airflow cluster +* [astro airflow stop]({{< relref "docs/astro_airflow_stop.md" >}}) - Stop a development airflow cluster + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_create.md b/docs/astro_airflow_create.md new file mode 100644 index 000000000..12796906c --- /dev/null +++ b/docs/astro_airflow_create.md @@ -0,0 +1,29 @@ +## astro airflow create + +Create a new airflow deployment + +### Synopsis + +Create a new airflow deployment + +``` +astro airflow create [flags] +``` + +### Options + +``` + -h, --help help for create +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_deploy.md b/docs/astro_airflow_deploy.md new file mode 100644 index 000000000..1b2896c3b --- /dev/null +++ b/docs/astro_airflow_deploy.md @@ -0,0 +1,30 @@ +## astro airflow deploy + +Deploy an airflow project + +### Synopsis + +Deploy an airflow project to a given deployment + +``` +astro airflow deploy [flags] +``` + +### Options + +``` + -f, --force Force deploy if uncommited changes + -h, --help help for deploy +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_init.md b/docs/astro_airflow_init.md new file mode 100644 index 000000000..07b4b2b59 --- /dev/null +++ b/docs/astro_airflow_init.md @@ -0,0 +1,30 @@ +## astro airflow init + +Scaffold a new airflow project + +### Synopsis + +Scaffold a new airflow project + +``` +astro airflow init [flags] +``` + +### Options + +``` + -h, --help help for init + -n, --name string Name of airflow project +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_kill.md b/docs/astro_airflow_kill.md new file mode 100644 index 000000000..8876db661 --- /dev/null +++ b/docs/astro_airflow_kill.md @@ -0,0 +1,29 @@ +## astro airflow kill + +Kill a development airflow cluster + +### Synopsis + +Kill a development airflow cluster + +``` +astro airflow kill [flags] +``` + +### Options + +``` + -h, --help help for kill +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_list.md b/docs/astro_airflow_list.md new file mode 100644 index 000000000..189c23aea --- /dev/null +++ b/docs/astro_airflow_list.md @@ -0,0 +1,29 @@ +## astro airflow list + +List airflow clusters + +### Synopsis + +List all created airflow clusters + +``` +astro airflow list [flags] +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_ps.md b/docs/astro_airflow_ps.md new file mode 100644 index 000000000..13b5be397 --- /dev/null +++ b/docs/astro_airflow_ps.md @@ -0,0 +1,29 @@ +## astro airflow ps + +List airflow containers + +### Synopsis + +List airflow containers + +``` +astro airflow ps [flags] +``` + +### Options + +``` + -h, --help help for ps +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_start.md b/docs/astro_airflow_start.md new file mode 100644 index 000000000..3bf5079fa --- /dev/null +++ b/docs/astro_airflow_start.md @@ -0,0 +1,29 @@ +## astro airflow start + +Start a development airflow cluster + +### Synopsis + +Start a development airflow cluster + +``` +astro airflow start [flags] +``` + +### Options + +``` + -h, --help help for start +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_airflow_stop.md b/docs/astro_airflow_stop.md new file mode 100644 index 000000000..fafd53573 --- /dev/null +++ b/docs/astro_airflow_stop.md @@ -0,0 +1,29 @@ +## astro airflow stop + +Stop a development airflow cluster + +### Synopsis + +Stop a development airflow cluster + +``` +astro airflow stop [flags] +``` + +### Options + +``` + -h, --help help for stop +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro airflow]({{< relref "docs/astro_airflow.md" >}}) - Manage airflow projects and deployments + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_auth.md b/docs/astro_auth.md new file mode 100644 index 000000000..d6ae51445 --- /dev/null +++ b/docs/astro_auth.md @@ -0,0 +1,27 @@ +## astro auth + +Mangage astronomer identity + +### Synopsis + +Manage astronomer identity + +### Options + +``` + -h, --help help for auth +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro]({{< relref "docs/astro.md" >}}) - Astronomer - CLI +* [astro auth login]({{< relref "docs/astro_auth_login.md" >}}) - Login to Astronomer services +* [astro auth logout]({{< relref "docs/astro_auth_logout.md" >}}) - Logout of Astronomer services + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_auth_login.md b/docs/astro_auth_login.md new file mode 100644 index 000000000..f3ab8f7bd --- /dev/null +++ b/docs/astro_auth_login.md @@ -0,0 +1,31 @@ +## astro auth login + +Login to Astronomer services + +### Synopsis + +Login to Astronomer services + +``` +astro auth login [flags] +``` + +### Options + +``` + -d, --domain string pass the cluster domain for authentication + -h, --help help for login + -r, --registry string pass a custom project registry for authentication +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro auth]({{< relref "docs/astro_auth.md" >}}) - Mangage astronomer identity + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_auth_logout.md b/docs/astro_auth_logout.md new file mode 100644 index 000000000..ec1e9e6d9 --- /dev/null +++ b/docs/astro_auth_logout.md @@ -0,0 +1,29 @@ +## astro auth logout + +Logout of Astronomer services + +### Synopsis + +Logout of Astronomer services + +``` +astro auth logout [flags] +``` + +### Options + +``` + -h, --help help for logout +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro auth]({{< relref "docs/astro_auth.md" >}}) - Mangage astronomer identity + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_config.md b/docs/astro_config.md new file mode 100644 index 000000000..b53e23418 --- /dev/null +++ b/docs/astro_config.md @@ -0,0 +1,27 @@ +## astro config + +Manage astro project configurations + +### Synopsis + +Manage astro project configurations + +### Options + +``` + -h, --help help for config +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro]({{< relref "docs/astro.md" >}}) - Astronomer - CLI +* [astro config get]({{< relref "docs/astro_config_get.md" >}}) - Get astro project configuration +* [astro config set]({{< relref "docs/astro_config_set.md" >}}) - Set astro project configuration + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_config_get.md b/docs/astro_config_get.md new file mode 100644 index 000000000..10a3e9d13 --- /dev/null +++ b/docs/astro_config_get.md @@ -0,0 +1,29 @@ +## astro config get + +Get astro project configuration + +### Synopsis + +Get astro project configuration + +``` +astro config get [flags] +``` + +### Options + +``` + -h, --help help for get +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro config]({{< relref "docs/astro_config.md" >}}) - Manage astro project configurations + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_config_set.md b/docs/astro_config_set.md new file mode 100644 index 000000000..7913ee163 --- /dev/null +++ b/docs/astro_config_set.md @@ -0,0 +1,29 @@ +## astro config set + +Set astro project configuration + +### Synopsis + +Set astro project configuration + +``` +astro config set [flags] +``` + +### Options + +``` + -h, --help help for set +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro config]({{< relref "docs/astro_config.md" >}}) - Manage astro project configurations + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_upgrade.md b/docs/astro_upgrade.md new file mode 100644 index 000000000..a11b06b26 --- /dev/null +++ b/docs/astro_upgrade.md @@ -0,0 +1,29 @@ +## astro upgrade + +Check for newer version of Astronomer CLI + +### Synopsis + +Check for newer version of Astronomer CLI + +``` +astro upgrade [flags] +``` + +### Options + +``` + -h, --help help for upgrade +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro]({{< relref "docs/astro.md" >}}) - Astronomer - CLI + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_users.md b/docs/astro_users.md new file mode 100644 index 000000000..864fce866 --- /dev/null +++ b/docs/astro_users.md @@ -0,0 +1,28 @@ +## astro users + +Manage astronomer users + +### Synopsis + +Manage astronomer users + +### Options + +``` + -h, --help help for users +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro]({{< relref "docs/astro.md" >}}) - Astronomer - CLI +* [astro users create]({{< relref "docs/astro_users_create.md" >}}) - Add an astronomer user +* [astro users delete]({{< relref "docs/astro_users_delete.md" >}}) - Delete an astronomer user +* [astro users list]({{< relref "docs/astro_users_list.md" >}}) - List astronomer users + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_users_create.md b/docs/astro_users_create.md new file mode 100644 index 000000000..da7bc5f37 --- /dev/null +++ b/docs/astro_users_create.md @@ -0,0 +1,31 @@ +## astro users create + +Add an astronomer user + +### Synopsis + +Add an astronomer user + +``` +astro users create [flags] +``` + +### Options + +``` + --email string Supply user email at runtime + -h, --help help for create + --skip-verify Skips password verification on create +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro users]({{< relref "docs/astro_users.md" >}}) - Manage astronomer users + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_users_delete.md b/docs/astro_users_delete.md new file mode 100644 index 000000000..a049cb712 --- /dev/null +++ b/docs/astro_users_delete.md @@ -0,0 +1,29 @@ +## astro users delete + +Delete an astronomer user + +### Synopsis + +Delete an astronomer user + +``` +astro users delete [flags] +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro users]({{< relref "docs/astro_users.md" >}}) - Manage astronomer users + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_users_list.md b/docs/astro_users_list.md new file mode 100644 index 000000000..489ae46a0 --- /dev/null +++ b/docs/astro_users_list.md @@ -0,0 +1,29 @@ +## astro users list + +List astronomer users + +### Synopsis + +List astronomer users + +``` +astro users list [flags] +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro users]({{< relref "docs/astro_users.md" >}}) - Manage astronomer users + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/docs/astro_version.md b/docs/astro_version.md new file mode 100644 index 000000000..82ff7af1f --- /dev/null +++ b/docs/astro_version.md @@ -0,0 +1,29 @@ +## astro version + +Astronomer CLI version + +### Synopsis + +Astronomer CLI version + +``` +astro version [flags] +``` + +### Options + +``` + -h, --help help for version +``` + +### Options inherited from parent commands + +``` + -g, --global view or modify global config +``` + +### SEE ALSO + +* [astro]({{< relref "docs/astro.md" >}}) - Astronomer - CLI + +###### Auto generated by spf13/cobra on 29-Jun-2018 diff --git a/gendocs/gendocs.go b/gendocs/gendocs.go new file mode 100644 index 000000000..5be637a0b --- /dev/null +++ b/gendocs/gendocs.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + + "github.com/astronomerio/astro-cli/cmd" + "github.com/spf13/cobra/doc" +) + +// you can generate markdown docs by running +// +// $ go run gendocs.go +// +// this also requires doc sub-package of cobra +// which is not kept in this repo +// you can acquire it by running +// +// $ gvt restore + +func main() { + identity := func(s string) string { + return fmt.Sprintf(`{{< relref "docs/%s" >}}`, s) + } + emptyStr := func(s string) string { return "" } + doc.GenMarkdownTreeCustom(cmd.RootCmd, "./docs/", emptyStr, identity) +}