Monday, September 12, 2016

How to connect Sitecore 8.1 to Cloud 2.0


This guide works only for Cloud 2.0 since it is absolutely different from Cloud 1.0. 
All the provided in the article links are lead only to official Sitecore portals.

Here is an official Sitecore guide Connect to xDB Cloud 2.0. I will try to make it clearer.


1. Request a new Cloud set

First of all, you need to request creating a new Cloud 2.0 set for you. You can request it using Sitecore Support Portal.
Important note: you are not able to request a set for any Sitecore release. It works only for some releases and this could be changed anytime. This information is available here.
Support will provide you with the following connection strings:
  • analytics
  • tracking.live
  • tracking.history
  • tracking.contact
  • analytics.cloud.index
and with a Reporting Service configuration which looks like:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
   <httpTransportFactory patch:instead="httpTransportFactory" type="Sitecore.Cloud.Xdb.CloudBasedTransportFactory, Sitecore.Cloud.Xdb" singleInstance="true">
       <param desc="serviceUrl">URL</param>
       <param desc="certificateThumbprint">value</param>
   </httpTransportFactory>
</sitecore>
</configuration>


2. Configure Sitecore instance

You should properly configure your Sitecore instance. There are 3 possible Sitecore configurations:
  • Standalone Sitecore instance - when you have only one server which performs both of content management and content delivery roles. It is a default configuration out of the box. 
  • Content Management instance.
  • Content Delivery instance.

Standalone Sitecore instance

You need to have an out of the box configuration and then disable the following 11 files:
  1. /App_Config/Include/Sitecore.Analytics.Processing.Aggregation.Services.config
  2. /App_Config/Include/Sitecore.Analytics.Processing.Services.config
  3. /App_Config/Include/Sitecore.Analytics.Tracking.Database.ScaledCM.config (already disabled by default, just check)
  4. /App_Config/Include/Sitecore.MarketingProcessingRole.config (already disabled by default, just check)
  5. /App_Config/Include/Sitecore.PathAnalyzer.Processing.config
  6. /App_Config/Include/CES/Sitecore.CES.DeviceDetection.CheckInitialization.config (already disabled by default, just check)
  7. /App_Config/Include/ContentTesting/Sitecore.ContentTesting.Processing.Aggregation.config
  8. /App_Config/Include/ExperienceAnalytics/Sitecore.ExperienceAnalytics.Aggregation.config
  9. /App_Config/Include/ExperienceAnalytics/Sitecore.ExperienceAnalytics.ReAggregation.config (already disabled by default, just check)
  10. /App_Config/Include/ExperienceAnalytics/Sitecore.ExperienceAnalytics.StorageProviders.config
  11. /App_Config/Include/ExperienceAnalytics/Sitecore.ExperienceAnalytics.Reduce.config (important note: there is a documentation issue in the official guide - this file is also should be disabled)
The next important step is to enable a remote, dedicated Reporting Service server. If you experience any issues with Analytic reports, first of all, check these steps:
  1. enable the /App_Config/Include/Sitecore.Xdb.Remote.Client.config file
  2. disable /App_Config/Include/Sitecore.Xdb.Remote.Server.config (already disabled by default, just check)
  3. enable /App_Config/Include/Sitecore.PathAnalyzer.RemoteClient.config
  4. disable /App_Config/Include/Sitecore.PathAnalyzer.Services.RemoteServer.config (already disabled by default, just check)

Content Management instance

You should configure the server according to the official guide - Configure a content management server. A few notes:
  • Skip the Step 3: Configure database connection strings
  • Enable but don't change the Sitecore.Xdb.Remote.Client.config file
  • The guide contains a link to xDB Cloud configuration - skip it since it is related only to Cloud 1.0
  • if earlier your CM was configured like CM + Processing or CM + Processing or CM + Reporting + Processing, you need to reconfigure it again according to the Excel file from the guide. If you use Cloud, your Reporting and Processing servers will be at Sitecore end

Content Delivery instance

You should configure the server according to the official guide - Configure a content delivery server. A few notes:
  • The guide contains a link to xDB Cloud configuration - skip it since it is related only to Cloud 1.0
  • Skip the Step 4: Configure database connection strings


3. Cloud client upgrading

You must update the Cloud client to connect to Cloud 2.0 since it was released after Sitecore 8.1 Update-3. Here are your steps to do this:
  1. Download the Cloud client 2.0 here.
  2. Remove all the content of the \App_Config\Include\XdbCloud folder
  3. Install the downloaded package (Control Panel => Install a package). Choose to override all files.


4. Cloud Client configuration

  1. Copy the 5 provided by Support connection strings into the ConnectionStrings.config file: analytics, tracking.live, tracking.history, tracking.contact, analytics.cloud.index
  2. Remove the reporting connection string
  3. Open the \App_Config\Include\XdbCloud folder and enable 3 configuration files: Sitecore.Cloud.Xdb.config, Sitecore.ContentSearch.Cloud.DefaultIndexConfiguration.config, Sitecore.ContentSearch.Cloud.Index.Analytics.config
  4. Open the Sitecore.Cloud.Xdb.config one, remove its content and paste the  Reporting Service configuration which was provided by Sitecore Support or copy the serviceUrl and certificateThumbprint parameters.
Important note: it is correct that the new updated Sitecore.Cloud.Xdb.config file is smaller than the old one from Cloud 1.0.