In the previous version of this framework, apart from CMS and Deployer setup steps, we were required to host custom WCF based Index service, install and configure ElasticSearch. In this release, I've moved all these on Docker.
So, now instead of downloading code host the Index service and ElasticSearch all we need to do is Docker Pull and you will have all the pre-requisites up and running.
Steps to setup latest version of this framework:-
- CMS setup
- Copy and paste the templating building block (TBB) to a location on your SDL WEB 8 CM Server
- Upload ESI4TIndexing.Templating.dll TBB to WEB 8 CMS using TcmUploadAssembly.exe
- Create a Component Template with following attributes
- Output Format – XML Fragment
- Add GetComponentAsXML TBB ,Publish Binaries in Package, Link Resolver and Cleanup Template.
- To setup Elasticsearch run following docker commands.
- docker pull hemkant/elasticsearch .
- docker run -p 9200:9200 -m3gb hemkant/elasticsearch
- To setup generic, WCF IndexService run following docker commands.
- docker pull hemkant/elasticsearchintegration4web8 .
- docker run -p 83:83 hemkant/elasticsearchintegration4web8
- To verify all the docker containers are up and running run docker ps command
- All these containers are available on hub.docker.com
- The last step is setup Deployer service
- Open the cd_storage_config.xml Storage Configuration file from the /bin/config folder and add following node under the Storages section:
- <StorageBindings><Bundle src="CustomStorageDAOBundles.xml"/></StorageBindings>
- Copy and paste CustomStorageConfig.xml file to change the value of following nodes
- ServiceEndPoint - URL of the IndexService
- TemplateIdToIndex - Tcm Id Of component Template which we have created in step 1 CMS setup.
- Copy the CustomStorageDAOBundles.xml XML file in the Content Delivery /bin/config folder
That's all we need. We have configured the ElasticSearch integration with SDL WEB now publish the components and data will be stored in ElasticSearch.
Happy coding and keep sharing !!!