diff --git a/docs/_embeds/docker/Dockerfile b/docs/_embeds/docker/Dockerfile new file mode 100644 index 0000000..a6cc967 --- /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 0000000..975747a --- /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 0000000..5bc64b0 --- /dev/null +++ b/docs/_embeds/docker/setup.sh @@ -0,0 +1,8 @@ +# build dockerfile +docker build -t fluvio:fluvio . + +# start fluvio cluster +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