Server preparation
The HCMS Client requires several pieces of masterdata (features, asset types, etc) and automations to exist on the censhare server.
This kind of preparation only needs to be done once per server.
Mandatory automated part
The source code of the HCMS CSK contains a tool that helps you to perform the necessary preparation quickly: the Headless tool. Headless tool is a commandline utility that connects to the censhare server and executes some custom scripts.
What is the Headless tool
This is a special tool that prepares configurations and automations for a HCMS Client Starter Kit application. It is similar to the official hcms
tool, but:
It only runs groovy-based scripts; there are no commands to execute and no interactive mode (nothing that you need to enter).
It is designed to be easily executed from another application.
output is formatted for easy parsing (each line is a JSON document).
It is not officially released.
This is the way currently used to distribute server-side configuration; for solution development, it can be replaced by the standard git deployment technique..
The tool is available in the /src/html/headless-tool
folder of the HCMS CSK repository and must be run in that directory.
If you want to know more about how it works, please read the README.md
in its repository.
Get the Headless tool
You need to clone the GitLab repository for the HCMS CSK:
git clone https://gitlab.censhare.com/oc/product/release/hcms-client-starter-kit.git
Run the Headless tool
You are going to run only one script, to be found in /src/html/headless-tool/prepare-server.groovy
. prepare-server.groovy
is the main script used for preparing censhare server for any future portals (HCMS Client Starter Kit - based applications).
All masterdata and automations it creates are common to all applications based on this framework.
However, three options as required before the script name:
-s
withfrmis://
: the URL of the censhare server or, if you are using a server running locally, the IP of your machine with the port, likefrmis://100.100.100.100:30546/corpus.RMIServerSSL
-u
with the username of the censhare server user; usuallycenshare
, but any other user with administrative privileges can be used-p
with the pasword (directly) or-P
with the name of the environment variable that contains such passwordNote that unlike the
hcms
tool, the headless tool one does not support interactive password entry or OS X keychain passwords.
cd hcms-client-starter-kit/headless-tool
java -jar headless-tool.jar -s frmis://<censhare-server>:30546/corpus.RMIServerSSL -u <user> -p "<password>" prepare-server.groovy
The output of this command are messages formatted as single-line JSON documents. Each message has a timestamp, severity level, message and optionally some additional structured data.
This allows easy parsing by the parent process.
For server clusters
Headless tool has one important limitation: it only works with one server and ignores any other ones in the cluster. In multi-server setups (ie when at least one remote server exists), additional manual step is still needed: in the Java Admin Client, you need to use "Synchronize remote servers". Otherwise all changes will be present only on the primary server!
Manual setup
Note that this is only relevant for the censhare servers with heavy customizations deployed via git or other file distribution. Otherwise, please ignore this section.
Extract files from the archive, or checkout files from the /src/html/headless-tool
repository and add some of that content to appropriate places in the git project:
masterdata from
satellite-assets/portal/masterdata.xml
Except the optional templates for domains - they should be already created by one of the previous steps.
dic_master
settings for imagemerge (
settings.xml
) settings tomodules/image/aa-image-create-include.xml
(must be added inside!)add new automation
app/modules/image/aa-image-create-dynamic-image-cache-master.xml
Note that this is already part of standard setup of Online Channel --> maybe it is already done!
video preview configuration (
dic_video
)module-assets directory
dic_video/presets
should be added as it ismodules/video/aa-video-preview.xml
uses these presetsany existing changes must be merged
automation for metadata mapper (
/src/html/headless-tool/automations/metadata-mapper
), as an XSLT transformationadd both
xslt-*
files belong to some module assets directoryadd new automation action
aa-cmd.xml
Note that the real one must have timestamp in its name and
cmd-info/@name
! This is done automatically by the Java Admin Client.
automation for Google Vision AI integration(
/src/html/headless-tool/automations/google-vision
)basically the same as the previous (metadata mapper)
optional: it is needed only if there is some other automation (typically the google vision) that assigns tags to the images
this automation actually just makes sure that these tags have an output channel