From b5b0e44f3d42affabaa2135949bf981e16071e58 Mon Sep 17 00:00:00 2001 From: Brent Gardner <brent.gardner@spaceandtime.io> Date: Fri, 23 Sep 2022 13:08:27 -0600 Subject: [PATCH 1/2] Fix compose for Ian --- dev/docker/ballista-executor.Dockerfile | 2 ++ dev/docker/ballista-scheduler.Dockerfile | 3 +++ docker-compose.yml | 24 ++++++++++++++++++++---- docs/source/user-guide/flightsql.md | 8 ++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dev/docker/ballista-executor.Dockerfile b/dev/docker/ballista-executor.Dockerfile index 156fbae42..33931df65 100644 --- a/dev/docker/ballista-executor.Dockerfile +++ b/dev/docker/ballista-executor.Dockerfile @@ -23,6 +23,8 @@ ENV RELEASE_FLAG=${RELEASE_FLAG} ENV RUST_LOG=info ENV RUST_BACKTRACE=full +RUN apt-get update && apt-get install -y netcat + COPY target/$RELEASE_FLAG/ballista-executor /root/ballista-executor # Expose Ballista Executor gRPC port diff --git a/dev/docker/ballista-scheduler.Dockerfile b/dev/docker/ballista-scheduler.Dockerfile index 15b07360b..998e9dffb 100644 --- a/dev/docker/ballista-scheduler.Dockerfile +++ b/dev/docker/ballista-scheduler.Dockerfile @@ -22,6 +22,9 @@ ARG RELEASE_FLAG=release ENV RELEASE_FLAG=${RELEASE_FLAG} ENV RUST_LOG=info ENV RUST_BACKTRACE=full +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y nginx netcat COPY target/$RELEASE_FLAG/ballista-scheduler /root/ballista-scheduler diff --git a/docker-compose.yml b/docker-compose.yml index 826899dd1..5e71f2e5e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,25 +14,33 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -version: '3.3' +version: '3.8' services: etcd: image: quay.io/coreos/etcd:v3.4.9 command: "etcd -advertise-client-urls http://etcd:2379 -listen-client-urls http://0.0.0.0:2379" ports: - - 2379:2379 + - "2379:2379" ballista-scheduler: image: ballista-scheduler build: dockerfile: dev/docker/ballista-scheduler.Dockerfile context: . command: "--config-backend etcd --etcd-urls etcd:2379 --bind-host 0.0.0.0" + ports: + - "80:80" + - "50050:50050" environment: - RUST_LOG=info volumes: - ./benchmarks/data:/data depends_on: - etcd + healthcheck: + test: ["CMD", "nc", "-z", "ballista-scheduler", "50050"] + interval: 5s + timeout: 5s + retries: 5 ballista-executor: image: ballista-executor build: @@ -46,13 +54,21 @@ services: volumes: - ./benchmarks/data:/data depends_on: - - ballista-scheduler + ballista-scheduler: + condition: service_healthy + healthcheck: + test: ["CMD", "nc", "-z", "ballista-executor", "50051"] + interval: 5s + timeout: 5s + retries: 5 ballista-client: image: ballista-benchmarks build: dockerfile: dev/docker/ballista-benchmarks.Dockerfile context: . - command: ["/bin/sh", "sleep", "infinity"] + command: ["/bin/bash", "-c", "sleep infinity"] + ports: + - "50051:50051" environment: - RUST_LOG=info volumes: diff --git a/docs/source/user-guide/flightsql.md b/docs/source/user-guide/flightsql.md index df990d019..54a28a8b8 100644 --- a/docs/source/user-guide/flightsql.md +++ b/docs/source/user-guide/flightsql.md @@ -53,11 +53,19 @@ choco install docker-desktop docker-compose ``` ## <a name="rust"/>Building Ballista + +To build in docker (non-linux systems): ```shell git clone https://github.com/apache/arrow-ballista.git dev/build-ballista-rust.sh ``` + +Or in linux-based systems with the correct dependencies installed, one can simply: + +```shell +cargo build --release --all --features flight-sql +``` ## <a name="docker"/> Run Docker Containers From b06fce55c96aa500b3325a230e6f72e752528cb2 Mon Sep 17 00:00:00 2001 From: Brent Gardner <brent.gardner@spaceandtime.io> Date: Fri, 23 Sep 2022 13:17:48 -0600 Subject: [PATCH 2/2] Prettier --- docs/source/user-guide/flightsql.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/user-guide/flightsql.md b/docs/source/user-guide/flightsql.md index 54a28a8b8..cd7b9fce9 100644 --- a/docs/source/user-guide/flightsql.md +++ b/docs/source/user-guide/flightsql.md @@ -53,14 +53,14 @@ choco install docker-desktop docker-compose ``` ## <a name="rust"/>Building Ballista - + To build in docker (non-linux systems): ```shell git clone https://github.com/apache/arrow-ballista.git dev/build-ballista-rust.sh ``` - + Or in linux-based systems with the correct dependencies installed, one can simply: ```shell