PowerBreakfast #005 - Why DSC, NOW?
- 1. WHY DSC, NOW?
PowerBreakfast #005 – 11th October 2014
Singapore PowerShell User Group
- 2. Agenda
o Introduction
o What’s DSC?
o Scenario & Configuration
o Traditional way of doing things
o Doing the DSC way
o Doing the DSC way but with other methods
- 4. Who am I?
Milton Goh
Work @ Dimension Data (Singapore)
Tweet @miltongoh
Blog @ www.miltongoh.com
Recognized @ TechNet – Microsoft Community Contributor (MCC)
Passed Exam @ Prometric – MCSE, MCSA, MCITP, ITIL, MOF
Co-Lead @ Singapore PowerShell User Group
- 6. Desired State Configuration
First release in October 2013
Platform that provide the management of configuration data.
Ensure that the components of your server farm / data centre always have the
correct configuration.
Allows “Continuous Deployment”
Prevent “Configuration Drift”
Uses language extensions and providers to enable declarative, autonomous and
idempotent deployment.
- 7. Pre-Requisites
Windows Management Framework (WMF) 4.0
Pre-installed in Windows 8.1 and Windows Server 2012 R2 (Ensure that KB2883200
is installed)
For Windows Server 2008 R2, Windows Server 2012 and Windows 7, be sure to
install Microsoft .NET Framework 4.5 before installing WMF 4.0
- 8. How does DSC work?
Reference: http://blogs.technet.com/b/privatecloud/archive/2013/08/30/introducing-powershell-desired-state-configuration-dsc.aspx
- 9. References
PowerBreakfast Singapore #004 – Steven Murawski (Desired State Configuration in
the Real World)
http://www.poshbreakfast.com/?p=22
PowerShell.Org – Free DSC eBook / Resources
http://www.powershell.org/wp/dsc-hub/
http://www.powershell.org/wp/forums/dsc-desrired-state-configuration/
Intro to PowerShell 4.0 Desired State Configuration – Scripting Guy Blog
http://blogs.technet.com/b/heyscriptingguy/archive/2014/03/09/weekend-scripter-
intro-to-powershell-4-0-desired-state-configuration.aspx
- 11. Scenario
Imagine you have a project that is hosting a custom .NET web application that is
developed by the Professional Services team of your company, Contoso Ltd.
The web application is developed for the public website for government body
Ministry of PowerShell.
Target to have a millions visits to the site a month due to the large amount of
enthusiastic PowerShell-ers that loves to get latest information from it.
The server infrastructure is targeted at having 4Web-Front End Servers, 2 Application
Servers and 2 Databases Servers in total.
- 12. Server Configuration
Web-Front End
o Web-Server (IIS)
o .NET Framework 3.5 Features
Application Server
o Application Server
o .NET Framework 3.5 Features
Database Server
o .NET Framework 3.5 Features
- 14. Development Team
Usually someone (Team Lead or Solutions Architect) will take on the installation of
the server, configuration of the necessary features.
Installation is usually done on a single server without any redundancy; If corrupted
or things get screwed up, re-installation is the only option.
If installation is done in a Virtual Machine (Hyper-V per say), then the “Check Points”
feature in Hyper-V is fully utilized for every installation or deployment done.
Developer(s) on the team may simply copy the Virtual Machine that is installed
already and run it on the local machine.
If there is any instructions on setting up a brand new development environment, it
would have been shared via email on the required features or desired configuration.
No document were written or details are left un-documented due to the rush factor.
- 15. Production Deployment Team
Certain Infrastructure Team will only take care up to Operating System (OS) level
where it ensures that the OS is up and running for the Application Team to take over
the installation.
This means that there isn’t a clear visibility of what was deployed on the OS.
The Infrastructure Team Lead may also receive the same email that was shared
internally on what is the desired configuration, thus Engineer(s) was assigned to
replicate directly.
Engineer(s) may document the installation process by doing “Screen Shot” and place
it in the Installation Guide.
- 16. Missing Puzzle
GAPs will slowly surface when:
During rush hours where changes were made to the
Development/Staging/Production environment directly and not conveyed to the rest
of the team. (E.g. Development team made changes without informing the
Infrastructure team)
Often Developer who test the codes will work flawlessly on their individual
development machine but will often crashed upon deployed over to the UAT server.
(E.g. Missing features that is required to be installed, this often spread across Staging
and Production environment)
Installation guide were written based on the initial installation and does not get
updated as time goes by thus it is invalid for the environment.
Things wouldn’t tends to work and huge amount of troubleshooting is required to be
done when trying to introduce new servers into the farm of existing servers.
- 19. Setup Pull Server
Download the xPSDesiredStateConfiguration module from the following URL:
https://gallery.technet.microsoft.com/xPSDesiredStateConfiguratio-417dc71d
Unzip the downloaded archive
Copy the archive into the folder (C:Program FilesWindowsPowerShellModules) of
the designated Pull Server.
- 21. Setup Pull Server
Copy the PowerShell script into your designated server (if you didn’t use the
PowerShell ISE on the designated server or you have done it on another client
computer).
Execute the PowerShell script on the designated server
Configure DSC Pull Server by running Start-DscConfiguration .CreatePullServer -Wait
- 23. Enable Nodes to Pull
Script to tell member server to pull configuration.
- 25. DSC Resource Kit
Microsoft PowerShell Team is currently constantly updating the modules that is
available to be used with PowerShell Desired State Configuration (DSC).
Latest Resource Kit was updated on 30th September 2014 and available for download
at https://gallery.technet.microsoft.com/DSC-Resource-Kit-All-c449312d
- 27. Other than Microsoft PowerShell DSC, there are other platforms available to be use to
achieve Desired State Configuration.
o Chef - https://www.getchef.com/chef/
o Puppet - http://puppetlabs.com/
- 29. Thank you for attending:
PowerBreakfast #005
Have you join
Singapore PowerShell User Group
Facebook group yet?
https://www.facebook.com/singaporepowershell