Download presentation
Presentation is loading. Please wait.
Published byErnest Jeffery Ball Modified over 6 years ago
1
Automating SharePoint AutoSPInstaller vs Desired State Configuration (DSC)
Nik Charlebois Brian Lalancette Dudes
2
Microsoft Premier Field Engineer (PFE) based in Ottawa, Canada
4/21/2018 2:41 AM @NikCharlebois Microsoft Premier Field Engineer (PFE) based in Ottawa, Canada Ex-PowerShell MVP Author, Speaker, Blogger Creator of the ReverseDSC and VisualDSC engines Nik speaking NikCharlebois.com © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
https://blogs.technet.microsoft.com/brianlala/
4/21/2018 2:41 AM @BrianLala Microsoft Premier Field Engineer (PFE) based in Toronto, Canada Occasional speaker & blogger Creator of AutoSPInstaller and AutoSPSourceBuilder Co-creator of AutoSPInstaller.com Brian speaking © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
4
Session objectives and takeaways
Tech Ready 15 4/21/2018 Session objectives and takeaways Session objective: Learn ways to automate the deployment of SharePoint environments Key takeaways: Learn how AutoSPInstaller can and has been used to automate the deployment of SharePoint Learn how PowerShell Desired State Configuration (DSC) can be used to automate and monitor the deployment of SharePoint Get an overview of tools to help with DSC onboarding © 2012 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.
5
Overview of AutoSPInstaller
4/21/2018 2:41 AM 1 Overview of AutoSPInstaller © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
4/21/2018 AutoSPInstaller PowerShell-based process for performing the installation and initial configuration of SharePoint 201x, based on an XML input file Introduced in 2010 to support SharePoint 2010 and its new PowerShell cmdlets Refactored later in 2010 Huge amount of community input and feedback over past 7 years Over 125k downloads from © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
7
AutoSPInstaller Demo Kickoff
8
AutoSPInstaller Design considerations & advantages Ease of use
4/21/2018 AutoSPInstaller Design considerations & advantages Ease of use User-friendly, semi-verbose status messages Incorporate "best practices" wherever feasible Centralized, remote installation option © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
9
AutoSPInstaller Design considerations (continued)
4/21/2018 AutoSPInstaller Design considerations (continued) "Virtual" DSC :) re-runnable Extensible (AutoSPInstallerFunctionsCustom.ps1) DR on the cheap: build a farm identical to original production in a fraction of the time Classic, imperative approach © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
10
AutoSPInstaller.com SPA (Single-Page App) hosted on Azure Websites
4/21/2018 AutoSPInstaller.com SPA (Single-Page App) hosted on Azure Websites 100% client-side JS – can actually be used offline Developed by another Canuck (Ivan Josipovic) with input from myself Useful for creating configurations from scratch, and validating/modifying existing configurations AutoSPInstaller.com can actually be used completely offline, after initially loading the site! © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
11
AutoSPInstaller.com Demo
12
AutoSPInstaller - Gotchas!
4/21/2018 AutoSPInstaller - Gotchas! Its ease of use can lead inexperienced admins down a rabbit hole Farm can quickly "drift" from initial state, rendering initial XML config invalid Admins still need to know how to spec and architect a farm Lots of "issues" can be due to environment, Windows, or SharePoint itself; many folks can't differentiate Formally unsupported by Microsoft! © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
13
AutoSPInstaller Demo Wrap-Up
14
Overview of SharePointDSC
4/21/2018 2:41 AM 2 Overview of SharePointDSC © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
15
Desired State Configuration (DSC)
Requires PowerShell 4 or greater (WMF); Responsible for bringing/keeping a machine in its Desired State; Available both On-Prem and in Azure Automation & IaaS; Windows Nano Linux MacOS
16
Local Configuration Manager (LCM)
It’s the core of DSC! Engine responsible for running DSC; Keeps the Desired Configuration Information in memory; Pending Current Previous
17
DSC Configuration Script
Somewhat human-readable way of defining your Desired State. PS1 script defining a special « Configuration » keyword (behaves like a function); Upon calling the configuration, generates a .MOF file;
18
What Does it Look Like?
19
DSC Push Demo
20
SharePoint DSC First DSC module to « RTM »;
4/21/2018 2:41 AM SharePoint DSC First DSC module to « RTM »; Available as Open-Source on GitHub; Support SharePoint 2013 and 2016 (no support for 2010); Currently at version ; Available on the PowerShell Gallery; © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
21
4/21/2018 2:41 AM DSC Resource Granular PowerShell module inside SharePointDSC responsible for a specific SharePoint component; - MSFT_SPWebApplication - MSFT_SPManagedPath - MSFT_SPSite - MSFT_UserProfileService - … Located under C:\Program Files\WindowsPowerShell\Modules\ SharePointDSC\<version>\DSCResources © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
Comparison
23
Language AutoSPinstaller: DSC: <WebApplication Name=“A”>
<SiteCollections> <SiteCollection Name=“B”> <Webs> <Web Name=“C” /> </Webs> </SiteCollection> </SiteCollections> </WebApplication> DSC: SPWebApplication A { … } SPSite B {… DependsOn=“[SPWebApplication]A” SPWeb C DependsOn=“[SPSite]B”
24
Advantages of DSC Pull Server mode;
Apply and Autocorrect configuration mode; Standardize ‘’Language’’ across multiple streams; Wide community support;
25
SharePointDSC Demo
26
DSC - Gotcha’s Declaration Repetition can lead to disaster
Declare all artefacts in the first node & only declare SPFarm and SPServiceInstance in secondary nodes; Learning Curve is still significant to get started; Can become very complex very quickly; Different ConfigurationMode for servers;
27
Why I Recommend WMF 5.1 Introduces reporting endpoints;
Improved Pull Server support Package Management Partial DSC Class Support PowerShell 5.1 is supported for SharePoint Server 2013+ us/powershell/wmf/5.1/productincompat
28
4/21/2018 2:41 AM 3 ReverseDSC © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
29
Key Definitions Desired State: How a machine node should be configured; Current State: How a machine node is currently configured; * Goal of DSC is to have Current State == Desired State
30
Anatomy of a DSC Resource
Test-TargetResource -> Am I in my Desired State? Get-TargetResource -> How am I currently configured? Set-TargetResource -> Here is how I want you to configure me!
32
Principle of Deduction
Get-TargetResource is included in every resource… Get-TargetResource returns me the Current State of any given machine node for a resource… Using PowerShell we can dynamically call into all Get- TargetResource methods inside a Module…
33
Introducing a new concept
Reverse DSC!
34
4/21/2018 2:41 AM The “Ahhhh” moment I can get an exact picture of how my existing environment is configured! I can export the result of calling all Get-TargetResource as a DSC script! I can use that script to create an exact replica of an existing environment or on-board an existing environment onto DSC! …I can even take an on-premises environment…..take that Reverse DSC and…. push a replica in Azure! © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
35
Imagine the possibilities
4/21/2018 2:41 AM Imagine the possibilities Analyze best practices Quickly replicate on-premises to Azure; Compare configuration drifts between 2 environments; Replicate a client’s environment for troubleshooting; Enroll existing environment onto DSC for Monitoring and compliance; Straightforward upgrade from SharePoint 2013 to 2016; Merge Multi-Server farm’s config into a standalone Dev box DEV/TEST …. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
36
Onboarding Existing Investments
4/21/2018 2:41 AM Onboarding Existing Investments Scenario: Client already has a SharePoint 2013 or 2016 environment and wish to onboard it onto DSC. 1 - Run ReverseDSC: “Tell me what is your Current Configuration” 3 – “Guess What? Your Current State is now also your Desired State” 2 – “Here it is!” 1 2 3 © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
37
4/21/2018 2:41 AM 4 Summary © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
38
Feature Comparison 4/21/2018 2:41 AM Feature AutoSPInstaller DSC
Learning Curve Medium High Readability Very Good Good Expandibility Limited to SharePoint All Technology Stacks Declarative Language XML PowerShell SP Supported Version 2010, 2013 and 2016 2013 and 2016 only Extraction 3rd party tools ($) ReverseDSC Applicability Configure a Farm based on definition Configure and prevent configuration drifts Templating Search and Replace XML Parameterized Data SPDocKit can export a farm’s configuration to AutoSPInstaller-ready XML © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
39
http://aka.ms/AutoSPInstaller http://aka.ms/ReverseDSC
4/21/2018 2:41 AM URLs © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.