PowerShell / PowerShell/DSC

Consider how we might offer resource code as an ARM resource

オープン
#246 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Issue-Enhancement
主要言語
Rust
スター
526
フォーク
76
平均マージ
3日 16時間
マージ済み PR(30日)
24

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、リンクされている Azure Run Command REST API モデルと、issue で説明されているマシン構成サービスとリソースタイプの依存関係を確認します。リポジトリのファイルやテストは指定されていないため、ARM リソーススキーマ、インラインスクリプトの処理、エンドツーエンドの dsc リソースフローについて完了基準を合意する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, powershell
領域
api, cloud, infrastructure
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。