Deploy Open VSX from a Che workspace
Deploy an on-premises Open VSX extension registry by using predefined devfile tasks in a Che workspace. The workspace environment includes all necessary tools and commands defined in the .devfile.yaml file of the Open VSX repository.
-
You are logged in to the cluster as a cluster administrator.
-
You have a running Che instance.
-
Start a workspace by using the Eclipse Open VSX repository.
The .devfile.yaml includes an
elasticsearchcomponent that does not support IBM Power (ppc64le) or IBM Z (s390x) architectures. To start the workspace on these architectures, remove theelasticsearchcomponent from the devfile. Alternatively, use the Deploy Open VSX from source procedure to deploy Open VSX without starting a workspace.The environment, including all necessary commands, is defined in the
.devfile.yamlfile. -
Create a new project for Open VSX.
Run the
2.1. Create Namespace for OpenVSXtask in the workspace:Terminal → Run Task… → devfile → 2.1. Create Namespace for OpenVSXThis creates a new project named
openvsxon the cluster. -
Build and publish the Open VSX server image.
Run the
2.2. Build and Publish Open VSX Imagetask in the workspace:Terminal → Run Task… → devfile → 2.2. Build and Publish OpenVSX ImageDuring execution, the task prompts you to enter the Open VSX server version. If left blank, the task uses a default version.
Available Open VSX server versions are listed on the Open VSX releases page.
-
Build and publish the Open VSX CLI (
ovsx) image.Run the
2.3. Build and Publish OpenVSX CLI Imagetask in the workspace:Terminal → Run Task… → devfile → 2.3. Build and Publish OpenVSX CLI Image -
Deploy Open VSX.
Run the
2.4. Deploy OpenVSXtask in the workspace:Terminal → Run Task… → devfile → 2.4. Deploy OpenVSXThis task processes the
openvsx-deployment.ymltemplate and creates all required resources, including:-
Deployments for PostgreSQL, Elasticsearch, the Open VSX server, and the Open VSX CLI
-
Services and routes for accessing components
-
Secrets for GitHub OAuth credentials and the Open VSX Personal Access Token (PAT)
All deployment parameters are described in the
deploy/openshift/openvsx-deployment.ymlfile. The template includes default values such asOVSX_PAT_BASE64.
-
-
Add an Open VSX user with a PAT to the database.
Run the
2.5. Add OpenVSX user with PAT to the DBtask in the workspace:Terminal → Run Task… → devfile → 2.5. Add OpenVSX user with PAT to the DBThe task prompts you for the Open VSX username and user PAT. Press Enter to use the default values.
The user PAT must match the decoded value of
OVSX_PAT_BASE64specified in the deployment file. If you updateOVSX_PAT_BASE64, use the new decoded value as the user PAT. -
Configure Che to use the internal Open VSX registry.
Run the
2.6. Configure Che to use the internal Open VSX registrytask in the workspace:Terminal → Run Task… → devfile → 2.6. Configure Che to use the internal OpenVSX registryThis task patches the
CheClustercustom resource to use the deployed Open VSX registry URL. -
Publish a Visual Studio Code extension from a
.vsixfile.Run the
2.8. Publish a Visual Studio Code Extension from a VSIX filetask in the workspace:Terminal → Run Task… → devfile → 2.8. Publish a Visual Studio Code Extension from a VSIX fileThe task prompts you to provide the extension publisher name and the path to the
.vsixfile. -
Optional: Publish a predefined list of extensions.
Update the
deploy/openshift/extensions.txtfile with the download URLs of each.vsixfile, then run the2.9. Publish list of Visual Studio Code Extensionstask:Terminal → Run Task… → devfile → 2.9. Publish list of Visual Studio Code Extensions
-
Start any workspace and verify the published extensions are available in the Extensions view of the workspace IDE.
-
Open the
internalroute in theopenvsxproject to verify the registry UI displays the published extensions.
-
To restrict the registry to internal cluster traffic, see Configure internal access to the Open VSX registry.
-
To remove a published extension, see Delete an extension by using the Open VSX administrator API.