Applies to version 2020.1.3; author: Wojciech Mleczko
The default WEBCON BPS installation contains the WEBCON BPS Search Server component, which is responsible for full-text search support.
This component consists of several elements:
WEBCON BPS Search Service is responsible for starting/stopping Solr and ZooKeeper processes that run within the Java virtual machine.
The environment prepared by the installer consists of one node. To create a high availability environment, you should prepare an environment consisting of several Solr and ZooKeeper nodes, and a loadbalancer that distributes traffic.
The number of created ZooKeeper nodes on the failure tolerance of N machines, calcucated by using the 2N+1 formula. The minimum number of nodes resistant to the failure of one ZooKeeper node is 3.
In the case of Solr – operation of at least one node is required. Number of nodes = N+1.
Loadbalancer is responsible for directing query traffic from WEBCON BPS to Solr nodes.
Solr and ZooKeeper can be installed in any environment – directly on Windows or Linux machines, or in a container environment. WEBCON BPS refers to loadbalancer which is responsible for directing traffic to individual Solr nodes.
It is important to properly set up ZooKeeper Ensemble according to the Solr documentation -> Ensemble configuration
Solr is configured to pass the appropriate connection values to ZooKeeper -> Using the -z Parameter with bin/solr
After starting Solr, change the security settings -> Enable basic authentication, and change the password of the Solr administrative user -> Add a User or Edit a Password.
WEBCON BPS invokes to four Solr collections:
These collections can be created from scratch or transferred from the existing Solr installation.
To create collections (for new installation), the configuration must be loaded into ZooKeeper according to the documentation -> Upload a Configuration Directory. The configurations can be found in the BPS installer folder at (.SearchServerSolrSolrTemplatesconfigsets).
The next step is to create the collection by invoking individual addresses (in this example, the loadbalancer address for solr is solr:8983):
Remember to set the replicationFactor parameter according to the number of Solr nodes.
To transfer data from the existing Solr installation, backup/restore the collections used by BPS -> Backup Collection and Restore Collection There is no need to load the configuration of the collections.
After creating or restoring the collection, create and grant privileges to the user who will be used to connect WEBCON BPS with Solr. You can use the PowerShell script, to create the collection use the Solr account with the previously set password:
$Cred = Get-Credential
$Url = "http://solr:8983/solr/admin/authentication"
$headers = @{
'Content-type' = 'application/json'
}
$Body = "{'set-user' : {'WEBCON_BPS' : 'HASŁO'}}"
Invoke-RestMethod -Method 'Post' -Uri $url -Credential $Cred -Body $body -headers $headers
$BodyPermission="{'set-permission': {'path':['/select','/update','/spell','/suggest'],'collection': ['BPS_Elements', 'BPS_Activities','BPS_Navigations', 'BPS_AI'],'role':['Role','dataReaderRole']}}"
$BodyUserRole = "{'set-user-role': {'WEBCONBPS': ['Role']}}"
$Url = "http://solr:8983/solr/admin/authorization"
Invoke-RestMethod -Method 'Post' -Uri $url -Credential $Cred -Body $BodyPermission -headers $headers
Invoke-RestMethod -Method 'Post' -Uri $url -Credential $Cred -Body $BodyUserRole -headers $headers
In this script, change the Solr address and password for the WEBCON_BPS user.
The last step is to set Solr connection in WEBCON BPS from the installer level. To do this, go to the Tools for application management and select the Search Server configuration tab:
After saving the changes, restart the WebCon BPS WorkFlow Service and recycle the WEBCON BPS application pool.