370 likes | 604 Views
Managing SharePoint 2010 Customizations for the IT Pro. Name Title Company. Agenda. Solution packaging changes and options in 2010 Sandboxed solutions Deployment Monitoring Management. Changes in the solution management. Solution Management and Design. Solutions – C hanges.
E N D
Managing SharePoint 2010 Customizations for the IT Pro Name Title Company
Agenda • Solution packaging changes and options in 2010 • Sandboxed solutions • Deployment • Monitoring • Management
Changes in the solution management Solution Management and Design
Solutions – Changes • Two types of solutions • Farm solutions • Features deployed to front end • Sandboxed solutions • End-user submitted solution • Features deployed to database – usable in site collection level • Solution dependencies • Upgrade infrastructure to support life cycle management of deployed functionalities
Solution Deployment Options • Full trust deployment • Local deployment only • More or less the same as in 2007 • Sandboxed solution deployment • Deployed to a specific site collection by site collection administrators • Code runs in a rights-restricted process with limited CAS permissions • Server resource usage is monitored against a quota managed by the service administrators
Solution Deployment Considerations • Now a design decision -- Farm || Sandbox • WFE || App Server || All • Some at Farm, others at Site • Farm solutions can impact server uptime • Sandboxed – limited scope/scale additional management • Balance of: • Costs – Management/QA • Performance – safe/scale • Audience - Business Unit/Everyone • Time to market – ASAP/When ready
What are they and why would I use them? Sandboxed Solutions
Todays Problems, a big pain… • Hosting Providers • IT Departments • Online Collaboration FarmStability BusinessAgility
Developer WSS 3.0’s Challenge • Design, build, and test customizations • Developers build custom solutions • Administrators can only secure solutions with CAS • Hard to control what is being done in custom code • Largest cause of SharePoint support cases: custom code • Administrator • Install and monitor customizations • Site Collection Owner • Activate and use customizations
Introducing Sandboxed Solutions • Sandboxed solution: site collection owners can upload to SharePoint • Agile: enables site collection owners to deploy new functionality without involvement of administrators • Local/remote development options • Stable: self-regulating and monitored by administrators • Limited set of permissions and functionality • Resource quotas established and monitored by administrators • Secure: site collection owner is in control
Sandboxed Solutions Help Enterprises • Sandboxed solutions are important because • Solve SharePoint hosting issues in corporate environments • Make hosted SharePoint environments much easier to implement and manage • Reduces time to deploying custom solutions • Removing process of getting code approved and deployed by server administrators • Improves stability of SharePoint servers • Now badly performing code isolated to an AppDomain within a worker process and visibility is to a single site collection
Overview of the Sandbox • Allows a subset of the full capabilities in the SharePoint API • Secure – enforcing the sandbox • Execute in a partially trusted environment • Code executes in a special service process • Subject to CAS • Validation framework • Provides way to do custom farm wide validation for the deployed packages • Each solution is isolated to its site collection
Types of Sandbox Solutions • A Subset of existing Feature Model • Web/Site Scoped Features • Many XML constructs: <Modules>, • <Lists>, <ContentTypes>, etc. • Client JS, Iframe, etc. • Supports • Web Parts • Event Receivers • Feature Activation Events • Custom Workflow Actions • InfoPath Business Logic SPSite SPWeb SPList SPListItem
Sandbox Setup & Deployment • Start on select servers to run sandbox processes
Site Collection Administration • Solution Gallery -- _catalogs/solutions • Empower SC Admins
Defining “The Sandbox” Quota/Blocked Solutions Limited OM CAS External Process
Central Administration • Solution Administration • Block Solutions • Quota Templates
A Separate Process • User Code Service(SPUCHostService.exe) • Sandbox Worker Process(SPUCWorkerProcess.exe) • Sandbox Worker Process Proxy(SPUCWorkerProcessProxy.exe)
Sandbox Architecture FRONT END User Code Server Execution Manager(Inside Application Pool) Host Services (SPUCHostService.exe) Worker Service (SPUCWorkerProcess.exe) IIS(WPW3.EXE) Untrusted Code Subset Object Model Full Object Model
Code Access Security AspNetHostingPermission, Level=Minimal SharePointPermission, ObjectModel=true SecurityPermission, Flags=Execution Sandbox My.dll wss_usercode.config Other.dll System DLL User Code SharePoint DLL Full Trust Framework Code SharePoint OM Subset OM
Sandbox Boundaries • Off-box connections, http, web services, etc • ADO.net • Enterprise features (Search, BCS, etc.) • Threading • P-Invoke • IO • Other sites x x x x x x x
Breaking out of the Sandbox Full-Trust Proxy Worker Service (SPUCWorkerProcess.exe) GAC Untrusted Code SPProxyOperationArgs SPProxyOperationArgs SPUtility SPProxyOperation SecuredResource
Administration Options • Load Balancing • Validation • Resource Management • Monitoring
Load Balancing • Sandboxed solutions can be run in two modes • Local Mode • Execute code on the SharePoint WFE • Low administration overhead • Lower scalability • Remote Mode • Execution on back-end farm machine • Via dedicated service applications • Load balanced distribution of code execution requests
Solution Validation • [GuidAttribute("34805697-1FC4-4b66-AF09-AB48AC0F9D97")] • publicclassPublisherValidator:SPSolutionValidator{ • publicoverridevoidValidateSolution( • SPSolutionValidationProperties properties){ • properties.Valid = [true || false]; • properties.ValidationErrorMessage = “no soup for you”; • } • publicoverridevoidValidateAssembly( • SPSolutionValidationPropertiesproperties, • SPSolutionFileassembly){ • } • }
Resource Management for IT Pro’s Resource’s monitored Abnormal Termination CPU Execution Time Critical and Unhandled Exceptions Memory Consumption SQL Query Time Non-Responsive Proc’s Data Marshalling Size Handles and Threads • All sites are allocated resource quotas • Established by server administrators • Daily resource usage calculations • Warning thresholds • E-mail notification • Hard threshold • Sandboxed code doesn’t run for remainder of day
Sandbox Solution MonitoringHow it works • Site collection quotas specify the warning and hard limits for number of resources that can be used per day • Sum of resource measures are taken across solutions deployed to site collection • I.e., add up CPU Points for all solutions • Max of resource utilization measures checked against site collection quota to determine if it should be throttled/blocked
Monitored Resources You can tweak these values to fit your need…
Sandbox Solution MonitoringCase Study • A solution has executed 40 SQL queries (via the SharePoint OM) • One point for SQL is 400 queries • Means for SQL it’s consumed .1 resource points • So the resource usage is for the day for that solution is .1 resource points + other counters
Summary • Solution packaging changes and options in 2010 • Sandboxed solutions • Deployment • Monitoring • Management
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.