Surendra Sharma

Surendra Sharma

Search This Blog

Sunday, September 4, 2016

Deployment platform for Sitecore - MAD

Attend webinar on “MAD deployment platform: effortless reliable and automated Sitecore deployments” by Hinnerk Backer, Director of Software Development in

Here are the key points from this webinar.

Deployment should be effortless, without manual intervention, automated, reliable, zero downtime, transparent, easy rollback. 

For any deployment one need to assemble their own process with deployment tools like Octopus, Sitecore Shipping items, TDS etc.

However there is one more complete deployment platform solution available for Sitecore - MAD.

MAD stands for Multi-Agency Deployment.

The MAD Philosophy
  • Proven, extensible deployment process based on Sitecore best practices
  • Declarative configuration
  • High level of transparency
  • Multi-agency support

Features of MAD
  • Fully automated deployments of files and Sitecore items
  • Easy web based configuration
  • Incremental deployments
  • Automated regression testing
  • Approval-workflows
  • Complete deployment history and rollback
  • Advanced management features
  • Extensibility API

Deployment of application modules

For deployment any module to server using MAD require need to submit module to MAD hub.

Developers/admin can directly upload modules by using web interface.

Developers can check-in their changes and Continue integration environment submit them to SERVER.

MAD service must be installed, configured and running on all the environment to the deployment.
Central service deployed modules and files on Integration Farm(CM), QA-FARM for sanity checks , LIVE FARM(CD).

Seamless deployment can be achieved by blue/green deployment pattern where One LIVE and one Offline site is available.

Nginx reverse proxy is used to switch the site in blue/green deployment pattern.

Both LIVE and OFFLINE site pointing to same Sitecore databases and available on IIS. Below is the procedure to deploy module by MAD which uses blue/green deployment pattern.

  • One should deploy new files on OFFLINE site.
  • Freeze live site
  • Deploy items and publish
  • Warmup
  • Switch reverse proxy
  • Offline LIVE site and make OFFLINE site to LIVE site.

MAD advanced Features for server management

  • Recycle App pol
  • Process dump
  • Rebuild search indexes
  • Run Sitecore jobs
  • IIS reset
  • Verification and repair of installed items and files

Please leave your comments or share this detail if it’s useful for you.

Sunday, August 28, 2016

Content migration guide for Sitecore

Content migration is itself a project within a project and luckily I was extensively involved on different projects where content migration is one of the most important story of the project.

In one of the Sitecore project, I developed lots of scripts to migrate over 500,000 records from different sources to Sitecore.

During these migration, I come across with different situations and found some most suitable way to deal with.

I tried to cover all such technics in this guide. Below are the key topics that I want to emphasized
  • Introduction
  • Questions for client
  • Data Mapping
  • Data Representation and Mapping
  • Source of Data
  • Data Migration Map
  • Why SQL Server
  • Guidelines for content migration resources and team
  • Images and Media
  • Sitecore Fields
  • Migration Code
  • Log Files
  • Code Technique
  • Testing

I tried my best to include all the scenarios that are associated with content migration.

You can read and download this white paper from here:

Please leave your comments or share this guide if it’s useful for you.

Friday, August 26, 2016

How to get media library extension and mime type programmatically in Sitecore

One of my colleague asked me that how to get extension of uploaded file in Sitecore media library programmatically?

Here are different pointers which may be useful for you while working with media library 

·         You can get media library item in LinkField type from Sitecore.Data.Fields namespace.

·         LinkField.TargetItem -> gives reference of media library item.

·         Sitecore.Resources.Media.MediaManager.GetMediaUrl(linkField.TargetItem) -> Return media links

·         By default, link extension is “.ashx

·         Get the extension and mime type of media library item by using below code

//Return extension like gif
string mediaItemExtension = linkField.TargetItem.Fields["Extension"].Value;

//Return mime type like image/gif
string mediaItemMimeType = linkField.TargetItem.Fields["Mime Type"].Value;

·         You can also view both of these fields in Sitecore content tree as

Media Item
Media item
·         Let me cover one important entry in web.config file for media library item extension.
      Indicating whether to include a file extension when generating an item name from a file name.
      Default value: "false"
<setting name="Media.IncludeExtensionsInItemNames" value="false"/>

·         As comments above explain that if you want to include extension in media item name then set this property as true and when you upload any file in media library for example “1.JPG” then after uploading, Sitecore give its name as “1 jpg” as shown in below image. By default this value is false and for uploading “1.JPG”, Sitecore name it as “1” as shown in first image.

Media Item with extension
Media item with extension

Please leave your comments or share these tip if it’s useful for you.