Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for elyra-metadata 'create' and 'update' commands #2578

Merged
merged 5 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/recipes/deploying-kubeflow-locally-for-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ These endpoints will be used to configure your Elyra metadata runtime with the
command below:

```bash
elyra-metadata install runtimes \
elyra-metadata create runtimes \
--schema_name=kfp \
--name=kfp-local \
--display_name="Kubeflow Pipeline (local)" \
Expand Down
7 changes: 3 additions & 4 deletions docs/source/user_guide/code-snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To format the output as JSON run `elyra-metadata list code-snippets --json`. Not
To create a code snippet:

```bash
elyra-metadata install code-snippets \
elyra-metadata create code-snippets \
--display_name="Preview DataFrame" \
--description="Preview Pandas DataFrame" \
--tags="['Python', 'Pandas']" \
Expand All @@ -130,8 +130,7 @@ Refer to the [Code snippet properties](#code-snippet-properties) section for an
To modify a code snippet:

```bash
elyra-metadata install code-snippets \
--replace \
elyra-metadata update code-snippets \
--name="preview_dataframe" \
--display_name="Preview DataFrame" \
--description="Preview Pandas DataFrame" \
Expand All @@ -140,7 +139,7 @@ elyra-metadata install code-snippets \
--code="['# Display first 5 rows', 'df.head(5)']"
```

Refer to the [Code snippet properties](#code-snippet-properties) section for an explanation of the parameters. Note that you must specify the `--name` parameter and the `--replace` parameter.
Refer to the [Code snippet properties](#code-snippet-properties) section for an explanation of the parameters. Note that you must specify the `--name` parameter.

#### Exporting code snippets

Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/command-line-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ It should also be noted that individual object-valued properties can optionally

Should a failure be encountered relative to a complex schema, the properties identified as complex will be identified in the tool's usage statement. They will refer to a note at the bottom of the usage statement indicating that these approaches should be used.

Finally, when updating instances using the `--replace` option. You are not required to include unchanged values on the command line. Instead, the existing object is read and any properties provided on the command line, or included in the bulk JSON data, are applied to the existing properties.
Finally, when updating instances using the `update` command, you are not required to include unchanged values on the command line. Instead, the existing object is read and any properties provided on the command line, or included in the bulk JSON data, are applied to the existing properties.

### Working with pipelines

Expand Down
11 changes: 5 additions & 6 deletions docs/source/user_guide/pipeline-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ elyra-kfp-examples-catalog kubeflow_pipelines_examples /.../Jupyter/metad

#### Adding a component catalog

To add a component catalog entry run `elyra-metadata install component-catalogs`.
To add a component catalog entry run `elyra-metadata create component-catalogs`.

```bash
$ elyra-metadata install component-catalogs \
$ elyra-metadata create component-catalogs \
--display_name="filter components" \
--description="filter text in files" \
--runtime_type=KUBEFLOW_PIPELINES \
Expand All @@ -191,18 +191,17 @@ Refer to section [Configuration properties](#configuration-properties) for param

#### Modifying a component catalog entry

To replace a component catalog entry run `elyra-metadata install component-catalogs` and specify the `--replace` option:
To replace a component catalog entry run `elyra-metadata update component-catalogs`:

```bash
$ elyra-metadata install component-catalogs \
$ elyra-metadata update component-catalogs \
--name="filter_components" \
--display_name="filter components" \
--description="filter text in files" \
--runtime_type=KUBEFLOW_PIPELINES \
--schema_name="url-catalog"\
--paths="['https://raw.githubusercontent.com/elyra-ai/examples/master/component-catalog-connectors/kfp-example-components-connector/kfp_examples_connector/resources/filter_text_using_shell_and_grep.yaml']" \
--categories='["file operations"]' \
--replace
--categories='["file operations"]'
```

Note: You must specify all property values, not only the ones that you want to modify.
Expand Down
7 changes: 3 additions & 4 deletions docs/source/user_guide/runtime-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ To format the output as JSON run `elyra-metadata list runtimes --json`. Note tha
To create a runtime configuration for a Kubeflow Pipelines deployment:

```bash
elyra-metadata install runtimes \
elyra-metadata create runtimes \
--schema_name=kfp \
--display_name="My Kubeflow Pipelines Runtime" \
--api_endpoint=https://kubernetes-service.ibm.com/pipeline \
Expand All @@ -129,11 +129,10 @@ Refer to the [Kubeflow Pipelines Configuration settings](#kubeflow-pipelines-con

#### Modifying a runtime configuration

To edit a runtime configuration, use the `--replace` option along with `--name` and `--schema_name` (to locate the instance), followed by the modified property values. In this case, we're updating the `api_password` and `tags` properties:
To edit a runtime configuration, use the `update` command along with `--name` and `--schema_name` (to locate the instance), followed by the modified property values. In this case, we're updating the `api_password` and `tags` properties:

```bash
elyra-metadata install runtimes \
--replace \
elyra-metadata update runtimes \
--name="my_kubeflow_pipelines_runtime" \
--schema_name=kfp \
--api_password=mynewpassword \
Expand Down
9 changes: 4 additions & 5 deletions docs/source/user_guide/runtime-image-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ runtime-image anaconda /Users/jdoe/.../jupyter/metadata/runtime-
To add a runtime image configuration for the public `jdoe/my-image:1.0.0` container image:

```bash
$ elyra-metadata install runtime-images --schema_name=runtime-image \
$ elyra-metadata create runtime-images --schema_name=runtime-image \
--name="my_image_name" \
--display_name="My runtime image" \
--description="My custom runtime container image" \
Expand All @@ -116,15 +116,14 @@ $ elyra-metadata install runtime-images --schema_name=runtime-image \

#### Modifying a runtime configuration

To replace a runtime image configuration append the `--replace` option:
To replace a runtime image configuration use the `update` command:

```bash
$ elyra-metadata install runtime-images --schema_name=runtime-image \
$ elyra-metadata update runtime-images --schema_name=runtime-image \
--name="my_image_name" \
--display_name="My runtime image" \
--description="My other custom runtime container image" \
--image_name="jdoe/my-other-image:1.0.1" \
--replace
--image_name="jdoe/my-other-image:1.0.1"
```

#### Exporting runtime image configurations
Expand Down
Loading