dx: Streamline setup with single command, parallel installs, and cross-platform support#453
dx: Streamline setup with single command, parallel installs, and cross-platform support#453gambtho wants to merge 1 commit intoAzure:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Improves the developer setup flow (with a focus on Windows friendliness) by adding a cross-platform submodule reset script, switching installs to npm ci, parallelizing dependency installation, and updating the README with simplified setup steps and an optional “use system Azure CLI” path.
Changes:
- Added
scripts/setup-submodule.mjsto reset/init the Headlamp submodule cross-platform. - Switched plugin/Headlamp installs to
npm ci, added a top-levelsetupscript, and parallelizedinstall:all. - Added an optional
AKS_DESKTOP_SYSTEM_AZpath in external-tools setup and refreshed README setup instructions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/setup-submodule.mjs | New Node-based submodule reset/init script intended to replace the reset path of the bash helper. |
| package.json | Uses npm ci, parallelizes install:all, and introduces a setup script for streamlined bootstrap. |
| build/setup-external-tools.ts | Adds AKS_DESKTOP_SYSTEM_AZ mode to skip bundled Azure CLI download and generate an az shim. |
| README.md | Rewrites development setup docs with prerequisites, npm run setup, and the optional system Azure CLI flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
build/setup-external-tools.ts
Outdated
| // Create a wrapper that delegates to the system az | ||
| if (PLATFORM === 'win32') { | ||
| fs.writeFileSync(path.join(azCliBinDir, 'az.cmd'), '@echo off\r\naz %*\r\n'); | ||
| } else { | ||
| fs.writeFileSync(path.join(azCliBinDir, 'az-wrapper'), '#!/bin/sh\nexec az "$@"\n', { mode: 0o755 }); |
build/setup-external-tools.ts
Outdated
| fs.writeFileSync(path.join(azCliBinDir, 'az-wrapper'), '#!/bin/sh\nexec az "$@"\n', { mode: 0o755 }); | ||
| const azSymlink = path.join(azCliBinDir, 'az'); | ||
| if (fs.existsSync(azSymlink)) fs.unlinkSync(azSymlink); | ||
| fs.symlinkSync('az-wrapper', azSymlink); | ||
| } |
| 1. Clone the repository: | ||
| - [Node.js](https://nodejs.org/) 20+ | ||
| - [Go](https://go.dev/) 1.22+ (for the Headlamp backend) | ||
| - [Git](https://git-scm.com/) |
| If you already have [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) installed and want to skip the bundled download: | ||
|
|
||
| ```bash | ||
| ./scripts/headlamp-submodule.sh --reset | ||
| npm install | ||
| npm run install:all | ||
| ``` | ||
| ```bash | ||
| AKS_DESKTOP_SYSTEM_AZ=1 npm run setup | ||
| ``` |
…s-platform support
|
this PR modifies |
Summary
Improves the developer setup experience, especially on Windows, addressing #367:
npm run setupcommand — replaces 6 manual steps with one command that resets the submodule, installs all deps, and builds the backendinstall:allnow usesconcurrentlyto install headlamp, plugin, and ai-assistant packages simultaneouslynpm ciovernpm install— faster installs from lockfile (especially on Windows cmd)scripts/setup-submodule.mjs(Node.js) eliminates the bash/Git Bash requirement on Windows for initial setupAKS_DESKTOP_SYSTEM_AZ=1to skip the ~500MB bundled az download and use an existing installation insteadChanges
package.jsonsetupscript, parallelizeinstall:all, switch tonpm ciscripts/setup-submodule.mjsbuild/setup-external-tools.tsAKS_DESKTOP_SYSTEM_AZenv var to use system az CLIREADME.mdCLAUDE.mdTest plan
npm run setupcompletes successfully on a fresh clone (Linux/macOS)npm run setupcompletes successfully on Windows (cmd, not Git Bash)npm run install:allruns the three installs in parallel (verify via concurrently output)AKS_DESKTOP_SYSTEM_AZ=1 npm run setupskips az download and creates wrapper pointing to system azAKS_DESKTOP_SYSTEM_AZ=1 npm run setupfails gracefully when az is not on PATHnode scripts/setup-submodule.mjsresets the submodule correctlynpm run devworks after setupCloses #367