Distribute IO builds for MacOS using Homebrew.
We would like to make IO binaries available to Mac users. Homebrew seems like a good way to do this.
Pros
- Homebrew is popular and easy to use.
- An Envoy formula is already being maintained.
- Homebrew provides an easy way to distribute Custom Taps.
Cons
- A new distribution target adds a maintenance burden.
- IO's name collides with Steve Dekorte's IO language, so we are calling the package
io-proxy.
Installing IO with Homebrew
To install IO with Homebrew, first add the IO tap with brew tap agentio/io and brew trust agentio/io.
brew tap agentio/io
brew trust agentio/io
Then install IO with brew install io-proxy.
brew install io-proxy
You should see something like this:
==> Would install 1 formula:
io-proxy
==> Fetching downloads for: io-proxy
✔︎ Formula io-proxy (0.1.74) Verified 22.6MB/ 22.6MB
==> Installing io-proxy from agentio/io
==> Summary
🍺 /opt/homebrew/Cellar/io-proxy/0.1.74: 3 files, 47.6MB, built in 0 seconds
==> Running `brew cleanup io-proxy`...
IO requires Envoy, which can also be installed with Homebrew:
brew install envoy
If all goes well, you will be able to run IO from the command line.
io
Distribution Details
Currently we are only distributing ARM builds.
After compiling the IO binary, we archive it with tar.
tar gcf io.tar.gz io
We use Google Cloud Storage to distribute the archive. Archives can be uploaded with gcloud.
gcloud storage cp io.tar.gz gs://agent-io/homebrew/io/v0.1.86/io.tar.gz
We compute a SHA hash of the archive with sha256sum.
sha256sum io.tar.gz
With this, we create a formula:
class IoProxy < Formula
desc "The IO proxy"
homepage "https://agent.io/posts/io"
url "https://storage.googleapis.com/agent-io/homebrew/io/v0.1.74/io.tar.gz"
sha256 "6866848a7276532d38856ac36ed09e5f56a7e2bbd8450247bf18308a9fd39be4"
version "0.1.74"
def install
bin.install "io"
end
end
We use the agentio/homebrew-io repo to distribute the formula.