automation: powershell & dsc

Download Automation: PowerShell & DSC

Post on 08-Feb-2017

232 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

Automation: PowerShell & DSC

Automation: PowerShell & DSCTools for the DevOps toolbox

Introductionshttps://flic.kr/p/89xksJ

Who are you?Where do you work?What do you do?How do you work?What is your development style? (Agile, traditional, etc.) 2

Application Lifecycle ManagementDefineIdeationDevelopIdea to working softwareOperateWorking software in production Value realizationUsers/StakeholdersDevelopment & testingOperationsPRODUCTBACKLOG

OPSBACKLOG

Monitor

Implement

MeasureActionable learning

This is a more recent Microsoft graphic on ALM, And I think the differences from the previous slide really show the evolution were seeing in the industry.For one thing, it is a cycle, not a line. Visual Studio 11

2012 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/16/20153

Transition to OperationsHow smooth is your handoff? What does a release look like for you?https://flic.kr/p/6gobfx

Code is written. Time to get this out into the wild.4

Release?https://flic.kr/p/ctho6

Does your release look like this?5

Release?https://flic.kr/p/6EsbR7

Fire in the hole?6

Releasehttps://flic.kr/p/f5NNeZ

7

Why do we care?2015 State of DevOps surveyGapLead Time 200x gap Deployment failures 60x fewerMean Time To Recovery 168x faster2x more likely to exceed profitability, market share, & productivity goals.50% higher market cap growth over 3 years.

8

Operations is hard(ware).. and many other things, but lets talk about hardware.https://flic.kr/p/dZaCMA

Setting up a new serverSetting up 10 new servers. 10,000 new serversDifferent roles require different configurationsAll machines in the same role should have the exact same configuration.Drift over timeChanging requirements Please install X on all the web servers9

Server HerdingServer Configurations

10

Role based configuration

Web Servers

SQL Servers

Web Services Servers

11

App based configuration

App 1

App 2

App 3

12

Environment based configuration

Dev

Test

Production

13

Why is this hard?https://flic.kr/p/8tjkup

You know what you want a server to be.You dont know when it drifts.You dont know what about it has drifted.You have to write deltas14

What would be better?https://flic.kr/p/nC1mb

Stick with what you know: Describe what you want.Separate the what from the howPrinted directions vs GPS nav.15

Automationhttp://www.flickr.com/photos/10506540@N07/3517227492

Automation.16

https://flic.kr/p/c4QJzCWe need another tool

Desired State ConfigurationDescribe what you want (Declarative), rather than perform actions to get there (imperative)17

What is PowerShell DSC?Extension to PowerShell languagePS SyntaxCreates configuration scriptsCreates and manages configuration filesEmphasis on serversEnsures servers are configured the way you need.Set it and forget itThe future of Windows Server Management (and Linux?)

https://en.wikipedia.org/wiki/Windows_PowerShell#/media/File:Windows_PowerShell_icon.png

18

Where does PS DSC fit in?Similar to Chef/Puppet Based on industry standardsManaged Object Format (MOF)Common Information Model (CIM)

https://flic.kr/p/763JUC

Similar to Chef/Puppet (can be integrated with)Based on industry standardsManaged Object Format (MOF)Common Information Model (CIM)

19

Three Phased Approach.http://gph.is/1B7gY3Z

20

Kicking the tireshttps://flic.kr/p/s7cRDv

Recap

Implemented as a moduleGet-Command Module PSDesiredStateConfiguration

Configuration is in a new command type.Get-DscResource is your friendGet-DscResource -syntax is totally sweet

22

Contoso University WebsiteLets make this a little more real.

23

RecapHow does this solve the problems we saw earlier?https://flic.kr/p/bpKh74

Separation of Concerns

Dev

Test

ProductionStructural Configurations

Environment Configuration DataApplication Configuration

25

Give me more!Write custom DSC resourcesPull modelPartial ConfigurationsDevelop configuration like code (version control, testing)Integration with server deployment processReporting

Works locally toohttps://flic.kr/p/cBFFFL

Questions?https://flic.kr/p/cBFFBS

27

Thank you!Josh GillespieJosh.Gillespie@polarissolutions.com@jcgillespie

28

Recommended

View more >