Save 37% off PRO during our Black Friday Sale! »

Dive into PowerShell DSC PULL

Dive into PowerShell DSC PULL

Deep Dive into PowerShell Desired Statement Configuration PULL Mode.
- What PULL is?
- Why PULL?
- How to configure PULL Mode?
- What are Local Configuration Manager Engine parameters?
- Debugging PowerShell DSC PULL

C61c4df7cb3f2da2b4a7e7fe08bca7e1?s=128

guitarrapc

July 12, 2014
Tweet

Transcript

  1. None
  2. @Job @Private http://tech.guitarrapc.com @guitarrapc_tech https://github.com/guitarrapc/valentia

  3. None
  4. PUSH Client Client DSC Server Node Node Resource Configuration PUSH

    DSCの管理下に置かれるクライント Resource Resource
  5. PUSH Client Client DSC Server Node Node Resource Configuration PUSH

    DSCの管理下に置かれるクライント Resource Resource
  6. Boring…. Why don’t you use Valentia instead ?

  7. Easy sending desired configuration at once! You don’t need any

    module to implement!
  8. None
  9. Neither Orchestration nor RemoteCommandTool You SHOULD manage configuration PUSH is

    practice of DSC
  10. None
  11. Do you want to manage node status? Wanna manage scheduler

    by yourself? How do you send resource to the node?
  12. Hey, where did I applied this configuration? Beyond Firewall? Should

    I manage authentication each time?
  13. Mof management The more nodes, the more mof

  14. None
  15. None
  16. How do I use DSC in production?

  17. None
  18. PULL Client Client DSC Server Node Node Resource Configuration PULL

    DSCの管理下に置かれるクライアント
  19. Do you think PULL is better than PUSH?

  20. None
  21. None
  22. Number of Nodes Scaling

  23. Continuous Configuration Automate Resource transfer

  24. Beyond Firewall High Availability

  25. Think about production.

  26. Have a number of servers? Auto Scaling servers? Less think

    about Configuration changes?
  27. Let’s use DSC PULL

  28. None
  29. Sorry for long time absent for web blog. http://tech.guitarrapc.com

  30. https://github.com/guitarrapc/DSCSample

  31. None
  32. Enable-PSRemoting -Force Set-ExecutionPolicy RemoteSigned # or ByPass

  33. xPSDesiredStateConfiguration Resource (3.0.0.1) http://gallery.technet.microsoft.com/xPSDesiredStateConfiguratio-417dc71d

  34. C:¥Program Files¥WindowsPowerShell¥Modules

  35. Demo

  36. C:¥DSCSample

  37. F5 で実行するだけの簡単なほげもげ

  38. F5 で実行するだけの簡単な略

  39. 誰でもできる!

  40. http://127.0.0.1:8080/PSDSCPullServer/PSDSCPullServer.svc

  41. None
  42. F5 で実行するだけの簡単な略

  43. Demo

  44. None
  45. F5 で実行するだけの簡(

  46. Configuration folder you specify on PSDSCPullServer .mof .mof.checksum

  47. New-DSCCheckSum Cmdlet # コピーした.mofファイルのchecksumファイルを生成する。 New-DSCCheckSum $dest -Verbose -Force

  48. Demo

  49. None
  50. Get-DSCConfiguration Cmdlet $cimSession = New-CimSession -ComputerName $nodename Get-DscConfiguration -CimSession $cimSession

  51. Get actual Configuration, not desired configuration!

  52. Cmdlet result also changes!

  53. Demo

  54. None
  55. Test-DSCConfiguration Cmdlet $cimSession = New-CimSession -ComputerName $nodename Test-DscConfiguration -CimSession $cimSession

  56. Demo

  57. None
  58. Through CIM Method Cmdlet # Run Immediately Invoke-CimMethod -Namespace root/Microsoft/Windows/DesiredStateConfiguration

    -Cl MSFT_DSCLocalConfigurationManager -Method PerformRequiredConfigurationChecks -Arguments @{Flags = [System.UInt32]1}
  59. Demo

  60. None
  61. LCM defines behavior toward DSC operations

  62. PULL or PUSH RefreshMode = "Pull"

  63. Guid to refer mof on DSCServer ConfigurationID = $guid

  64. How Node act toward Configuration ConfigurationMode = "ApplyAndAutoCorrect"

  65. How to download from DSC PULL Server DownloadManagerName = "WebDownloadManager"

  66. ServerUrl and AllowUnsecureConnection DownloadManagerCustomData = @{ ServerUrl = "http://10.0.2.20:8080/PSDSCPullServer/PSDSCPullServer.svc" AllowUnsecureConnection

    = "true"}
  67. How often configuration will apply ConfigurationModeFrequencyMins = 30

  68. How often check configuration to DSC PULL Server RefreshFrequencyMins =

    15
  69. None
  70. xDscDiagnostics Resource (2.0) http://gallery.technet.microsoft.com/scriptcenter/xDscDiagnostics-PowerShell-abb6bcaa

  71. C:¥Program Files¥WindowsPowerShell¥Modules

  72. Get-xDSCOperation (Get-xDscOperation -Newest 1).AllEvents

  73. Trace-xDSCOperation Trace-xDscOperation -seq 1

  74. None
  75. PULL is the only one can be use in production

    using xDSCDiagnostic
  76. None
  77. None