Automating SharePoint AutoSPInstaller vs Desired State Configuration (DSC) Nik Charlebois Brian Lalancette Dudes.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Co- location Mass Market Managed Hosting ISV Hosting.
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Windows Azure Web Sites Speaker Title Organization.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Today’s Agenda
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

customer.
03 | Word Templates Brian Meier| Senior Lead Program Manager.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
04 | Business Analyzer Brian Meier| Senior Lead Program Manager.

Microsoft Virtual Academy
Building AD-SQL-APP Server on AZURE
Microsoft Azure Deployment Planning Services
Microsoft Ignite /4/2018 8:46 AM
6/17/2018 5:54 AM OSP322 Getting the best of both worlds, making the most of SharePoint hybrid search solutions Shyam Narayan Microsoft © 2013 Microsoft.
Learning about Containers in the Real World
Configuration Management with Azure Automation DSC
Возможности Excel 2010, о которых следует знать
SharePoint Online Management and Control
Transforming SharePoint Farm Solutions to the Add-in Model
Azure PowerShell Aaron Roney Senior Program Manager Cormac McCarthy
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Setting up team development infrastructure for SharePoint 2013
SPC Developer 11/19/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Microsoft Virtual Academy
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Title of Presentation 12/2/2018 3:48 PM
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Virtual Academy
Automated SharePoint Installation: Past, Present & Future
System Center Application Management
Overview: Dynamics 365 for Project Service Automation
Surviving identity management in a hybrid world
2/27/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Business Continuity and the Microsoft Cloud
TechEd /23/2019 9:23 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Feature: Multi-user Editing Allowed in RMA Entry
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Day 2, Session 2 Connecting System Center to the Public Cloud
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
PowerShell for ConfigMgr 2012 SP1
Build /24/ What's new for Azure developers in Visual Studio 2013 update 2 and Azure SDK 2.3 Dan Fernandez Principal PM
Presentation transcript:

Automating SharePoint AutoSPInstaller vs Desired State Configuration (DSC) Nik Charlebois Brian Lalancette Dudes

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.

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 https://blogs.technet.microsoft.com/brianlala/ © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

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.

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.

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 https://autospinstaller.codeplex.com © 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.

AutoSPInstaller Demo Kickoff

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.

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.

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.

AutoSPInstaller.com Demo

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.

AutoSPInstaller Demo Wrap-Up

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.

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

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

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;

What Does it Look Like?

DSC Push Demo

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 1.6.0.0; 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.

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.

Comparison

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”

Advantages of DSC Pull Server mode; Apply and Autocorrect configuration mode; Standardize ‘’Language’’ across multiple streams; Wide community support;

SharePointDSC Demo

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;

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+ https://msdn.microsoft.com/en- us/powershell/wmf/5.1/productincompat

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.

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

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!

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…

Introducing a new concept Reverse DSC!

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.

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.

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.

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.

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.

http://aka.ms/AutoSPInstaller http://aka.ms/ReverseDSC 4/21/2018 2:41 AM URLs http://aka.ms/AutoSPInstaller http://aka.ms/ReverseDSC http://aka.ms/VisualDSC © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.