That is the primary put up in a multi-part sequence concerning the new launch of DSC.
We’re happy to announce the Common Availability of Microsoft’s Desired State Configuration (DSC)
model 3.0.0.
This model marks a big evolution in cloud-native configuration administration
for cross-platform environments. DSC is a declarative configuration and orchestration platform that
defines a regular approach of exposing settings for purposes and companies. It’s a instrument for managing
techniques and purposes by describing what they need to appear to be reasonably than the right way to make it that
approach. DSC simplifies system, service, and software administration by separating what to do from the right way to
do it.
Advantages of DSC
- Declarative and Idempotent: DSC configuration paperwork are declarative JSON or YAML recordsdata
that outline the specified state of your system in a straight-forward approach. They embrace the situations
of DSC assets that want configuration. DSC ensures the system matches that state, repeatedly if
wanted, with out making pointless modifications. - Versatile: DSC Assets outline the right way to handle state for a selected system or software
part. Assets may be authored in any language, not solely PowerShell. - Cross-Platform: DSC works on Linux, macOS, and Home windows while not having additional instruments or
dependencies. - Integratable: Designed to be simply built-in into current configuration options. DSC
returns schematized JSON objects for hint messages and command output. Software builders and script
authors can simply validate and parse the output for integration with different configuration instruments
and frameworks. DSC simplifies the way you name it by accepting JSON from stdin for all configuration
and useful resource instructions. DSC assets embrace a manifest that defines the useful resource properties as a
JSON schema and the right way to invoke the useful resource. You may reuse this definition throughout numerous
toolchains for tighter integration with DSC. - Backwards appropriate: This launch of DSC can use all current PowerShell 7 and Home windows
PowerShell DSC assets.
With DSC, you may:
- Create configuration recordsdata that outline how your setting ought to look.
- Write DSC assets in any programming language to handle your techniques and purposes.
- Invoke DSC assets to carry out particular actions.
- Outline a regular approach for purposes and companies to make their settings discoverable and
usable. This implies that you could uncover and invoke assets instantly, even with out DSC.
Variations from PowerShell DSC
Home windows PowerShell 5.1 contains PowerShell Desired State Configuration (PSDSC). We seek advice from as
basic DSC, which encompasses PSDSC v1.1 and v2. Nonetheless, DSC can use any basic DSC assets
that exist in the present day, together with the script-based and class-based PSDSC assets. You should utilize PSDSC
assets in DSC with each Home windows PowerShell and PowerShell.
The discharge of DSC is a serious change to the DSC platform. DSC differs from PSDSC in a couple of necessary
methods:
- DSC not contains or helps the Native Configuration Supervisor (LCM).
- DSC doesn’t rely upon PowerShell. You should utilize DSC with out PowerShell put in and handle
assets written in bash, python, C#, Go, or another language. - DSC doesn’t embrace a neighborhood configuration supervisor. DSC is invoked as a command-line instrument. It doesn’t
run as a service. - The PSDSC configuration paperwork used Managed Object Format (MOF) recordsdata. Few instruments have been in a position to
parse MOF recordsdata, particularly on non-Home windows platforms. DSC isn’t appropriate with MOF recordsdata, however you
can nonetheless use all current PSDSC assets. - DSC is constructed on trade requirements, reminiscent of JSON, JSON Schema, and YAML. These requirements make DSC
simpler to combine into instruments and workflows in comparison with PSDSC. - DSC configuration paperwork are outlined in JSON or YAML. The configuration paperwork use
expression features to allow dynamic values, reasonably than utilizing PowerShell code to retrieve
setting variables or be a part of strings. - DSC helps supplying parameter values for configuration paperwork at runtime both as JSON
or by pointing to a parameters file as an alternative of producing a configuration MOF file earlier than
making use of the configuration. - Not like PSDSC, DSC returns strongly structured output. This structured output adheres to a
printed JSON Schema, making it simpler to grasp the output and to combine it into your individual
scripts, reporting, and different tooling. Whenever you take a look at or set assets and configurations
with DSC, the output tells you how a useful resource is out of the specified state or what DSC modified
in your system.
Options of DSC
- Teams: DSC helps a brand new useful resource form that modifications how DSC processes an inventory of assets.
Useful resource authors can outline their very own group assets and configuration authors can use any of the
built-in group assets.The DSC repository has an instance that reveals how one can group assets collectively and use
thedependsOn
key phrase to outline the order these teams are utilized in a configuration. - Assertions: Use the
Microsoft.Dsc/Assertion
(a particular group useful resource) to validate the
setting earlier than working the configuration.The DSC repository has an instance that reveals how you should utilize an assertion to handle a
useful resource that ought to solely run on a selected working system. - Importers: DSC helps a brand new useful resource form that pulls in a configuration from an exterior
supply for reuse within the present configuration doc. Useful resource authors can outline their very own
importer assets and configuration authors can use the built-inMicrosoft.DSC/Embody
useful resource.The DSC repository has an instance that reveals how you should utilize theMicrosoft.Dsc/Embody
useful resource to reuse a separate configuration doc file, enabling you to compose a fancy
configuration from smaller, easier configuration paperwork. - Exporting: DSC helps a brand new operation that assets can implement to return the listing of all
current situations of that useful resource. You should utilize thedsc useful resource export
command to get
each occasion of that useful resource on a machine. Use thedsc config export
command to search for
a set of assets and return a brand new configuration doc containing each occasion of these
assets. - Configuration features: DSC configuration paperwork help a set of features that
allow you to alter how DSC processes the assets.The DSC repository has an instance that reveals how one can reference the output from one
useful resource within the properties of one other.
Help lifecycle
DSC follows semantic versioning. The primary launch of DSC, model 3.0.0, is a Steady launch.
The primary launch of DSC, model 3.0.0
, is a Steady launch. Patch releases replace the third
digit of the semantic model quantity. For instance, 3.0.1 is a patch replace to three.0.0. Steady releases
obtain patches for important bugs and safety vulnerabilities for 3 months after the subsequent
Steady launch. For instance, model 3.0.0 is supported for 3 months after 3.1.0 is launched.
At all times replace to the newest patch model of the discharge you’re utilizing.
Subsequent steps
As I discussed on the prime of this put up, this was the primary in a sequence of posts concerning the new DSC. For the next posts:
- DSC refers to Desired State Configuration (DSC) v3.0.0
- PSDSC refers to PowerShell Desired State Configuration (PSDSC) v1.1 and v2
Now you might be prepared for the subsequent put up: Get Began with Desired State Configuration v3.0.0 (DSC)
Name to motion
For extra details about Desired State Configuration v3.0 (DSC), go to the
DSC documentation. We worth your suggestions. Cease by our GitHub repository and allow us to
know of any points you discover.
Jason Helmick
Sr. Product Supervisor, PowerShell