Project Description
SLEPerf containerize
Containerize SLEPerf. AS alp is our next generation products and container TECH become fundamental , I'd like to adapt SLEPerf to container. This project will try find out a way that how performance tools running in a container .
Goal for this Hackweek
Try Resolve key task for SLEPerf to running in a container
discuss reasonable solution that sleperf could be running in container , init task will be 5 blow. (could change after discuss)
- create very base container has shell/python3 environment
- run-label task, replace local run/bin file to container inside run/bin file
- find a way to run another container process in a container. if there is no stander api way , we need use proxy way which is use systemd file as proxy
- reschedule sleperf process , main process monitor and scheduler benchmark process.
- share storage issue, we need share log between different containers
Result: we have create prototype that all process could run pass.
``` FROM opensuse/tumbleweed:latest RUN ["mkdir","/usr/share/qa","/var/log/qa","/var/log/qaset" ] RUN ["touch","/entrypoint" ] ADD ["scheduler-service/automation/qaset","/usr/share/qa/qaset" ] ADD ["scheduler-service/automation/perfcom","/usr/share/qa/perfcom" ] ADD ["common-infra/libs","/usr/share/qa/qaset/libs" ] ENTRYPOINT [ "/bin/bash" ]
LABEL "createshare"="bash -c \'podman volume create sleperfvarlogqa;podman volume create sleperfvarlogqaset;podman volume create sleperfrootqaset;podman volume create sleperfusrshareqaqaset;podman volume create sleperfusrshareqaperfcom\'" LABEL "rmshare"="bash -c \'podman volume rm sleperfvarlogqa;podman volume rm sleperfvarlogqaset; podman volume rm sleperfrootqaset;podman volume rm sleperfusrshareqaqaset;podman volume rm sleperfusrshareqaperfcom\'" LABEL "run"="podman run -itd --mount type=volume,src=sleperfvarlogqa,target=/var/log/qa \ --mount type=volume,src=sleperfvarlogqaset,target=/var/log/qaset \ --mount type=volume,src=sleperfrootqaset,target=/root/qaset \ --mount type=volume,src=sleperfusrshareqaqaset,target=/usr/share/qa/qaset \ --mount type=volume,src=sleperfusrshareqaperfcom,target=/usr/share/qa/perfcom \ --name sleperf localhost/sleperf:latest" LABEL "rmsleperf"="bash -c \'podman stop sleperf;podman rm sleperf;\'" LABEL "setupsystemd"="bash -c \'podman cp sleperf:/usr/share/qa/qaset/misc/sleperfentry.service /usr/lib/systemd/system/;podman cp sleperf:/usr/share/qa/qaset/bin/sleperfproxy /bin/;systemctl enable sleperf_entry \'" ```
runlabel will create 2 file in ALP host
1 is systemd service sleperf_entry.service which will launch our sleperf proxy script at boot .
2 is bin/sleperfproxy systemd service run this file and this file will execute main-process in container do most work. read [sleperfhook_output] , and run coo-response [action] like:
input: "container_sleperf_hook_msg: pull_and_run_container xxxx " , action : pull test image and run again ;
input: "container_sleperf_hook_msg: all_finished" , action: exit;
input: "container_sleperf_hook_msg: testcase_finish" , action : reboot .
sleperfhookoutput we just need insert into main-process when need action in ALP host.
Resources
ALP
Looking for hackers with the skills:
Nothing? Add some keywords!
This project is part of:
Hack Week 23
Comments
Similar Projects
This project is one of its kind!