380 likes | 458 Views
PowerShell DSC. The future of deployments by Rami Mounla. Today’s outline . About myself Learn about DSC Look at DSC in action Check the DSC CRM configuration. About myself. Solution Architect Lead of the Dynamics CRM Team MCP – MCSD – MCTS Dynamics CRM MVP. Who are you?.
E N D
PowerShell DSC The future of deployments by Rami Mounla
Today’s outline • About myself • Learn about DSC • Look at DSC in action • Check the DSC CRM configuration
About myself • Solution Architect • Lead of the Dynamics CRM Team • MCP – MCSD – MCTS • Dynamics CRM MVP
Deployments Characteristics Predictable Repeatable Fast Automated NoHuman
Previous Experience 5 days!!! Platform 1 ½ days 1 day SQL C++ ½ day Prerequisites ½ day AD ½ day Firewall VM 1 day
What is DSC “DSC is a new management platform in Windows PowerShell that enables deploying and managing configuration data for software services and managing the environment in which these services run”
What Does DSC provide? “DSC provides a set of Windows PowerShell language extensions, new Windows PowerShell cmdlets, and resources that you can use to declaratively specify how you want your software environment to be configured.”
What are the advantages? • Avoid configuration drift • Keep configurations the same for all servers (all environments) • Easily create VMs from scratch for every deploy • On-premise or cloud (e.g. Azure)
So what? • Increase the (on going) assurance that deployment will succeed • Faster Deployments • Automate and simplify our deployments
How does it work? • Authoring Phase: Create Configuration PowerShell • Staging Phase: CreateMOF file • Apply the configuration to the server • Push • Start-DscConfiguration • Pull • OData services to pull the details • Runs as System User MAKE IT SO!
156 Other Providers https://gallery.technet.microsoft.com/scriptcenter/DSC-Resource-Kit-All-c449312d
Demo Resource example & Diff
Prerequisites • Windows Management Framework (WMF) 4.0 • PowerShell 4.0 with remoting enable • .NET 4.5 • Preferably 2012 R2 or 8.1 • Patch KB2883200 (for eXperimental resources)
CRM 2015 perquisites • AD • OU • Service Account • Access to Performance Log Users group • SQL (with specific config) • .NET 3.5 • .NET 4.5.2 • Installation account must be Domain account • Cannot run using remoting
Typical CRM deploy: Scripted Deploy <CRMSetup> <Server> <Patch update="true"> </Patch> <LicenseKey>****</LicenseKey> <SqlServer>WIN-FJSSHT6JGM6</SqlServer> <Databasecreate="true"/> <ReportingURL="http://WIN-FJSSHT6JGM6/ReportServer"/> <OrganizationCollation>Latin1_General_CI_AI</OrganizationCollation> <basecurrencyisocurrencycode="NZD"currencyname="New Zealand Dollar"currencysymbol="$"currencyprecision="2"/> <Organization>CRM 2015 Organisation</Organization> <OrganizationUniqueName>CRM2015Org</OrganizationUniqueName> <OU>OU=DynamicsCrmOu,DC=TheAuthority,DC=local</OU> <WebsiteUrlcreate="true"port="5555"> </WebsiteUrl> <InstallDir>c:\Program Files\Microsoft Dynamics CRM</InstallDir> ... <SQMoptin="false"/> <muoptinoptin="true"/> <Email> <IncomingExchangeServername=""/> </Email> </Server> </CRMSetup>
Command line E:\Server\amd64\SetupServer.exe /Q/lC:\deployment\crmserver_install.log /configC:\deployment\crmConfigurationFile2015.xml
Demo CRM using DSC
Resources • http://bit.ly/1abB8PD(good place to start) • http://bit.ly/1TNqIqs(PluralSight course) • http://bit.ly/1MEGQGz(Microsoft Providers) • http://bit.ly/1xmaVFV(eXperimantal Resources) Continuous Delivery by Jez Humble, David Darley a Martin Fowler Signature book