cloud-bulldozer / cloud-bulldozer/benchmark-wrapper

snafu base image

Open
#326 16 comments 0 reactions 1 assignee Claimed by @learnitall View on GitHub
Dominant language
Python
Stars
19
Forks
56
PR merge metrics
No merged PRs in 30d

Description

I was having problems rebuilding smallfile image, because pip kept failing to download a random python package, I got really annoyed and started thinking of ways to prevent this from happening, and came up with the idea of having a snafu base image that contained just the stuff that run_snafu.py needs, which is quite a lot actually. Then you make the individual benchmarks build off this base, so they don't have nearly as heavy a lift. For example:

```
[bengland@localhost benchmark-wrapper]$ cat snafu/smallfile_wrapper/generic-snafu-Dockerfile
FROM registry.access.redhat.com/ubi8:latest

RUN dnf install -y --nodocs git python3-pip
RUN dnf install -y --nodocs procps-ng iproute net-tools ethtool nmap iputils
RUN ln -s /usr/bin/python3 /usr/bin/python
COPY . /opt/snafu/
RUN pip3 install -e /opt/snafu/
```
and then the smallfile image becomes:

```
[bengland@localhost benchmark-wrapper]$ cat snafu/smallfile_wrapper/Dockerfile
FROM quay.io/bengland/snafu:latest

RUN git clone https://github.com/distributed-system-analysis/smallfile /opt/smallfile
RUN ln -sv /opt/smallfile/smallfile_cli.py /usr/local/bin/
RUN ln -sv /opt/smallfile/smallfile_rsptimes_stats.py /usr/local/bin/
```
and it rebuilds really fast. Would anyone else like to see this implemented? I could post a PR for this with smallfile and then we can incrementally extend it to other benchmarks if there is interest. Possible benchmarks that could use this would include:

```
[benchmark-operator]$ grep -r run_snafu . | awk -F: '{ print $1 }' | awk -F/ '/roles/{print $3}' | sort -u
cyclictest
fio_distributed
flent
fs-drift
hammerdb
image_pull
log_generator
oslat
pgbench
scale_openshift
smallfile
stressng
testpmd
uperf
vegeta
ycsb
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.