Extension basics
Installation
When you run p4 extension --install, the server extension is transferred from your client machine to the Helix Core server, where built-in validation occurs. For example, the server notifies you if the manifest is missing or is invalid.
The server stores the server extension in the extension depot. See p4 depot for Form Fields > Type: > extension. The server extensions depot is a new depot type because the files associated with a server extension are separate from the files in other types of Helix Core depots.
Viewing the history of extensions
A super user can run p4 changes on the extension depot to see the history of installs, upgrades, and deletes.
Listing extensions
See p4 extension in Helix Core P4 Command Reference, which explains the --list option.
Disabling and re-enabling an extension
To disable or re-enable a server extension, in the global configuration or in the instance configuration, change the value of ExtEnabled. See and .
Deleting an extension
To delete a server extension, use p4 extension delete extName
This deletes the depot file and removes the server extension’s resource directory.
Directories
When a server extension is committed to the extensions depot, the server creates a subdirectory for the server extension. This directory is specified by the server.extensions.dir configurable. By default, the name of this directory matches the configurable's name, server.extensions.dir, and is located under the P4ROOT directory. Each server extension gets two subdirectories under the directory specified at server.extensions.dir, one for its resources and one that can be used as a persistent scratch space.
See also the Helix.Core.Server.GetArchDirFileName and Helix.Core.Server.GetDataDirFileName functions in the Helix Core Extensions Developer Guide > Class Helix.Core.Server.
Additional information
Prerequisite |
Knowledge of Lua. |
Limitation |
Any plain-Lua library is compatible, provided that it matches version of the server extension runtime. However, external Lua libraries that require native machine code for a specific processor are not compatible. |
Replication supported, but not DVCS |
Server extensions are stored as normal depot files and use the existing file replication mechanism for transfer to replicas. Replicas install extensions as soon they received them from the commit server. However, if your server extension has files that are stored in the server.extension.dir directory, those files will not be replicated. DVCS instances do not receive server extensions. |
Backup and restore |
Server extensions are depot files and server extension specs are included in checkpoints. However, the contents of the server.extensions.dir directory should be added to the list of depot directories to back up. Some of these files might be in an inconsistent state if they are accessed while the server is running because they are owned by your server extensions rather than by the Helix Core server. In the case of a loss of the server.extensions.dir data, the server will automatically recreate the files on first access because that data is on the server in the depot of type extension. |
Internationalization |
The server extensions API and manifest allow extensions to return messages localized by locale to the user. Message strings are encoded as UTF-8 and can be converted to other character sets. See the Helix Core "Internationalization Notes". |
Diagnostics / debugging |
To log line-delimited JSON from within a server extension, use the Helix.Core.Server.log() function. See Helix Core Extensions Developer Guide > Class Helix.Core.Server. |
Documentation from the command-line |
See p4 help serverextensionintro |
Your search for returned result(s).