標籤:wmf wmi dsc
Windows管理架構WMF總覽
Windows管理架構WMF是基於Windows的,跨伺服器的一致性管理介面的架構。它包含如下特性:
Windows PowerShell
Windows PowerShell Desired State Configuration (DSC)
Windows PowerShell Integrated Script Environment (ISE)
Windows Remote Management (WinRM)
Windows Management Instrumentation (WMI)
Windows PowerShell Web Services (Management OData IIS Extension)
Software Inventory Logging (SIL)
Server Manager CIM Provider
Windows Remote Management 架構
650) this.width=650;" title="clip_image002" style="margin:0px;background-image:none;" border="0" alt="clip_image002" src="http://s3.51cto.com/wyfs02/M02/06/27/wKiom1myW5ChOx2aAADEbURKgk0839.jpg" height="541" />
650) this.width=650;" title="clip_image004" style="margin:0px;background-image:none;" border="0" alt="clip_image004" src="http://s3.51cto.com/wyfs02/M02/A4/D8/wKioL1myW2_w-vYBAAC0HrCeINA807.jpg" height="399" />
Windows Management Instrumentation 架構
650) this.width=650;" title="clip_image006" style="margin:0px;background-image:none;" border="0" alt="clip_image006" src="http://s3.51cto.com/wyfs02/M01/06/27/wKiom1myW5LxfPh5AADg3npn27c266.jpg" height="479" />
650) this.width=650;" title="clip_image008" style="margin:0px;background-image:none;" border="0" alt="clip_image008" src="http://s3.51cto.com/wyfs02/M00/A4/D8/wKioL1myW3GwghmUAAHZ-DWBL0A208.png" height="379" />
對於DBA來說,可以利用WMI做以下兩個方面的監控:
1. 使用WMI Provider for Server Events建立SQL Server Agent警示。
2. 使用Powershell訂閱WMI產生的事件。
Windows PowerShell Desired State Configuration
DSC是可定義的系統配置、部署和管理的平台。
DSC的一些背景
一種新型的組態管理工具被建立,用來管理平台,應用程式,和雲上面的基礎架構以保證雲在高可用性下運行。這些新工具和基礎架構的需求來源於雲規模的增長,快速更新和複雜性。但是現有的工具僅限支援Windows。
Windows PowerShell 預期狀態配置(DSC)提供了一個內建於Windows,基於公開標準的配置平台。DSC在部署周期(開發,測試,預發布和發布)每個階段都可以非常靈活地,穩定地,一致地起作用,在向外擴充時也一樣,這也正是雲端運算環境所需要的。
DSC是什麼
在內部部署和雲上,DSC都會帶給你一個強大而簡單的方式去管理你的Windows基礎架構。它通過向PowerShell語言中引進一個非常簡單的文法聲明,和一個用來接收和應用這些配置的內建引擎來實現。你使用這個新的聲明文法,來聲明一個你環境的預期狀態,然後將它分發給組成你的環境的每一個目標節點。在配置被交付和應用後,當配置發生偏差時,它能夠用來糾正配置偏差,或者只向你彙報配置偏差,讓你知道發生了什麼。
PowerShell提供了兩種模式:推模式和拉模式
儘管大部分工具同時支援這兩種模式,但是也有一些工具喜好推模式,例如Ansible;還有一些工具喜好拉模式,例如Puppet和Chef。有關於這兩種模式的爭論有很多。推模式更加簡單、更容易控制:它不需要在目標節點上安裝任何特定的軟體,同時配置在使用者請求時才會觸發。拉模式的延展性更好,支援豐富的中繼資料:目標節點自己完成配置工作,使用非同步方式,同時拉伺服器能夠集中儲存每一個目標節點狀態的中繼資料。
650) this.width=650;" title="clip_image010" style="margin:0px;background-image:none;" border="0" alt="clip_image010" src="http://s3.51cto.com/wyfs02/M00/A4/D8/wKioL1myW3Ly9lQOAADKIbMYKho111.jpg" height="315" />
650) this.width=650;" title="clip_image012" style="background-image:none;" border="0" alt="clip_image012" src="http://s3.51cto.com/wyfs02/M02/06/27/wKiom1myW5SjMgVxAADCsHXTCX4140.jpg" height="318" />
對於DBA,可以通過DSC來部署資料庫、管理資料庫。
參考:
https://docs.microsoft.com/zh-cn/powershell/wmf/readme
https://msdn.microsoft.com/en-us/library/aa384464.aspx
https://msdn.microsoft.com/en-us/library/aa394553.aspx
https://docs.microsoft.com/en-us/powershell/dsc/overview
https://www.red-gate.com/simple-talk/sysadmin/powershell/powershell-desired-state-configuration-the-basics/
http://www.pstips.net/monitor-event.html
https://docs.microsoft.com/en-us/sql/relational-databases/wmi-provider-server-events/wmi-provider-for-server-events-concepts
本文出自 “SQL Server Deep Dive” 部落格,請務必保留此出處http://ultrasql.blog.51cto.com/9591438/1963767
Windows管理架構WMF總覽