From 772bd462d3920ecb3b7231b5d15e6070afb3e809 Mon Sep 17 00:00:00 2001 From: Lorenzo Venerandi <68255980+Lore09@users.noreply.github.com> Date: Sun, 9 Mar 2025 15:08:35 +0100 Subject: [PATCH] moved directories --- .../wasmcloud-edge-host/README.md | 0 .../wasmcloud-edge-host/docker-compose.yaml | 78 +++++++++---------- .../wasmcloud-edge-host/nats-leaf.conf | 0 .../wasmcloud-edge-host/values.yaml | 0 .../wasmcloud-platform/values.yaml | 0 infra/wasmcloud/build/Dockerfile | 51 ------------ 6 files changed, 39 insertions(+), 90 deletions(-) rename infra/{wasmcloud => }/wasmcloud-edge-host/README.md (100%) rename infra/{wasmcloud => }/wasmcloud-edge-host/docker-compose.yaml (96%) rename infra/{wasmcloud => }/wasmcloud-edge-host/nats-leaf.conf (100%) rename infra/{wasmcloud => }/wasmcloud-edge-host/values.yaml (100%) rename infra/{wasmcloud => }/wasmcloud-platform/values.yaml (100%) delete mode 100644 infra/wasmcloud/build/Dockerfile diff --git a/infra/wasmcloud/wasmcloud-edge-host/README.md b/infra/wasmcloud-edge-host/README.md similarity index 100% rename from infra/wasmcloud/wasmcloud-edge-host/README.md rename to infra/wasmcloud-edge-host/README.md diff --git a/infra/wasmcloud/wasmcloud-edge-host/docker-compose.yaml b/infra/wasmcloud-edge-host/docker-compose.yaml similarity index 96% rename from infra/wasmcloud/wasmcloud-edge-host/docker-compose.yaml rename to infra/wasmcloud-edge-host/docker-compose.yaml index d0f1680..7317108 100644 --- a/infra/wasmcloud/wasmcloud-edge-host/docker-compose.yaml +++ b/infra/wasmcloud-edge-host/docker-compose.yaml @@ -1,40 +1,40 @@ -services: - nats: - image: nats:alpine - container_name: nats - restart: always - command: -js -c /etc/nats/nats.conf - ports: - - "4222:4222" # client port - - "8222:8222" # monitoring port - volumes: - - ./nats-leaf.conf:/etc/nats/nats.conf - # networks: - # - internal - - wasmcloud: - image: ghcr.io/wasmcloud/wasmcloud:1.4.0 - container_name: wasmcloud - restart: always - environment: - - WASMCLOUD_NATS_HOST=nats - - WASMCLOUD_NATS_PORT=4222 - - WASMCLOUD_RPC_TIMEOUT_MS=4000 - - WASMCLOUD_LABEL_host-type=edge - - WASMCLOUD_STRUCTURED_LOGGING_ENABLED=false - - WASMCLOUD_LOG_LEVEL=INFO - - WASMCLOUD_JS_DOMAIN=default - - WASMCLOUD_LATTICE=default - - WASMCLOUD_LATTICE_PREFIX=default - - WASMCLOUD_CTL_TOPIC_PREFIX=wasmbus.ctl - - WASMCLOUD_SECRETS_TOPIC=wasmcloud.secrets - ports: - - '8000:8000' - depends_on: - - nats -# networks: -# - internal - -# networks: -# internal: +services: + nats: + image: nats:alpine + container_name: nats + restart: always + command: -js -c /etc/nats/nats.conf + ports: + - "4222:4222" # client port + - "8222:8222" # monitoring port + volumes: + - ./nats-leaf.conf:/etc/nats/nats.conf + # networks: + # - internal + + wasmcloud: + image: ghcr.io/wasmcloud/wasmcloud:1.4.0 + container_name: wasmcloud + restart: always + environment: + - WASMCLOUD_NATS_HOST=nats + - WASMCLOUD_NATS_PORT=4222 + - WASMCLOUD_RPC_TIMEOUT_MS=4000 + - WASMCLOUD_LABEL_host-type=edge + - WASMCLOUD_STRUCTURED_LOGGING_ENABLED=false + - WASMCLOUD_LOG_LEVEL=INFO + - WASMCLOUD_JS_DOMAIN=default + - WASMCLOUD_LATTICE=default + - WASMCLOUD_LATTICE_PREFIX=default + - WASMCLOUD_CTL_TOPIC_PREFIX=wasmbus.ctl + - WASMCLOUD_SECRETS_TOPIC=wasmcloud.secrets + ports: + - '8000:8000' + depends_on: + - nats +# networks: +# - internal + +# networks: +# internal: # driver: bridge \ No newline at end of file diff --git a/infra/wasmcloud/wasmcloud-edge-host/nats-leaf.conf b/infra/wasmcloud-edge-host/nats-leaf.conf similarity index 100% rename from infra/wasmcloud/wasmcloud-edge-host/nats-leaf.conf rename to infra/wasmcloud-edge-host/nats-leaf.conf diff --git a/infra/wasmcloud/wasmcloud-edge-host/values.yaml b/infra/wasmcloud-edge-host/values.yaml similarity index 100% rename from infra/wasmcloud/wasmcloud-edge-host/values.yaml rename to infra/wasmcloud-edge-host/values.yaml diff --git a/infra/wasmcloud/wasmcloud-platform/values.yaml b/infra/wasmcloud-platform/values.yaml similarity index 100% rename from infra/wasmcloud/wasmcloud-platform/values.yaml rename to infra/wasmcloud-platform/values.yaml diff --git a/infra/wasmcloud/build/Dockerfile b/infra/wasmcloud/build/Dockerfile deleted file mode 100644 index 94542c7..0000000 --- a/infra/wasmcloud/build/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -FROM ubuntu:24.04 AS wash-build-image - -# Install dependencies and tools -RUN apt-get update && apt-get install -y \ - curl \ - wget \ - tar \ - git \ - build-essential \ - && rm -rf /var/lib/apt/lists/* - -# ----------------- Install WasmCloud ----------------- -RUN curl -s "https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh" | bash && \ - apt-get install -y wash - -# ----------------- Install Go 1.23 ----------------- -RUN wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && \ - tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz && \ - rm go1.23.4.linux-amd64.tar.gz - -# Set Go environment variables -ENV PATH="/usr/local/go/bin:${PATH}" -ENV GOPATH="/go" -ENV GOROOT="/usr/local/go" - -# ----------------- Install TinyGo 0.34.0 ----------------- -RUN wget https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb && \ - dpkg -i tinygo_0.34.0_amd64.deb && \ - rm tinygo_0.34.0_amd64.deb - -# ----------------- Install Rust ----------------- -# Install Rust -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ - . "$HOME/.cargo/env" && \ - cargo install --locked wasm-tools - -# Set Rust environment variables -ENV PATH="/root/.cargo/bin:${PATH}" - -# Verify installations -RUN go version && tinygo version && cargo --version && wash --version && wasm-tools --version - - -# ----------------- Build the WasmCloud module ----------------- -FROM wash-build-image - -RUN mkdir /app -WORKDIR /app - -# Install go dependencies, build the wasm module, push it to the registry -CMD ["sh", "-c", "go env -w GOFLAGS=-buildvcs=false && go mod download && go mod verify && wash build && wash push $REGISTRY build/*.wasm"] \ No newline at end of file