solo-io / wasm

Web Assembly tools and SDKs for extending cloud-native infrastructure
Apache License 2.0
305 stars 39 forks source link

Tutorial "Deploying Filters to Local Envoy" broken #235

Open dkegel-sigsci opened 3 years ago

dkegel-sigsci commented 3 years ago

Describe the bug The two-line demo https://docs.solo.io/web-assembly-hub/latest/tutorial_code/deploy_tutorials/deploying_with_local_envoy/ fails on line two with error

[2021-02-03 22:46:58.457][1][critical][main] [external/envoy/source/server/server.cc:96] error initializing configuration '': WASM missing Proxy-Wasm ABI version or requires an unsupported version.

To Reproduce Steps to reproduce the behavior:

  1. wasme pull webassemblyhub.io/ilackarms/add-header:v0.1
  2. wasme deploy envoy webassemblyhub.io/ilackarms/add-header:v0.1

Expected behavior runs demo instead of terminating with status 1

Additional context Docker version 20.10.2, build 2291f61, on mac.

hi @ilackarms :-)

Sodman commented 3 years ago

Hi @dkegel-sigsci , thanks for the bug report! Looks like our docs here are a little out of date and could use some love!

The default envoy image used by wasme deploy envoy is the Envoy backing Istio 1.5.1, but is usually changed by the user for whatever your ultimate target platform is.

For an example image that still works with that platform, you can try:

wasme deploy envoy webassemblyhub.io/sodman/assemblyscript-istio-1-5:v0.1

In terms of source code, these add-header demo examples usually use the default boilerplate generated when you run:

wasme init ./my-filter

If you're targeting another version of Envoy, eg the version run by Istio 1.7.1, you could specify that instead, as follows:

wasme deploy envoy webassemblyhub.io/sodman/as-istio-1-7-1:v0.1 --envoy-image "docker.io/istio/proxyv2:1.7.1"

We should still update the docs, and at this point, probably also the default envoy image used by wasme deploy envoy.

dkegel-sigsci commented 3 years ago

Thanks. Would it make sense to turn those demos from two-line demos into four-line demos by adding the 'wasme init...' and 'wasme build...' lines, then?

Sodman commented 3 years ago

We've tried to split out the "Build tutorials" and the "Deploy tutorials" into two separate sections to avoid overloading folks with one bigger longer tutorial, as there's something of a natural breakpoint in the middle.