Skip to content

APP-16234: add offline msi installer with Agent binary embedded#234

Merged
aldenh-viam merged 5 commits into
viamrobotics:mainfrom
aldenh-viam:push-qrrpwmqlkvyl
May 26, 2026
Merged

APP-16234: add offline msi installer with Agent binary embedded#234
aldenh-viam merged 5 commits into
viamrobotics:mainfrom
aldenh-viam:push-qrrpwmqlkvyl

Conversation

@aldenh-viam
Copy link
Copy Markdown
Contributor

@aldenh-viam aldenh-viam commented May 5, 2026

  1. Download viam-agent-stable-windows-x86_64.exe to msi\viam-agent-from-installer.exe
  2. Run make msi
  3. Distribute generated msi\bin\x64\Release\Package.msi

(above instructions should be set up in CI)

I confirmed I'm able to install Agent on an offline machine using the installer. It writes the Viam directories, including:

C:\opt\bin\viam-agent (symlink)
C:\opt\cache\viam-agent-from-installer.exe

and starts up viam-agent.

viam-agent-stable-windows-x86_64.exe is 28,194KB and Package.msi is 9,060 KB:

MSI cab files are compressed. (line 19 of Package.wxs) embeds a CAB inside the MSI, and by default WiX uses LZX/MSZIP compression. Go binaries compress well (typically 3–4× ratio) because they contain lots of repeated runtime metadata, symbol tables, and zero-padded sections. 28MB → 9MB ≈ 32% is normal.

@aldenh-viam aldenh-viam requested review from abe-winter and cheukt May 5, 2026 14:37
@cheukt
Copy link
Copy Markdown
Member

cheukt commented May 5, 2026

we should build and upload the msi to gcp - do you want to do it in this pr or as a fast follow?

@aldenh-viam
Copy link
Copy Markdown
Contributor Author

we should build and upload the msi to gcp - do you want to do it in this pr or as a fast follow?

How are we currently building and distributing the (online) msi installer? I don't see anything about it in the .github/workflows dir.

@cheukt
Copy link
Copy Markdown
Member

cheukt commented May 5, 2026

@abe-winter would know more, but i suspect we don't have a process for it yet

@abe-winter
Copy link
Copy Markdown
Member

yup no yaml yet for msi. remaining work to normalize on msi:

  • test that firewalling is correct in tcp mode
  • add msi yaml
  • update docs
  • remove old exe build at some point

@aldenh-viam aldenh-viam changed the title APP-16234: add offline msi installer with Agent installer embedded APP-16234: add offline msi installer with Agent binary embedded May 5, 2026
@EvanDorsky
Copy link
Copy Markdown
Member

Worked great on my windows vm, way better install experience than before.

@aldenh-viam aldenh-viam force-pushed the push-qrrpwmqlkvyl branch 3 times, most recently from e1e698b to ff26db5 Compare May 6, 2026 14:05
@aldenh-viam
Copy link
Copy Markdown
Contributor Author

Given the compressed offline installer is only 9MB, should I just make these changes in msi/ so we don't need to maintain both online and offline msi installers?

@cheukt
Copy link
Copy Markdown
Member

cheukt commented May 6, 2026

ya lets do that

@aldenh-viam aldenh-viam force-pushed the push-qrrpwmqlkvyl branch from ff26db5 to 3774500 Compare May 6, 2026 15:16
@cheukt
Copy link
Copy Markdown
Member

cheukt commented May 6, 2026

where are we pushing the msi?

Comment thread .github/workflows/build-agent-msi.yaml Outdated
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest `
-Uri "https://storage.googleapis.com/packages.viam.com/apps/viam-agent/viam-agent-stable-windows-x86_64" `
Copy link
Copy Markdown
Member

@abe-winter abe-winter May 6, 2026

Choose a reason for hiding this comment

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

  1. this binary comes from workflow.yml in this repo -- in theory you can build them at the same time rather than downloading
  2. warning: if you run this download-based msi task as part of an agent release workflow, I think you will get the previous stable version for weird release flow reasons
  3. curl is available on this machine if you prefer

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ideally we should use the binary that we just built

@aldenh-viam aldenh-viam requested a review from abe-winter May 6, 2026 20:13
@aldenh-viam aldenh-viam force-pushed the push-qrrpwmqlkvyl branch from 4991936 to 8b4d44f Compare May 7, 2026 13:36
@aldenh-viam
Copy link
Copy Markdown
Contributor Author

CI run sample: https://github.com/viamrobotics/agent/actions/runs/25498673196/job/74826372596

It would upload viam-agent-v0.27.3-dev.9-windows-x86_64.msi to GCS.

Comment thread .github/workflows/workflow.yaml Outdated
- name: Upload MSI to GCS (Release)
if: github.event_name == 'release'
shell: bash
run: gsutil -h "Cache-Control:no-cache" cp viam-agent-*-windows-x86_64.msi gs://packages.viam.com/apps/viam-agent/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we also upload to viam-agent-stable-windows-x86_64.msi for stable releases? so we have a stable path to refer to as well

Copy link
Copy Markdown
Member

@cheukt cheukt left a comment

Choose a reason for hiding this comment

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

looks good! just one more request

@aldenh-viam
Copy link
Copy Markdown
Contributor Author

Something of note: this installer has two new options:
image

Checking is "Recommended for production deployments" -- should we not recommend this until we're sure it's the superior option? Some modules, like the keystrokes one, probably require full Local System permissions.

image

Should we not recommend changing the default install location?

@cheukt
Copy link
Copy Markdown
Member

cheukt commented May 11, 2026

i'll defer to @abe-winter for this, but i agree with removing "Recommended for production deployments" for now

ya we should recommend not changing the default install location.

@aldenh-viam
Copy link
Copy Markdown
Contributor Author

33df0b8 How's this for warning text? @abe-winter , @cheukt , @ale7714

image image

@abe-winter
Copy link
Copy Markdown
Member

new text lgtm

@viamrobotics-overwatch
Copy link
Copy Markdown

Hey @aldenh-viam — this PR has been approved and CI has been green for 3+ business days. Ready to merge?

Auto-comment from overwatch. Will not re-nudge for 7 days.

@aldenh-viam aldenh-viam force-pushed the push-qrrpwmqlkvyl branch 2 times, most recently from 3c6943a to 993a77b Compare May 26, 2026 17:29
Co-Authored-By: Claude <noreply@anthropic.com>
@aldenh-viam aldenh-viam force-pushed the push-qrrpwmqlkvyl branch 2 times, most recently from 48ce09f to 49bb81d Compare May 26, 2026 17:53
@aldenh-viam aldenh-viam merged commit e0e4ba6 into viamrobotics:main May 26, 2026
11 checks passed
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.

4 participants