From fd133bbf38f00f38b51905d7da3b238fd7e08ac3 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 28 Apr 2022 09:36:51 +0530 Subject: [PATCH] Added docs for demo and updated docs for workflow execution config with more details (#316) --- .../matchable_workflow_execution_config.go | 3 ++ .../matchable_workflow_execution_config.go | 50 +++++++++++++++++++ .../matchable_workflow_execution_config.go | 6 +++ docs/source/demo.rst | 12 +++++ ...tectl_delete_workflow-execution-config.rst | 3 ++ docs/source/gen/flytectl_demo_start.rst | 22 ++++++-- ...flytectl_get_workflow-execution-config.rst | 50 +++++++++++++++++++ docs/source/gen/flytectl_get_workflow.rst | 2 +- docs/source/gen/flytectl_sandbox_start.rst | 10 ++-- ...tectl_update_workflow-execution-config.rst | 6 +++ docs/source/nouns.rst | 1 + docs/source/verbs.rst | 1 + 12 files changed, 155 insertions(+), 11 deletions(-) create mode 100644 docs/source/demo.rst diff --git a/cmd/delete/matchable_workflow_execution_config.go b/cmd/delete/matchable_workflow_execution_config.go index 4aa47acc23..fda9525f80 100644 --- a/cmd/delete/matchable_workflow_execution_config.go +++ b/cmd/delete/matchable_workflow_execution_config.go @@ -34,6 +34,9 @@ For example, here's the config file wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. diff --git a/cmd/get/matchable_workflow_execution_config.go b/cmd/get/matchable_workflow_execution_config.go index 7e75c2a93b..35fd4ce06d 100644 --- a/cmd/get/matchable_workflow_execution_config.go +++ b/cmd/get/matchable_workflow_execution_config.go @@ -69,6 +69,56 @@ Example: content of wec.yaml: project: flytectldemo max_parallelism: 5 +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + + +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain workflow level + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml flytectl get workflow-execution-config --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + workflow: k8s_spark.dataframe_passing.my_smart_structured_dataset + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + Usage ` ) diff --git a/cmd/update/matchable_workflow_execution_config.go b/cmd/update/matchable_workflow_execution_config.go index 57e20c065d..5a1c28d2d2 100644 --- a/cmd/update/matchable_workflow_execution_config.go +++ b/cmd/update/matchable_workflow_execution_config.go @@ -27,6 +27,9 @@ Example: content of wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo :: @@ -42,6 +45,9 @@ For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo proje project: flytectldemo workflow: core.control_flow.run_merge_sort.merge_sort max_parallelism: 5 + security_context: + run_as: + k8s_service_account: mergesortsa :: diff --git a/docs/source/demo.rst b/docs/source/demo.rst new file mode 100644 index 0000000000..38e7b49374 --- /dev/null +++ b/docs/source/demo.rst @@ -0,0 +1,12 @@ +Sandbox +------- +It specifies the actions to be performed on the 'demo' resource. + +.. toctree:: + :maxdepth: 1 + :caption: Sandbox + + gen/flytectl_demo_start + gen/flytectl_demo_status + gen/flytectl_demo_teardown + gen/flytectl_demo_exec diff --git a/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 8094452bd6..3f0ef09907 100644 --- a/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -30,6 +30,9 @@ For example, here's the config file wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. diff --git a/docs/source/gen/flytectl_demo_start.rst b/docs/source/gen/flytectl_demo_start.rst index 694f0e1390..71bcb4a1df 100644 --- a/docs/source/gen/flytectl_demo_start.rst +++ b/docs/source/gen/flytectl_demo_start.rst @@ -17,11 +17,11 @@ Starts the demo cluster without any source code: :: flytectl demo start - + Mounts your source code repository inside the demo cluster: :: - flytectl demo start --source=$HOME/flyteorg/flytesnacks + flytectl demo start --source=$HOME/flyteorg/flytesnacks Specify a Flyte demo compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -29,11 +29,24 @@ Specify a Flyte demo compliant image with the registry. This is useful in case y flytectl demo start --image docker.io/my-override:latest Note: If image flag is passed then Flytectl will ignore version and pre flags. - + Specify a Flyte demo image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: - flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + +Runs a specific version of Flyte. Flytectl demo only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +:: + + flytectl demo start --version=v0.14.0 + +.. note:: + Flytectl demo is only supported for Flyte versions >= v1.0.0 + +Runs the latest pre release of Flyte. +:: + + flytectl demo start --pre Start demo cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. eg : for passing timeout value in secs for the demo container use the following. @@ -41,7 +54,6 @@ eg : for passing timeout value in secs for the demo container use the following. flytectl demo start --env FLYTE_TIMEOUT=700 - The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: s - seconds (default) m - minutes diff --git a/docs/source/gen/flytectl_get_workflow-execution-config.rst b/docs/source/gen/flytectl_get_workflow-execution-config.rst index 0faeb3c3a7..c3b6123c00 100644 --- a/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -61,6 +61,56 @@ Example: content of wec.yaml: project: flytectldemo max_parallelism: 5 +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + + +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain workflow level + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml flytectl get workflow-execution-config --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + workflow: k8s_spark.dataframe_passing.my_smart_structured_dataset + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + Usage diff --git a/docs/source/gen/flytectl_get_workflow.rst b/docs/source/gen/flytectl_get_workflow.rst index e3ddfded83..845a89ab86 100644 --- a/docs/source/gen/flytectl_get_workflow.rst +++ b/docs/source/gen/flytectl_get_workflow.rst @@ -93,7 +93,7 @@ Options --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) - --filter.sortBy string Specifies which field to sort results (default "created_at") + --filter.sortBy string Specifies which field to sort results -h, --help help for workflow --latest flag to indicate to fetch the latest version, version flag will be ignored in this case --version string version of the workflow to be fetched. diff --git a/docs/source/gen/flytectl_sandbox_start.rst b/docs/source/gen/flytectl_sandbox_start.rst index a638e5cfd0..bfde221cfe 100644 --- a/docs/source/gen/flytectl_sandbox_start.rst +++ b/docs/source/gen/flytectl_sandbox_start.rst @@ -17,12 +17,12 @@ Starts the sandbox cluster without any source code: :: flytectl sandbox start - + Mounts your source code repository inside the sandbox: :: - flytectl sandbox start --source=$HOME/flyteorg/flytesnacks - + flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: @@ -36,7 +36,7 @@ Runs the latest pre release of Flyte. flytectl sandbox start --pre -Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -44,7 +44,7 @@ Specify a Flyte Sandbox compliant image with the registry. This is useful in cas flytectl sandbox start --image docker.io/my-override:latest Note: If image flag is passed then Flytectl will ignore version and pre flags. - + Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: diff --git a/docs/source/gen/flytectl_update_workflow-execution-config.rst b/docs/source/gen/flytectl_update_workflow-execution-config.rst index 783ef3795c..a3ec158822 100644 --- a/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -24,6 +24,9 @@ Example: content of wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo :: @@ -39,6 +42,9 @@ For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo proje project: flytectldemo workflow: core.control_flow.run_merge_sort.merge_sort max_parallelism: 5 + security_context: + run_as: + k8s_service_account: mergesortsa :: diff --git a/docs/source/nouns.rst b/docs/source/nouns.rst index 197ce67a02..150d3cab0c 100644 --- a/docs/source/nouns.rst +++ b/docs/source/nouns.rst @@ -23,3 +23,4 @@ Flytectl nouns specify the resource on which the action needs to be performed. E files config sandbox + demo diff --git a/docs/source/verbs.rst b/docs/source/verbs.rst index a1763a35b2..50eb37071e 100644 --- a/docs/source/verbs.rst +++ b/docs/source/verbs.rst @@ -15,5 +15,6 @@ Flytectl verbs specify the actions to be performed on the resources. Example: cr gen/flytectl_register gen/flytectl_config gen/flytectl_sandbox + gen/flytectl_demo gen/flytectl_version gen/flytectl_upgrade