wasmCloud / wash

WAsmcloud SHell - the comprehensive command-line tool for wasmCloud development
https://wasmcloud.com
Apache License 2.0
148 stars 58 forks source link

[BUG] Could not put manifest to deploy Failed to put model spec: Failed to extract components: Failed to extract traits #870

Closed kaje783 closed 11 months ago

kaje783 commented 11 months ago

Describe the bug wasmcloud_host set up and wash connected to the wasmcloud_host. Now I want to push the hello example, but I get this error message: Could not put manifest to deploy Failed to put model spec: Failed to extract components: Failed to extract traits

To Reproduce Steps to reproduce the behavior:

  1. Install wash: https://wasmcloud.com/docs/installation?os=ubuntudebian
  2. Create two keys, one for wash, the other one for wasmcloud_host
    
    $ wash keys gen Cluster # wash

Public Key: CBACSQWPSZHZWWX737JEVD3WKQCKC56I37HVW5GSGBOKKGF45PXNTA53 Seed: SCAA2ALH2YOEPXVZBF3MM5UPNJWUSJQTPRGIQFJQIIGQZAANXVW3N5HN2A

Remember that the seed is private, treat it as a secret. $ wash keys gen Cluster # wasmcloud_host

Public Key: CCTRUKGVLW6O4YJ4ZJ4PLV6IWLWCJJDA6KAYM35HVU4ELOA2SSUCJ74D Seed: SCAGGRDSYFX57JN3J7263E3PCM2TPFTO47RTIMOLYPHG3SNUEGROOOMYOU

Remember that the seed is private, treat it as a secret.

3. Deploy wasmcloud_host (baseline is: https://github.com/wasmCloud/examples/blob/main/docker/docker-compose.yml):

This docker-compose file loads

nats with JetStream enabled

a local OCI registry

redis (for the kvredis capability provider)

grafana + tempo for tracing

wasmcloud_host

version: "3.3" services: nats: image: nats:2.8.4-alpine container_name: wasmcloud_nats ports:

4. Add cluster to wash

$ wash ctx new cluster1 -i What do you want to name the context?: cluster1 What cluster seed do you want to use to sign invocations?: SCAA2ALH2YOEPXVZBF3MM5UPNJWUSJQTPRGIQFJQIIGQZAANXVW3N5HN2A What is the control interface connection host?: 127.0.0.1 What is the control interface connection port?: 4222 Enter your JWT that you use to authenticate to the control interface connection, if applicable: Enter your user seed that you use to authenticate to the control interface connection, if applicable: Enter the absolute path to control interface connection credsfile, if applicable: What should the control interface timeout be (in milliseconds)?: 2000 What is the lattice prefix that the host will communicate on?: cluster1 What JetStream domain will the host be running, if any?: What is the RPC host?: 127.0.0.1 What is the RPC connection port?: 4222 Enter your JWT that you use to authenticate to the RPC connection, if applicable: Enter your user seed that you use to authenticate to the RPC connection, if applicable: Enter the absolute path to RPC connection credsfile, if applicable: What should the RPC timeout be (in milliseconds)?: 2000

Created context cluster1 with default values

6. Set new defined cluster as default: 

$ wash ctx default cluster1

Set new context successfully

5. Check if wasmcloud_host is over wash available

$ wash get hosts

Host ID Uptime (seconds)
NCS4TQASDXAJGMWPWOCOX53EBTBG4A7OSME5RACC5HPYKFVHKRAG47XQ 6668

6. Download hello example: `wash new actor -t hello hello`
7.  Deploy hello example:

$ cd hello $ wash app deploy wadm.yaml

Could not put manifest to deploy Failed to put model spec: Failed to extract components: Failed to extract traits



**Expected behavior**
The hello example was deployed successfully

**Environment (please complete the following information) **
 - OS: Ubuntu 20.04
 - Shell: bash
 - wash Version: 0.20.2
connorsmith256 commented 11 months ago

Hey @kaje783, it looks like the docker compose template we have is quite a bit out of date 😅

You'll want to use a more recent wasmCloud host and wadm server

Let's check if you have a recent version of wash: wash --version (v0.20.2 is the latest)

If you're okay with not using docker, I would instead run wash up

Then in another terminal tab you can run the wash app deploy wadm.yaml command

(You can also run wash up -d if you want to send the host process to the background)

I'll file a related issue to update this docker compose template :)

connorsmith256 commented 11 months ago

Filed over at https://github.com/wasmCloud/examples/issues/240

kaje783 commented 11 months ago

Hey @connorsmith256 , thanks for your answer.

Wash' version is at 0.20.2 and the deployment with wash up -d && wash app deploy wadm.yaml works so far. But I would like to separate it, i.e. wash on one host and just the runtime on another host.

I have now found an error in the docker-compose file, i.e. the version of wadm is too old. This is the current docker-compose file:

version: "3.3"
services:
  nats:
    image: nats:2.8.4-alpine
    container_name: wasmcloud_nats
    ports:
      - "4222:4222"
      - "6222:6222"
      - "8222:8222"
    command: [ "-js" ]

  wasmcloud:
    depends_on:
      - "nats"
    image: wasmcloud/wasmcloud_host:0.63.2
    container_name: wasmcloud
    environment:
      RUST_LOG: debug,hyper=info
      WASMCLOUD_LATTICE_PREFIX: cluster1
      WASMCLOUD_RPC_HOST: nats
      WASMCLOUD_CTL_HOST: nats
      WASMCLOUD_PROV_RPC_HOST: nats
      WASMCLOUD_CLUSTER_SEED: SCAGGRDSYFX57JN3J7263E3PCM2TPFTO47RTIMOLYPHG3SNUEGROOOMYOU # seed from point 2, wasmcloud_host
      WASMCLOUD_CLUSTER_ISSUERS: CBACSQWPSZHZWWX737JEVD3WKQCKC56I37HVW5GSGBOKKGF45PXNTA53 # public key from point 2, wash
      OTEL_TRACES_EXPORTER: otlp
      OTEL_EXPORTER_OTLP_ENDPOINT: http://tempo:55681
    ports:
      - "4000:4000"
      - "8080-8089:8080-8089" # Allows exposing examples on ports 8080-8089
    command: [ "/usr/local/bin/wasmcloud_host"]

  wadm:
    depends_on:
      - "nats"
    image: ghcr.io/wasmcloud/wadm:v0.7.1
    container_name: wasmcloud_wadm
    environment:
      - RUST_LOG=debug,hyper=info
      - WADM_NATS_SERVER=nats:4222

I can now deploy the hello world example with wash, but it doesn't appear in the runtime. I always see this error in the wadm logs:

2023-10-09T09:43:12.296772Z ERROR observe{subscribe_topics=["wasmbus.evt.*"]}: wadm::observer: Couldn't add mirror consumer. Will retry on next heartbeat error=consumer error: can't use consumer name with server < 2.9.0 lattice_id=cluster1

But I'm opening a new issue for this.

Thank you very much again.

kaje783 commented 11 months ago

As mentioned, the new issue in wadm: https://github.com/wasmCloud/wadm/issues/189

connorsmith256 commented 11 months ago

Glad you got it running! I'll close this issue and we can continue to discuss the issue with NATS/wadm versions over in https://github.com/wasmCloud/wadm/issues/189 👍