Skip to content

Instantly share code, notes, and snippets.

@juniorz
Last active October 12, 2019 22:56
Show Gist options
  • Save juniorz/0fecd7eafc44ff03013e1f0ab1bc4b6b to your computer and use it in GitHub Desktop.
Save juniorz/0fecd7eafc44ff03013e1f0ab1bc4b6b to your computer and use it in GitHub Desktop.
How to build Istio proxy on OSX (Catalina)
  1. Install Envoy (and Istio proxy) dependencies
    1. https://github.com/envoyproxy/envoy/blob/master/bazel/README.md
    2. https://github.com/istio/proxy/blob/3781be0e624470a4ee613c4ffc9816976f5dd701/.circleci/config.yml#L95
      1. Install XCode
      2. sudo xcode-select -s /Applications/Xcode.app/Contents/Developer; sudo xcodebuild -license; bazel clean --expunge; See: bazelbuild/bazel#6056 (comment)
    3. https://www.envoyproxy.io/docs/envoy/latest/install/building#requirements
  2. Configure the dev environment
    1. https://github.com/istio/istio/wiki/Preparing-for-Development#setting-up-environment-variables
    2. https://medium.com/@nadundesilva/building-istio-from-source-on-linux-be860d660aa7
  3. Hack
    1. https://github.com/envoyproxy/envoy/blob/master/DEVELOPER.md
    2. https://www.envoyproxy.io/docs/envoy/latest/extending/extending
    3. https://github.com/envoyproxy/envoy/blob/b48cdeb2af3ac1317c5bc2421b498486b1f2e598/source/extensions/extensions_build_config.bzl
    4. https://blog.envoyproxy.io/how-to-write-envoy-filters-like-a-ninja-part-1-d166e5abec09
    5. https://docs.bazel.build/versions/master/bazel-overview.html
    6. https://medium.com/@dirao/debugging-envoyproxy-on-osx-a3ebe87dc916
  4. Learn
  5. Cool examples
cd $ISTIO/proxy
make build_envoy
make test
file bazel-bin/src/envoy/envoy
bazel-bin/src/envoy/envoy --version

Questions

  1. How to list all available extensions compiled into envoy? Neither envoy -h or envoy --version shows anything. bazel-bin/src/envoy/envoy will error but does the trick.
  2. How to start the server? bazel-bin/src/envoy/envoy --config-yaml 'admin: {access_log_path: "/dev/stdout", address: { socket_address: {address: 127.0.0.1, port_value: 9901}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment