Rolling out your Content Deployer Extension
When you have tested and compiled the Java class for your Content Deployer Extension, add it as an Extension to your Add-on package.
Procedure
- Choose a Content Deployer extension package to download from the list below, and copy it from the installation media folder indicated to a folder of your choosing. The specific extension package you need depends on the setup you are running:
Your setup File to copy You are running SDL Tridion Sites alone, and you use neither Experience Optimization nor the Context Expression Extension. \Content Delivery\roles\deployer\add-ons\udp-deployer-dx-extension-assembly-VERSION-search.zip You are combining SDL Tridion Sites and SDL Tridion Docs in a mashup, using the Context Expression Extension, but not Experience Optimization. \Content Delivery\roles\expression\add-ons\udp-cx-deployer-dx-extension-assembly-VERSION-search.zip You are running SDL Tridion Docs alone. \Content Delivery\roles\deployer\add-ons\udp-deployer-ish-extension-assembly-VERSION-search.zip where VERSION is a string indicating the version and build number of the ZIP file at the time of release.
- Create a new folder on your system and unzip the ZIP file you downloaded to this new folder.
- Create a JAR file containing your compiled Java class, which implements an all-new custom Module or extends an existing Module. Also include any other Java classes you may have implemented to support your class.
- Add the resulting JAR file, plus any dependent JAR files (developed by your own organization or by third parties), to your new folder.
- Access the server on which your Content Deployer microservice runs, and in its config/ folder, open deployer-conf.xml for editing.
- Add
Pipelineelements to thePipelinessection of the deployer-conf.xml file as needed, ensuring that theidattribute of eachPipelineelement you add is unique and different from theidattribute of allPipelineelements already present in deployer-conf.xml. - If you have created an all-new custom Module for deployment or undeployment, find the
Pipelinesections for the type of content that your custom Module deploys or undeploys. Within each of thosePipelinesections, add a newStepelement as the last step (so that it is called after all other Steps have finished processing) that looks as follows:<Step Factory="com.sdl.delivery.deployer.steps.TridionExecutableStepFactory" Id="STEPID"> <Module Type="MODULETYPE" Class="CLASSNAME"/> </Step>where:- STEPID uniquely identifies this deployment or undeployment step
- MODULETYPE is the simple Java class name of the Module you have built
- CLASSNAME is the fully qualified Java class name of the Module you have built
- Alternatively, if you have extended an existing Module for deployment or undeployment, find the
Pipelinesections that contain aStepelement containing the existing Module you extended. Within each suchStepelement, in theModulesubelement referencing the existing Module's Java class, replace the value of theClasselement with the fully qualified classname of your own Java class. For example:<Module Type="ComponentDeploy" Class="CLASSNAME"/>where CLASSNAME is the fully qualified Java class name of the new Module class that you have built.
- If your Module class uses a custom configuration, add that configuration in the form of one or more subelements within the
Moduleelement. In the following example, the Module has anAppInstanceconfiguration subelement to identify which instance of the Module this is.<Module Type="MODULETYPE" Class="CLASSNAME"> <AppInstance>default</AppInstance> </Module> - Save your changes to deployer-conf.xml.
- In the new folder, open the extension package manifest file manifest.json for editing.
- Increase the value of the
versionproperty. - Set the value of the
authorproperty to your name. - Update the value of the
descriptionproperty to include a description of the functionality you are adding. - Save your changes to manifest.json.
- Zip your resources back into a ZIP package. Give it the same name as the ZIP file in step 1, but with VERSION set to the new value of the
versionproperty in manifest.json. - In Content Manager Explorer, select Add-ons from the slide-out navigation and from the Manager tab, upload your new ZIP file.
- Restart your Content Deployer microservice.