ceph / teuthology-api

A REST API to execute teuthology commands.
MIT License
2 stars 10 forks source link

Use teuthology-kill command instead of teuthology.kill.main function #47

Closed VallariAg closed 8 months ago

VallariAg commented 9 months ago

To test this PR, setup teuthology-api inside the teuthology container.

  1. Add instructions in teuthology dockerfile to setup t-api inside the teuthology container:

    SHELL ["/bin/bash", "-c"] 
    WORKDIR /
    RUN git clone -b use-kill-cmd https://github.com/ceph/teuthology-api && \
    cd /teuthology-api/ && \
    python3 -m venv venv && source ./venv/bin/activate && pip install -e . && \
    export TEUTHOLOGY_API_SERVER_PORT=8083 && \
    exit
    WORKDIR /teuthology
    ....
  2. In docker-compose file, expose TEUTHOLOGY_API_SERVER_PORT for teuthology service:

    teuthology:
    ports:
      - 8083:8083
  3. Start the containers

  4. exec into the teuthology container and run these commands:

    cd /teuthology-api
    source ./venv/bin/activate
    <add your teuthology-api's .env file>
    uvicorn teuthology_api.main:app --reload --port 8083 --host 0.0.0.0
  5. Schedule a run on /suite route, using the README payload.

  6. Then kill by pressing "Kill Run" button of https://github.com/ceph/pulpito-ng/pull/51

Contribution Guidelines

To sign and test your commits, please refer to Contibution guidelines.

Checklist