Install Model Service (DXA 2.0) as a Windows service
Updated: Aug 27, 2019
Though it is well documented in the SDL doc, I am just consolidating all into one place –
Install JDK 8 or Latest version.
Also you need to download the SDL Web Content Delivery layout: CD_10.1.0.8270 (Note: This is not yet released as a part of DXA 2.0, so to get that please raise a request to SDL customer support team. You can directly raise it through SDL Support portal at https://gateway.sdl.com.)
Note: Model service basically used as a microservice for Content Delivery, so SDL recommend to install the Model Service on the same machine where the Content Delivery setup is done.
Create a new folder in your target machine, and rename it to a unique name as per you choice. Here for example I named it as a model-service
Copy the below folders from the downloaded installation media
Paste ToAll the foldersSDL.DXA.NET.2.0\cis\dxa-model-service\standalone\model-service\binCD_10.1.0.8270\release\template\standalone\model-service\libCD_10.1.0.8270\release\template\standalone\model-service\All the foldersCD_10.1.0.8270\release\template\standalone\services\Model-services\services\
By default, this microservice runs on the port 8998. If you want to change the port, you can change it in the cd_storage_conf.xml file, as well as you have to pass the port no as a parameter of the command to the installer. (As a alternative of this you can also specify the port no. in the installService.ps1 script under the model-service\bin\ folder)
Now everything is set. So to install the service open PowerShell >> Go to the bin folder (for me it is C:\SDL\Web\model-service\bin) >> Run the below script.
PS C:\SDL\Web\model-service\bin> & ‘.\installService.ps1’ –server.port=8998
if you want to register automatically then add the additional parameter like below –
& ‘.\installService.ps1’ –register –server.port=8998
Note: You can also change the default values to something meaningful for the Model Service by editing the installService.ps1, such as in the following example:
$name=”SDLDXAModelServices” $displayName=”SDL DXA Model Services” $description=”Content Delivery Micro Services For DXA”