開発ワークステーション
このガイドでは、保守的なツール セットと明示的なスモーク テストを使用して Ubuntu 24.04 GNOME ワークステーションを構築します。別のソースを固定してレビューしない限り、言語とエディターのバージョンは、選択したパッケージ ソースに従います。
プロンプト
Create an Ubuntu 24.04 GNOME development workstation with a dark color
scheme, SSH, Docker, Git, Python, Node.js, curl, jq, tmux, htop, and Neovim.
Create a locked-password user named dev with sudo and Docker group intent.
Do not add third-party repositories unless their HTTPS URL, signing key,
release support, and license are explicit. Add tests for the desktop session,
tool versions, Docker service, group membership, and one container smoke test.レシピを確認する
{
"name": "ubuntu24-development-workstation",
"base_image": "ubuntu-24.04",
"os": {
"features": ["desktop", "ssh", "docker", "git", "python", "nodejs"],
"packages": ["curl", "jq", "tmux", "htop", "neovim"],
"users": [
{
"username": "dev",
"groups": ["sudo", "docker"],
"shell": "/bin/bash"
}
],
"desktop_settings": {
"color_scheme": "prefer-dark",
"fonts": {
"monospace_font": "Ubuntu Mono 13"
},
"power": {
"idle_delay": 600,
"sleep_inactive_ac_timeout": 0,
"sleep_inactive_ac_type": "nothing"
}
}
}
}各機能が期待どおりに Ubuntu 24.04 で拡張されることを確認します。 docker グループ メンバーシップは、Docker デーモンを制御できるため、一般に root に相当します。ユーザーにその権限が必要ない場合は削除してください。
バージョンとソース
管理されたワークステーションでは「最新」を要求しないでください。選択したスナップショットから実際に利用可能なバージョンを記録し、それらのバージョンをテストします。ベンダー リポジトリまたはブートストラップ インストーラーは、別個の信頼ルートと更新ライフサイクルを追加します。キー、リポジトリのメタデータ、用語、ロールバック動作を確認した後でのみ使用してください。
Rustup、言語バージョン マネージャー、エディター拡張機能、コンテナー イメージなどのツールは、イメージのビルド後に移動コードをダウンロードできます。それらがワークステーションのベースラインにとって重要である場合は、それらを固定し、証拠パケットにその出所を含めます。
検証シナリオ
{
"id": "development-smoke",
"name": "Development workstation smoke test",
"enabled": true,
"tests": ["boot", "login", "packages", "services"],
"custom_tests": [
{
"description": "Confirm core tools and Docker are usable.",
"assertions": [
{
"type": "command_succeeds",
"description": "Python reports a version.",
"params": {"command": "python3 --version"}
},
{
"type": "command_succeeds",
"description": "Node.js reports a version.",
"params": {"command": "node --version"}
},
{
"type": "service_running",
"description": "The Docker daemon is running.",
"params": {"service": "docker"}
},
{
"type": "user_in_group",
"description": "The dev account has the reviewed Docker authority.",
"params": {"username": "dev", "group": "docker"}
}
]
}
]
}実際にインストールするすべてのグラフィカル エディターに GUI アサーションを追加します。パッケージ チェックでは、壊れた初回起動、ライセンス ダイアログ、ディスプレイ統合の欠落、または間違ったデフォルト デスクトップを検出できません。
最後に、承認された登録または SSH キー パスを使用してログインをテストします。レシピには意図的にパスワードが含まれていません。