SharePoint 2010 Session - 3By: Usman Zafar Malik[MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP
SharePoint 2010 Deployment
Agenda•   What to Deploy?•   Types of Solution Packages•   Deployment Cases•   Deployment Steps•   Deployment Approaches
What to Deploy ?
Solution Package• What is a solution package?  – A solution package is a distribution package that    delivers your custom...
Type of Solutions1- Sandboxed Solutions2- Farm Solutions
Sandboxed Solutions•   Allowing site collection administrators to deploy solutions that are safe to run.•   Deploying Solu...
Sandboxed Solutions
Farm Solutions• Theyre deployed by a farm administrator and are scoped  to the farm level.• Also known as full trust solut...
Farm Solutions
Deployment Items•   Visual Web parts•   Master Pages•   Content Types•   List Definitions•   Page Layouts•   User Controls...
Visual Web Parts
Visual Web Parts
Master Pages
Master Pages
Master Pages
User Controls
User Controls
Physical Item in 14 Hive
Deployment Cases• Fresh Deployment• Upgrade Deployment• Uninstall Deployment
Deployment StepsFresh Deployment    1. Adding Solution (*.wsp file)           Just add this solution to the SharePoint so...
Deployment StepsUpgrade Deployment   Deploy Solution v/s Upgrade Solution Concept   • Upgrade Solution  If you rename the...
Deployment StepsUpgrade Deployment (Deploy Solution Technique)       1. Disable and Uninstall all the Features            ...
Deployment StepsUpgrade Deployment (Upgrade Solution Technique)   1. Upgrade Solution Package        Just performs upgrad...
Deployment StepsUpinstall Deployment    1. Disable and Uninstall all the Features          You must first need to deactiv...
Deployment Approaches• Two types of Deployment Approaches. Use STSADM Command Line Tool Use Power Shell Commands
STSADM Command Line Tool• An .exe file “Stsadm.exe” resides in 14 hive Bin  folder.  Path: C:ProgramFilesCommonFilesMicros...
STSADM Command Line ToolAdding Solutionstsadm.exe -o addsolution -filename "DummySharePointProject.wsp”* Perform Administr...
STSADM Command Line ToolRetracting Solutionstsadm.exe -o retractsolution -name "DummySharePointProject.wsp" -immediate* Pe...
STSADM Command Line ToolInstalling Featurestsadm.exe -o installfeature -name [Feature Name] -forceUninstall Featurestsadm....
STSADM Command Line ToolDeactivate/Disable Featurestsadm.exe -o deactivatefeature -id [Feature ID] -url [TargetUrl] –force...
Power Shell CommandsMost Power full deployment toolHave large number of command supports (Getter/Setter) available for com...
Power Shell CommandsAdding Solution$SolutionPath = “C:DummySharePointProject.wsp”Add-SPSolution $SolutionPathDeploying Sol...
Power Shell CommandsRetracting Solution$solutionName = "DummySharePointProject.wsp“$SiteUrl = “http://mydummyweburl:9999/”...
Power Shell CommandsInstalling FeatureInstall-SPFeature [FeatureFolderName]Uninstall FeatureUninstall-SPFeature [FeatureFo...
Power Shell CommandsDeactivate/Disable FeatureDisable-SPFeature [FeatureFolderName] -Url [http://server/site/subsite]Activ...
Thanks !
Upcoming SlideShare
Loading in...5
×

SharePoint 2010 Training Session 3

664

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
664
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
39
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SharePoint 2010 Training Session 3

  1. 1. SharePoint 2010 Session - 3By: Usman Zafar Malik[MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP
  2. 2. SharePoint 2010 Deployment
  3. 3. Agenda• What to Deploy?• Types of Solution Packages• Deployment Cases• Deployment Steps• Deployment Approaches
  4. 4. What to Deploy ?
  5. 5. Solution Package• What is a solution package? – A solution package is a distribution package that delivers your custom SharePoint Server 2010 development work to the Web servers or the application servers in your server farm. – Use solutions to package and deploy custom Features, site definitions, templates, layout pages, Web Parts, cascading style sheets, and assemblies.
  6. 6. Type of Solutions1- Sandboxed Solutions2- Farm Solutions
  7. 7. Sandboxed Solutions• Allowing site collection administrators to deploy solutions that are safe to run.• Deploying Solutions at Site Collection Level.• Some of the Limitations are – Can’t support visual web parts, because it contains a .ascx control that must be deployed to the “_layouts” directory and deploying controls isnt allowed in any directory in sandboxed solutions. – Upload the solution package to the Solution Gallery and activate it. – For Debugging sandbox solutions, attach the debugger to the sandboxed solution worker process, SPUCWorkerProcess.exe and debug it.
  8. 8. Sandboxed Solutions
  9. 9. Farm Solutions• Theyre deployed by a farm administrator and are scoped to the farm level.• Also known as full trust solutions.• They have full trust access to all resources and functionality in SharePoint and, when deployed, require you to IISReset.• Solution should deployed on both WFE’s and Application Servers.
  10. 10. Farm Solutions
  11. 11. Deployment Items• Visual Web parts• Master Pages• Content Types• List Definitions• Page Layouts• User Controls• Web Controls• Site Definitions
  12. 12. Visual Web Parts
  13. 13. Visual Web Parts
  14. 14. Master Pages
  15. 15. Master Pages
  16. 16. Master Pages
  17. 17. User Controls
  18. 18. User Controls
  19. 19. Physical Item in 14 Hive
  20. 20. Deployment Cases• Fresh Deployment• Upgrade Deployment• Uninstall Deployment
  21. 21. Deployment StepsFresh Deployment 1. Adding Solution (*.wsp file)  Just add this solution to the SharePoint solution gallery (Site Collection/Farm Level) 2. Deploying Solution (*.wsp file)  Placed all the files present in the solution package will be deployed to their respective places.  User control files (.ascx) are copied to “%ProgramFiles%Common FilesMicrosoft Sharedweb server extensions14TEMPLATEControlTemplates” or a subfolder of it.  Assemblies are deployed to the global assembly cache or to a web applications bin folder  Features are copied to a subfolder of “%ProgramFiles%Common FilesMicrosoft Sharedweb server extensions14TEMPLATEFEATURES” and installed in the Feature Gallery of the farm, web application, site collection, or website, depending on the scope of the Feature 3. Activation the Features  Activate the Features as required  Features must be activated before they can be used.
  22. 22. Deployment StepsUpgrade Deployment Deploy Solution v/s Upgrade Solution Concept • Upgrade Solution  If you rename the solution file or change the GUID, "upgradesolution" operation will fail with an error stating that a solution with name or GUID does not exists in solution store. But in case of “deploy solution” it will allow you to rename it. • Deploy Solution  When you deploy a solution and then their associated features are also installed but thats not the case with "upgradesolution" operation. If you uninstall the features and then upgrade the solution, it will not install the features. But if you deploy the solution it will install the features again.
  23. 23. Deployment StepsUpgrade Deployment (Deploy Solution Technique) 1. Disable and Uninstall all the Features  For the safe side you need to deactivate/disable the feature and then uninstall it . 2. Retracting Solution (*.wsp file)  Retracted solutions are not removed from the farms solution store and can remain stored there in an un-deployed state indefinitely.  It will uninstall all the features which exists in the solution package. 3. Deleting Solution  Deleting the existing solution. 3. Adding Solution  Adding the updated solution in to the SharePoint solution store. 3. Deploying Solution  Deploying the newly added solution/package file. Will automatically installing the features and placed the files in to their respective places. 3. Activating Features  Activate the newly installed features as required.
  24. 24. Deployment StepsUpgrade Deployment (Upgrade Solution Technique) 1. Upgrade Solution Package  Just performs upgrade operations on the Solution/Package file.
  25. 25. Deployment StepsUpinstall Deployment 1. Disable and Uninstall all the Features  You must first need to deactivate/disable all the features and then uninstall it. 2. Retracting Solution (*.wsp file)  Retracted solutions are not removed from the farms solution store and can remain stored there in an un- deployed state indefinitely.  It will uninstall all the features which exists in the solution package. 3. Deleting Solution  Deleting the existing solution.
  26. 26. Deployment Approaches• Two types of Deployment Approaches. Use STSADM Command Line Tool Use Power Shell Commands
  27. 27. STSADM Command Line Tool• An .exe file “Stsadm.exe” resides in 14 hive Bin folder. Path: C:ProgramFilesCommonFilesMicrosoftSharedweb server extensions14BINstsadm.exe
  28. 28. STSADM Command Line ToolAdding Solutionstsadm.exe -o addsolution -filename "DummySharePointProject.wsp”* Perform Administrative CommandDeploying Solutionstsadm.exe -o deploysolution -name "DummySharePointProject.wsp" -allowGacDeployment -immediate –force* Perform Administrative Commandstsadm.exe -o deploysolution -name "DummySharePointProject.wsp" -allowGacDeployment -immediate -force –allcontenturls* Perform Administrative CommandNote: * Always perform this command after every command that need to run the administrative job.* stsadm.exe -o execadmsvcjobs
  29. 29. STSADM Command Line ToolRetracting Solutionstsadm.exe -o retractsolution -name "DummySharePointProject.wsp" -immediate* Perform Administrative Commandstsadm.exe -o retractsolution -name "DummySharePointProject.wsp" -allcontenturls -immediate* Perform Administrative CommandDeleting Solutionstsadm.exe -o deletesolution -name "DummySharePointProject.wsp"* Perform Administrative CommandNote: * Always perform this command after every command that need to run the administrative job.* stsadm.exe -o execadmsvcjobs
  30. 30. STSADM Command Line ToolInstalling Featurestsadm.exe -o installfeature -name [Feature Name] -forceUninstall Featurestsadm.exe -o uninstallfeature -id [Feature ID] -force* [Feature Name] = Example: “Feature.ContentTypes"* [Feature ID] = Example: 4c9e8ca5-d893-42b8-a3b3-cae4b18bf133
  31. 31. STSADM Command Line ToolDeactivate/Disable Featurestsadm.exe -o deactivatefeature -id [Feature ID] -url [TargetUrl] –forceActivate/Enable Featurestsadm.exe -o activatefeature -id [Feature ID] -url [TargetUrl] -force* [Feature ID] = Example: 4c9e8ca5-d893-42b8-a3b3-cae4b18bf133* [TargetUrl] = provide the site URL from where feature is going to disabled. http://mydummysiteserver:port/testsite
  32. 32. Power Shell CommandsMost Power full deployment toolHave large number of command supports (Getter/Setter) available for commandsCan code normal C# code inside power shell scriptCan execute our multiple commands through scripting logic
  33. 33. Power Shell CommandsAdding Solution$SolutionPath = “C:DummySharePointProject.wsp”Add-SPSolution $SolutionPathDeploying Solution$solutionName = "DummySharePointProject.wsp“$SiteUrl = “http://mydummyweburl:9999/”Install-SPSolution -Identity $solutionName -WebApplication $SiteUrl -GACDeployment
  34. 34. Power Shell CommandsRetracting Solution$solutionName = "DummySharePointProject.wsp“$SiteUrl = “http://mydummyweburl:9999/”Uninstall-SPSolution -Identity $solutionName -WebApplication $SiteUrl -Confirm:$falseDeleting Solution$solutionName = "DummySharePointProject.wsp“Remove-SPSolution -Identity $solutionName -Confirm:$false
  35. 35. Power Shell CommandsInstalling FeatureInstall-SPFeature [FeatureFolderName]Uninstall FeatureUninstall-SPFeature [FeatureFolderName ]
  36. 36. Power Shell CommandsDeactivate/Disable FeatureDisable-SPFeature [FeatureFolderName] -Url [http://server/site/subsite]Activate/Enable FeatureEnable-SPFeature [FeatureFolderName] -Url [http://server/site/subsite]
  37. 37. Thanks !
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×