Skip to content
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
33 changes: 33 additions & 0 deletions .github/workflows/kbench-iperf3-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and push docker image for k-bench iperf3 test containers

on:
push:
paths:
- "test_images/**"

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
run: |
cd test_images
make build-kbench-iperf3
make push-kbench-iperf3
env:
IMAGE_REPO: ghcr.io/${{ github.repository_owner }}
IMAGE_TAG: latest
1 change: 0 additions & 1 deletion config/dp_network_internode/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ Run dp_network_internode individually using the following command:
cd ../../; ./run.sh -t "dp_network_internode" -r <run-tag> -o <output-dir>"

Please use the qperf results for the network latency and the iperf3 results for bandwidth.

27 changes: 4 additions & 23 deletions config/dp_network_internode/iperf_client_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: podtype
- key: podtype
operator: In
values:
- server
topologyKey: kubernetes.io/hostname
hostname: iperfclient
subdomain: kbench-service-oid-0-tid-0
containers:
- image: nginx
- name: iperfclientcontainer
image: ghcr.io/anpegush/kbench-iperf3:latest
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "4200Mi"
Expand All @@ -29,24 +31,3 @@ spec:
memory: "4200Mi"
cpu: "1000m"
ephemeral-storage: "5Gi"
command: ["/bin/sh","-c"]
args:
- sleep 2s;
apt-get update;
apt-get install -y iperf3;
apt-get install -y procps;
apt-get install -y net-tools;
apt-get install -y iputils-ping;
apt-get install -y qperf;
apt-get clean;
apt-get install -y wget gawk make;
apt-get clean;
apt-get install -y gcc libpath-tiny-perl;
cd /tmp;
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz;
tar xvf qperf-0.4.9.tar.gz;
cd qperf-0.4.9;
./configure;
make;
sleep infinity;
name: iperfclientcontainer
26 changes: 3 additions & 23 deletions config/dp_network_internode/iperf_server_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ spec:
hostname: iperfserver
subdomain: kbench-service-oid-0-tid-0
containers:
- image: nginx
- name: iperfservercontainer
image: ghcr.io/anpegush/kbench-iperf3:latest
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "4200Mi"
Expand All @@ -19,25 +21,3 @@ spec:
memory: "4200Mi"
cpu: "1000m"
ephemeral-storage: "5Gi"
command: ["/bin/sh","-c"]
args:
- sleep 2s;
apt-get update;
apt-get install -y iperf3;
apt-get install -y procps;
apt-get install -y net-tools;
apt-get install -y qperf;
apt-get install -y iputils-ping;
apt-get clean;
apt-get install -y wget gawk make;
apt-get clean;
apt-get install -y gcc libpath-tiny-perl;
cd /tmp;
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz;
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz;
tar xvf qperf-0.4.9.tar.gz;
cd qperf-0.4.9;
./configure;
make;
sleep infinity;
name: iperfservercontainer
2 changes: 1 addition & 1 deletion config/dp_network_internode/iperf_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: kbench-pod-namespace
spec:
selector:
name: myiperf
name: myiperf
clusterIP: None
ports:
- name: foo # Actually, no port is needed.
Expand Down
27 changes: 4 additions & 23 deletions config/dp_network_intranode/iperf_client_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: podtype
- key: podtype
operator: In
values:
- server
topologyKey: kubernetes.io/hostname
hostname: iperfclient
subdomain: kbench-service-oid-0-tid-0
containers:
- image: nginx
- name: iperfclientcontainer
image: ghcr.io/anpegush/kbench-iperf3:latest
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "4200Mi"
Expand All @@ -29,24 +31,3 @@ spec:
memory: "4200Mi"
cpu: "1000m"
ephemeral-storage: "5Gi"
command: ["/bin/sh","-c"]
args:
- sleep 2s;
apt-get update;
apt-get install -y iperf3;
apt-get install -y procps;
apt-get install -y net-tools;
apt-get install -y iputils-ping;
apt-get install -y qperf;
apt-get clean;
apt-get install -y wget gawk make;
apt-get clean;
apt-get install -y gcc libpath-tiny-perl;
cd /tmp;
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz;
tar xvf qperf-0.4.9.tar.gz;
cd qperf-0.4.9;
./configure;
make;
sleep infinity;
name: iperfclientcontainer
26 changes: 3 additions & 23 deletions config/dp_network_intranode/iperf_server_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ spec:
hostname: iperfserver
subdomain: kbench-service-oid-0-tid-0
containers:
- image: nginx
- name: iperfservercontainer
image: ghcr.io/anpegush/kbench-iperf3:latest
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "4200Mi"
Expand All @@ -19,25 +21,3 @@ spec:
memory: "4200Mi"
cpu: "1000m"
ephemeral-storage: "5Gi"
command: ["/bin/sh","-c"]
args:
- sleep 2s;
apt-get update;
apt-get install -y iperf3;
apt-get install -y procps;
apt-get install -y net-tools;
apt-get install -y qperf;
apt-get install -y iputils-ping;
apt-get clean;
apt-get install -y wget gawk make;
apt-get clean;
apt-get install -y gcc libpath-tiny-perl;
cd /tmp;
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz;
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz;
tar xvf qperf-0.4.9.tar.gz;
cd qperf-0.4.9;
./configure;
make;
sleep infinity;
name: iperfservercontainer
2 changes: 1 addition & 1 deletion config/dp_network_intranode/iperf_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: kbench-pod-namespace
spec:
selector:
name: myiperf
name: myiperf
clusterIP: None
ports:
- name: foo # Actually, no port is needed.
Expand Down
15 changes: 15 additions & 0 deletions test_images/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
KBENCH_IPERF3_DOCKERFILE = kbench-iperf3.Dockerfile
IMAGE_REPO ?= localhost:5000
IMAGE_REPO := $(shell echo $(IMAGE_REPO) | tr '[:upper:]' '[:lower:]')
IMAGE_TAG ?= latest
IMAGE_NAME = $(IMAGE_REPO)/kbench-iperf3:$(IMAGE_TAG)

PHONY: build-kbench-iperf3 push-kbench-iperf3 all

all: build-kbench-iperf3 push-kbench-iperf3

build-kbench-iperf3:
docker build -t $(IMAGE_NAME) -f $(KBENCH_IPERF3_DOCKERFILE) .

push-kbench-iperf3:
docker push $(IMAGE_NAME)
24 changes: 24 additions & 0 deletions test_images/kbench-iperf3.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Use the official Nginx base image
FROM nginx:latest

# Install iperf3
RUN apt-get update && \
apt-get install -y iperf3 && \
apt-get install -y procps && \
apt-get install -y net-tools && \
apt-get install -y iputils-ping && \
apt-get install -y qperf && \
apt-get install -y wget gawk make && \
apt-get install -y gcc libpath-tiny-perl && \
# Clean up apt cache to reduce image size
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install qperf
RUN cd /tmp && \
wget https://www.openfabrics.org/downloads/qperf/qperf-0.4.9.tar.gz && \
tar xvf qperf-0.4.9.tar.gz && \
cd qperf-0.4.9 && \
./configure && \
make
CMD ["/bin/sh","-c","sleep infinity"]