Solutions and Features, STSADM export, the Content Deployment API – all can be used to move SharePoint site artifacts from one environment to another, and all have different capabilities and limitations. Failing to plan your deployment processes properly can add significant risk to a SharePoint development project, and in some scenarios the problems may only become apparent when initial development is complete and updates need to be released. In this session we’ll explore the nuts and bolts of each development/deployment approach, and you’ll emerge on a firmer footing in this complex area of SharePoint. We’ll also touch on 3rd-party tools which can help with the deployment puzzle, from Codeplex utilities such as the Content Deployment Wizard to emerging tools such as Kivati Studio.
Managing the SharePoint 2010 Application Lifecycle - Part 2
Approaches and Best Practices for Deploying SharePoint sites
1. Approaches and Best Practices for deploying SharePoint sites DEV212 Chris O’Brien - MVP
2. Ask The Experts Panel Text numbers 1. IT PRO – 07891 100640 2. DEV – 07790 108093 3. IW – 07790 132855 4. BA – 07989 359425
3. Chris O’Brien, MVP, MCSD.Net, MCTS www.sharepointnutsandbolts.com Hands-on developer Author of Content Deployment Wizard tool Regular speaker at UK user group
4. What we’ll cover Deployment goals and challenges Options: Deployment with Features STSADM export Content Deployment/Wizard Kivati Studio/code/PowerShell Considerations Best practices and guidelines
5. The challenge Most projects will use multiple environments (esp. WCM) Complex mix of .Net/SharePoint artifacts Files/assemblies SharePoint schema (e.g. content types, site columns) SharePoint content Configuration (e.g. web.config)
6. Deployment goals Repeatable Should always be able to rebuild from zero Predictable Acceptable packaging effort Automation scale Documentation is critical
9. Option 1: Features Pros Classic approach for rolling out functionality to multiple site collections Fairly rich framework/tools Can provision files as ‘uncustomized’ Cons Deals with schema only, not data Relatively steep learning curve Code often required for updates
10. Option 2: STSADM export Pros Very simple Moves site collections/web – data & schema Can be scripted Cons Doesn’t allow setting of certain switches All objects given new IDs – can break things ListView web parts, InfoPath connections etc. Bi-directional can cause problems
11. Option 2: STSADM export Other considerations: Is not backup/restore! Not deployed: Alerts Audit trail Change log history Recycle bin items Workflow tasks/state
13. Option 3: Content Deployment Wizard Pros Same deal as STSADM export, but.. Exposes more switches e.g. retain IDs Can deploy site collection/web/list/list item Can be scripted (beta) Cons Files are deployed as customized Bi-directional can cause problems Need to understand capabilities
15. Option 4: Kivati Studio Pros Packages updates into .exe for administrator Nice structure for e.g. content type updates Workflow designer allowing reuse Can write custom code if no built-in task Cons Fairly steep learning curve Potential lock-in? Doesn’t move content e.g. list items/files
17. Choosing a method - factors Features are generally the best option, but consider: Type of solution: Single site collection/WCM – Wizard good here Multiple site collection Packaging experience Timeframe also a factor Frequency/type of updates More code required to update Features
18. Choosing a method – factors If multiple developers, consider team dev model:
19. Best practices – to always do Always use WSPs for file system files, SafeControl entries etc. Document how to deploy/rebuild site! Identify how updates will be rolled out E.g. Updates to content types, list schemas etc.
20. Best practices – avoid: Using STSADM backup/restore to move a site Only for restoring to same location! Using ‘Save as site template’ to move a publishing site Not all settings saved Modifying live Feature or site def files Update using code once deployed
21. Summary Don’t lose sight of deployment goals We considered 4 approaches Identify approach which suits project Analysed factors in decision Some best practices are always relevant Documentation Need to avoid ‘pitfall’ methods!