diff --git a/flytectl/README.md b/flytectl/README.md index a85eecb3ab..fd022104df 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -15,6 +15,8 @@ Flytectl is designed to be a portable, lightweight, CLI for working with Flyte. ## Docs Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https://flytectl.rtfd.io) +Generating docs locally can be accomplished by running make gendocs from within the docs folder + ## Installation @@ -26,3 +28,4 @@ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash [Contribution guidelines for this project](docs/CONTRIBUTING.md) + diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 8e2463aad2..c625fd2072 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -19,6 +19,8 @@ type CommandEntry struct { ProjectDomainNotRequired bool CmdFunc CommandFunc Aliases []string + Short string + Long string PFlagProvider PFlagProvider } @@ -26,7 +28,8 @@ func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { for resource, cmdEntry := range cmdFuncs { cmd := &cobra.Command{ Use: resource, - Short: fmt.Sprintf("Retrieves %v resources.", resource), + Short: cmdEntry.Short, + Long: cmdEntry.Long, Aliases: cmdEntry.Aliases, RunE: generateCommandFunc(cmdEntry), } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index b0a51deade..4491ef03dc 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -13,6 +13,41 @@ import ( "github.com/lyft/flytectl/pkg/printer" ) +const( + executionShort = "Gets execution resources" + executionLong = ` +Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) +:: + + bin/flytectl get execution -p flytesnacks -d development + +Retrieves execution by name within project and domain. + +:: + + bin/flytectl execution -p flytesnacks -d development oeh94k9r2r + +Retrieves execution by filters +:: + + Not yet implemented + +Retrieves all the execution within project and domain in yaml format + +:: + + bin/flytectl get execution -p flytesnacks -d development -o yaml + +Retrieves all the execution within project and domain in json format. + +:: + + bin/flytectl get execution -p flytesnacks -d development -o json + +Usage +` +) + var executionColumns = []printer.Column{ {"Name", "$.id.name"}, {"Workflow Name", "$.closure.workflowId.name"}, diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index ed86e5d0d0..c19a593280 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -6,19 +6,37 @@ import ( "github.com/spf13/cobra" ) +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + getCmdShort = `Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.` + getCmdLong = ` +Example get projects. +:: + + bin/flytectl get project +` +) + // CreateGetCommand will return get command func CreateGetCommand() *cobra.Command { getCmd := &cobra.Command{ Use: "get", - Short: "Retrieve various resource.", + Short: getCmdShort, + Long: getCmdLong, } getResourcesFuncs := map[string]cmdcore.CommandEntry{ - "project": {CmdFunc: getProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true}, - "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}}, - "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}}, - "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}}, - "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}}, + "project": {CmdFunc: getProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, + Short: projectShort, + Long: projectLong}, + "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}, Short: taskShort, + Long: taskLong}, + "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}, Short: workflowShort, + Long: workflowLong}, + "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}, Short: launchPlanShort, + Long: launchPlanLong}, + "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, + Long: executionLong}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 0f31e5106b..ff8e1ce912 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -11,6 +11,42 @@ import ( "github.com/lyft/flytestdlib/logger" ) +const( + + launchPlanShort = "Gets launch plan resources" + launchPlanLong = ` +Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) +:: + + bin/flytectl get launchplan -p flytesnacks -d development + +Retrieves launch plan by name within project and domain. + +:: + + bin/flytectl launchplan -p flytesnacks -d development recipes.core.basic.lp.my_wf + +Retrieves launchplan by filters. +:: + + Not yet implemented + +Retrieves all the launchplan within project and domain in yaml format. + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o yaml + +Retrieves all the launchplan within project and domain in json format + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o json + +Usage +` +) + var launchplanColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 93c3395d8e..6b68011ea3 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -12,6 +12,41 @@ import ( "github.com/lyft/flytectl/pkg/printer" ) +const( +projectShort = "Gets project resources" +projectLong = ` +Retrieves all the projects.(project,projects can be used interchangeably in these commands) +:: + + bin/flytectl get project + +Retrieves project by name + +:: + + bin/flytectl get project flytesnacks + +Retrieves project by filters +:: + + Not yet implemented + +Retrieves all the projects in yaml format + +:: + + bin/flytectl get project -o yaml + +Retrieves all the projects in json format + +:: + + bin/flytectl get project -o json + +Usage +` +) + var projectColumns = []printer.Column{ {"ID", "$.id"}, {"Name", "$.name"}, diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index a29d690660..ddc28fb0b9 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -14,6 +14,41 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) +const( + taskShort = "Gets task resources" + taskLong = ` +Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) +:: + + bin/flytectl get task -p flytesnacks -d development + +Retrieves task by name within project and domain. + +:: + + bin/flytectl task -p flytesnacks -d development square + +Retrieves project by filters. +:: + + Not yet implemented + +Retrieves all the tasks within project and domain in yaml format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o yaml + +Retrieves all the tasks within project and domain in json format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o json + +Usage +` +) + var taskColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 71b08f4c7b..d6a8d9172b 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -13,6 +13,41 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) +const( + workflowShort = "Gets workflow resources" + workflowLong = ` +Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) +:: + + bin/flytectl get workflow -p flytesnacks -d development + +Retrieves workflow by name within project and domain. + +:: + + bin/flytectl workflow -p flytesnacks -d development recipes.plugins.k8s_spark.pyspark_pi.my_spark + +Retrieves workflow by filters. +:: + + Not yet implemented + +Retrieves all the workflow within project and domain in yaml format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o yaml + +Retrieves all the workflow within project and domain in json format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o json + +Usage +` +) + var workflowColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 4787a69b27..821f034cd8 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -11,6 +11,42 @@ import ( "sort" ) +const( + registerFilesShort = "Registers file resources" + registerFilesLong = ` +Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +If there are already registered entities with v1 version then the command will fail immediately on the first such encounter. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks + +If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in +the skipOnError flag. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks --skipOnError + +Using short format of skipOnError flag +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s + +Overriding the default version v1 using version string. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + +Change the o/p format has not effect on registration. The O/p is currently available only in table format. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s -o yaml + +Usage +` +) + func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { files := args sort.Strings(files) diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index f6381521e4..62263a3387 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -5,18 +5,27 @@ import ( "github.com/spf13/cobra" ) +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + registerCmdShort = "Registers tasks/workflows/launchplans from list of generated serialized files." + registercmdLong = ` +Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Currently these input files are protobuf files generated as output from flytekit serialize. +Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1 +If the entities are already registered with flyte for the same version then registration would fail. +` +) + // RegisterCommand will return register command func RegisterCommand() *cobra.Command { registerCmd := &cobra.Command{ Use: "register", - Short: "Registers tasks/workflows/launchplans from list of generated serialized files.", - Long: "Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin.\n" + - "Currently these input files are protobuf files generated as output from flytekit serialize.\n" + - "Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1\n" + - "If the entities are already registered with flyte for the same version then registration would fail.\n", + Short: registerCmdShort, + Long: registercmdLong, } registerResourcesFuncs := map[string]cmdcore.CommandEntry{ - "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: filesConfig}, + "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: filesConfig, Short: registerFilesShort, + Long: registerFilesLong}, } cmdcore.AddCommands(registerCmd, registerResourcesFuncs) return registerCmd diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 7dca669327..c92fb30d56 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,15 +3,15 @@ package cmd import ( "context" "fmt" - "github.com/lyft/flytectl/cmd/update" - "github.com/lyft/flytectl/cmd/register" - "github.com/lyft/flytectl/cmd/get" + "github.com/lyft/flytectl/cmd/register" + "github.com/lyft/flytectl/cmd/update" "github.com/lyft/flytectl/pkg/printer" - stdConfig "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/viper" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "github.com/spf13/cobra/doc" "github.com/lyft/flytectl/cmd/config" ) @@ -24,6 +24,9 @@ var ( func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, + Long : "flytectl is CLI tool written in go to interact with flyteadmin service", + Short: "flyetcl CLI tool", + Use : "flytectl", } rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", @@ -60,6 +63,25 @@ func initConfig(_ *cobra.Command, _ []string) error { return nil } +func GenerateDocs() error { + rootCmd := newRootCmd() + err := GenReSTTree(rootCmd, "gen") + if err != nil { + logrus.Fatal(err) + return err + } + return nil +} + +func GenReSTTree(cmd *cobra.Command, dir string) error { + emptyStr := func(s string) string { return "" } + // Sphinx cross-referencing format + linkHandler := func(name, ref string) string { + return fmt.Sprintf(":doc:`%s`", ref) + } + return doc.GenReSTTreeCustom(cmd, dir, emptyStr, linkHandler) +} + func ExecuteCmd() error { return newRootCmd().Execute() } diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index b00d91bf59..9ccbb4ee29 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -16,6 +16,54 @@ type ProjectConfig struct { ArchiveProject bool `json:"archiveProject" pflag:",Archives the project specified as argument."` } +const( + projectShort = "Updates project resources" + projectLong = ` +Updates the project according the flags passed.Allows you to archive or activate a project. +Activates project named flytesnacks. +:: + + bin/flytectl update project -p flytesnacks --activateProject + +Archives project named flytesnacks. + +:: + + bin/flytectl get project flytesnacks --archiveProject + +Activates project named flytesnacks using short option -t. +:: + + bin/flytectl update project -p flytesnacks -t + +Archives project named flytesnacks using short option -a. + +:: + + bin/flytectl update project flytesnacks -a + +Incorrect usage when passing both archive and activate. + +:: + + bin/flytectl update project flytesnacks -a -t + +Incorrect usage when passing unknown-project. + +:: + + bin/flytectl update project unknown-project -a + +Incorrect usage when passing valid project using -p option. + +:: + + bin/flytectl update project unknown-project -a -p known-project + +Usage +` +) + var ( projectConfig = &ProjectConfig{} errProjectNotFound = "Project %v not found\n" diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index ac83b69200..791deb5c9d 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -6,15 +6,34 @@ import ( "github.com/spf13/cobra" ) +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + updateUse = "update" + updateShort = ` +Used for updating flyte resources eg: project. +` + updatecmdLong = ` +Currently this command only provides subcommands to update project. +Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. +Example update project to activate it. +:: + + bin/flytectl update project -p flytesnacks --activateProject +` +) + // CreateUpdateCommand will return update command func CreateUpdateCommand() *cobra.Command { updateCmd := &cobra.Command{ - Use: "update", - Short: "Update various resources.", + Use: updateUse, + Short: updateShort, + Long: updatecmdLong, } updateResourcesFuncs := map[string]cmdcore.CommandEntry{ - "project": {CmdFunc: updateProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig}, + "project": {CmdFunc: updateProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, + Short: projectShort, + Long: projectLong}, } cmdcore.AddCommands(updateCmd, updateResourcesFuncs) diff --git a/flytectl/docs/Makefile b/flytectl/docs/Makefile index e61723ad76..c43bf3516c 100644 --- a/flytectl/docs/Makefile +++ b/flytectl/docs/Makefile @@ -14,6 +14,18 @@ help: .PHONY: help Makefile +gendocs: + go build -o ../bin/flytectl-docs $(SOURCEDIR)/generate_docs.go + rm -rf $(SOURCEDIR)/gen + mkdir gen + ../bin/flytectl-docs + mv gen $(SOURCEDIR) + make html + +clean: + rm -rf $(SOURCEDIR)/gen + rm -rf build/* + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile diff --git a/flytectl/docs/source/delete.rst b/flytectl/docs/source/delete.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/delete.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst new file mode 100644 index 0000000000..ea2cffb934 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl.rst @@ -0,0 +1,57 @@ +.. _flytectl: + +flytectl +-------- + +flyetcl CLI tool + +Synopsis +~~~~~~~~ + + +flytectl is CLI tool written in go to interact with flyteadmin service + +Options +~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -h, --help help for flytectl + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. +* :doc:`flytectl_update` - +Used for updating flyte resources eg: project. + +* :doc:`flytectl_version` - Displays version information for the client and server. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst new file mode 100644 index 0000000000..7bace0e069 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -0,0 +1,61 @@ +.. _flytectl_config: + +flytectl config +--------------- + +Runs various config commands, look at the help of this command to get a list of available commands.. + +Synopsis +~~~~~~~~ + + +Runs various config commands, look at the help of this command to get a list of available commands.. + +Options +~~~~~~~ + +:: + + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + -h, --help help for config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. +* :doc:`flytectl_config_validate` - Validates the loaded config. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst new file mode 100644 index 0000000000..0173329f4e --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -0,0 +1,63 @@ +.. _flytectl_config_discover: + +flytectl config discover +------------------------ + +Searches for a config in one of the default search paths. + +Synopsis +~~~~~~~~ + + +Searches for a config in one of the default search paths. + +:: + + flytectl config discover [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for discover + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst new file mode 100644 index 0000000000..923bb9d794 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -0,0 +1,65 @@ +.. _flytectl_config_validate: + +flytectl config validate +------------------------ + +Validates the loaded config. + +Synopsis +~~~~~~~~ + + +Validates the loaded config. + +:: + + flytectl config validate [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for validate + --strict Validates that all keys in loaded config + map to already registered sections. + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst new file mode 100644 index 0000000000..75ebbba98c --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -0,0 +1,67 @@ +.. _flytectl_get: + +flytectl get +------------ + +Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +Synopsis +~~~~~~~~ + + + +Example get projects. +:: + + bin/flytectl get project + + +Options +~~~~~~~ + +:: + + -h, --help help for get + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_get_execution` - Gets execution resources +* :doc:`flytectl_get_launchplan` - Gets launch plan resources +* :doc:`flytectl_get_project` - Gets project resources +* :doc:`flytectl_get_task` - Gets task resources +* :doc:`flytectl_get_workflow` - Gets workflow resources + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst new file mode 100644 index 0000000000..450ffacf32 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_execution: + +flytectl get execution +---------------------- + +Gets execution resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) +:: + + bin/flytectl get execution -p flytesnacks -d development + +Retrieves execution by name within project and domain. + +:: + + bin/flytectl execution -p flytesnacks -d development oeh94k9r2r + +Retrieves execution by filters +:: + + Not yet implemented + +Retrieves all the execution within project and domain in yaml format + +:: + + bin/flytectl get execution -p flytesnacks -d development -o yaml + +Retrieves all the execution within project and domain in json format. + +:: + + bin/flytectl get execution -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get execution [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for execution + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst new file mode 100644 index 0000000000..a223801fb7 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_launchplan: + +flytectl get launchplan +----------------------- + +Gets launch plan resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) +:: + + bin/flytectl get launchplan -p flytesnacks -d development + +Retrieves launch plan by name within project and domain. + +:: + + bin/flytectl launchplan -p flytesnacks -d development recipes.core.basic.lp.my_wf + +Retrieves launchplan by filters. +:: + + Not yet implemented + +Retrieves all the launchplan within project and domain in yaml format. + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o yaml + +Retrieves all the launchplan within project and domain in json format + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get launchplan [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for launchplan + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst new file mode 100644 index 0000000000..1c3d7490bf --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_project: + +flytectl get project +-------------------- + +Gets project resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the projects.(project,projects can be used interchangeably in these commands) +:: + + bin/flytectl get project + +Retrieves project by name + +:: + + bin/flytectl get project flytesnacks + +Retrieves project by filters +:: + + Not yet implemented + +Retrieves all the projects in yaml format + +:: + + bin/flytectl get project -o yaml + +Retrieves all the projects in json format + +:: + + bin/flytectl get project -o json + +Usage + + +:: + + flytectl get project [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for project + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst new file mode 100644 index 0000000000..dab9475f2e --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_task: + +flytectl get task +----------------- + +Gets task resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) +:: + + bin/flytectl get task -p flytesnacks -d development + +Retrieves task by name within project and domain. + +:: + + bin/flytectl task -p flytesnacks -d development square + +Retrieves project by filters. +:: + + Not yet implemented + +Retrieves all the tasks within project and domain in yaml format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o yaml + +Retrieves all the tasks within project and domain in json format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get task [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for task + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst new file mode 100644 index 0000000000..14d2d57fe0 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_workflow: + +flytectl get workflow +--------------------- + +Gets workflow resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) +:: + + bin/flytectl get workflow -p flytesnacks -d development + +Retrieves workflow by name within project and domain. + +:: + + bin/flytectl workflow -p flytesnacks -d development recipes.plugins.k8s_spark.pyspark_pi.my_spark + +Retrieves workflow by filters. +:: + + Not yet implemented + +Retrieves all the workflow within project and domain in yaml format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o yaml + +Retrieves all the workflow within project and domain in json format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get workflow [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for workflow + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst new file mode 100644 index 0000000000..27269b9856 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -0,0 +1,63 @@ +.. _flytectl_register: + +flytectl register +----------------- + +Registers tasks/workflows/launchplans from list of generated serialized files. + +Synopsis +~~~~~~~~ + + + +Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Currently these input files are protobuf files generated as output from flytekit serialize. +Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1 +If the entities are already registered with flyte for the same version then registration would fail. + + +Options +~~~~~~~ + +:: + + -h, --help help for register + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_register_files` - Registers file resources + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst new file mode 100644 index 0000000000..1f1b8bb7be --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -0,0 +1,94 @@ +.. _flytectl_register_files: + +flytectl register files +----------------------- + +Registers file resources + +Synopsis +~~~~~~~~ + + + +Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +If there are already registered entities with v1 version then the command will fail immediately on the first such encounter. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks + +If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in +the skipOnError flag. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks --skipOnError + +Using short format of skipOnError flag +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s + +Overriding the default version v1 using version string. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + +Change the o/p format has not effect on registration. The O/p is currently available only in table format. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s -o yaml + +Usage + + +:: + + flytectl register files [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for files + -s, --skipOnError fail fast when registering files. + -v, --version string version of the entity to be registered with flyte. (default "v1") + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst new file mode 100644 index 0000000000..663e28f992 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -0,0 +1,67 @@ +.. _flytectl_update: + +flytectl update +--------------- + + +Used for updating flyte resources eg: project. + + +Synopsis +~~~~~~~~ + + + +Currently this command only provides subcommands to update project. +Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. +Example update project to activate it. +:: + + bin/flytectl update project -p flytesnacks --activateProject + + +Options +~~~~~~~ + +:: + + -h, --help help for update + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_update_project` - Updates project resources + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst new file mode 100644 index 0000000000..da7bcbb115 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -0,0 +1,108 @@ +.. _flytectl_update_project: + +flytectl update project +----------------------- + +Updates project resources + +Synopsis +~~~~~~~~ + + + +Updates the project according the flags passed.Allows you to archive or activate a project. +Activates project named flytesnacks. +:: + + bin/flytectl update project -p flytesnacks --activateProject + +Archives project named flytesnacks. + +:: + + bin/flytectl get project flytesnacks --archiveProject + +Activates project named flytesnacks using short option -t. +:: + + bin/flytectl update project -p flytesnacks -t + +Archives project named flytesnacks using short option -a. + +:: + + bin/flytectl update project flytesnacks -a + +Incorrect usage when passing both archive and activate. + +:: + + bin/flytectl update project flytesnacks -a -t + +Incorrect usage when passing unknown-project. + +:: + + bin/flytectl update project unknown-project -a + +Incorrect usage when passing valid project using -p option. + +:: + + bin/flytectl update project unknown-project -a -p known-project + +Usage + + +:: + + flytectl update project [flags] + +Options +~~~~~~~ + +:: + + -t, --activateProject Activates the project specified as argument. + -a, --archiveProject Archives the project specified as argument. + -h, --help help for project + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - +Used for updating flyte resources eg: project. + + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst new file mode 100644 index 0000000000..ad0f5f66fa --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -0,0 +1,61 @@ +.. _flytectl_version: + +flytectl version +---------------- + +Displays version information for the client and server. + +Synopsis +~~~~~~~~ + + +Displays version information for the client and server. + +:: + + flytectl version [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for version + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/generate_docs.go b/flytectl/docs/source/generate_docs.go new file mode 100644 index 0000000000..458b597c8b --- /dev/null +++ b/flytectl/docs/source/generate_docs.go @@ -0,0 +1,10 @@ +package main + +import "github.com/lyft/flytectl/cmd" + +func main() { + if err := cmd.GenerateDocs(); err != nil { + panic(err) + } +} + diff --git a/flytectl/docs/source/get.rst b/flytectl/docs/source/get.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/get.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 2863700592..173c1a6759 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -41,25 +41,32 @@ Basic Configuration :maxdepth: 1 :caption: Flyte Core docs - Flyte Documentation + Flyte Documentation + gen/flytectl .. toctree:: :maxdepth: 2 - :caption: Flytectl docs - Entities + :caption: Flytectl verbs - tasks - workflow - launchplan - + gen/flytectl_get + gen/flytectl_update + gen/flytectl_delete + gen/flytectl_register + gen/flytectl_config .. toctree:: :maxdepth: 2 - :caption: Flytectl verbs - - get - update - delete - register + :caption: Flytectl nouns + + gen/flytectl_get_execution + gen/flytectl_get_project + gen/flytectl_get_workflow + gen/flytectl_get_task + gen/flytectl_get_launchplan + gen/flytectl_update_project + gen/flytectl_register_files + gen/flytectl_version + gen/flytectl_config_validate .. toctree:: :maxdepth: 2 diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst deleted file mode 100644 index 399976e6a9..0000000000 --- a/flytectl/docs/source/launchplan.rst +++ /dev/null @@ -1,3 +0,0 @@ -################################# -Interacting with LaunchPlans -################################# diff --git a/flytectl/docs/source/register.rst b/flytectl/docs/source/register.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/register.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/tasks.rst b/flytectl/docs/source/tasks.rst deleted file mode 100644 index a5df10ff75..0000000000 --- a/flytectl/docs/source/tasks.rst +++ /dev/null @@ -1,4 +0,0 @@ -####################### -Interacting with Tasks -####################### - diff --git a/flytectl/docs/source/update.rst b/flytectl/docs/source/update.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/update.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst deleted file mode 100644 index c75064ce2b..0000000000 --- a/flytectl/docs/source/workflow.rst +++ /dev/null @@ -1,4 +0,0 @@ -############################ -Interacting with Workflows -########################### - diff --git a/flytectl/go.sum b/flytectl/go.sum index b89512e672..2c4b1fcd70 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -66,6 +66,7 @@ github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHo github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -271,6 +272,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU=