售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning PowerShell DSC
Table of Contents
Learning PowerShell DSC
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introduction to PowerShell DSC
What is PowerShell DSC?
What is PowerShell?
On to PowerShell DSC
Why do we need Configuration Management?
What is DevOps?
DSC quick wins
A high level overview of DSC
The authoring phase
The staging phase
The execution phase
Why all the abstraction?
How does DSC help me?
The who
The what
The how
Idempotence
Isn't this Group Policy or SCCM?
DSC features
DSC requirements
DSC versions
PowerShell v4 DSC
v4 DSC language extensions
v4 DSC base resources
v4 DSC Cmdlets
The v4 DSC Pull Server
PowerShell v5 DSC
v5 DSC language extensions
v5 DSC base resources
v5 DSC Cmdlets
v5 improvements
The PowerShell ISE
Partial configurations and dependencies
Class-based DSC Resources
DSC built-in support for help
DSC run as credential support
DSC resource side-by-side installation
DSC resource script debugging
The separation of node and configuration IDs
DSC LCM MetaConfig updates
DSC LCM rich state information
DSC LCM RefreshMode values
DSC status from a central location
Summary
2. DSC Architecture
Overview
Push and pull modes
The push management model
The pull management model
The general workflow
Authoring
Syntax
Compilation
Staging
Execution
Push executions
Pull executions
The example workflow
Configuration data
Hardcoded data
Parameter-based data
Hashtable data
Local Configuration Manager
LCM settings
Configuration modes
ApplyOnly
ApplyAndMonitor
ApplyAndAutoCorrect
Refresh modes
The LCM configuration
An example LCM configuration
The DSC Pull Server
What is a DSC Pull Server?
What does the Pull Server do for us?
Automatic and continuous configuration
Repository
Reporting
Security
Setting up a DSC Pull Server
Pull Server settings
Installing the DSC server
Adding MOF files to a Pull Server
Adding DSC Resources to a Pull Server
Deployment considerations
General observations
LCM gotchas
Deployment mode differences
Summary
3. DSC Configuration Files
Defining a DSC configuration script file
Authoring DSC configuration files
DSC automatic variables
AllNodes
Node
ConfigurationData
DSC Resource import declarations
Import-DscResource
The DSC script file syntax
The Configuration keyword
The Node keyword
DSC Resource statements
The script file example
Defining a DSC configuration data file
Authoring DSC configuration data files
Configuration data syntax
The variable syntax
The data file syntax
Allowable DSC configuration content
Creating reusable DSC configurations
Nested DSC configurations
Nested DSC configuration syntax
Nested DSC configuration limitations
DSC composite resources
Why use DSC composite resources?
The DSC composite resource syntax
DSC composite resource folder structure
DSC composite resource drawbacks
Debugging and troubleshooting configuration script files
Using DSC event logs
Enabling verbose logging
What do DSC event logs contain?
Gathering events from a single DSC operation
Event Viewer
PowerShell
Using the xDscDiagnostics module to analyze DSC logs
Get-xDscOperation
Trace-xDscOperation
Resetting the DSC engine cache
Enabling the debug mode
Fixing a stuck DSC run
Summary
4. DSC Resources
What are DSC Resources?
Creating a custom PowerShell v4 DSC Resource
The folder structure of a v4 DSC Resource
The syntax of a v4 DSC Resource
The DSC Resource definition file
Naming
Versioning
Parameters
Qualifiers
The DSC PowerShell module file
Get-TargetResource
Test-TargetResource
Set-TargetResource
Authoring custom DSC Resources
Creating DSC Resources manually
Creating DSC Resources automatically
Creating a custom PowerShell v5 DSC Resource
PowerShell classes
Class-based DSC Resources
The folder structure of v5 DSC Resources
The syntax of v5 DSC Resources
Declaring the class
Schema
Methods
Get
Test
Set
The advantages of a class-based DSC Resource
The disadvantages of a class-based DSC Resource
What makes a good DSC Resource
Idempotent
Do one thing well
Reuse code, but don't go overboard
Contribute back!
Testing custom DSC Resources
Using xDscResourceDesigner
Pester
Microsoft recommendations
How do you find DSC Resources?
Microsoft DSC Resource Kits
Installing DSC Resource Kits
The Microsoft PowerShell DSC GitHub repository
Installing DSC Resources from GitHub
The Microsoft PowerShell Gallery
PackageManagement
Installing PackageManagement
Initializing PackageManagement
Discover DSC Resources in the PowerShell Gallery
Installing DSC Resources in the PowerShell Gallery
Custom hosting options
Local SMB/network share
NuGet IIS
Third-party NuGet servers
Summary
5. Pushing DSC Configurations
Tooling
Setting things up
Test environments
Locally pushing DSC configurations
Setting up the test environment locally
Compiling configurations for local target nodes
Executing configurations for local target nodes
Remotely pushing DSC configurations
Setting up the test environment remotely
Compiling configurations for remote target nodes
Executing configurations for remote target nodes
Things you must consider when pushing DSC configurations
Summary
6. Pulling DSC Configurations
Creating DSC Pull Servers
DSC Pull Server setup considerations
DSC Pull Server types
The Windows Management Framework version
Initial setup tasks
Installing required DSC Resources
SSL certificates
SMB share creation
Preparing DSC Resources for Pull Server distribution
Miscellaneous tasks
Creating a WMF 4 DSC Pull Server
Creating a WMF 5 DSC Pull Server
Validating a DSC Pull Server install
Testing using a web browser
Testing using the command line
Registering target nodes with a DSC Pull Server
Registering a WMF 4 target node
Registering a WMF 5 target node
Pulling DSC configurations with a DSC Pull Server
Pulling DSC configurations using ConfigurationIDs
Pulling DSC configurations using RegistrationKeys
DSC Pull Server and target node status
Checking the current LCM configuration status
Triggering a DSC configuration to run on a target node
Triggering a WMF 4 target node
Triggering a WMF 5 target node
Using DSC logging to check on the status
Reporting on the target node status
Reporting on the target node status with the DSC Pull Server
Summary
7. Example Scenarios
Real life DSC usage
Setting up a common installation base
Installing software
A configuration management refresher
Complicated deployments
Handling change
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜