-
Notifications
You must be signed in to change notification settings - Fork 175
Procedures/managed openvsx registry #3170
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
eb3f2e5
procedures: add documentation for operator-managed OpenVSX registry
svor 5d9acf4
procedures: add custom credentials and OpenVSX UI access documentation
svor 0ccb3d7
procedures: add OpenVSX server configuration customization section
svor 96be9a4
update changes
svor 3ab34ad
procedures: add extension deletion section and fix pod labels
svor cc368fa
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor 9d7306e
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor b60679b
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor 8d634fa
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor d7aad60
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor ea62645
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor 845f8a1
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor 56debdb
procedures: add prerequisites, verification, and Tech Preview notice
svor 2b5d82a
fix openvsx extensions CM name
svor 7ccb1cc
Update modules/administration-guide/pages/enabling-the-managed-open-v…
svor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
375 changes: 375 additions & 0 deletions
375
modules/administration-guide/pages/enabling-the-managed-open-vsx-registry.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,375 @@ | ||
| :_content-type: PROCEDURE | ||
| :description: Enable the Operator-managed Open VSX registry to deploy a dedicated Open VSX server and PostgreSQL database as {prod} operands | ||
| :keywords: administration guide, openvsx, registry, extensions, managed, operator | ||
| :navtitle: Enable the managed Open VSX registry | ||
|
|
||
| [id="enabling-the-managed-open-vsx-registry"] | ||
| = Enable the managed Open VSX registry | ||
|
|
||
| [role="_abstract"] | ||
| [IMPORTANT] | ||
| ==== | ||
| The managed Open VSX registry is a Technology Preview feature only. | ||
| ==== | ||
|
|
||
| Enable {prod-short} to deploy and manage a dedicated Open VSX server with a PostgreSQL database as Operator-managed components. The managed registry is exposed through the {prod-short} gateway and provides a private, curated extension registry without requiring manual deployment or database administration. | ||
|
|
||
| When enabled, the {prod-short} Operator creates the following resources: | ||
|
|
||
| * An Open VSX server `Deployment` with a `PersistentVolumeClaim` for extension storage. | ||
| * A PostgreSQL database `Deployment` with a `PersistentVolumeClaim` for data. | ||
| * A one-shot `Job` to provision the database with the required user and access token. | ||
| * A `ConfigMap` for listing extensions to publish to the registry. | ||
|
|
||
| When disabled, the Operator removes all managed Open VSX resources. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * An active `{orch-cli}` session with administrative permissions to the destination {orch-name} cluster. See {orch-cli-link}. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Enable the managed Open VSX registry by patching the `CheCluster` custom resource: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} patch checluster {prod-checluster} \ | ||
| --namespace {prod-namespace} \ | ||
| --type merge \ | ||
| --patch '{ | ||
| "spec": { | ||
| "components": { | ||
| "openVSXRegistry": { | ||
| "enable": true | ||
| } | ||
| } | ||
| } | ||
| }' | ||
| ---- | ||
| + | ||
| The Operator deploys the Open VSX server and PostgreSQL database, provisions the database, and exposes the registry through the {prod-short} gateway. | ||
| + | ||
| NOTE: The managed registry starts empty with no pre-installed extensions. You must publish extensions to the registry after enabling it. | ||
|
|
||
| . Optional: Configure the server storage size by setting the `claimSize` field. The default is `3Gi`. | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} patch checluster {prod-checluster} \ | ||
| --namespace {prod-namespace} \ | ||
| --type merge \ | ||
| --patch '{ | ||
| "spec": { | ||
| "components": { | ||
| "openVSXRegistry": { | ||
| "server": { | ||
| "pvc": { | ||
| "claimSize": "__<size>__" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }' | ||
| ---- | ||
| + | ||
| where `__<size>__` is the required storage size. For example: `5Gi`. | ||
|
|
||
| . Optional: Configure the database storage size. The default is `1Gi`. | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} patch checluster {prod-checluster} \ | ||
| --namespace {prod-namespace} \ | ||
| --type merge \ | ||
| --patch '{ | ||
| "spec": { | ||
| "components": { | ||
| "openVSXRegistry": { | ||
| "database": { | ||
| "pvc": { | ||
| "claimSize": "__<size>__" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }' | ||
| ---- | ||
|
|
||
| . Optional: Publish extensions to the managed registry by editing the `openvsx-server-extensions` `ConfigMap` in the {prod-short} {orch-namespace}. Add extension `.vsix` download URLs, one per line: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} edit configmap openvsx-server-extensions \ | ||
| --namespace {prod-namespace} | ||
| ---- | ||
| + | ||
| The Operator automatically runs a publishing `Job` when the `ConfigMap` content changes. | ||
|
|
||
| .Verification | ||
|
|
||
| * Verify that the Open VSX server and database pods are running: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-server | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-database | ||
|
svor marked this conversation as resolved.
|
||
| ---- | ||
|
|
||
| * Access the Open VSX registry UI by navigating to `pass:c,a,q[https://__<che_host>__/openvsx]` in a browser, where `__<che_host>__` is the hostname of your {prod-short} instance. You can retrieve the URL from the `CheCluster` status: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} get checluster {prod-checluster} \ | ||
| --namespace {prod-namespace} \ | ||
| -o jsonpath='{.status.openVSXURL}' | ||
| ---- | ||
|
|
||
| * Open a workspace and verify that extensions from the managed registry are available in the *Extensions* view. | ||
|
|
||
| [id="configuring-custom-credentials-for-the-managed-open-vsx-registry"] | ||
| == Configure custom credentials for the managed Open VSX registry | ||
|
|
||
| By default, the Operator generates an `openvsx-credentials` secret with random passwords and access tokens. To use custom database credentials and Open VSX user accounts, create a secret and reference it in the `CheCluster` custom resource. | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| The secret must exist before it is referenced in the `CheCluster` custom resource. The Operator validates the secret on create and update and rejects the change if the secret is missing or incomplete. | ||
| ==== | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * An active `{orch-cli}` session with administrative permissions to the destination {orch-name} cluster. See {orch-cli-link}. | ||
|
|
||
| .Procedure | ||
|
svor marked this conversation as resolved.
|
||
|
|
||
| . Create a secret with the required credentials: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} create secret generic __<secret_name>__ \ | ||
| --namespace {prod-namespace} \ | ||
| --from-literal=database-user=__<db_user>__ \ | ||
| --from-literal=database-password=__<db_password>__ \ | ||
| --from-literal=database-name=__<db_name>__ \ | ||
| --from-literal=openvsx-publisher-name=__<publisher_name>__ \ | ||
| --from-literal=openvsx-publisher-token=__<publisher_token>__ \ | ||
| --from-literal=openvsx-admin-name=__<admin_name>__ \ | ||
| --from-literal=openvsx-admin-token=__<admin_token>__ | ||
| ---- | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} label secret __<secret_name>__ \ | ||
| --namespace {prod-namespace} \ | ||
| app.kubernetes.io/part-of=che.eclipse.org | ||
| ---- | ||
| + | ||
| The secret must contain all of the following keys: | ||
| + | ||
| [cols="1,2", options="header"] | ||
| |=== | ||
| | Key | Description | ||
|
|
||
| | `database-user` | ||
| | PostgreSQL username. | ||
|
|
||
| | `database-password` | ||
| | PostgreSQL password. | ||
|
|
||
| | `database-name` | ||
| | PostgreSQL database name. | ||
|
|
||
| | `openvsx-publisher-name` | ||
| | Login name of the Open VSX publisher account with the `privileged` role. | ||
|
|
||
| | `openvsx-publisher-token` | ||
| | Personal access token for the publisher account. | ||
|
|
||
| | `openvsx-admin-name` | ||
| | Login name of the Open VSX admin account. | ||
|
|
||
| | `openvsx-admin-token` | ||
| | Personal access token for the admin account. | ||
| |=== | ||
|
|
||
| . Reference the secret in the `CheCluster` custom resource: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} patch checluster {prod-checluster} \ | ||
| --namespace {prod-namespace} \ | ||
| --type merge \ | ||
| --patch '{ | ||
| "spec": { | ||
| "components": { | ||
| "openVSXRegistry": { | ||
| "enable": true, | ||
| "credentialsSecretName": "__<secret_name>__" | ||
| } | ||
| } | ||
| } | ||
| }' | ||
| ---- | ||
|
|
||
|
svor marked this conversation as resolved.
|
||
| .Verification | ||
|
|
||
| . Verify that the Open VSX server pod is running: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-server | ||
| ---- | ||
|
|
||
| . Verify that the custom credentials are injected as environment variables in the Open VSX server pod: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} exec deploy/openvsx-server \ | ||
| --namespace {prod-namespace} -- \ | ||
| env | grep -E 'OPENVSX_ADMIN_PAT|OPENVSX_USER_PAT' | ||
| ---- | ||
| + | ||
| The output should include `OPENVSX_ADMIN_PAT` and `OPENVSX_USER_PAT`. | ||
|
|
||
| . Verify that the database pod uses the custom credentials: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} exec deploy/openvsx-database \ | ||
| --namespace {prod-namespace} -- \ | ||
| env | grep -E 'POSTGRESQL_' | ||
| ---- | ||
|
|
||
| [id="customizing-the-open-vsx-server-configuration"] | ||
| == Customize the Open VSX server configuration | ||
|
|
||
| The Operator creates an `openvsx-server` `ConfigMap` with a default `application.yml` configuration when the managed registry is first enabled. This `ConfigMap` is user-editable: the Operator creates it once and does not overwrite subsequent changes. Modifying the `ConfigMap` automatically triggers a rolling restart of the Open VSX server pod. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * An active `{orch-cli}` session with administrative permissions to the destination {orch-name} cluster. See {orch-cli-link}. | ||
| * The managed Open VSX registry is enabled and running. | ||
|
|
||
| .Procedure | ||
|
svor marked this conversation as resolved.
|
||
|
|
||
| . Edit the `openvsx-server` `ConfigMap`: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} edit configmap openvsx-server \ | ||
| --namespace {prod-namespace} | ||
| ---- | ||
| + | ||
| The `ConfigMap` contains a single `application.yml` key with the Open VSX Spring Boot configuration. | ||
|
|
||
| .Verification | ||
|
|
||
| * Verify that the Open VSX server pod has restarted with the updated configuration: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-server | ||
| ---- | ||
|
|
||
| [id="deleting-extensions-from-the-managed-open-vsx-registry"] | ||
| == Delete extensions from the managed Open VSX registry | ||
|
|
||
| Delete individual extensions or specific extension versions from the managed Open VSX registry by using the Open VSX admin API. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * An active `{orch-cli}` session with administrative permissions to the destination {orch-name} cluster. See {orch-cli-link}. | ||
| * The managed Open VSX registry is enabled and running. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Get the Open VSX server pod name: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-server -o name | ||
| ---- | ||
|
|
||
| . Delete an entire extension with all its versions: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} exec __<openvsx_server_pod>__ \ | ||
| --namespace {prod-namespace} -- \ | ||
| sh -c 'curl -X POST "http://openvsx-server:8080/openvsx/admin/api/extension/__<extension_namespace>__/__<extension_name>__/delete?token=$OPENVSX_ADMIN_PAT"' | ||
| ---- | ||
| + | ||
| where: | ||
| + | ||
| -- | ||
| `__<openvsx_server_pod>__`:: The pod name from the previous step. | ||
| `__<extension_namespace>__`:: The namespace (publisher) of the extension. For example: `redhat`. | ||
| `__<extension_name>__`:: The name of the extension. For example: `java`. | ||
| -- | ||
|
|
||
| . Alternatively, to delete only a specific version of an extension: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} exec __<openvsx_server_pod>__ \ | ||
| --namespace {prod-namespace} -- \ | ||
| sh -c 'curl -X POST -H "Content-Type: application/json" \ | ||
| -d '"'"'[{"version": "__<extension_version>__"}]'"'"' \ | ||
| "http://openvsx-server:8080/openvsx/admin/api/extension/__<extension_namespace>__/__<extension_name>__/delete?token=$OPENVSX_ADMIN_PAT"' | ||
| ---- | ||
| + | ||
| where `__<extension_version>__` is the version to delete. For example: `1.2.3`. | ||
|
|
||
| .Verification | ||
|
|
||
| * Open the Open VSX registry UI and verify that the deleted extension is no longer listed. | ||
|
|
||
| [id="disabling-the-managed-open-vsx-registry"] | ||
| == Disable the managed Open VSX registry | ||
|
|
||
| Disable the managed Open VSX registry to remove the Open VSX server, PostgreSQL database, and all associated resources from the {orch-namespace}. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * An active `{orch-cli}` session with administrative permissions to the destination {orch-name} cluster. See {orch-cli-link}. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Set the `enable` field to `false`: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} patch checluster {prod-checluster} \ | ||
| --namespace {prod-namespace} \ | ||
| --type merge \ | ||
| --patch '{ | ||
| "spec": { | ||
| "components": { | ||
| "openVSXRegistry": { | ||
| "enable": false | ||
| } | ||
| } | ||
| } | ||
| }' | ||
| ---- | ||
| + | ||
| The Operator removes all managed Open VSX resources, including deployments, services, persistent volume claims, and secrets. | ||
|
|
||
| .Verification | ||
|
|
||
| * Verify that no Open VSX pods remain in the {orch-namespace}: | ||
| + | ||
| [source,shell,subs="+quotes,+attributes,+macros"] | ||
| ---- | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-server | ||
| {orch-cli} get pods --namespace {prod-namespace} -l app.kubernetes.io/component=openvsx-database | ||
| ---- | ||
|
|
||
| [role="_additional-resources"] | ||
| .Additional resources | ||
|
|
||
| * xref:managing-ide-extensions.adoc[] | ||
| * xref:configuring-the-open-vsx-registry-url.adoc[] | ||
| * xref:using-the-cli-to-configure-the-checluster-custom-resource.adoc[] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.