Consider how we might offer resource code as an ARM resource
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 526
- Fork
- 76
- Merge medio
- 3g 16h
- PR unite (30g)
- 24
Descrizione
Summary of the new feature / enhancement
The intention would be for DSC resources to be published as an ARM resource. The motivation for such as solution would be to eliminate the machine configuration dependency on external artifacts, by modeling resources in ARM and writing them as a control-plane API.
This might be workable, based on Run Command resources. In that model, the script reference can either be in-line code or an external file.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/run-command-managed#rest-api
Proposed technical implementation details (optional)
For very simple one-liners we could consider passing in the command syntax with the parameter input. This probably would be most useful in audit scenarios. Set scripts are more often complicated but Get scripts can sometimes be quite short.
If we followed the Run Command schema, this is what the json might look like.
{
"source": {
"get": "$service = get-service -name $env:Name; @{Name = $service.Name; Status = $service.status}"
},
"parameters": {
"Status": "Running",
"Name": "bits"
}
}
So an end-to-end automation command would look something like this.
{"source": {"get": "$service = get-service -name $env:Name; @{Name = $service.Name; Status = $service.status}"},"parameters": {"Status": "Running","Name": "bits"}} | dsc resource
This would require the machine configuration service team to create a new resource type under Microsoft.GuestConfiguration. Then a configuration in JSON format in ARM could reference the script code as a dependency.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il modello Azure Run Command REST API collegato e la dipendenza tra il servizio di configurazione delle macchine e il tipo di risorsa descritta nell’issue. Non vengono indicati file del repository né test; sarebbe necessario concordare i criteri di completamento per uno schema di risorsa ARM, la gestione degli script inline e un flusso di risorse dsc end-to-end.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, powershell
- Ambito
- api, cloud, infrastructure
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100