powerbreakfast #005 - why dsc, now?

29
WHY DSC, NOW? PowerBreakfast #005 – 11 th October 2014 Singapore PowerShell User Group

Upload: milton-goh

Post on 04-Jul-2015

100 views

Category:

Technology


4 download

DESCRIPTION

Following from PowerBreakfast #004 presented by Steven Murawaski on Desired State Configuration (DSC) that is available here. Are you still not convince that you should be looking at DSC right NOW or do you think it is worth waiting for something new or even looking at staying at where you are and how things are working now? In this session, I will generally focus on the Operational side of things which focus on the response that I have received from speaking to various folks at work. On top of that, I will also share on how things may have changed for a group of Developers and/or System Engineers which we have integrate DSC into your daily life.

TRANSCRIPT

Page 1: PowerBreakfast #005 - Why DSC, NOW?

WHY DSC, NOW?PowerBreakfast #005 – 11th October 2014

Singapore PowerShell User Group

Page 2: PowerBreakfast #005 - Why DSC, NOW?

Agendao 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

Page 3: PowerBreakfast #005 - Why DSC, NOW?

Introduction

Page 4: PowerBreakfast #005 - Why DSC, NOW?

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

Page 5: PowerBreakfast #005 - Why DSC, NOW?

What’s DSC?

Page 6: PowerBreakfast #005 - Why DSC, NOW?

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.

Page 7: PowerBreakfast #005 - Why DSC, NOW?

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

Page 8: PowerBreakfast #005 - Why DSC, NOW?

How does DSC work?

Reference: http://blogs.technet.com/b/privatecloud/archive/2013/08/30/introducing-powershell-desired-state-configuration-dsc.aspx

Page 9: PowerBreakfast #005 - Why DSC, NOW?

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

Page 10: PowerBreakfast #005 - Why DSC, NOW?

Scenario & Configuration

Page 11: PowerBreakfast #005 - Why DSC, NOW?

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 4 Web-Front End Servers, 2 Application Servers and 2 Databases Servers in total.

Page 12: PowerBreakfast #005 - Why DSC, NOW?

Server ConfigurationWeb-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

Page 13: PowerBreakfast #005 - Why DSC, NOW?

Traditional Wayof doing things…

Page 14: PowerBreakfast #005 - Why DSC, NOW?

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.

Page 15: PowerBreakfast #005 - Why DSC, NOW?

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.

Page 16: PowerBreakfast #005 - Why DSC, NOW?

Missing PuzzleGAPs 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.

Page 17: PowerBreakfast #005 - Why DSC, NOW?

Imagine…

Page 18: PowerBreakfast #005 - Why DSC, NOW?

Doing the DSC way…

Page 19: PowerBreakfast #005 - Why DSC, NOW?

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 Files\WindowsPowerShell\Modules) of the designated Pull Server.

Page 20: PowerBreakfast #005 - Why DSC, NOW?

Setup Pull Server Create the Configuration File

Save the file

Page 21: PowerBreakfast #005 - Why DSC, NOW?

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

Page 22: PowerBreakfast #005 - Why DSC, NOW?

Configuration for Nodes to Pull Telling how the server should look like.

Page 23: PowerBreakfast #005 - Why DSC, NOW?

Enable Nodes to Pull Script to tell member server to pull configuration.

Page 24: PowerBreakfast #005 - Why DSC, NOW?

Demo

Page 25: PowerBreakfast #005 - Why DSC, NOW?

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

Page 26: PowerBreakfast #005 - Why DSC, NOW?

Other ways than DSC

Page 27: PowerBreakfast #005 - Why DSC, NOW?

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/

Page 28: PowerBreakfast #005 - Why DSC, NOW?

Questions? Comments? Something to share?

Page 29: PowerBreakfast #005 - Why DSC, NOW?

Thank you for attending:PowerBreakfast #005

Have you joinSingapore PowerShell User Group

Facebook group yet?

https://www.facebook.com/singaporepowershell