Skip to content

Commit 5c3e2f1

Browse files
authored
chore: update doc with additional verification instructions (#3)
Signed-off-by: Frank Kong <frkong@redhat.com>
1 parent a0aa666 commit 5c3e2f1

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ When `--push-images` is enabled, images are tagged as:
385385
${REGISTRY_URL}/${REGISTRY_NAMESPACE}/plugin-name-dynamic:1.0.0
386386
```
387387

388+
NOTE: If the repository name (ex: plugin-name-dynamic) in the namespace specified by `REGISTRY_NAMESPACE` does not exist, the dynamic plugin factory will create a new registry. Depending on the registry specified by `REGISTRY_URL`, the newly created repository may be private. This will be the case for `quay.io`.
389+
388390
## Examples
389391

390392
See the `examples` directory for complete configuration examples:
@@ -420,6 +422,50 @@ podman run --rm -it \
420422
--no-push-images
421423
```
422424

425+
#### Package Verification
426+
427+
Afterwards, you can verify that the plugin functions correctly by dynamically installing them into your RHDH instance by adding the newly published plugins into the `dynamic-plugins.yaml` file of your RHDH instance. You may need to add additional `pluginConfig` fields if your plugin requires additional configurations.
428+
429+
```yaml
430+
includes:
431+
- dynamic-plugins.default.yaml
432+
plugins:
433+
- package: oci://quay.io/{REGISTRY_NAMESPACE}/backstage-community-plugin-todo:0.12.0!backstage-community-plugin-todo
434+
disabled: false
435+
pluginConfig: # `pluginConfig` may be required for additional configurations such as mounting the components
436+
dynamicPlugins:
437+
frontend:
438+
backstage-community.plugin-todo:
439+
mountPoints:
440+
- mountPoint: entity.page.todo/cards
441+
importName: EntityTodoContent
442+
entityTabs:
443+
- path: /todo
444+
title: Todo
445+
mountPoint: entity.page.todo
446+
- package: oci://quay.io/{REGISTRY_NAMESPACE}/backstage-community-plugin-todo-backend:0.13.0!backstage-community-plugin-todo-backend
447+
disabled: false
448+
```
449+
450+
We will show an example of how to verify with [RHDH Local](https://github.com/redhat-developer/rhdh-local).
451+
452+
1. If the OCI images were pushed to a previously non-existent repository, please ensure it's now a public repository (or you can setup podman credentials for subsequent steps)
453+
2. Create a `dynamic-plugins.override.yaml` file with the plugin config above. Replace the `{REGISTRY_NAMESPACE}` with the registry namespace used to publish the plugins.
454+
3. Import a catalog entity the `todo` plugin with. We will be importing the backstage repository via `config/app-config/app-config.local.yaml`:
455+
456+
```yaml
457+
catalog:
458+
locations:
459+
- type: url
460+
target: https://github.com/backstage/backstage/blob/master/catalog-info.yaml
461+
rules:
462+
- allow: [Component]
463+
```
464+
465+
4. Start the RHDH instance with `podman compose up -d`
466+
5. Navigate to <http://localhost:7007/catalog/default/component/backstage/todo> and verify that the `backstage` catalog entity appears, and a `todo` tab appears containing a table of all `TODO` comments in the source code of the catalog entity.
467+
6. Clean up with `podman compose down --volumes`
468+
423469
### Gitlab Workspace Example
424470

425471
Located at [`examples/example-config-gitlab`](./examples/example-config-gitlab/)

0 commit comments

Comments
 (0)