This post describe the
installation of Web Deploy and Configuration with Sitecore instance.
This post will be very useful if you want to sync your Sitecore
media items with all of the CD's environment (Distributed environment) . In one
of my previous project, I was keeping all the media items in file system and synchronizing
all the files from CM to Cd's server. This solution is tested with 1 CMS and 6 CD's
server (2-EU, 2- NA, 2- AP) with more than 5 Lakh files.
1. Software Pre-requisites
a. OS
– Window 7/ Windows Server 2008 R2 Enterprise
b. CMS
– Sitecore 8.0
c. WebDeploy_amd64_en-US.msi
2. Installation
Download the latest
version of web deploy installer for Windows (64bit) using the below link.
Follow below steps for installtion:
- Click on Download.
- In the File Download dialog box, click Run.
- In the Security Warning dialog box, click Run.
- On the Welcome to the Web Deployment Tool Setup Wizard page, click Next.
- On the End-User License Agreement page, select the I accept the terms in the license agreement box, and then click Next.
- On the Choose Setup Type page, click Complete.
For More Details Visit : https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd569059(v=ws.10)
Note : Install the WebDeploy on CMS and CD
environment. Create one local admin account for CMS
configuration. After installation Access the below url from CMS server. It will
prompt for user ID and password. Provide the admin user ID and password.
http://[ CDIPAddress]/ MsDeployAgentService
3. Configure Web Deploy With Sitecore
To configure Web
Deployment of file media from CM to CD, on the publishing instance or all CM
instances follow below steps.
1. In the /App_Config/Include sub directory,
rename the WebDeploy.config.example file to WebDeploy.config (remove the .example
extension).
2. In the
/App_Config/Include/WebDeploy.config file, configure parameters for the
/configuration/sitecore/events/event/handler element as follows:
<?xml
version="1.0" encoding="utf-8" ?>
<configuration>
<sitecore>
<!-- Read the Sitecore Scaling guide
(http://sdn.sitecore.net/Reference/Sitecore%206/Scaling%20Guide.aspx)
in its entirety before you configure
Web Deploy.
If you use Web Deploy to transfer file
media to a CD environment that uses DFS to synchronize those files,
change the Media.FileFolder setting in
the web.config file to the equivalent of /App_Data/Replicated/MediaFiles,
and configure Web Deployment for the
/App_Data/Replicated/MediaFiles subdirectory rather than the
/App_Data/MediaFiles subdirectory.
-->
<events>
<event
name="publish:begin">
<handler
type="Sitecore.Publishing.WebDeploy.PublishHandler,
Sitecore.Publishing.WebDeploy" method="OnPublish">
<synchronous>true</synchronous>
<tasks
hint="list:AddTask">
<default
type="Sitecore.Publishing.WebDeploy.Task">
<!-- Publish operation int
othe target database will trigger this deployment task. -->
<targetDatabase>web_na</targetDatabase>
<!-- Target server is
optional. If omitted, operation is performed on the local server. -->
<targetServer>sdc0na-iissc01</targetServer>
<!--
userName and password are optional.
If omitted, local user identity or
credentials saved in Windows
Vault will be used to connect to the server.
-->
<userName>sdc0na-iissc01\wdadmin</userName>
<password>wRSJd2Bf8S</password>
<!-- localRoot is optional. If
omitted, the website root is used. -->
<localRoot>D:\inetpub\wwwroot\WebDeployCMS\Website</localRoot>
<remoteRoot>D:\inetpub\wwwroot\WebDeployCDTest\Website</remoteRoot>
<!-- Paths, relative to the
localRoot, which will be deployed to the remote location. -->
<items
hint="list:AddPath">
<media>App_Data/Replicated/MediaFiles</media>
</items>
</default>
</tasks>
<tasks hint="list:AddTask">
<default
type="Sitecore.Publishing.WebDeploy.Task">
<!-- Publish operation int
othe target database will trigger this deployment task. -->
<targetDatabase>web_na</targetDatabase>
<!-- Target server is
optional. If omitted, operation is performed on the local server. -->
<targetServer>sdc0na-iissc02</targetServer>
<!--
userName and password are
optional. If omitted, local user identity or
credentials saved in Windows
Vault will be used to connect to the server.
-->
<userName>sdc0na-iissc02\wdadmin</userName>
<password>wRSJd2Bf8S</password>
<!-- localRoot is optional. If
omitted, the website root is used. -->
<localRoot>D:\inetpub\wwwroot\WebDeployCMS\Website</localRoot>
<remoteRoot>D:\inetpub\wwwroot\WebDeployCDTest\Website</remoteRoot>
<!-- Paths, relative to the
localRoot, which will be deployed to the remote location. -->
<items
hint="list:AddPath">
<media>App_Data/Replicated/MediaFiles</media>
</items>
</default>
</tasks>
</handler>
</event>
</events>
</sitecore>
</configuration>
Note :
1. Install
the weDeploy on CMS and CD both environment .
2. After
configuration upload some document using Sitecore in Media library and choose
as File Upload. Publish the Media and search in CD server of particular
media.
4. Useful Links
The Windows domain and
username of an account with permissions to modify the required file systems on
the remote server, such as DOMAIN\username (you can omit the domain for local
Windows accounts). Note Because of a bug in Web Deploy 2.0, the user must be
either the built-in Administrator or a member of the Domain Administrators
security group. The Sitecore reference number for the issue is 351405. For more
information about this requirement, see
http://learn.iis.net/page.aspx/1023/web-deploy-error-codes/.
Informative Santosh. Keep blogging.
ReplyDeleteThanks Satish.
ReplyDelete