Kentico CMS 7.0 Windows Azure Deployment Guide

Configuring external services

Configuring external services

Previous topic Next topic Mail us feedback on this topic!  

Configuring external services

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

By default, external Windows services that come with Kentico CMS do not run in the Azure environment. However, you can make a few adjustments to the Visual Studio project to make the services work. After performing the steps described in this topic, the services - Scheduler and Health monitor - will run as part of the Smart search worker role.

 

To enable external services on your Azure application, follow these steps:

 

1. Open the ServiceDefinition.csdef file and uncomment the following code:

 

<Startup>

   <Task commandLine="InstallService.cmd" executionContext="elevated" taskType="simple" />

</Startup>

 

2. Open the InstallService.cmd file from the SmartSearchWorker project and on the following line replace <YourAppGuid> with the value of the CMSApplicationGuid key. You can find the key in the appSettings section of the Web.config file in the CMSApp project.

 

SET _guid=<YourAppGuid>

 

For example, if the CMSApplicationGuid key looks like this:

 

<add key="CMSApplicationGuid" value="77b0671d-ed31-4679-9bd3-fce7e245d591" />

 

... then the appropriate line in the InstallService.cmd would look like this:

 

SET _guid=77b0671d-ed31-4679-9bd3-fce7e245d591

 

3. The InstallService.cmd script creates a user with administrator rights on your Windows Azure machine, which will then register the services. Therefore, you need to choose a password for the new user and insert it into the script file.

 

SET _adminPassword=<YourPassword>

 

4. Open the Visual Studio's Properties Window (by selecting View -> Properties Window in the main menu or by pressing F4) and set the Copy to Output Directory property to Copy always for the following two files (both are located within the CMSApp project):

 

App_Data/CMSModules/WinServices/services.xml

Web.config

 

The solution is now ready to be deployed to the cloud. Once the application is deployed and starts for the first time, the InstallService.cmd script will register the services into the system. You will then be able to manage them via remote desktop.