Geeks With Blogs

News





The SharePoint Hillbilly Fewer Big Words... More Pretty Pictures...

 

Application deployment in SharePoint is a broad topic with many options. It is extremely important to set standards in your organization for application deployment in SharePoint that are straightforward and reproducible in order to make deployment successful and repeatable. A proper deployment also lends itself to ease of maintenance of deployed applications. After giving the issue a lot of thought, research, and talking to people who know more than me, I decided to detail recommended strategies for deploying various applications into a production SharePoint environment.

So, why bother?

The objective for setting forth deployment standards in your organization is to provide guidance to developers and administrators and set expectations about SharePoint Deployment. Some Key objectives:

  • · Set realistic expectations - SharePoint application deployment is never a one-step process. You can’t just copy files over and be done with it.
  • · Document the process – Because multiple steps are involved in a SharePoint deployment it is important to document the deployment steps in a way that is understandable to both developers and administrators.
  • · Package where possible – Part of a successful and repeatable deployment strategy is to create packages where possible that can be deployed instead of manually creating items as part of the deployment process.
  • · Improve upon the process – As your organization becomes more adept at SharePoint application deployment you will be able to streamline the process allowing deployments to take place in fewer steps.


What steps might I take during a deployment?

There are multiple steps that may or may not take place when deploying an application in SharePoint. The following table details many of the various steps.

Step #

Description

Details

1

Create Web Application

In Central Admin or STSADM

2

Create Site Collection

In Central Admin or STSADM

3

Extend Site Collection

In Central Admin or STSADM

4

Deploy Themes

STSADM command with WSP file

5

Deploy MasterPages

STSADM command with WSP file

6

Deploy Custom Web Parts

STSADM command with WSP file

7

Upload Site Template

in SharePoint Site Collection

8

Create Site Using Site Template or Create Blank Site

in SharePoint Site Collection

9

Create or Deploy Lists / Libraries

In newly created site. Ideally lists will be deployable WSP files or part of site template, but may need to be manually created in some instances

10

Publish InfoPath Forms

In Central Admin if Admin approved, otherwise just publish to forms library

11

Deploy Custom Workflows

STSADM command with WSP file

12

Build Pages using created lists and deployed web parts

As time goes on, these pages will be part of deployable packages or part of the site templates. To start off though they may need to be put together manually.

13

Set Up Security Groups

in SharePoint Site

14

Configure navigation for accessing newly created site accordingly

This could involve modifying an XML file or modifying Navigation in SharePoint or even a third party solution

 

There are many options when it comes to SharePoint Application Deployment. Unfortunately, many of the options are not great and end up being “Developing in Production”.

The most common SharePoint Deployment strategies involve using SharePoint Designer and publishing SharePoint sites with SharePoint Designer. This may work fine for smaller implementations and indeed seems ideal for an initial deployment, however many problems emerge when maintenance has to be done on an application deployed using SharePoint Designer. Among these problems:

  • · Any sort of republish of a site with SPD overwrites list data
  • · Modifications have to either be done in production or on a copy of the site.
  • · If changes are made on a copy of the site, newer data will be lost when the changes are republished.
  • · SPD Workflows cannot easily be modified in Development environment and individually redeployed.
  • · Using SPD to maintain pages breaks SharePoint’s “ghosting” feature.
  • · Using SPD on a production server is equivalent to “developing in production” and can bring down a site if a mistake is made.

So, how should your organization handle SharePoint Application Deployments? A recent conversation with a SharePoint guru indicated that if 50% of your application deployment was made up of deployable packages then you would be ahead of 90% of the companies using SharePoint. I think 50% is an achievable goal and most organizations should endeavor to reach it.

An ideal SharePoint deployment would be 100% deployable packages and the only steps a SharePoint administrator would have to do are:

  1. 1. Deploy Features
  2. 2. Create Site
  3. 3. Configure Security

Although ideal, this option is generally not realistic with the maturity of the SharePoint team of most organizations and in some cases is overkill (i.e. if it would take much longer to create everything as deployable packages than to just put the parts together manually). As SharePoint developers gain more experience and develop a set of internal templates they use daily, this ideal scenario becomes more plausible.

Deployment Types with Sample Deployment Scripts:

When creating deployment scripts for your SharePoint application it is important to note that not every deployment script will be the same. Steps in a deployment script can vary widely based upon a number of factors. It is not realistic to attempt to create one deployment script template that will be the basis for all deployments. Things that can affect deployment scripts:

  • · Logical placement of application in production
  • · Size of application
  • · Customization level of application
  • · Number and types of features to deploy
  • · Security (AD, FBA, Anonymous, etc)

That being said, deployment scripts can be expected to fall into one of three main types. These types are described in detail below.

No Custom Development or No Template Deployments

Some sites may have no customizations, templates, or deployable packages. This means that all of the functionality for the deployed sites would need to be re-created in the production environment. Although at first glance this may seem pretty severe, it is the most common SharePoint Deployment strategy and builds upon one of the Strengths of SharePoint (rapid application development and deployment). Problems arise, however, when these applications must be modified or maintained. All changes have to be done in production or on a backup of the site which can cause data to be lost when the backup is restored into production. Again, maintenance may not be an issue for more simple sites as changes may also be kept simple. SharePoint Designer Deployments also fall into this category. Reasons for having no custom development or templates include:

  • · Lack of experience of development team (don’t know how to create package “x”)
  • · Time to create deployable packages is much greater than just building the site with a good deployment script
  • · Site is based upon an existing template already in production (i.e. Team Site)
  • · Site was designed and developed in SharePoint Designer

Below is an example Deployment Script for a site with no custom development or templates.

Step

Description

1

Upload the Site Template “x.STP” to the site collection http://url.com/path/sitcol

2

Create a new site called “Site Name” under the Site http://url.com/path/sitcol using the template uploaded in Step 1

3

Upload data connection files in Central Administration

 
  • - Give location of files (drive or attached to script)
  • - Click on ‘Manage Data Connection Files’ under Application Management in Central Admin.
  • - Upload data connection files.
  • - Specify the correct category when uploading the files.

4

Install the form template in Central Administration.

 
  • - Click on ‘Upload form template’ under Application Management in Central Admin.
  • - Give location for form

5

Activate the form template to the appropriate site collection

6

Set up security groups in Active Directory (this assumes you are handling users security in AD and only specifying AD groups in SharePoint, not a bad idea for maintenance)

7

Set up permissions for site using groups created in Step 6

 

Mixed Deployments

A “mixed” deployment script contains non-customized items and customized deployable packages. At first glance the no custom deployment process may seem more desirable; however with this deployment script you get the advantage of maintainability around your workflows. The workflows deployed in the following script may be modified and redeployed to the site without affecting the rest of the site. This gets us closer to our goal of having all modifications occur in a development environment, tested in a QA environment, and then deployed in production. The reasons for a “mixed” deployment:

  • · Lack of experience of development team (don’t know how to create package “x”)
  • · Time to create deployable packages is much greater than just building the site with a good deployment script
  • · Site is based upon an existing template already in production (i.e. Team Site)
  • · Site was designed and developed in SharePoint Designer

The following steps are approximate steps that would need to take place to deploy the same application as the previous script using a mixed deployment scenario.

Step

Description

1

Upload the Site Template “x.STP” to the site collection http://url.com/path/sitcol

2

Create a new site called “Site Name” under the Site http://url.com/path/sitcol using the template uploaded in Step 1

3

Upload data connection files in Central Administration

 
  • - Give location of files (drive or attached to script)
  • - Click on ‘Manage Data Connection Files’ under Application Management in Central Admin.
  • - Upload data connection files.
  • - Specify the correct category when uploading the files.

4

Install the form template in Central Administration.

 
  • - Click on ‘Upload form template’ under Application Management in Central Admin.
  • - Give location for form

5

Activate the form template to the appropriate site collection

6

Install the workflow solution package

 
  • - Give location of workflow.wsp file(s)
  • - Open a command prompt and navigate to 12 hive:  c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin
  • - Enter the following command: stsadm –o addsolution –filename

7

Deploy the workflow package from Central Administration – Operations – Solution Management

8

Go to Site Collection Features to activate the solution package (name of workflow)

9

Associate the workflows with the correct list/library

 
  • - From Library/List Settings, select Workflow Settings
  • - Click Add a workflow
  • - Select ‘name of workflow’ from the list
  • - Type in name of the workflow
  • - Set this workflow to be manually started by an authenticated user with Edit Items Permissions, click ok
  • OR
  • - Set this workflow to be started when a new item is created (make sure to remove the checkbox from Allow this workflow to be manually started by an authenticated user with Edit Items Permissions, click ok
  • OR
  • - Set this workflow to be started when a new item is modified(make sure to remove the checkbox from Allow this workflow to be manually started by an authenticated user with Edit Items Permissions, click ok

10

Set up security groups in Active Directory

11

Set up permissions for site using groups created in Step 10

 

Custom Development Deployments

In an ideal world every aspect of deploying a site would be done with packages. The packages would be deployed to an appropriate location and the site created. As stated earlier, if you get 50% of your deployment to be packages you are ahead of 90% of the companies out there, so having deployments that are entirely package based may not be attainable, but should be strived for none the less.

Below is a deployment script for the same application deployed in the previous scripts but is entirely made up of packages. Steps 1,2, and 3 are the main difference between the previous script. The Site Definition will be created as a deployable package adding another level of maintainability from previous deployment script.

Step

Description

1

Deploy the Site Definition “x.WSP” to the site collection http://url.com/path/sitcol

2

Create a new site called “Site Name” under the Site http://url.com/path/sitcol using the site definition deployed in Step 1

3

Deploy data connection files (thanks to Corey Roth for showing how to do this:)

4

Install the form template in Central Administration.

 
  • - Click on ‘Upload form template’ under Application Management in Central Admin.
  • - Give location for form

5

Activate the form template to the appropriate site collection

6

Install the workflow solution package

 
  • - Give location of workflow.wsp file(s)
  • - Open a command prompt and navigate to 12 hive:  c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin
  • - Enter the following command: stsadm –o addsolution –filename

7

Deploy the workflow package from Central Administration – Operations – Solution Management

8

Go to Site Collection Features to activate the solution package (name of workflow)

9

Associate the workflows with the correct list/library

 
  • - From Library/List Settings, select Workflow Settings
  • - Click Add a workflow
  • - Select ‘name of workflow’ from the list
  • - Type in name of the workflow
  • - Set this workflow to be manually started by an authenticated user with Edit Items Permissions, click ok
  • OR
  • - Set this workflow to be started when a new item is created (make sure to remove the checkbox from Allow this workflow to be manually started by an authenticated user with Edit Items Permissions, click ok
  • OR
  • - Set this workflow to be started when a new item is modified(make sure to remove the checkbox from Allow this workflow to be manually started by an authenticated user with Edit Items Permissions, click ok

10

Set up security groups in Active Directory

11

Set up permissions for site using groups created in Step 10

 

Caveat

One important note when creating deployable packages.  You’ll notice in that last script that the workflows were still separate packages to be deployed and not part of the same feature as the site definition.  This is important from a maintenance standpoint.  If you stick everything in one package it makes incremental updates on each web part, work flow, etc… more cumbersome.  So, don’t stick everything in one feature.  Make them dependent features instead.  You’ll thank me later.

Some important things to have in place before you begin

So, you are about to go and set up your deployment standards for your organization.  Here are a couple of things you need to have in place first:

  • · A well defined taxonomy needs to be in place before rigid deployment standards are enforced
  • · A back-out strategy in case an application needs to be un-deployed
  • · A maintenance strategy for future modifications to application
  • · Whoever is deploying the applications into production needs to be competent in SharePoint’s ins and outs and should not need handholding.

Also, some things you need to decide internally within your organization:

  • · What is the threshold for creating a package versus manually creating objects in SharePoint?
  • · What person / group is responsible for deploying applications?

Conclusion

These scripts are not meant to be the end of the conversation.  They can be improved upon for even more automation.  This is just to help get you started and help you understand what application deployment means in SharePoint.  Hopefully you learned something you didn’t know or maybe even had an “ah-ha!” moment.

Posted on Friday, June 12, 2009 1:28 PM | Back to top


Comments on this post: SharePoint Solution Deployment Strategies – Dare I say Best Practices?

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
Great post - I work for a professional consulting firm that specializes in SharePoint development and even we find it very difficult to manage these deployments simply because of the complexity and amount of testing required to get what should be fairly basic application changes into production. Your article is a great summary of the issue.
Left by Chris Woodill on Jun 21, 2009 10:07 AM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
I completely agree my friend. Thats why I invested so much of my time trying to find projects or programs which can help me streamline the process. By far the best one I found is a project on CodePlex called WSSDeploy. Very awesome if you ask me. Here is a link if you like: http://wssdeploy.codeplex.com/ What do you think?
Left by Monzer on Jul 06, 2009 2:44 PM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
I work for a small company that have a solution for all this issue, it not 75% or greater.
http://www.repliweb.com/products/ross/index.php
Left by steve nguyen on Jul 16, 2009 8:02 AM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
Nice article with a lot of information.
I totally agree with you, the way deployment of sharepoint applications are done into Production environment.
Thanks.
Left by Venkatesh on Jul 20, 2009 9:15 PM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
Lovely article,
Thanks for sharing your experience [:)]
Left by Rohan on Feb 24, 2010 12:36 AM

# web app deployment
Requesting Gravatar...
good. but i need to deploy the web application. help me please
Left by sathees on Apr 12, 2010 11:33 PM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
Maybe You will find this useful... a document with a couple of methods to deploy and package a SharePoint solution like webpart, infopath form or a workflow...

http://www.starsoft.com.pl/files/Starsoft%20SharePoint%20Competencies%20Center%20-%20MOSS%202007%20-%20Deployment%20&%20Packaging%20guide.pdf
Left by Michal Bojko on May 17, 2010 2:31 PM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
Hi,

@ Michal: the link you provided does not seem to be working giving 404.
Left by Pooja on Aug 30, 2011 4:10 AM

# re: SharePoint Solution Deployment Strategies – Dare I say Best Practices?
Requesting Gravatar...
very informative article ...thank you so much !
Left by salman on Apr 12, 2012 5:42 AM

Your comment:
 (will show your gravatar)


Copyright © Mark Rackley | Powered by: GeeksWithBlogs.net