Configuring extension registry
You can configure a local or an on-premises extension registry in Code as an admin to ensure that only approved extensions are available to team members within your teamspace.
Before you begin
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.
About this task
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:
- Control repository storage - Extensions are stored and versioned in the .devopsconfig Control repository. Requires a manual commit and push after each deployment.
- 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.
- On-premises Open VSX instance - Extensions are hosted and managed on your own Open VSX instance.
The following table compares the three configurations:
| 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_galleryis set tolocal(Control repository or PVC storage). They are not applicable when using an on-premises Open VSX instance.
Set Registry Configuration
Procedure
-
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.
-
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.
- Select Open with DevOps Code to clone the .devopsconfig Control repository in Code.
- 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.
- Upload the .vsix files into the extensions folder.
-
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.
-
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:
-
Refresh the extension registry:
The registry does not automatically detect new extensions immediately after a push.
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.
What to do next
- Install the extensions approved by administrator from the Extensions view in Code.
- Learn how to install extensions manually for air-gapped environment. See Installing extensions in air-gapped environment.