quay.io/repository/rhacs-eng/sandbox:benchmark-node-analyze-1.0 is an Ubi8 based image with vim, RPM and RPM-build installed. Those packages are necessary for benchmark node analyze function
execute
docker run -it --rm quay.io/rhacs-eng/sandbox:benchmark-node-analyze-1.1
-
In the running ubi8 container,
cd tmp-specsfolder and make suregenerate-rpm-specs.shis there (check dockerfile line 6) -
execute the bash file:
bash generate-rpm-specs.sh [number of the RPM specs]. You will be able to see the RPM spec files in the folder
bash generate-rpm-specs.sh 1000
- execute
rpmbuild -bb *.spec
You will see output like: Wrote: /root/rpmbuild/RPMS/x86_64/package_name9-0-0.x86_64.rpm This gives you the path where RPM files were generated to.
- install all packages using the rpm files just created: yum localinstall /.*rpm
yum localinstall /root/rpmbuild/RPMS/x86_64/.*rpm
-
check the running ubi containers by executing:
docker container lsand get the container id of the container where you are currently installing the rpm packages -
execute
docker export [container id]>[tar name].tar(e.gdocker export c8c57bb7e926>demoV1.tar) and unzip the tar ball to get the file system -
Go to scanner/benchmarks/analyzeNode folder and execute command:
RHCOS_TEST_PATH="path/to/file/system" go test -bench=. -benchmem