I was playing around with Sitecore Azure Module last week and would like to share my experience to get the site up and running.
I am using Sitecore 8.0 version, WFFM and EXM modules. Obviously you would need the Sitecore Azure module to help you setup the content editing and content deliry farm.
- Sitecore 8.0 rev. 160115 (8.0 Update-7)
- Sitecore WFFM rev. 151127 (Update-6)
- Sitecore EXM 3.1 rev. 151213 (3.1 Update-2)
- Sitecore Azure 8.0 rev. 150522
The target Azure setup would be
- 1CM and 1CD server in the same data center, in my case I create the farms in the Singapore data center as it’s the closest one for me
- Sharing the same databases for CM and CD; core, master, web, reporting. In the case of CD it will not have a reference to master and reporting
- xDB cloud will not be used, instead MongoDB databases will be created using the free 500MB databases from http://mongolab.com
Before proceeding you would need an Azure Subscription in order to be able to create the necessary VM/Cloud Service, if you’re like me and just want to try out the Sitecore Azure Module you can sign up for a free trial for one month.
Installation
- Install Sitecore 8.0 rev. 160115, I prefer to use SIM tool to do this but you can use your own preference
- Install Sitecore WFFM rev. 151127 (Update-6)
- Install Sitecore EXM 3.1 rev. 151213 (3.1 Update-2)
- Install Sitecore Azure Module
In the installing Sitecore Azure Module article above, it also explain about how to deploy to Azure to setup a Editing Farm and Delivery Farm which seems to be easy and straightforward. However I encountered some issues while trying to deploy to Azure.
Issues when deploying
Error saying that the storage account already exist in Azure
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
ManagedPoolThread #16 16:21:32 ERROR Sitecore.Azure.Pipelines.Automation.Azure.Storage,Sitecore.Azure,Process Exception: System.Exception Message: Job started: Automation|Sitecore.Azure.Pipelines.Automation.Azure.Storage is failed|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sitecore.Azure.Exceptions.ManagementApiRequestException: REST REQUEST FAILED : Request: https://management.core.windows.net/6d970697-8920-4807-8424-6f44bfee9e22/services/storageservices Server response = <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>ConflictError</Code><Message>The storage account named 'campaignmanagevalsasc6d9' is already taken.</Message></Error> ---> System.Net.WebException: The remote server returned an error: (409) Conflict. at System.Net.HttpWebRequest.GetResponse() at Sitecore.Azure.Managers.HttpGatewayManager.GetHttpResponse(String uri, String httpMethod, String versionXMsVersion, String body) --- End of inner exception stack trace --- at Sitecore.Azure.Pipelines.Automation.Azure.Storage.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) at Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) at Sitecore.Azure.Managers.PipelineJobManager.Worker(Pipeline pipeline, PipelineArgs pipelineArgs) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Jobs.Job.ThreadEntry(Object state) |
The storage account service name must be unique in Azure across subscriptions, meaning that it has to be unique not only for you and for other subscriptions in the Azure as well. To fix this you can go to /sitecore/system/Modules/Azure/[project_name]/[region_name]/Editing01/Storages/Default and update the Service Name field.
Error saying that the database server already exist
1 2 3 4 5 6 7 8 |
Exception: Microsoft.SqlServer.Management.Common.SqlServerManagementException Message: Trying to create new server from a database that alreay has a database server. New server name 'kbp8mkulvg' is not the same as existing 'zwzlztyz1j' Source: Sitecore.Azure at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(String subscriptionID, AzureSqlDatabase database, String login, String password) at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(AzureSqlDatabase azureSqlDatabase, String login, String password) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.ResolveServer(AzureSqlDatabase azureSqlDb, List`1 resolvedServers, Dictionary`2 preferServer) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) |
Solution:
In the /sitecore/system/Modules/Azure/CampaignManagement-Evaluation/Southeast Asia/Editing01/Sql01 “Server Name” field empty the value. And then clean the unused Azure SQL database server.
Error saying that the vmsize does not exist
Solution:
This is because the vm tier name has been changed by Microsoft, which originally was D3 is now has been updated to Standard_D3. To fix this you would need to update the /App_Config/AzureVendors/Microsoft.xml
1 |
<size sortorder="14" value="Standard_D3" cores="4" siteStorageSize="180">D3: 4 cores / 14 GB RAM</size> |
With the free trial subscription you might encounter an issue when the Sitecore Azure Module tries to create the database in SQL Database S2 tier
1 2 3 4 5 6 7 8 9 10 11 |
Exception: Sitecore.Azure.Exceptions.ManagementApiRequestException Message: REST REQUEST FAILED : Request: https://management.core.windows.net:8443/6d970697-8920-4807-8424-6f44bfee9e22/services/sqlservers/servers/tmapl7ndqr/databases Server response = <Error xmlns="Microsoft.SqlServer.Management.Framework.Web.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>The operation is not supported for your subscription offer type.</Message><InnerError><Message>The operation is not supported for your subscription offer type.</Message><InnerError i:nil="true"/><SqlErrorCode i:nil="true"/><Severity i:nil="true"/></InnerError><SqlErrorCode>40827</SqlErrorCode><Severity>16</Severity></Error> Source: Sitecore.Azure at Sitecore.Azure.Managers.HttpGatewayManager.GetHttpResponse(String uri, String httpMethod, String versionXMsVersion, String body) at Sitecore.Azure.Providers.AzureSQL.AzureSqlProvider.CreateDatabase(String subscriptionId, String serverName, String databaseName, String edition, String serviceObjectiveId, Double maxSize) at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDatabase(DatabaseReference databaseReference) at Sitecore.Azure.Retryer.Retryer.ExecuteNoResult(Action action, Action recover) at Sitecore.Azure.Pipelines.DeployDatabase.CreateDatabase.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) |
Solution:
To fix this you can temporarily change the /sitecore/system/Modules/Azure/[project-Name]/[region_name]/Editing01/Sql01/Set01/[database_name] Tier field and change it to “Basic – Basic”. This could also be caused by the database size Sitecore Azure Module requested to be created is not supported by the free trial subscription, I haven’t tested this however if you would like to try it yourself then update the /App_Config/AzureVendors/Microsoft.xml change the
1 |
<size default="true">250 GB</size> |
to something smaller, say 100GB or 10GB
Another issue when trying to create the Cloud Service
Solution:
This issue seems to be related to the siteStorageSize configuration in /App_Config/AzureVendors/Microsoft.xml. I was trying to create a D3 instance which has the default size of 180GB, reducing the value to 10GB or more seems to do the trick
1 |
<size sortorder="14" value="Standard_D3" cores="4" siteStorageSize="150">D3: 4 cores / 14 GB RAM</size> |
Some reference links that might helps: