You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/developing/0020-develop-extensions.md
+3-182Lines changed: 3 additions & 182 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,189 +181,10 @@ will have the following content.
181
181
```
182
182
183
183
## How To Use/Integrate Extensions
184
-
Once extensions have been developed and an extensions package exists, they can be used in the Virtual Client runtime. There are a number of different ways that
185
-
extensions can be bootstrapped/installed on the system to suit the needs of the situation. The following examples illustrate some common ways that extensions can
186
-
be integrated into the Virtual Client runtime.
187
-
188
-
### Place Extensions Directly in Virtual Client Application Folder
189
-
The simplest way to integrate extensions binaries, profiles or packages into Virtual Client is to copy the files directly to the Virtual Client application
* Extensions binaries/.dlls can be placed directly in the root directory of the Virtual Client application (i.e. right beside the VirtualClient executable).
193
-
194
-
```bash
195
-
# Given an installation location /home/users/virtualclient, the binaries/.dlls
### Reference Extensions from Other Locations on the System
223
-
Virtual Client enables the user/developer to define additional locations to look for extensions during execution startup. To do so, the user/developer can set
224
-
custom environment variables on the system to provide Virtual Client with the alternate locations. Virtual Client will look for dependencies in both the default
225
-
locations (normal operation) as well as within these alternate locations.
226
-
227
-
#### Supported Environment Variables
228
-
The following environment variables can be used to define alternate locations for dependencies:
229
-
230
-
***VC_LIBRARY_PATH**
231
-
Defines 1 or more path locations where extensions assemblies/.dlls exist and that should be loaded at runtime. Multiple directory paths can be defined separated
232
-
by a semi-colon ';' character (similar to the Windows and Linux `PATH` environment variable). Note that Virtual Client will search the immediate directory only
233
-
for extension assemblies/.dlls. Recursive subdirectory searches are not supported.
Defines 1 or more path locations where Virtual Client packages (including extensions packages) exist. Multiple directory paths can be defined separated by a semi-colon ';' character (similar to the Windows
256
-
and Linux `PATH` environment variable). Note that Virtual Client will search the immediate directory only for packages. Recursive subdirectory searches are
Defines 1 or more path locations where extensions profiles exist and that should be available for use during execution. Multiple directory paths can be defined separated
280
-
by a semi-colon ';' character (similar to the Windows and Linux `PATH` environment variable). Note that Virtual Client will search the immediate directory only for extension
281
-
profiles. Recursive subdirectory searches are not supported.
Given multiple of these environment variables are defined at the same time, Virtual Client will perform the search (and load/install) operations in the
304
-
following way:
305
-
306
-
***Priority for extensions packages and binaries/.dlls:**
307
-
* Packages with "extensions" in the default Virtual Client `/packages` folder are installed. This includes assemblies/.dlls and profiles extensions.
308
-
* Packages with "extensions" in directories defined in the `VC_PACKAGES_PATH` environment variable are installed. This includes assemblies/.dlls and profiles extensions.
309
-
However, packages that exist in the `/packages` folder have precedence. Duplicate packages found in the paths defined by this environment variable will be ignored.
310
-
* Binaries/.dlls in directories defined in the `VC_LIBRARY_PATH` environment variable are loaded into the runtime unless a duplicate (by name) is already loaded.
311
-
Duplicate binaries/.dlls in the paths defined by this environment variable will be ignored.
312
-
313
-
***Priority for extensions profile:**
314
-
* Profiles that are in the default Virtual Client `packages` folder have highest precedence.
315
-
* Profiles in directories defined in the `VC_PROFILES_PATH` environment variable have secondary precedence.
316
-
317
-
### Downloaded Extensions from a Package Store
318
-
The default for most Virtual Client scenarios is to download extensions from a package store. The **VirtualClient bootstrap** command can be used to download
319
-
extensions from a package store and install them.
320
-
321
-
```bash
322
-
# Package/Blob Store Structure
323
-
/container=packages/blob=crc.vc.extensions.zip
324
-
325
-
# Execute bootstrap command to download and install the extensions
The developer can choose to use a custom profile for bootstrapping/installing extensions as well.
334
-
335
-
```json
336
-
# Profile = BOOTSTRAP-EXTENSIONS.json
337
-
{
338
-
"Description": "Installs extensions from a package store.",
339
-
"Dependencies": [
340
-
{
341
-
"Type": "DependencyPackageInstallation",
342
-
"Parameters": {
343
-
"Scenario": "InstallCRCExtensionsPackage",
344
-
"BlobContainer": "packages",
345
-
"BlobName": "crc.vc.extensions.zip",
346
-
"PackageName": "crcvcextensions",
347
-
"Extract": true
348
-
}
349
-
}
350
-
]
351
-
}
352
-
```
353
-
354
-
...Then you can use it! Note that the profile can exist in another directory location and be referenced by the path to the file (full or relative path).
355
-
184
+
Once extensions have been developed and an extensions package exists, they can be used in the Virtual Client runtime. See the following documentation
185
+
for details on how to integrate extensions into the runtime.
The default for most Virtual Client scenarios is to download extensions from a package store. The `VirtualClient bootstrap` command can be used to download
325
+
extensions from a package store and install them.
326
+
327
+
```bash
328
+
# Package/Blob Store Structure
329
+
/container=packages/blob=crc.vc.extensions.zip
330
+
331
+
# Execute bootstrap command to download and install the extensions
The developer can choose to use a custom profile for bootstrapping/installing extensions as well.
339
+
340
+
```json
341
+
# Profile = BOOTSTRAP-EXTENSIONS.json
342
+
{
343
+
"Description": "Installs extensions from a package store.",
344
+
"Dependencies": [
345
+
{
346
+
"Type": "DependencyPackageInstallation",
347
+
"Parameters": {
348
+
"Scenario": "InstallCRCExtensionsPackage",
349
+
"BlobContainer": "packages",
350
+
"BlobName": "crc.vc.extensions.zip",
351
+
"PackageName": "crcvcextensions",
352
+
"Extract": true
353
+
}
354
+
}
355
+
]
356
+
}
357
+
```
322
358
323
359
## Script-Based Extensions Walkthrough
324
360
The following sections provide a bit more guidance on how to develop script-based extensions for Virtual Client and then to integrate them. Virtual Client provides
0 commit comments