Configuring extension registry

You can configure a local extension registry in Code as an admin to ensure that only approved extensions are available to team members within your teamspace.

Before you begin:

  • Gained access to DevOps Control with permission to create repositories.
  • Download the required .vsix extension files from a trusted source, or use non-published extension files that you have access to. You can visit the specific extension's page in the Open VSX registry, download the desired stable release's .vsix file. Generally, prerelease versions are also listed in Open VSX and only release versions are recommended for deploying.
  • Read Authenticating with DevOps Code UI.

An extension registry decides which extensions are available in your teamspace. Regardless of which configuration you choose, only administrators can upload extensions to the registry, and teamspace members can only view and install the extensions that an administrator has approved and published.

There are three ways to configure the registry:

  1. Control repository storage - Extensions are stored and versioned in the .devopsconfig Control repository. Requires a manual commit and push after each deployment.
  2. Persistent Volume Claim (PVC) storage - Extensions are stored on a persistent volume. Deployment is automated; no commit or push required. The default capacity of the storage is 20 GB.
  3. On-premises Open VSX instance - Extensions are hosted and managed on your own Open VSX instance.

The following table compares the three configurations:

Table 1. Registry configuration comparison
Configuration extensions_gallery value storage_type value Commit/push required?
Control repository storage local control Yes, after every deployment
PVC storage local pvc No, deployment is automated
On-premises Open VSX <your-onprem-openvsx-url>/vscode/gallery/extensionquery Not applicable Not applicable

The DevOps Code extension provides commands that you can use as an administrator to deploy and manage extensions within the extension registry. The key commands provided by the DevOps Code extension in the cloud IDE are:

  • DevOps Code: Deploy to Extension Registry - Deploys extension files to the registry.
  • DevOps Code: Fetch from Extension Registry - Refreshes the registry after new extensions are pushed to the repository.
    Note:
    These commands apply only when extensions_gallery is set to local (Control repository or PVC storage). They are not applicable when using an on-premises Open VSX instance.

Set Registry Configuration

  1. Choose one of the three configurations and update settings.json in the repository root accordingly:

    Based on the comparison above, decide whether you want to use Control repository storage, PVC storage, or an on-premises Open VSX instance, then add the corresponding values to settings.json as shown below.

    1. Option A - Control repository storage:
      {
          "extensions_gallery": "local",
          "storage_type": "control"
      }
    2. Option B - Persistent Volume Claim (PVC) storage:
      {
          "extensions_gallery": "local",
          "storage_type": "pvc"
      }
    3. Option C - On-premises Open VSX instance:

      Set extensions_gallery to the hosted URL of your Open VSX instance, appended with the /vscode/gallery/extensionquery path. The storage_type parameter is not applicable for this configuration, since extensions are hosted and managed by your on-premises Open VSX instance rather than by Code.

      {
          "extensions_gallery": "<your-onprem-openvsx-url>/vscode/gallery/extensionquery"
      }
    4. Supported parameter values:

      The extensions_gallery parameter supports these values:

      • local: Uses the administrator-controlled registry (Control repository or PVC storage).
      • disabled: Prevents the user from installing new extensions from the Code IDE.
      • default: Uses the public Open VSX registry.
      • A URL ending in /vscode/gallery/extensionquery: Uses an on-premises Open VSX instance hosted at that URL.

      The storage_type parameter supports these values:

      • control: Stores extensions in the .devopsconfig Control repository.
      • pvc: Stores extensions on a persistent volume.
  2. Add approved extensions in Code:
    Note:
    This step applies only to local registry configurations (Control repository or PVC storage). It is not applicable when using an on-premises Open VSX instance.
    1. Select Open with DevOps Code to clone the .devopsconfig Control repository in Code.
    2. After cloning the main branch of the .devopsconfig repository in Code, create an extensions folder in the repository root if one does not exist. Note that you can also create other branches and version the extensions on different branches.
    3. Upload the .vsix files into the extensions folder.
  3. Deploy and publish the extensions:
    Note:
    This step applies only to local registry configurations (Control repository or PVC storage). It is not applicable when using an on-premises Open VSX instance.
    1. Right-click the .vsix file in the Explorer pane and select Deploy to Extension Registry.
      A dialog confirms that the extension was deployed successfully. If you chose Control repository storage, the extension folder is created inside extensions in the Control repository, and the extension is not available to teamspace members until you commit and push the changes. If you chose PVC storage, deployment is automated and the extension becomes available without any further commit or push.
  4. If you chose Control repository storage, commit and push the changes to Control. Skip this step if you chose PVC storage, where deployment is automated:
    1. Commit the following items:
      • extensions folder
      • settings.json file
    2. Push these changes to the Control repository.
      After the push completes, the extension is published to the registry and is available to all team members.
  5. Refresh the extension registry:

    The registry does not automatically detect new extensions immediately after a push.

    1. As an administrator, open the Command Palette and run DevOps Code: Fetch from Extension Registry to refresh the registry content and test that the deployment succeeded.
      A notification confirms that the registry refresh is complete, and you can search and see the new extension(s). Other teamspace members do not need to run this command; searching for the extension in the Extensions view automatically triggers a rescan and shows the newly deployed extension in the results.

The extensions are now available in the registry. Members in a teamspace can view and install only the extensions that you have added and published.

Install the extensions approved by administrator from the Extensions view in Code.