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)

  1. create very base container has shell/python3 environment
  2. run-label task, replace local run/bin file to container inside run/bin file
  3. 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
  4. reschedule sleperf process , main process monitor and scheduler benchmark process.
  5. 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 "create_share"="bash -c \'podman volume create sleperf_var_log_qa;podman volume create sleperf_var_log_qaset;podman volume create sleperf_root_qaset;podman volume create sleperf_usr_share_qa_qaset;podman volume create sleperf_usr_share_qa_perfcom\'"
LABEL "rm_share"="bash -c \'podman volume rm sleperf_var_log_qa;podman volume rm sleperf_var_log_qaset; podman volume rm sleperf_root_qaset;podman volume rm sleperf_usr_share_qa_qaset;podman volume rm sleperf_usr_share_qa_perfcom\'"
LABEL "run"="podman run -itd --mount type=volume,src=sleperf_var_log_qa,target=/var/log/qa \
--mount type=volume,src=sleperf_var_log_qaset,target=/var/log/qaset \
--mount type=volume,src=sleperf_root_qaset,target=/root/qaset \
--mount type=volume,src=sleperf_usr_share_qa_qaset,target=/usr/share/qa/qaset \
--mount type=volume,src=sleperf_usr_share_qa_perfcom,target=/usr/share/qa/perfcom \
--name sleperf localhost/sleperf:latest"
LABEL "rm_sleperf"="bash -c \'podman stop sleperf;podman rm sleperf;\'"
LABEL "setup_systemd"="bash -c \'podman cp sleperf:/usr/share/qa/qaset/misc/sleperf_entry.service /usr/lib/systemd/system/;podman cp sleperf:/usr/share/qa/qaset/bin/sleperf_proxy /bin/;systemctl enable sleperf_entry \'"

runlabel will create 2 file in ALP host add-emoji

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: "containersleperfhookmsg: pullandruncontainer xxxx " , action : pull test image and run again ;

input: "containersleperfhookmsg: allfinished" , action: exit;

input: "containersleperfhookmsg: testcasefinish" , action : reboot .

sleperfhookoutput we just need insert into main-process when need action in ALP host.



Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 23


  • 8 months ago: renxt0310 joined this project.
  • 8 months ago: cachen liked this project.
  • 8 months ago: jerrytang started this project.
  • 8 months ago: jerrytang originated this project.

  • Comments

    • cachen
      8 months ago by cachen | Reply

      Ideally user can easily deploy/run SLEPerf framework and service within container(s) for their performance testing task, will this project to provide 2 containers e.g. SLEPerf-server, SLEPerf-client?

      • jerrytang
        8 months ago by jerrytang | Reply

        This idea just focus on SLEPerf client. good idea provide server option, we already has sles container that contain dashboard service on debug server, so it should less effect on server container.

    Similar Projects

    This project is one of its kind!