KanBo Search Installation and Configuration for KanBo 2.7

KanBo search is based on its own search engine and the search engine built into SharePoint/Office365. KanBo compiles the search results into one easy to understand result page, which consists of 4 sections: Cards, KanBo Documents, SharePoint Documents and KanBo Users.

For more details, please read this article: KanBo Search.


Prerequisites


1) Virtual Machine:

KanBo Search component requires Windows environment for the installation. Considering on-premises architecture it can be installed on the same server where KanBo or SharePoint is configured. In terms of Office 365 and Azure KanBo hosting we do recommend to setup dedicated Virtual Machine on Azure (Windows Server 2012 R2 SP1) with lowest pricing plan and use own redirected domain with A record and wildcard certificate.


2) Make sure you have .Net Framework 4.7 installed on your Virtual Machine.

You can check the version of .net Framework by using the following command in Command Prompt:

dir %windir%\Microsoft.NET\Framework /AD

If the version is lesser than 4.7, please download it from the following site and install on the Virtual Machine.


https://www.microsoft.com/en-us/download/details.aspx?id=55167 


3) Make sure that you have set Execution Policy on your Machine to Unrestricted.

To do this, enter Powershell as administrator.

As a first step, you must set Execution Policy on this machine as Unrestricted. 

Enter in Powershell:

Set-ExecutionPolicy Unrestricted

and confirm this action. 

 


After the whole installation is done, you can set the Execution Policy to Restricted (Set-ExecutionPolicy Restricted), using the same method.  


4) You must install Java on the machine: 

Download the file for Windows: http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html 

Install it using this manual:  http://docs.lucee.org/guides/running-lucee/windows/installing-the-server-jre-on-windows.html


There is alternative way of installing Java:

1. Create a new folder on your server: C:\Java and copy there all extracted files which you have downloaded previously.

 


2. Go to Computer in file explorer -> Properties.


3. In Control Panel select Advanced system settings.

 


 4. Now select Environment Variables in Advanced.


5. Now select path and start editing it.


6. Copy the path to the location of Bin folder in Java location and paste it in the beginning.




7. Save all changes.



5) Solr installation Package:

Contact us at support@kanbozone.com to receive the KanBo Search component package.

Before installing the KanBo Search, please make sure that you have the most recent version of KanBo deployed on your Azure and Office 365. Contact us to get the newest KanBo version package and if you don't have the most recent version, please perform the whole update procedure .



Installation

Step 1: Download files, extract them to working location ( it can for example new folder C:\Workspace ).



Step 2. Go to your Working location and enter the Solr Installer folder. Open next folder which is also called Solr Installer and start editing InstallerScript.ps1.




Step 3. Start editing the file. Adjust all information written in italic.


# Target solr path, must not exist
$solrPath = 'c:\new-solr' - locaction where you want to put KanBo Search component files 

$keytoolPath = "C:\Java\jdk1.8.0_161\jre\bin\keytool.exe" - here change the path to your Java folder


#credentials for solr admin user
$solrWwwLogin = 'admin' - write there a login for the Search service
$solrWwwPassword = 'solr password' - write there a password for the Search service

$solrCertificateCN = 'localhost' # Ex. mysearch.local - CN name of certificate in store
$solrKeyStorePassword = 'keystore' # Minimum 6 characters - certificate password

$solrPort = 9999 - any port you want to use for search component.
$solrStopPort = 9998 - port for the communication purposes


# Optional, $solrKeyStorePassword must be the same as password for pfx file that will be imported
$solrPfxFilePath = '' - you can also specify location for the certificate if you already have one. Leave this value empty if you decide to generate a certificate using $solrCertificateCN.


Save the changes in the file. Don't run it for now.




Step 4. Go to your Working location and enter the Solr Installer folder. Open next folder which is also called Solr Installer and start editing AddCore.ps1. 




Step 5. Start editing the file. Adjust all information written in italic.


# Target solr path, must not exist
$solrPath = 'c:\newsolr' - your path to the Solr folder


# Values for the parameters bellow can be found in the web.config in the value of KanBoContentConnectionString
$serverName = 'localhost' - If there is a need to specify port please use the comma ex. serverName,1433
$database = 'KanBoContent49a2d5e34axxxxxx' - The name of KanBo Content Database. You can find it in the value of the KanBoSqlConnectionString in web.config
$dbUser = 'solrdbuser' - Add here a name of database user, created only for Solr purpose
$dbPass = 'solr1@3' - Add here a password for the user below


# arbitrary name that will be used in the KanBo config file
$solrCoreName = 'kanbosample' - add a custom name for the core


Save the changes in file. Don't run it for now.




Step 6. Go to the Location where Search is added and enter Solr installer -> Data -> Service. Example: "C:\Your working location\Solr Installer\Solr Installer\Data\Service".



Step 7. Right-click on KanBoSearchService.exe and select Properties.



Step 8. Now click on "Unblock" button. Apply and save this change.


Step 9. Now enter Powershell (run it as administrator).



Step 10. 

Write here cd C:\Path to your working location.




Step 11.

Then, enter any location directing to folder where InstallerScript.ps1 is located, i.e. "cd Solr Installer" Hit enter. 



Step 12. A communicate will appear: "Copying files to your working location".





Step 13. After this step is finished, run the AddCore.ps1.




Checking the state of your Solr account

Step 14. Enter your Internet browser. Paste there a following URL, adding a solrPort number you already entered in InstallerScript.ps1.

https://localhost:solrPortNumber/solr 

example: https://localhost:10080/solr/ 


Select OK in the communicate of Security Alert in your browser or select go to Website anyway option - if there is any.


 

Step 15. Click on "Continue to this website" link if a communicate "There is a problem with this website's security sertificate" appears. (This message should not appear when your previously added certificate is proper).

Enter your password and login, which you previously entered in InstallerScript.ps1.




Step 16 You have entered your SOLR admin panel.



Step 17. In your SOLR's admin panel (https://localhost:solrPortNumber/solr) ,enter Core selector to select a Core you would like to manage. Select one of them.



Step 18. After choosing one, click on Dataimport.




Step 19. Select "Auto-refresh status" and click on Execute button.



Step 20. You will see your Indexing being completed in a couple of seconds.



Please also go to the Logging section to check if any errors appear.



Step 22. Go to the Windows Firewall with Advanced Security and add a new Inbound Rule.




- In Rule type select Port.



- This rule should apply to TCP. In the second option select Specific local ports and add a SolrPort here.



- Select Allow the connection.



- Rule should apply to Domain, Private and Public.


- Select a name. Select Finish. The Rule should be created.


- Also, in the Azure Virtual Machine scenario, you must go to your Machine's NSG (Network security group) and add a new Inbound Rule.






- Use the following configuration - but change the Destination Port Ranges to suit your SolrPort.




Creating and starting a Full Crawl task and configuring the web.config of KanBo

TIP: You can skip part of adding full crawl task and use Powershell instead to do the indexing for you.


23. Copy the Scheduled Job folder from your working location (it can be found in the Solr Installer folder in i.e. C:\Workspace\Solr Installer\Scheduled Job). 

Paste this folder to  the freshly created Solr folder and name it Management.



24. Go into the Management folder. Open the SolrManagement.exe.config in a file editor. 


25. Enter there the following values. Change exemplary core values to ones matching your KanBo content databases.

 Then, save the changes.

 <appsettings>
<add key="SolrUser" value="YOUR SOLR ADMINISTRATOR USER NAME"></add>
<add key="SolrPassword" value="YOUR SOLR PASSWORD"></add>
<add key="Cores" value="https://127.0.0.1:20112/solr/YOUR CORE NAME,https://127.0.0.1:20112/solr/YOUR CORE NAME"></add>
  </appsettings>



26. You need to start a Full Crawl task now. Go to the Task scheduler on your PC and click select Create Task.

 


27. In General section, enter a name for it (example: "Crawler") and select "Run whether user is logged on or not".


 


28. Go to Triggers section. Click on "New" button.

In Settings choose Daily.

Choose a start for today and the actual hour.

Select Repeat task every 5 minutes.

Click "OK" to save these changes.



29. Go to the Actions section.

Choose action: Start a Program.

In Program/script select Browser and select SolrManagement file from Management folder. Click on Open.

Then click ok to save these changes.


 


30. Save your task. It will be added to the Task scheduler. Your task will have it's first run in 5 minutes.



31. Enter www root folder of your KanBo.

Go to wwwroot -> and start editing the Web config in any text editor.


In case of Azure installation, go to https://{kanbo web app name}.scm.azurewebsites net/DebugConsole/?shell=powershell, enter Site and then wwwroot and enter web.config from here.

Start editing it.



32.In web config, please delete the following section:

    <plugins>
<plugin-loader.directory path="/Extensions">
      <load-packages>
      <package name="standard"></package>
      <package name="search-db"></package>
      <!-- 
        <package name="search-solr" user="" pass="" url-to-core="" ></package>
      -->
      <!--
      <plugin alias="job.security-group-sync-source" name="ad-sync" ></plugin>
      <plugin alias="security-group-sync-source.active-directory" ></plugin>
      <plugin alias="job-host" name="ad-sync-host" background="true" options="repeat wait_after(60s) catch log_time(debug)">
         <job name="ad-sync" ></job>
      </plugin>
       --></load-packages></plugin-loader.directory> 
</plugins>



Add there such a section instead:

 <plugins>
<plugin-loader.directory path="/Extensions" />
       <plugin alias="plugin-loader.directory" path="/Extensions" />
      <plugin alias="security-group-sync-target.sharepoint" attach-on-group-create="true" />
      <plugin alias="security-group-sync-target.sharepoint-external-site-collection" />
      <plugin alias="docsource.sharepoint">
   <event-listener type="soap11" link="documents">
      </plugin>
      <plugin alias="clean-layouts-on-board-remove" />
      <plugin alias="add-sharepoint-login-to-public-board" />
    <plugin alias="plugin-config-executor.multiplex-config" user="SolrAdmin" pass="SolrAdminPassword" allow-all-certificates="true" url="https://YourServer:10080/solr/CoreName">
        <plugin alias="search-docs.solr" />
        <plugin alias="search-cards.solr" />
        <plugin alias="search-boards.solr" />
      </plugin> 
    <plugin alias="users-source.sharepoint" />
</plugins>


Apply there your port address (SOLR URL), administrator name and password. 

example:

<plugin alias="plugin-config-executor.multiplex-config" user="SolrAdmin" pass="SolrAdminPassword" allow-all-certificates="true" url="https://YourServer:10080/solr/CoreName">
        <plugin alias="search-docs.solr"></plugin>
        <plugin alias="search-cards.solr"></plugin>
        <plugin alias="search-boards.solr"></plugin>
        <plugin alias="search-users.solr"></plugin> 
      </plugin> 

Save these changes.



33. Go back to the wwwroot folder and check if the Extensions folder has all plugins needed for KanBo Search.



 34. Go to Kanbo.log to see if SOLR plugin is working properly.

2018-02-07 02:06:36,480 Plugins         DEBUG | plugin 20000000-0000-0000-0000-000000000001(Solr Cards Search): Ok! 
2018-02-07 02:06:36,480 Plugins         DEBUG | plugin 20000000-0000-0000-0000-000000000002(Solr Documents Search): Ok! 
2018-02-07 02:06:36,480 Plugins         DEBUG | plugin 20000000-0000-0000-0000-000000000003(Solr Boards Search): Ok!



35. As for the last step, you can check if search works properly in your KanBo. Try to search for a common card and document name in your KanBo.


You should be able to find Cards and Documents.



Go also to the Discover Boards section and start looking for an existing Board.





This article was helpful for 1 person. Is this article helpful for you?