- Notifications
You must be signed in to change notification settings - Fork928
Closed
Description
Currently the Coder CLI and the server are shipped in the same binary which results in it being quite large. We have made a lot of improvements to the CLI filesize over the last couple of months, especially thanks to@mafredri's work, but it is still almost twice as large compressed and 3 times as large uncompressed compared to a "slim" binary.
Pros
- Users need to only download one binary if they want to test coder locally
- No distinction is necessary
Cons
- The coder binary is large as it contains the compiled frontend and binaries for all architectures for workspace agents
- These are not needed if the CLI is only going to be used as a CLI
- We have to ship a slim binary type which is the same as a regular binary but doesn't contain the frontend or other binaries
Proposal:
Add a new binary that we release calledcoderd
which only contains the server components, including the compiled frontend and regular CLI binaries. The CLI will have the server components removed including the embedded frontend and slim binaries (perhaps after a short deprecation window if we desire).
Pros
- Smaller filesize for users that only need to download the CLI and don't care about the server components
- No problems during development where devs accidentally use slim binaries instead of full binaries that contain the frontend et. al. (we have run into this a few times)
Cons
- If users want to run a coder server locally for evaluation they will need to download two binaries
- This may not be the case in the future when users can accomplish everything from the web UI that they need the CLI for (e.g. creating first user, uploading templates etc.)
- We can ease this pain by adding a flag to the install.sh script that will download and install both for you i.e.
bash install.sh --with-server
)
- Distinction between the binary will be necessary in our docs