Updating KanBo to No Instances version (KanBo 2.7) when you have 2 or more Instances on Azure

In case you have many KanBo instances, you can migrate each instance to become a stand-alone KanBo Web Application with only one Content Database. All important information about your KanBo will be located only in the Content Database and the Profiles and Instances database won't be needed further.

I Prerequisites

1. Downloading the deplyment tool from LINK
2. Unziping the deployment tool and moving it to a specified location on a Virtual Machine.
Example: C:\DeploymentTool
3. Making backups of KanBo package and databases.
See the manual for backup here.

II Preparing KanBo Web Applications/Sites.

1. In case you have 2 or more instances you should prepare as many Web Apps on Azure as the number of instances you have. Please keep in mind that you can reuse one existing KanBo Web App for the first instance and create a new Web App for the next Instances.
In case when you have one KanBo Web Application containing 2 instances, you can keep the existing KanBo Web App. You must create a new Web App for the upcoming second KanBo which will be yet created.

Creating a Web App

1. First of all, we need to start with creating a new Web App on your Azure. It will be used to host the application.
Go to your Azure management page, click on +New and search for Web App.
Full KanBo installation on Office 365 SharePoint Azure Microsoft
2. Choose a Web App.
Full KanBo installation on Office 365 SharePoint Azure Microsoft
3. Click on "Create button".
Full KanBo installation on Office 365 SharePoint Azure Microsoft
4. Provide the name url of your second Web App, in our case it will be "kanboinstance2".
Choose your Subscribtion, Resource Group (create new and name it "Kanbo") and choose the App Service plan/location. Select OS as Windows.

Configuring the new Web App

5. After the page has been created, we need to change some settings. Click on  App Services icon on the left pane and search for your application. Click on your page to navigate to its options.
6. After the page has loaded, scroll the menu down and click on the "Application settings". You will see the configuration screen, find the Web Sockets option and turn it on. Save your changes.
7. In certain cases, new SSL certificates and domains will be needed for the freshly created Sites - only if you want to have custom names for your KanBo sites which are hosted on Azure. In this case you will need a new SSL certificate and domain for the second KanBo Web App.
8. In conclusion you should have 2 Web Apps on Azure - first is the existing KanBo with 2 instances and the second is now empty.
9. Enter the freshly created Web App and navigate to https:{Your Web App Name}.scm.azurewebsites.net or go to Advanced Tools -> Go.
10. Now select Debug Console -> Powershell and move to folder Site -> wwwroot.
11. Copy all files from the original KanBo package (in our case it will be from kanboinstance.azurewebsites.net wwwroot folder).
Download the wwwroot folder from the old KanBo into a .zip file.
Now drag and drop your .zip archive into left upper part of KUDU service.

III. Adjusting KanBo.app on Sharepoint

1. Now we need to switch to SharePoint where your KanBo.app has been installed on 2 Site Collections.
KanBo.app on the 1st Site Collection is made for one of the Instances and KanBo.app on the 2nd Site Collection is made for the Second instance.
Please make sure you have the tenant administrator rights on your Office 365 and Owner rights on Site Collections in SharePoint.
2. Please go to the Site Collection where the 2nd KanBo.app is added.
In our case the first KanBo.app is installed on https://mykanboapp.sharepoint.com/sites/kanbo1 and the second is installed on https://mykanboapp.sharepoint.com/ so we will go to it.
3. Add /_layouts/15/appregnew.aspx to the Site Address. In our case it will be https://mykanboapp.sharepoint.com/_layouts/15/appregnew.aspx
4. We need to register a new KanBo.app once again. 
Follow these rules:Client ID - generate it
Client Secret - generate it
Title: KanBoApp 
Domain: YourSiteAddress.azurewebsites.net
Redirect URI: https://yoursiteaddress.azurewebsites.net/pages/default.aspx 
5. Once it is ready, click on Create. Please notice it's very important to copy all values above to notepad or any other text editor for the upcoming procedure.
6. Move to the web.config of your KanBo (in the Kudu Services, i.e. https://kanboinstance2.scm.azurewebsites.net/DebugConsole/?shell=powershell -> site -> wwwroot). 
In the following section, add your freshly generated Client Id and Client Secret. Save the change.
 <!-- <o365> -->   <provider id="sp" type="Sharepoint" clientId="YOUR CLIENT ID" clientSecret="YOUR CLIENT SECRET"></provider>   </provider>    <!-- </o365> -->
7. Download the KanBo.app. 
8. First of all change the extension of the KanBo.app to .zip so that it is KanBo.zip. When it is done, open the .zip file(do not extract it!) and open AppManifest.xml. It should be opened in a new window of a text editor (f. ex. Notepad, Wordpad).
9. Change the following in the AppManifest.xml:
  1. Change the Product ID to a randomly generated GUID.
  2. The <StartPage> section: change every single address so that it points to your site where KanBo is hosted, HTTPS is important. Replace url.placeholder with adres of your KanBo IIS.
  3. <RemoteWebApplication> section, change the ClientIdPlaceholder, so that it is the same as the ID you’ve previously generated while registering the app in SharePoint.
10. After the changes have been made, save the file, allow the .zip file to update, and change the file extension back to .app so that it is KanBo.app again.
11. When you are done with changes in the KanBo.app file you can upload it to the App Catalog. Navigate to your app catalog, choose Apps for SharePoint, upload the KanBo.app file there. (See more here).
12. In the app catalog, navigate to the "Distribute apps for SharePoint" and upload there our freshly modified KanBo.app file:

Do not install KanBo in AppCatalog! Please do it on the Site Collection.
13. Add KanBo to your Site Collection.
Do not use system account! Use tenant admin account instead-http://www.codeproject.com/Articles/808291/Sorry-only-tenant-administrators-can-add-or-give-a
Navigate to the site collection, click on add an app:
14. Find KanBo on the list of the apps you can add and click on it to install it.
15. You will have to click on "Trust" when asked if you trust the app. After a couple of seconds you should see the app installed and ready to use. Before navigating to the app please click on the app details to be sure that no errors occurred during the installation process.If no errors occurred you can click on the app to navigate to it.
You might find yourself not able to add this app.
16. To solve this issue, simply click Find out why link. After you enter the next site, please click Request Approval link.
Simply send it by pressing Request. You don't need to type any text into white area.
17.At https://YOURNAME.sharepoint.com/sites/appcatalog/AppRequests/ActiveRequests.aspx you might find your pending request for KanBo app approval. Approve it to move forward.
Go to your Site collection -> Settings -> Add an app.
Click on KanBo app tile.
After clicking Trust it button or solving App Request problem and then clicking Trust It button, KanBo app will be added to your Site Collection. It takes 10-30 seconds depending on the current load of Office 365.
18. KanBo will be added in a couple of minutes to your Site Collection. Don't click on it for now.

IV. Splitting your KanBo 2 Instances into stand-alone Web Apps using Deployment Tool

1. Download both KanBo packages from Azure - click on download button for the wwwroot folder.
2. Move package from the first existing KanBo to a Virtual Machine where KanBo is installed (to a specified location.) Unzip it.
3. Go to your server where KanBo is installed. Enter the folder with Deployment Tool.

4.. Open PowerShell by running it as administrator.
5. Open your KanBo folder location by using the following script. Replace folder name with a name of folder with original KanBo package. In our case it will be mk.
mkdir \YourFolderName
and then,
cd \YourFolderName
6. Download the most recent KanBo package to your server by using the following script.
Ask us for the address to download these files.
Please make sure that your server has a connection to the Internet.
(New-Object System.Net.WebClient).DownloadFile("https://address/KanBoNightly.zip", "$(pwd)\web.zip")
7. Change the path to your Deployment Tool local path and  the following script to connect to the Deployment tool.
new-alias kanbo c:\DeploymentToolPath\kanbo
8. Step Migrate configuration of your KanBo web.config by filling in the address of Kanbo folder and executing the following script:
kanbo migrate-config C:\Your KanBo Folder Path\web.config
9. Now use the following script to set new KanBo package.
kanbo set-package-zip web.zip
10. As a result, you will get a folder KanBoAzure, containing deploy.config and web.zip.
Deploy.config file contains all information from the web.config of your KanBo Instances.
Web.zip contains the KanBo 2.7 package.

11. Open deploy.config and web.config from the extracted web.zip package.
You would have to adjust KanBo web.config to data from the deploy config.

12. Firstly, delete this section from the web.config.

13. Copy the Client Id, Client Secret and spHost URL in the following values in the web.config from deploy.config ( the first opened doument is deploy.config, second is web.config).

14. Compare the following <app settings> and change them if needed.

15. Copy the connection string value into web.config.
16. Now you can delete entire content of the wwwroot package on your Azure Kudu service site. (i.e. https://kanboinstance.scm.azurewebsites.net/DebugConsole/?shell=powershell -> site -> wwwroot).
17. Create an archive .zip file from the Web package and download it to Azure.
Now drag and drop your .zip archive into left upper part of KUDU service.
18. Repeat these steps for instance 2. 
This time take values from the second part of the deploy.config which is pointing to instance 2.
Important  - this time make sure you add a new Client ID and Client Secret to web.config - ones which have been generated  in steps from section "Adjusting KanBo.app on SharePoint".
19. Please visit UpgradeDatabases.aspx page to fire upgrade scripts on KanBo databases. You can do it by entering the following URL address:
/Pages/UpgradeDatabases.aspx just after first part of your KanBo IIS URL. Please make sure to turn on your KanBo Web App on Azure on II Site before entering this page.
An example:
If your URL is https://oc-kanbo.azurewebsites.net/intranet/1# (remove bolded part of URL) your address to upgrade page will be https://oc-kanbo.azurewebsites.net/Pages/UpgradeDatabases.aspx
https://YOUR KANBO NAME.azurewebsites.net/Pages/UpgradeDatabases.aspx
When upgrade of databases is complete, you will see the following communicate:
You can see the entire log of the Migration in the kanbo.log.

20. Now enter your KanBo site. Please adjust the address and remove the last section of the address (intranet/1).

If you address was https://mykanbo.azurewebsites.net/intranet/1, now it will be https://mykanbo.azurewebsites.net/.
21. You will be redirected to Setup. Click on Automatic Setup.
In couple of seconds, you will be presented with your KanBo ID. Send this ID to us, so we can generate a license for you.
22. When you receive a license for your new KanBo ID, add it to your web.config (in Azure Kudu Service) in the following section.
 <add key="KanBoLicenseKey" value="{LICENSE KEY}" />
23. Go to KanBo Setup once again, select Advanced and hit KanBo ID. 
Once it appears, click on License Status. You should see information regarding the license on the right.
24. Click on Exit to go back to your KanBo.

Repeat the steps above for the second instance.

Updating KanBo Search Component

1. KanBo Search Component's core must be updated in order to work fine with the recent KanBo update.

See the manual for updating the Search's core here.

2. Open the web.config and update entry for the Search.

  • Find the <plugins> section
  • Add or adjust the following entry (you can copy it from the old web.config and make adjustments - only the url changes as the core's name is added to it).  
<plugin alias="plugin-config-executor.multiplex-config" user="{SOLRUserName}" pass="{SOLRUserPassword}" 
allow-all-certificates="true" url="https://{SOLRUrl}:{SOLRport}/solr/{YourSOLRCoreName}">
   <plugin alias="search-docs.solr" />
   <plugin alias="search-cards.solr" />
   <plugin alias="search-boards.solr" />

Is this article helpful for you?