万本电子书0元读

万本电子书0元读

顶部广告

Learning PowerShell DSC - Second Edition电子书

售       价:¥

7人正在读 | 0人评论 9.8

作       者:James Pogran

出  版  社:Packt Publishing

出版时间:2017-09-11

字       数:40.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
A learning guide to get you started with PowerShell DSC. About This Book ? Create flexible and maintainable deployments using DSC configuration *s that stand the test of time. ? Explore the core architecture, concepts, and practices in depth. ? Learning PowerShell DSC is a step-by-step guide that shows you how to start using and taking advantage of PowerShell DSC along with configuring and deploying applications. Who This Book Is For If you are a system administrator, developer, or engineer and are responsible for configuration management and automation, then this book is for you. IT professionals who wish to learn PowerShell Desired State Configuration for the efficient management, configuration, and deployment of systems will also find this book useful. What You Will Learn ? Explore PowerShell Desired State Configuration and activities around it, including the need for configuration management and abstraction. ? Create reusable DSC configurations and debug/ troubleshoot configuration files. ? Learn about the PowerShell DSC architecture with the help of push-and-pull management and workflows. ? Define DSC configuration *s and data files and push DSC configuration files remotely and locally. ? Validate DSC Pull Server install and register target nodes with a DSC Pull Server. ? Learn about DSC Cross Platform and install PowerShell on Linux and macOS along with real-life DSC uses and different types of deployment. In Detail The main goal of this book is to teach you to configure, deploy, and manage your system using the new features of PowerShell v5/v6 DSC. This book begins with the basics of PowerShell Desired State Configuration, covering its architecture and components. It familiarizes you with the set of Windows PowerShell language extensions and new Windows PowerShell commands that make up DSC. Then it helps you create DSC custom resources and work with DSC configurations with the help of practical examples. Finally, it describes how to deploy configuration data using PowerShell DSC. Throughout this book, we will be focusing on concepts such as building configurations with parameters, the local configuration manager, and testing and restoring configurations using PowerShell DSC. By the end of the book, you will be able to deploy a real-world application end-to-end and will be familiar enough with the powerful Desired State Configuration platform to achieve continuous delivery and efficiently and easily manage and deploy data for systems. Style and approach The purpose of this book is to introduce readers to the powerful PowerShell Desired State Configuration platform to achieve continuous delivery, efficient management, and the easy deployment of data for systems.
目录展开

Title Page

Learning PowerShell DSC

Second Edition

Copyright

Learning PowerShell DSC

Second Edition

Credits

About the Author

About the Reviewers

www.PacktPub.com

Why subscribe?

Customer Feedback

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

Introducing 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

DSC high-level overview

The authoring phase

The staging phase

The execution phase

Why all the abstraction?

How does DSC help?

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

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

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

PowerShell V6 DSC

Summary

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

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

DSC configuration syntax

The configuration keyword

The Node keyword

DSC resource statements

DSC configuration 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

The DSC composite resource folder structure

DSC composite resource drawbacks

Partial DSC configurations

Debugging and troubleshooting configuration script files

Status at a glance

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

DSC Resources

What are DSC resources?

What makes a good DSC resource

Idempotent

Do one thing well

Reuse code, but don't go overboard

Contribute back

Creating PowerShell MOF-based custom DSC resources

MOF-based DSC resource folder structure

MOF-based DSC resource syntax

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 PowerShell class-based custom DSC resources

PowerShell classes

Class-based DSC resources

The folder structure of class-based DSC resource

Class-based DSC resource syntax

Advantages of a class-based DSC resource

Disadvantages of a class-based DSC resource

Creating single-instance custom DSC resources

Creating PowerShell custom DSC resources in C#

Create the MOF schema

Create the Visual Studio project

Create the C# cmdlet code

Packaging the C# custom DSC resource

Testing custom DSC resources

Using xDscResourceDesigner

Pester

Microsoft recommendations

How do you find DSC resources?

Microsoft DSC resource Kits

Installing DSC resource Kits

Microsoft PowerShell DSC GitHub repository

Installing DSC resources from GitHub

Microsoft PowerShell Gallery

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

Deploying DSC resources

Deploying DSC resources in a push DSC configuration deployment

Deploying DSC resources in a pull DSC configuration deployment

Summary

Pushing DSC Configurations

Tooling

Setting things up

Test environment

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

Pulling DSC Configurations

Creating DSC pull servers

DSC pull server setup considerations

DSC pull server type

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 an SMB DSC pull server

Creating an HTTPS DSC pull server

DSC pull server and registration keys

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 target node using a configuration ID

Registering a target node using RegistrationKey

Pulling DSC configurations with a DSC pull server

Compiling DSC configurations using ConfigurationIDs

Compiling DSC configurations using RegistrationKeys

Deploying DSC Configurations to the DSC pull server

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

WMF 5 pull server reporting

WMF 4 pull server reporting

Summary

DSC Cross Platform Support

DSC cross-platform support

Using DSC on Linux

Installing DSC on Linux

Pushing a DSC configuration to a Linux node

PowerShell Core

Installing PowerShell Core on Windows

Installing PowerShell Core on macOS

Homebrew

Manual

Installing PowerShell Core on Linux

Ubuntu

Summary

Example Scenarios

Real-life DSC usage

Setting up a common installation base

Installing software

Configuration management refresher

Complicated deployments

Handling change

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部