Skip to content

dx: Streamline setup with single command, parallel installs, and cross-platform support#453

Draft
gambtho wants to merge 1 commit intoAzure:mainfrom
gambtho:thgamble/367
Draft

dx: Streamline setup with single command, parallel installs, and cross-platform support#453
gambtho wants to merge 1 commit intoAzure:mainfrom
gambtho:thgamble/367

Conversation

@gambtho
Copy link
Collaborator

@gambtho gambtho commented Mar 17, 2026

Summary

Improves the developer setup experience, especially on Windows, addressing #367:

  • Single npm run setup command — replaces 6 manual steps with one command that resets the submodule, installs all deps, and builds the backend
  • Parallel dependency installsinstall:all now uses concurrently to install headlamp, plugin, and ai-assistant packages simultaneously
  • npm ci over npm install — faster installs from lockfile (especially on Windows cmd)
  • Cross-platform submodule script — new scripts/setup-submodule.mjs (Node.js) eliminates the bash/Git Bash requirement on Windows for initial setup
  • System Azure CLI support — set AKS_DESKTOP_SYSTEM_AZ=1 to skip the ~500MB bundled az download and use an existing installation instead

Changes

File Change
package.json Add setup script, parallelize install:all, switch to npm ci
scripts/setup-submodule.mjs New cross-platform Node.js script for submodule reset
build/setup-external-tools.ts Support AKS_DESKTOP_SYSTEM_AZ env var to use system az CLI
README.md Simplified setup: quick start, prerequisites, system az option
CLAUDE.md Updated initial setup instructions

Test plan

  • npm run setup completes successfully on a fresh clone (Linux/macOS)
  • npm run setup completes successfully on Windows (cmd, not Git Bash)
  • npm run install:all runs the three installs in parallel (verify via concurrently output)
  • AKS_DESKTOP_SYSTEM_AZ=1 npm run setup skips az download and creates wrapper pointing to system az
  • AKS_DESKTOP_SYSTEM_AZ=1 npm run setup fails gracefully when az is not on PATH
  • node scripts/setup-submodule.mjs resets the submodule correctly
  • npm run dev works after setup

Closes #367

Copilot AI review requested due to automatic review settings March 17, 2026 13:51
@gambtho gambtho changed the title doc: improve windows install process dx: Streamline setup with single command, parallel installs, and cross-platform support Mar 17, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.mjs to reset/init the Headlamp submodule cross-platform.
  • Switched plugin/Headlamp installs to npm ci, added a top-level setup script, and parallelized install:all.
  • Added an optional AKS_DESKTOP_SYSTEM_AZ path 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.

Comment on lines +56 to +60
// 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 });
Comment on lines +60 to +64
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/)
Comment on lines +35 to +39
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
```
@illume illume marked this pull request as draft March 17, 2026 14:33
@illume illume marked this pull request as draft March 17, 2026 14:33
@sniok
Copy link
Collaborator

sniok commented Mar 17, 2026

this PR modifies setup-external-tools.ts which is used in the build workflow, so if build passes I'm okay with getting this in, since all the other changes are dev only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dx: windows: Improve setup instructions

3 participants