Esthenia-collaboration / rfswarm-docker

Simple docker container wich make rswarm performance tool easy to launch
1 stars 0 forks source link

Add new action in the workflow to check the connection between manager and agent base image #34

Open Esthenia-collaboration opened 4 months ago

Esthenia-collaboration commented 4 months ago

Create a basic manager in the workflow to check the connection between the manager and the docker agent base image is running successfully

ADD the running command later

To launch a background interface and run the manager, commands lines below are used:

export DISPLAY=:0 rm -rf /tmp/.X0-lock Xvfb :0 -screen 0 640x480x8 -nolisten tcp & python /root/.local/lib/python3.11/site-packages/rfswarm_manager/rfswarm.py -i /src/product/RfswarmIni_file/RFSwarmManager.ini -s /src/product/tests_scenario/kafka_scenario.rfs -g 3 -n --run

Requirements below need to be installed:

python-decouple==3.8 psycopg2-binary Jinja2==3.1.2 Rtree==1.0.1 tk==0.1.0 aiohttp==3.8.5 rfswarm-manager==1.2.0 configparser psutil

test with fixed or variables python versions: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#using-a-specific-python-version

dave's Test repository might be used to run simple test: https://github.com/damies13/rfswarm/tree/master/Tests/Regression/Agent/testdata/Issue-%23171

https://github.com/damies13/rfswarm/blob/master/Doc/Agent_Communication.md

damies13 commented 2 months ago

HI Ksenia, @Esthenia-collaboration mentioned you were having trouble running the manager, you probably need tkinter installed, it's usually already installed in Mac OS and is part of the Windows installer, but not always installed on Linux especially command line distributions.

This is the relevant section from my github runner yaml for manager:

      - name: "Ubuntu Installs"
        if: ${{ matrix.platform == 'ubuntu-latest' }}
        run: |
          sudo apt install -y python3-tk python3-dev python3-xlib scrot fluxbox
          sudo apt list --installed

Just an FYI, if you run the manager with -n or --nogui then you don't need tkinter, but you will need to specify a scenario file for the manager to run.

Dave.

KseniaYa commented 2 months ago

HI Ksenia, @Esthenia-collaboration mentioned you were having trouble running the manager, you probably need tkinter installed, it's usually already installed in Mac OS and is part of the Windows installer, but not always installed on Linux especially command line distributions.

This is the relevant section from my github runner yaml for manager:

      - name: "Ubuntu Installs"
        if: ${{ matrix.platform == 'ubuntu-latest' }}
        run: |
          sudo apt install -y python3-tk python3-dev python3-xlib scrot fluxbox
          sudo apt list --installed
  • fluxbox: If you already have a window manager already you don't need fluxbox, I just use that as the window manager because it's small and quick to install
  • scrot: I don't remember why I installed scrot, It's a screen capture tool I think it might be required by one of the Robot Framework Libraries for taking screenshots

Just an FYI, if you run the manager with -n or --nogui then you don't need tkinter, but you will need to specify a scenario file for the manager to run.

Dave.

Hello Dave,

Thanks for the advice.

I added the -n option to run the manager, and it runs fine, but it doesn't show any logs. I expected to see some logs after running it, but I don't see anything. If I run rfswarm with the -n option without the scenario file, will I get an error or not?

I will run the tests in my local environment to compare a manager behavior with differents options.

Ksenia

damies13 commented 2 months ago

If I run rfswarm with the -n option without the scenario file, will I get an error or not?

From what I remember it will run the test from the ini file if there was one, if there's no scenario in the ini file (or there's no ini file) it should load the default "untitled" scenario, but as that has no script defined probably won't run.

Dave.