diff --git a/infra/wasmcloud/build/Dockerfile b/infra/wasmcloud/build/Dockerfile new file mode 100644 index 0000000..d3d6b60 --- /dev/null +++ b/infra/wasmcloud/build/Dockerfile @@ -0,0 +1,52 @@ +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 mod download && go mod verify && go mod tidy && wash build && wash push $REGISTRY build/*_s.wasm"] +CMD ["sh", "-c", "go env -w GOFLAGS=-buildvcs=false && go mod download && go mod verify && wash build && wash push $REGISTRY build/*_s.wasm"] \ No newline at end of file diff --git a/infra/wasmcloud/wasmcloud-cloud-host/values.yaml b/infra/wasmcloud/wasmcloud-cloud-host/values.yaml deleted file mode 100644 index a81b8d6..0000000 --- a/infra/wasmcloud/wasmcloud-cloud-host/values.yaml +++ /dev/null @@ -1,83 +0,0 @@ -fullnameOverride: "wasmcloud-platform" -nameOverride: "wasmcloud-platform" - -nats: - # Whether to install the nats chart (https://nats-io.github.io/k8s/helm/charts/nats) - enabled: true - fullnameOverride: "nats" - nameOverride: "nats" - # Source: https://github.com/wasmCloud/wasmcloud-operator/blob/main/examples/quickstart/nats-values.yaml - config: - cluster: - enabled: true - replicas: 3 - leafnodes: - enabled: true - websocket: - enabled: true - port: 4223 - jetstream: - enabled: true - fileStore: - pvc: - size: 10Gi - merge: - domain: default - # # Quickstart configuration - # statefulSet: - # name: nats - # service: - # name: nats - # headlessService: - # name: nats-headless - -wadm: - # Whether to install the wadm chart (oci://ghcr.io/wasmcloud/charts/wadm) - enabled: true - fullnameOverride: "wadm" - nameOverride: "wadm" - # Source: https://github.com/wasmCloud/wasmcloud-operator/blob/main/examples/quickstart/wadm-values.yaml - wadm: - image: - tag: v0.15.0 - config: - nats: - server: "nats://10.43.80.129" - # creds: - # jwt: "" - # seed: "" - # # If you're using the wasmCloud Operator, the secret could be created by the chart using the '.hostConfig.natsCredentialsFile' setting. - # secretName: "" - # key: "nats.creds" - resources: {} - -operator: - # Whether to install the wasmcloud-operator chart (oci://ghcr.io/wasmcloud/charts/wasmcloud-operator) - # Make sure to either install wasmCloud Operator or wasmCloud Host, not both - enabled: true - fullnameOverride: "wasmcloud-operator" - nameOverride: "wasmcloud-operator" - # image: - # tag: 0.3.2 - -host: - # Whether to install the wasmcloud-host chart (oci://ghcr.io/wasmcloud/charts/wasmcloud-host) - # Make sure to either install wasmCloud Operator or wasmCloud Host, not both - enabled: false - fullnameOverride: "wasmcloud" - nameOverride: "wasmcloud" - -hostConfig: - # Whether to use the wasmCloud host configuration custom resource; defaults to "false". - enabled: false - name: wasmcloud-host - lattice: default - # # Number of hosts (pods). Defaults to 1. - # hostReplicas: 1 - # Which version of wasmCloud to use; defaults to "latest" - version: "1.2.1" - # registryCredentialsFile: config.json - # natsCredentialsFile: secret.yaml - resources: - nats: {} - wasmCloudHost: {}