View
1.169
Download
2
Category
Preview:
DESCRIPTION
Citation preview
Information Technology Solutions
Customizing the Visual Studio 2010 SharePoint Deployment Process
Eric ShuppsSharePoint Server MVP
Information Technology SolutionsAbout Me
• SharePoint Server MVP• President, BinaryWave• Member, Patterns & Practices Advisory
Board (spg.codeplex.com)• Web: www.binarywave.com • Blog: www.sharepointcowboy.com• Twitter: @eshupps• Facebook:
www.facebook.com/sharepointcowboy
Information Technology SolutionsAgenda
• Introduction to Code Deployment • Code Deployment Fundamentals• Customizing Code Deployment• Demos
– Deploying SharePoint Assets– Creating Custom SharePoint Commands– Creating a Custom Deployment Step– Creating a Custom Deployment Configuration
Information Technology Solutions
Introduction to Code Deployment
Information Technology SolutionsCode Deployment Objectives
• Implementation of packaged code in development environment
• Modification of deployment options and parameters
• Retraction of deployed solutions• Elimination of repetitive manual processes
which decrease productivity• Single-click build/package/deploy process
integrated into VS IDE
Information Technology SolutionsLegacy Code Deployment
Create Solution
Files
AssetsFeatures
Build Solution
Package Solution
Deploy
Solution
MSBuild
Scripts
Tools
Solution Package
Manifests
Directives
WSP’s
Scripts
STSADM
Powershell
Information Technology SolutionsLegacy Deployment Tools
WSP Builder
STSDEVVSeWSS
MSBuild STSADM MakeCab Batch Files
Information Technology SolutionsLegacy Deployment Challenges
Poor Integration
Obfuscation
Modification
AutomationRetraction
Upgrades
Artifact Removal
Information Technology Solutions
Code Deployment Fundamentals
Information Technology SolutionsSP 2010 Code Deployment
Create Build Package Deploy
F5
Information Technology SolutionsVisual Studio Integration
• Single unified interface for code build, package and deployment process
• Auto-discovery of mapped assets• Visual package explorer• Edit-in-place configuration files
(manifest.xml)• Extensible framework which can be
modified to suit various requirements
Information Technology SolutionsVS2010 Deployment Process
Deploy
Deployment Tasks Deployment Actions Conflict Resolution
PackageManifest Directives Cabinet (WSP)
BuildPre-Build Actions Post-Build Actions
CreateFeatures Artifacts
Information Technology SolutionsCreate
• SP Project Items (SPI’s) provide pre-configured artifacts for common SharePoint projects
• Automatic generation of Features, Manifests, .webpart and supporting files
• Additional SPI’s via CKS:DEV
Information Technology SolutionsBuild
• Projects expose SharePoint-specific properties
• Selectable deployment to BIN or GAC
• Scripts and STSADM may continue to be used with pre- and post-build commands
Information Technology SolutionsPackage
• Packaging occurs after the build process and before the deployment process
• Dependent upon auto-generated configuration files
• All projects in solution will be packaged but only those marked as “start up” will be deployed
Build
Package
Deploy
Information Technology SolutionsPackage Elements
• Manifest– Auto-generated– Merge and overwrite
options• Directives
– No DDF file required• Cabinet
– WSP constructed from project assets
– Use Packaging Explorer to determine contents of package
Information Technology SolutionsDeploy
• New set of extendable deployment interfaces
• Deployment Configurations
• Deployment Steps• Conflict Resolution• SharePoint Commands
Information Technology SolutionsDeployment Configurations
• Deployment configurations are comprised of a set of deployment steps and related actions
• Pre and post-deployment commands may be attached to any deployment configuration
• Two deployment configurations ship OOTB:– Default– No activation
• Custom configurations can be created using any combination of steps
• Only one active configuration per project
Information Technology SolutionsDeployment Steps
• Drag-and-drop association with Deployment Configuration
• Specifies order of execution for both deployment and retraction
• Each step comprised of one or more tasks
Information Technology SolutionsConflict Resolution
• Built-in conflict resolution for default SPI’s– Automatic– Prompt– None
• Customizable detection and resolution via SharePoint Project Item Extensions
• Removes artifacts previously installed and activated– Delete list, remove web part from page and
gallery, disassociate workflow, etc.
Information Technology Solutions
Deploying SharePoint Assets
DEMO
Information Technology SolutionsDeployment Elements
Deployment Configuration
Default
No Activation
Custom
Deployment Steps
Pre-Deployment
Retract Solution
Recycle App Pool
Add Solution
Post-Deployment
SharePoint CommandsObject Model STSADM PowerShell
Information Technology Solutions
Creating a Custom SharePoint Command
DEMO
Information Technology SolutionsSharePoint Commands
• Execute SharePoint-specific commands in a 64-bit process
• Provide full access to SharePoint Object Model from deployment context
x86
x64
Information Technology Solutions
Creating a Custom Deployment Step
DEMO
Information Technology SolutionsDeployment Steps
• Custom code inheriting from IDeploymentStep interface
• Container for invoking custom SharePoint Commands SharePoint Commands
Object Model STSADM PowerShel
l
CanExecute?
Deployment Step
Information Technology Solutions
Creating a Custom Deployment Configuration
DEMO
Information Technology SolutionsDeployment Configuration
Deployment Configuration
Deployment Steps
SharePoint Commands
Default No Activation Custom
Recommended