Skip to content

Commit 8345b5e

Browse files
authored
[Ballista] Fix Ballista IT (#5)
1 parent d2bc07d commit 8345b5e

File tree

8 files changed

+32
-96
lines changed

8 files changed

+32
-96
lines changed

.dockerignore

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,6 @@
2121
# This setup requires to all of our docker containers have arrow's source
2222
# as a mounted directory.
2323

24-
# exclude everything
25-
**
26-
27-
# include explicitly
28-
!ci/**
29-
!c_glib/Gemfile
30-
!dev/archery/requirements*.txt
31-
!python/requirements*.txt
32-
!python/manylinux1/**
33-
!python/manylinux2010/**
34-
!r/DESCRIPTION
35-
!ruby/Gemfile
36-
!ruby/red-arrow/Gemfile
37-
!ruby/red-arrow/lib/arrow/version.rb
38-
!ruby/red-arrow/red-arrow.gemspec
39-
!ruby/red-arrow-cuda/Gemfile
40-
!ruby/red-arrow-cuda/lib/arrow-cuda/version.rb
41-
!ruby/red-arrow-cuda/red-arrow-cuda.gemspec
42-
!ruby/red-gandiva/Gemfile
43-
!ruby/red-gandiva/lib/gandiva/version.rb
44-
!ruby/red-gandiva/red-gandiva.gemspec
45-
!ruby/red-parquet/Gemfile
46-
!ruby/red-parquet/lib/parquet/version.rb
47-
!ruby/red-parquet/red-parquet.gemspec
48-
!ruby/red-plasma/Gemfile
49-
!ruby/red-plasma/lib/plasma/version.rb
50-
!ruby/red-plasma/red-plasma.gemspec
51-
!rust/Cargo.toml
52-
!rust/benchmarks/Cargo.toml
53-
!rust/arrow/Cargo.toml
54-
!rust/arrow/benches
55-
!rust/arrow-flight/Cargo.toml
56-
!rust/parquet/Cargo.toml
57-
!rust/parquet/build.rs
58-
!rust/parquet_derive/Cargo.toml
59-
!rust/parquet_derive_test/Cargo.toml
60-
!rust/datafusion/Cargo.toml
61-
!rust/datafusion/benches
62-
!rust/integration-testing/Cargo.toml
24+
ci
25+
dev
26+
**/target/*

ballista/.dockerignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

ballista/docker/README.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

ballista/dev/build-rust-base.sh renamed to dev/build-rust-base.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# under the License.
1919
BALLISTA_VERSION=0.4.2-SNAPSHOT
2020
set -e
21-
docker build -t ballistacompute/rust-base:$BALLISTA_VERSION -f docker/rust-base.dockerfile .
21+
docker build -t ballistacompute/rust-base:$BALLISTA_VERSION -f dev/docker/rust-base.dockerfile .

ballista/dev/build-rust.sh renamed to dev/build-rust.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ BALLISTA_VERSION=0.4.2-SNAPSHOT
2121

2222
set -e
2323

24-
docker build -t ballistacompute/ballista-rust:$BALLISTA_VERSION -f docker/rust.dockerfile .
24+
docker build -t ballistacompute/ballista-rust:$BALLISTA_VERSION -f dev/docker/rust.dockerfile .

ballista/docker/rust-base.dockerfile renamed to dev/docker/rust-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
# Base image extends debian:buster-slim
26-
FROM rust:1.49.0-buster AS builder
26+
FROM rust:1.51.0-buster AS builder
2727

2828
RUN apt update && apt -y install musl musl-dev musl-tools libssl-dev openssl
2929

ballista/docker/rust.dockerfile renamed to dev/docker/rust.dockerfile

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,57 @@
2222
# as a mounted directory.
2323

2424
ARG RELEASE_FLAG=--release
25-
FROM ballistacompute/rust-base:0.4.0-20210213 AS base
25+
FROM ballistacompute/rust-base:0.4.2-SNAPSHOT AS base
2626
WORKDIR /tmp/ballista
2727
RUN apt-get -y install cmake
2828
RUN cargo install cargo-chef
2929

3030
FROM base as planner
31-
COPY rust .
31+
RUN mkdir /tmp/ballista/ballista
32+
RUN mkdir /tmp/ballista/benchmarks
33+
RUN mkdir /tmp/ballista/datafusion
34+
RUN mkdir /tmp/ballista/datafusion-examples
35+
ADD Cargo.toml .
36+
COPY benchmarks ./benchmarks/
37+
COPY datafusion ./datafusion/
38+
COPY datafusion-examples ./datafusion-examples/
39+
COPY ballista ./ballista/
3240
RUN cargo chef prepare --recipe-path recipe.json
3341

3442
FROM base as cacher
3543
COPY --from=planner /tmp/ballista/recipe.json recipe.json
3644
RUN cargo chef cook $RELEASE_FLAG --recipe-path recipe.json
3745

3846
FROM base as builder
39-
COPY rust .
47+
RUN mkdir /tmp/ballista/ballista
48+
RUN mkdir /tmp/ballista/benchmarks
49+
RUN mkdir /tmp/ballista/datafusion
50+
RUN mkdir /tmp/ballista/datafusion-examples
51+
ADD Cargo.toml .
52+
COPY benchmarks ./benchmarks/
53+
COPY datafusion ./datafusion/
54+
COPY ballista ./ballista/
55+
COPY datafusion-examples ./datafusion-examples/
4056
COPY --from=cacher /tmp/ballista/target target
4157
ARG RELEASE_FLAG=--release
4258

4359
# force build.rs to run to generate configure_me code.
4460
ENV FORCE_REBUILD='true'
4561
RUN cargo build $RELEASE_FLAG
62+
RUN cd ballista/rust && \
63+
cargo build $RELEASE_FLAG
4664

4765
# put the executor on /executor (need to be copied from different places depending on FLAG)
4866
ENV RELEASE_FLAG=${RELEASE_FLAG}
49-
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/target/debug/ballista-executor /executor; else mv /tmp/ballista/target/release/ballista-executor /executor; fi
67+
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/ballista/rust/target/debug/ballista-executor /executor; else mv /tmp/ballista/ballista/rust/target/release/ballista-executor /executor; fi
5068

5169
# put the scheduler on /scheduler (need to be copied from different places depending on FLAG)
5270
ENV RELEASE_FLAG=${RELEASE_FLAG}
53-
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/target/debug/ballista-scheduler /scheduler; else mv /tmp/ballista/target/release/ballista-scheduler /scheduler; fi
71+
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/ballista/rust/target/debug/ballista-scheduler /scheduler; else mv /tmp/ballista/ballista/rust/target/release/ballista-scheduler /scheduler; fi
5472

5573
# put the tpch on /tpch (need to be copied from different places depending on FLAG)
5674
ENV RELEASE_FLAG=${RELEASE_FLAG}
57-
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/target/debug/tpch /tpch; else mv /tmp/ballista/target/release/tpch /tpch; fi
75+
RUN if [ -z "$RELEASE_FLAG" ]; then mv /tmp/ballista/ballista/rust/target/debug/tpch /tpch; else mv /tmp/ballista/ballista/rust/target/release/tpch /tpch; fi
5876

5977
# Copy the binary into a new container for a smaller docker image
6078
FROM ballistacompute/rust-base:0.4.0-20210213

ballista/dev/integration-tests.sh renamed to dev/integration-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919
set -e
20+
./dev/build-rust-base.sh
2021
./dev/build-rust.sh
21-
pushd rust/benchmarks/tpch
22+
pushd ballista/rust/benchmarks/tpch
2223
./tpch-gen.sh
2324

2425
docker-compose up -d

0 commit comments

Comments
 (0)