From 024fd1405b428e96ff61503da986e78e159f42a6 Mon Sep 17 00:00:00 2001 From: Sehyo Chang Date: Sat, 26 Oct 2024 19:32:48 -0700 Subject: [PATCH 1/2] update docker --- docs/_embeds/docker/Dockerfile | 9 +++++ docs/_embeds/docker/docker-compose.yaml | 45 +++++++++++++++++++++++++ docs/_embeds/docker/setup.sh | 8 +++++ 3 files changed, 62 insertions(+) create mode 100644 docs/_embeds/docker/Dockerfile create mode 100644 docs/_embeds/docker/docker-compose.yaml create mode 100755 docs/_embeds/docker/setup.sh diff --git a/docs/_embeds/docker/Dockerfile b/docs/_embeds/docker/Dockerfile new file mode 100644 index 00000000..a6cc967f --- /dev/null +++ b/docs/_embeds/docker/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:22.04 + +RUN apt-get update +RUN apt-get install -y curl unzip +RUN apt-get install -y tini openssl curl +RUN curl -fsS https://hub.infinyon.cloud/install/install.sh | bash + +ENV PATH "$PATH:/root/.fluvio/bin" +ENV PATH "$PATH:/root/.fvm/bin" diff --git a/docs/_embeds/docker/docker-compose.yaml b/docs/_embeds/docker/docker-compose.yaml new file mode 100644 index 00000000..975747ab --- /dev/null +++ b/docs/_embeds/docker/docker-compose.yaml @@ -0,0 +1,45 @@ +services: + sc: + image: fluvio:fluvio + container_name: sc + hostname: sc + ports: + - "9103:9003" + environment: + - RUST_LOG=info + command: "fluvio-run sc --local /fluvio/metadata" + volumes: + - fluvio-metadata:/fluvio/metadata + + spu: + image: fluvio:fluvio + container_name: spu + hostname: spu + volumes: + - fluvio-data:/fluvio/data + environment: + - RUST_LOG=info + ports: + - "9110:9010" + - "9111:9011" + command: "fluvio-run spu -i 5001 -p spu:9010 -v spu:9011 --sc-addr sc:9004 --log-base-dir /fluvio/data" + depends_on: + - sc-setup + + sc-setup: + image: fluvio:fluvio + container_name: sc-setup + environment: + - RUST_LOG=info + entrypoint: > + /bin/sh -c " + fluvio profile add docker sc:9003 docker; + fluvio cluster spu register --id 5001 --public-server 0.0.0.0:9110 --public-server-local spu:9010 --private-server spu:9011; + exit 0; + " + depends_on: + - sc + +volumes: + fluvio-data: + fluvio-metadata: diff --git a/docs/_embeds/docker/setup.sh b/docs/_embeds/docker/setup.sh new file mode 100755 index 00000000..39549247 --- /dev/null +++ b/docs/_embeds/docker/setup.sh @@ -0,0 +1,8 @@ +# Build Environment +docker build -t fluvio:fluvio . + +# Run SDF in Docker +docker compose up -d + +# Download profile to the CLI +fluvio profile add fluvio-docker 127.0.0.1:9103 docker \ No newline at end of file From e86eebb9be59f653aa03daba3821633d4dd2f562 Mon Sep 17 00:00:00 2001 From: Sehyo Chang Date: Sat, 26 Oct 2024 19:35:05 -0700 Subject: [PATCH 2/2] cleanup --- docs/_embeds/docker/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_embeds/docker/setup.sh b/docs/_embeds/docker/setup.sh index 39549247..5bc64b0c 100755 --- a/docs/_embeds/docker/setup.sh +++ b/docs/_embeds/docker/setup.sh @@ -1,7 +1,7 @@ -# Build Environment +# build dockerfile docker build -t fluvio:fluvio . -# Run SDF in Docker +# start fluvio cluster docker compose up -d # Download profile to the CLI