Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: import rp-storage-tool #11223

Merged
merged 5 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions tests/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,31 @@ RUN /kaf && \

#################################

FROM base as client-swarm
FROM base as rust
COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/rust /
RUN /rust && \
rm /rust
ENV PATH="${PATH}:/root/.cargo/bin"

#################################

FROM rust as client-swarm

COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/client-swarm /
RUN /client-swarm /root && \
RUN /client-swarm && \
rm /client-swarm

#################################

FROM rust as rp-storage-tool

COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/rp-storage-tool /
COPY --chown=0:0 --chmod=0755 tools/rp_storage_tool /rp_storage_tool
RUN /rp-storage-tool && \
rm -rf /rp_storage_tool

#################################

FROM golang as sarama-examples

COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/sarama-examples /
Expand Down Expand Up @@ -230,7 +247,7 @@ COPY --from=kcat /usr/local/bin/kcat /usr/local/bin/
COPY --from=sarama-examples /opt/sarama /opt/sarama
COPY --from=golang-test-clients /opt/redpanda-tests/go /opt/redpanda-tests/go
COPY --from=client-swarm /usr/local/bin/client-swarm /usr/local/bin/
COPY --from=client-swarm /usr/local/bin/rp-storage-tool /usr/local/bin/
COPY --from=rp-storage-tool /usr/local/bin/rp-storage-tool /usr/local/bin/
COPY --from=franz-bench /opt/franz-go/examples/bench /opt/franz-go/examples/bench
COPY --from=k8s /usr/local/bin/kubectl /usr/local/bin/helm /usr/local/bin/
COPY --from=kaf /usr/local/bin/kaf /usr/local/bin/
Expand Down
1 change: 1 addition & 0 deletions tests/docker/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!tests/python
!tests/go
!tools/offline_log_viewer
!tools/rp_storage_tool
!tools/consumer_offsets_recovery
!tests/docker/ducktape-deps/
!tests/rptest/remote_scripts
Expand Down
19 changes: 4 additions & 15 deletions tests/docker/ducktape-deps/client-swarm
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
#!/usr/bin/env bash
set -e
dir="$1"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH="$dir/.cargo/bin:${PATH}"
pushd /tmp
set -x

pushd /tmp
git clone https://github.com/redpanda-data/client-swarm.git

pushd client-swarm
git reset --hard 5610f614545ee34f593e1279b30ee9986959d9b0
cargo build --release
cp target/release/client-swarm /usr/local/bin
popd
rm -rf client-swarm

git clone https://github.com/jcsp/segment_toy.git
pushd segment_toy
git reset --hard b101a31927d48e513bec21ad500c048c91e7c192
cargo build --release
cp target/release/rp-storage-tool /usr/local/bin
popd
rm -rf segment_toy

rm -rf client-swarm
popd
rm -rf $dir/.cargo
rm -rf $dir/.rustup
8 changes: 8 additions & 0 deletions tests/docker/ducktape-deps/rp-storage-tool
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -e
set -x

cd /rp_storage_tool
cargo build --release
cp target/release/rp-storage-tool /usr/local/bin
cd /
5 changes: 5 additions & 0 deletions tests/docker/ducktape-deps/rust
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
set -x

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=1.70.0 -y
Loading