Comments (3)
For the sake of visibility:
In the case of WinGet as an orchestrator, we have an experimental feature in place for generating configuration from the current state for a single resource or package (and resource). This works with a few DSC v2 resources, but it's more of a building block to work on top of today.
In the future, WinGet would iterate over all installed packages, and it would be aware of Windows Settings.
Dev Home also has plans to support a logical "get my current configuration" and then some kind of editor type of experience to modify the generated configuration.
I think the approach here makes perfect sense in the world of DSC v3 only scenarios for DSC.exe, but in the current hybrid world, we're likely to see multiple different scenarios that need unique treatments.
from dsc.
A few things I think important to note about any potential recursive export implementations:
-
Currently, DSC can only perform the export for resources that are already installed on the machine.
In the future, with a repository for DSC resource packages, this could be runtime-resolvable. Right now, if you don't already have a resource installed and available, DSC simply can't know that it exists.
For example, you might have a resource to manage the installation of an application with WinGet, but not that application's configuration resource(s). So the export would be able to ensure that the application gets installed at the right version, but it installs with the default config, not the current config.
-
I don't think that there's a good way, right now, for resources to indicate (and therefore, for the export function to propogate) the difference between "This instance is configured for property
foo
to be set to1
and "This instance implicitly uses the default value1
for propertyfoo
."This primarily matters when a resource or application updates. This can lead to a case where both systems seem to have the same configuration before an update, but after updating the systems have different behavior - and from the perspective of the user, they only changed the exact same thing on both systems.
-
I don't see a good way, without custom implementations for the exporters, to map dependencies between exported instances.
I don't see how DSC itself (or higher order tools/exporter resources without custom logic) can tell that a package resource instance and a configuration file resource instance are related. With no way to define dependencies, you can end up with a configuration that tries to configure an app that isn't installed, or a web server before the database is defined, etc.
-
I'm not sure I see a coherent way for the exporter to handle groups.
Similar to dependencies, there's no way to associate a set of resources together, except through an adapter or group resource - whereas for readability and dependency management I would probably want the application package, configuration, and service resource instances grouped together.
I think recursive export is a good idea, but there's limitations to the operation that I don't see feasible options for that won't require a lot of custom logic or new resource capabilities for.
I also think that we should always be very clear when we describe export-for-reuse operations that the output from that operation is a starting point and should always be inspected and approved by a human before using that output. Especially when we're thinking about recursively exporting the full configuration of a system, but even when exporting the current configuration of a small group of applications.
from dsc.
For the mapping of applications to resources, I think a SWID property in the resource manifest should be sufficient. SWIDs are XML, so I suppose this would be a string that contains XML. However, it does appear that SWID XML doesn't contain content and is only relying on attributes, so this could be converted to JSON.
It would make sense to have a property in the manifest for exporter
kinds to declare if it returns and exportable config (which initiates recursion) or not (should be used directly to apply).
from dsc.
Related Issues (20)
- Better error when no input is provided to `test` on a resource
- Pending reboot should have embedded schema for assertions
- PSDSCAdapter cannot process argument transformation HOT 2
- Remove static validation of input HOT 4
- Large output not returned HOT 2
- `dsc` should add it's home directory to `PATH` to find included resources
- Cache entry path not found
- Copy loop iteration HOT 8
- Export operation method cannot be called on a null-valued expression HOT 2
- Expressions is missing array index support
- Duplicates allowed for parameters and values (or any HashMap) HOT 3
- Need to support getting traces from child `dsc` processes HOT 7
- Better error message when no input is provided to PowerShell adapters HOT 2
- Multi-string support HOT 7
- Nightly artifact build HOT 2
- Plan for existing DSC 1.1 LCM users to migrate to DSC 3.0
- Publish WinGet package HOT 1
- Offline image configuration
- Publish echo resource as `Microsoft.DSC.Debug/Echo`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsc.