11

Click here to load reader

PowerShell DSC Overview

Embed Size (px)

Citation preview

Page 1: PowerShell DSC Overview

PowerShell DSC overviewIgor Shenderchuk

Senior Software Engineer

Page 2: PowerShell DSC Overview

AgendaWhat is DSC?

DSC Architectural Overview Compilation phase

Execution phase

Staging phase (push and pull modes)

Windows DSC resources

Demo

Page 3: PowerShell DSC Overview

What is DSC?“Desired State Configuration is Microsoft’s technology, introduced in Windows management framework 4.0, for declarative configuration of systems”.

The DSC Book

“DSC is distributed, heterogeneous, configuration management platform”.

Jeffrey Snover

Page 4: PowerShell DSC Overview

DSC Architectural Overview

Configuration scriptMyConfig.ps1

MOFServer1.mof

Compilation

MOF on Target Node

DSC Local Configuration Manager

Execution

Page 5: PowerShell DSC Overview

Compilation phaseThe DSC configuration file is compiled to an MOF format.

MOF is a Distributed management task force standard for Common Information Model(CIM)

Each MOF file is for a single target node.

You can only have one MOF file applied to

any target node at any given time.

Page 6: PowerShell DSC Overview

Execution phase (LCM)

New MOF Pending.mof

Previous.mof

Current.mof

Success

Failure

Page 7: PowerShell DSC Overview

Push deployment

PS

3rd party tool

MOF

LCM

Pending.mof

Current.mof

Authoring Compilation Execution

Page 8: PowerShell DSC Overview

Pull deployment

PS

3rd

party tool

MOF

Authoring Staging Execution

Node

LCM

Pending.mof

Current.mof

Pull Server

MOF Files

Resources

NN

NN

Status

File download

Page 9: PowerShell DSC Overview

Windows DSC ResourcesBuilt-in resources for:

Enabling or disabling server roles and features

Managing registry settings

Managing files and folders

Starting, stopping and managing processes and services

Managing local user and group accounts

Deploying new software packages

Managing environment variables

Running Windows PowerShell scripts

Archive Group Process

Registry Service Script

Log Environment File

Package Role User

Page 10: PowerShell DSC Overview

DEMO

https://github.com/Shenderchuk/Presentations

Page 11: PowerShell DSC Overview

Used materialshttps://www.packtpub.com/books/content/powershell-%E2%80%93-dsc-architecture

https://www.sans.org/reading-room/whitepapers/bestprac/configuration-management-windows-powershell-desired-state-configuration-dsc-36167

https://www.penflip.com/powershellorg/the-dsc-book

https://google.com