Skip to content
/ ZeroDSC Public

lightweight native PowerShell desired state configuration engine

License

Notifications You must be signed in to change notification settings

alx9r/ZeroDSC

Repository files navigation

Warning A mild note of caution: The core features of ZeroDSC are implemented and working. Please experiment with ZeroDSC and provide feedback by opening issues and pull requests here. Please also note that it is still early days for this project and many of the features are still experimental and unpolished. Expect breaking changes to ZeroDSC before it stabilizes including changes to the configuration document format, live configuration objects, and the behaviour of the configuration algorithm.

Build status

ZeroDSC

ZeroDSC is a lightweight native PowerShell implementation of a desired state configuration (DSC) engine.

ZeroDSC directly invokes existing PowerShell DSC resources without any dependence on the local configuration manager (LCM). ZeroDSC uses a declarative configuration document format that looks similar to traditional LCM-invoked configurations. Configuration documents and resources are interpreted and invoked in a single PowerShell session. No intermediate files, encryption certificates, or additional processes, modules, or packages are required for ZeroDSC to work. This makes ZeroDSC suitable for bootstrapping more elaborate configuration management strategies.

The operation of the ZeroDSC configuration engine is deliberately transparent and interactive. Fine-grained observation and troubleshooting of the ZeroDSC configuration progress is possible with minimal effort. ZeroDSC supports end-to-end debugger access and streamlined invocation from Pester.

New to ZeroDSC?

If you are new to ZeroDSC and would like to learn more, I recommend reviewing the getting started documentation.

You can find more documentation here.

Uses

  • development and testing of DSC resources
  • automation involving the configuration of resources involving dependencies
  • configuring prerequisites for automated testing
  • bootstrapping LCM-invoked DSC setup
  • configuring resources in user contexts

Comparison

ZeroDSC is intended as a complement to, not a replacement for, the LCM. The table below is meant to highlight their differences.

✅ = already implemented

⬜ = on the ZeroDSC roadmap

ZeroDSC LCM-invoked DSC
Resources
works with class-based resources
works with MOF-based resources
works with binary resourcesa
Configuration Documents
works with ZeroDSC configuration documents
works with traditional PowerShell configuration documents
allows configuration documents with cyclic dependencies c
supports complex custom dependency logic
Privileges, Credentials, Remoting
invoke resources without requiring privileged user
invoke resources as current user without certificates
provide credentials interactively and immediately invoke resources as that user
install resources over PowerShell remoting
invoke resources over PowerShell remoting
encrypt and save credentials for future use
retains credentials after reboot
Control and Transparency
continually applies configurations
automatically continues configuration after reboots
fine-grained control of when and how configurations are applied
step through entire configuration process from single debugger
interact with live configuration objects in console
emits intuitive live configuration objects
Testing and Integration
seamless fine-grained invocation of configurations from Pester
streamlined integration with continuous integration systemsb

(a) ZeroDSC could be extended to support binary resources with minimal effort if needed.

(b) When ZeroDSC configurations are invoked using Pester, configuration results can be output in the NUnitXml format or any other format supported by Pester.

(c) The connect issue "Solve the 'Circular DependsOn Exists' Error" seems to indicate that cyclic DependsOn references are not allowed when using the LCM. ZeroDSC uses a multi-pass configuration algorithm that does not have this limitation.

Roadmap

⬜ = on the ZeroDSC roadmap ✔️ = already implemented

✔️ Invoker for class-based resources

✔️ Invoker for MOF-based resources

✔️ importing resources from DSL

✔️ creating configurations from DSL

✔️ binding configurations to resources

✔️ multi-pass configuration algorithm

✔️ configuration instructions implements IEnumerable<ConfigStep>

✔️ clean up public API

⬜ special aggregate resource for more complex dependency logic

⬜ log engine activity to the verbose stream

⬜ bootstrap RemoteFile resource

⬜ bootstrap Archive resource

⬜ adapt built-in resources to execute in user context

⬜ parameters for configuration documents

⬜ invokation of bootstrap resources over PowerShell remoting

⬜ invokation of other DSC resources over PowerShell remoting

⬜ install of ZeroDSC and DSC resources over PowerShell remoting

Note

1: The warning symbol is the work of Roulex_45 and is used under license by way of https://en.wikipedia.org/wiki/File:France_road_sign_A14.svg.

About

lightweight native PowerShell desired state configuration engine

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published