Dependencies
Digital Workspace Platform Extensions can have dependencies which are required to be met before the Extension can be installed via the Matrix42 Extension Gallery. These dependencies are generally divided into two categories:
Automatic Prerequisites
Automatic prerequisites are dependencies to other Extensions available in the Matrix42 Extension Gallery. These will be installed automatically prior to the targeted Extension, if available for the end-user.
To specify automatic prerequisites you can define them via the "DependentPackages" field in the package.json of the configuration package:
{ "Id": "01234567-8998-7654-3210-123456789987", "Name": "Extension with Automatic Prerequisites", "Version": "1.0.0", "Prerequisites": { "DependentPackages": [ { "Id": "76543210-3210-7654-8998-789987654321", "MinimalRequiredVersion": "1.4.0", "PackageName": "Automatic Prerequisite 1", "Vendor": "Matrix42 GmbH" } ] } }
Each dependencies must include the "Id" field which contains the ID of the configuration package of the dependency and the "MinimalRequiredVersion" field which contains the minimum version which must be installed on the target DWP.
When uploading the configuration package to the Matrix42 DevOps Portal all its prerequisites will be validated. You can only publish the uploaded Release to the Matrix42 Extension Gallery if there are no issues regarding the prerequisites.
Manual Prerequisites
Manual prerequisites are dependencies to components which cannot be installed automatically via the Matrix42 Extension Gallery. This can either be a dependency to a certain version of the Digital Workspace Platform or specific software requirements on the target environment.
Product Version Requirement
The product version requirement can be used to specify which version of the Digital Workspace Platform is required to install the Extension on. Therefor you can use the "MinimalRequiredProductVersion" and the "MaximumAllowedProductVersion" field in the package.json of the configuration package:
{ "Id": "01234567-8998-7654-3210-123456789987", "Name": "Extension with Product Version Requirement", "Version": "1.0.0", "Prerequisites": { "MinimalRequiredProductVersion": "11.0.2.3415", "MaximumAllowedProductVersion": "11.0.2.3507" } }
Both fields are optionally and inclusively. This means in the above example you can install the Extension on Digital Workspace Platforms starting from the version "11.0.2.3415" to the version "11.0.2.3507" but not on prior versions or above.
Software Requirements
Software requirements can be used to verify that certain software components are installed on the target environment before you can install the Extension. You can configure software requirements using the "SoftwareRequirements" field in the package.json of the configuration package:
{ "Id": "01234567-8998-7654-3210-123456789987", "Name": "Extension with Software Requirements", "Version": "1.0.0", "Prerequisites": { "SoftwareRequirements": [ { "ProductName": "Docker Desktop (for Linux Containers)", "Vendor": "Docker, Inc.", "Description": "Docker Desktop is required to orchestrate the Linux Containers.", "RequiredVersion": "^4.0.0", "DownloadUrl": "https://www.docker.com/products/docker-desktop", "DocumentationUrl": "https://help.matrix42.com/030_DWP/025_Extension_Test_Studio/How_to_fulfill_the_Software_Prerequisites", "Assertions": [ { "Type": "FileExists", "Path": "%ProgramFiles%\\Docker\\Docker\\Docker Desktop.exe" }, { "Type": "FileExists", "Path": "%ProgramFiles%\\Docker\\Docker\\DockerCli.exe" }, { "Type": "Registry", "Key": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Docker Inc.\\Docker\\1.0", "Value": "HumanVersion", "Data": "^4\\." }, { "Type": "Command", "Shell": "cmd", "Command": "docker info", "Result": "OSType: linux" }, { "Type": "Command", "Shell": "cmd", "Command": "docker info", "Result": "Name: docker-desktop" } ] } ] } }
The above example is taken from the Extension Test Studio Extension. It will require Docker Desktop version 4 to be installed on the target environment. Using the "Assertion" field the Extension Gallery will test for existing files, registry entries or by executing commands to see if the correct version is installed.