[1] Window PowerShell DSC 学习系列----DSC的定义和2种架构模式
来源:互联网 发布:最全家庭网络个人投资 编辑:程序博客网 时间:2024/05/01 01:54
PowerShell DSC是PowerShell的一部分,是一个新的管理平台,英文全称为,PowerShell Desired Status Configuration,翻译成中文就是理想管理配置状态。PowerShell DSC 能够为系统和软件服务部署和管理配置数据,并且允许定义当前机器的状态从而确保机器的状态和你预定义的没有偏差。
那么什么是状态的呢?状态指的就是一台机器上面的所有东西,比如,OS和软件的所有配置设置,任何文件和进程需要被设置成什么内容。DSC能够保证帮助我们处理所有的配置数据并且能重复执行且每次重复执行结果都一样。WindowPowerShell DSC能够帮助我们用户的资源在数据中心被正确的配置;DSC是PowerShell语言的扩展,为数据中心的资源提供了可申明,可自动化,满足幂等(可重复执行)性和一致性的配置能力。DSC能够帮助专业运维人员,开发,IT基础设施管理员等定义目标节点的配置(计算机或者设备)同时阻止配置的不一致性和配置状态的漂移。
简单的DSC的配置(Configuration)的例子。
PowerShell DSC是PowerShell的一部分, 而PowerShell是WMF(Window Management FrameWork)的一部分。
#1 PowerShell DSC支和Chef,Puppet一样,支持两种架构模式Push(推)和Pull(拉)模式。
(1)Push(推)模式
In this design, only one-way communication is possible. It is the administrator that sends the configuration to the machines.
Push(推)模式是是单向沟通模式,管理员直接把配置发送给目标节点。
优点:
- 成本低
- 架构简单
- 能够快速构建一个测试环境
缺点
- 需要自己管理服务器的连接;如果万一客户端不在线,则推送会失败。
(2)Pull(拉)模式
在Pull(拉)模式下,也是单向连接,不过是目标节点主动去轮询一个Pull Server(拉服务器),其实就是访问Pull Server(拉服务器)的Restful 服务(oData标准),轮询的间隔可以设置,默认情况下是15分钟。
优点:
- 能够自动部署配置
- 能够管理更多机器,就好在B/S结构中,很多用户同时访问一个网站一样,只要目标节点在网络上,其就会每 隔固定的时间去访问Pull Server(拉服务器)
缺点
- 需要部署多个服务器,在接下来的文章我们会看到,服务器端除了有Pull Server(拉服务器)之外,还有一个Compliance Server(状态监视服务器) 。
下一节,笔者将会重点介绍PowerShell DSC中的资源(Resource)已经配置文件格式(Configuration Sytax)。
参考文件:
https://www.simple-talk.com/sysadmin/powershell/powershell-desired-state-configuration-the-basics/
1 0
- [1] Window PowerShell DSC 学习系列----DSC的定义和2种架构模式
- [8] Window PowerShell DSC 学习系列----MOF文件和DSC Module的部署
- [2] Window PowerShell DSC 学习系列----DSC的资源(Resource)以及配置和格式(Configuration && Sytax )
- [3] Window PowerShell DSC 学习系列----如何在PowerShell DSC 5.x 安装最新的DSC Module?
- [6] Window PowerShell DSC 学习系列----如何安装最新的PowerShell DSC 5.1 Pull Server?
- [9] Window PowerShell DSC 学习系列----错误诊断和分析
- [4] Window PowerShell DSC 学习系列----PowerShell DSC 5.x 提供了哪些有用好用的工具命令?
- [22]Window PowerShell DSC学习系列---- 如何用PowerShell脚本查看DSC服务器的执行报表(Report)
- [28] Window PowerShell DSC 学习系列----如何用Java调用PowerShell DSC 5.x的oData服务
- [31] Window PowerShell DSC 学习系列----PowerShell DSC 专栏竟然在CSDN推荐的优秀专栏里面
- [21]Window PowerShell DSC学习系列---- 在Window 2012 R2 安装DSC 5.0 Pull服务器报错的解决方案
- [27] Window PowerShell DSC 学习系列----DSC 5.x 查询节点注册和执行报告(Report)查询
- [14]Windows PowerShell DSC学习系列---如何Debug PowerShell DSC?
- [5] Window PowerShell DSC 学习系列----如何生成一个DSC MOF文件?
- [25]Window PowerShell DSC学习系列----如何更换DSC Pull服务器数据库为Access数据库?
- [32] Window PowerShell DSC 学习系列----使用DSC Package安装时,如何获取Product ID?
- [11] Windows PowerShell DSC学习系列---如何定制一个基于PowerShell脚本实现的DSC Resource
- [12]Windows PowerShell DSC学习系列---PowerShell DSC的几个例子
- 《Head First Python》第七章 界面生成模板yate
- mysql二进制日志
- TCP的流量控制和拥塞控制机制
- [Android]当Activity启动模式为singleTask时的生命周期
- android studio添加butterknif插件
- [1] Window PowerShell DSC 学习系列----DSC的定义和2种架构模式
- java spring中对properties属性文件加密及其解密
- HTML转义字符汇总
- android----fragment学习中的listFragment
- 找数
- Rails配置项force_ssl与hsts
- 基于WWW的get请求Demo
- IE css3常用属性兼容性
- HTML5页面开发的基础性模板