How can we help you today?

Go ahead and ask us anything.

See the KanBo newest version.

Install Solr (KanBo Search) as a Web App on Azure

Last modified:

Installation steps 


1. Create a WebApp on Azure.

Go to App Services, then select +Add app service.

2. Set the following for your application:

- add a name for your application, 

- select the subscription, 

- OS: Windows,

- Publish: Code,

- Runtime stack: Java 8 (preferably 11),

- Java web server stack: Java SE,

- App service plan/location: select your app service plan.

Now click Create.

3. When the app is created, go Configuration -> General settings  Settings of it.


- Java 8 in Java version,
- Java 8 auto update in Java minor version,

- Java SE (Embedded web server) in Java Web container,

- Java SE (Embedded web server) in Java Web Server version,

- On in Web Sockets,

- On in Always On,

- Integrated w Managed Pipeline version,

- 1.1 in HTTP version.

Save these settings.

4. Make sure to add the Java_Home value inside of Configuration -> Application settings.

TIP: check your Java Home path in https:/{Your Solr Web App}

 Solr installation

1.Go to https://{Your Solr Web App Name} -> site, create a new folder and upload Solr there (drag&drop it to the right side of your Kudu browser.

2. In the wwwroot directory, add the following web.config.Web.config Adjust the Solr path inside.

3. Go back to your Solr installer directory.

Start editing the file KanBoSolrSetup.ps1. Adjust all information written in italic.

$keytoolPath = "C:\Java\jdk1.8.0_161\jre\bin\keytool.exe" - here change the path to your Java folder. On Azure, you can check this path at . Example: D:\Program Files\Java\jdk1.8.0_172\bin\keytool.exe.

$solrPath = 'c:\kanbo-solr'  - locaction where you want to put KanBo Search component files. Example: D:\home\site\wwwroot\solr
$solrVersion =  '8.6.2'

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

$solrCertificateCN = 'mysearch.local' # Ex. mysearch.local  - CN name of certificate in store
$solrKeyStorePassword = 'password' # Minimum 6 characters - certificate password
$valDays= 365 - days when your certificate will be valid

# Optional, $solrKeyStorePassword must be the same as the password for a pfx file that will be imported
$pfxPath = ""  - you can also specify a location for the certificate if you already have one and uploaded it to Kudu directory. 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.

4. Make sure to do the following modifications:

a)  uncomment InstallAzure and comment back Install at the botom of the script - 


b) In JAVA_HOME delete /jre - line 161

    pushd "$Env:JAVA_HOME\bin\"

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

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

# Values for the parameters below can be found in the web.config in the value of KanBoContentConnectionString
$serverName = '' #If there is a need to specify port please use the comma ex. serverName:1433

$database = 'KanBoContent...'  -The name of KanBo Content Database. You can find it in the value of the KanBoSqlConnectionString in web.config
$dbUser = 'username' - Add here a name of SQL database user.
$dbPass = 'password' - Add here a password for the user above

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

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

Make sure $solrVersion = '8.6.2' is like this.

6. Run the script KanBoSolrSetup.ps1.

Wait until it's finished.

7. Run the script AddCore.ps1.

Wait until it's finished.

8. Go to site -> wwwroot folder and edit the web.config. Adjust the path to your freshly created solr folder -> bin -> solr.cmd.

   <httpplatform processpath="%HOME%\site\wwwroot\solr\bin\solr.cmd" arguments="start -f -p %HTTP_PLATFORM_PORT%" startuptimelimit="20" startupretrycount="10" stdoutlogenabled="true" stdoutlogfile="%HOME%\LogFiles\solr.log">

9.  Now you can run solr with kanbo core. Enter https://{YOUR APP NAME} to access the admin panel and log in using your solr credentials.

10. Here you will see the admin panel of Solr.

11. .Enter the KanBo Core "KanBo" and run a data import to check the connection.

Create a crawl task

1. Download the Powershell script and .bat file from here:

2. Start editing the Powershell (ps1) script. 

Fill in the data: 

- {CoreName} - name of KanBo Core,

- {SolrAdminName} - Solr user account name

- {SolrAdminPassword} - Solr user account's password 

- {AzureAddress/Solr} - your Solr app address, example https://mykanbosolr.azurewebsi...

Save the script.

$solr = Create-SolrContext -core "{CoreName}" -user "{SolrAdminName}" -pass "rd}" -url "{Azureaddress/solr}"

You can also adjust this line to configure timing for the full crawl to be performed. In such entry, full crawl will run between 8PM and 9 PM, but you can se it accordingly to your needs (it should be time when no one is using KanBo).

if( $now.Hour -ge 20 -and $now.Hour -le 21) {
    Write-Host "Full crawl";
} else {
    Write-Host "Differential crawl";

3. Make a .zip file out of saved PowerShell script and .bat file.

4. Go to your Azure Web App and enter Webjobs.

5.Click on +Add.

6.. Configure the new job:

- Name: select a name,

- File upload: upload a .zip with .ps1 and .bat files.

- Type: Triggered,

- Triggers: Scheduled,

- CRON Expression:  0 */15 * * * * (meaning: after 15 minutes, you can change it to different frequency as a CRON Expression).

Save thre webjob.

7. Now you can monitor the performance of your Webjob in the Webjobs section.

Adjust KanBo web.config

1.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.

2. Delete the following entry from the <plugins> section. 

     <package name="search-db"></package>

3. Add the following section to the <plugins> section of web.config and just the following: your solr address, port, core's name, Solr administrator name and password. 


   <package name="search-db" />
<solr user="{SolrUser}" pass="{SolrPassword}" url="{https://SolrURL:Port/solr/{corename}" allow-all-certificates="true" />
<search-docs.solr />
<search-cards.solr />
<search-boards.solr />
<search-users.solr />
<search-desks.solr />
<user-update.solr />
<permission-update.solr />
<board-update.solr />
<homelayout-update.solr />
<card-update.solr />
<solr.detect-downstate />

Save these changes.

4. Make sure that httpruntime targetframework="4.6"

    <compilation targetframework="4.7" />
    <httpruntime targetframework="4.6" maxrequestlength="25165824" />
    <customerrors mode="Off" />
    <identity impersonate="false" />

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

 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!
2018-02-07 02:06:36,480 Plugins         DEBUG | plugin 20000000-0000-0000-0000-000000000003(Solr Users Search): Ok!

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

Try to find a user by his name in KanBo Search.

Go to Boards section and look for a Board.


If during dataimport you receive an error telling that Solr cannot find libs folder (in our case it is D:\home\site\wwwroot\solrinstall\server\solr\conf) , go inside your core and solrconfig.xml.

Make sure that these lines lead directly to the locations on your Azure directory.

Now restart the app on Azure and try dataimport again.

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