Squad backend notes
Note: This is a feature of Fuego that is in prototype form. That is, this feature is currently under development, and may change as the code matures and is readied for production use. It is presented here now to allow for experimentation and feedback.
Introduction [edit section]
Normally, Fuego stores test results on the test host (where Fuego is installed). These results can be queried and perused (browsed, examined, have visualizations presented) using a command line tool and via the Jenkins web interface.However, it is also possible to send test results to a different backend service for management and processing there.
This page documents the use of Fuego with the 'Squad' results management backend.
Here are some notes on using Fuego with Squad:
Commit d6634b2 is an early implementation of ftc support for putting run data to squad.
More debugging is needed and there are several FIXTHIS included, but it works.
Here are squad installation instructions for Ubuntu Xenial (16.04)
Squad installation [edit section]
Install squad server software [edit section]
- Install squad server application (this is a Django application)
host$ sudo apt-get install rabbitmq-server [Note] this is required for squad to communicate with celery worker tasks host$ git clone https://github.com/Linaro/squad host$ cd squad/ host$ mkvirtualenv --python=/usr/bin/python3.5 mysquad (mysquad) host$ pip3 install -r requirements-dev.txt (mysquad) host$ ./manage.py test (mysquad) host$ ./manage.py migrate (mysquad) host$ ./manage.py createsuperuser (mysquad) host$ ./manage.py runserver
If that doesn't work, try the following:
host$ mkvirtualenv --python=/usr/bin/python3.5 pipsquad (pipsquad) host$ ./manage.py migrate (pipsquad) host$ ./manage.py createsuperuser (pipsquad) host$ ./manage.py runserver
And if that doesn't work, you can install it on your host by following the instructions at: https://squad.readthedocs.io/en/latest/quickstart.html
To stop the server, type ctrl-C in the terminal where squad is running:
- (pipsquad) host$ ctrl-C
To exit the virtual environment:
* (pipsquad) host$ deactivate * host$
Starting squad after initial installation [edit section]
[Note] The next time you use Squad, do this:
host$ cd squad host$ workon squad host$ ./manage.py runserver
Configuring Squad [edit section]
- Configure a team and project in Squad
- host$ firefox http://localhost:8000/
- click upper-right popup menu > settings
- profile: write your name
- API token: copy the token - -> assign it to "server_squad_token" in fuego-ro/fuego.conf
- click upper-right popup menu > Administration
- Under: "Authentication and authorization"
- Add group (this is a user group!)
- name: myusergroup
- permissons: Under the Available permissions box, select "choose all"
- click "Save"
- Under: "Core"
- Add group (this is a team)
- slug=fuego
- name=fuego - -> assign this name ('fuego') to "server_squad_team" in fuego-ro/fuego.conf
- description: whatever
- usergroups: myusergroup
- Add project
- group: fuego
- slug=jessie
- name=jessie
- -> assign this name ('jessie') to "server_squad_project" in fuego-ro/fuego.conf
- Add group (this is a team)
- Under: "Authentication and authorization"
- Add group (this is a user group!)
- click upper-right popup menu > settings
- host$ firefox http://localhost:8000/
Fuego squad configuration [edit section]
- Edit fuego-ro/conf/fuego.conf to add squad attributes:
- server_type=squad
- server_domain=localhost:8000
- server_squad_token=<token generated above>
- server_squad_team=fuego
- server_squad_project=jessie
Putting runs from Fuego into Squad [edit section]
- To upload a run from Fuego
fuego-docker# ftc list-runs -q Benchmark.IOzone-default-1-bbb fuego-docker# ftc put-run Benchmark.IOzone-default-1-bbb Packaging run 'Benchmark.IOzone-default-1-bbb' run/ run/devlog.after.txt run/syslog.before.txt run/build.xml run/devlog.txt run/testlog.txt run/consolelog.txt run/run.json Run packaged successfully, and is at: /tmp/run-Benchmark.IOzone-default-1-on-fuegohost:bbb.frp WARNING: not adding attachment syslog.after WARNING: not adding attachment test_spec POSTING to http://localhost:8000/api/submit/fuego/jessie/a80be74d1629bdb2455b08db453beba0-4.9.133/bbb-4.9 Run package run-Benchmark.IOzone-default-1-on-fuegohost:bbb.frp was accepted by the server.
Issues [edit section]
- see FIXTHIS issues in ftc:
- $ grep FIXTHIS fuego-core/scripts/ftc | grep squad
Here is the FIXTHIS list for Fuego v1.5:
[FIXTHIS] squad: add a command line argument to override project_id (we don't have this concept in fuego) [FIXTHIS] squad: add a squad-compatible build_id [FIXTHIS] squad: add a command line argument to override build_id (we don't have this concept in fuego) [FIXTHIS] squad: add a squad-compatible env_id [FIXTHIS] squad: add a command line argument to override env_id FIXTHIS - squad: drop colon and plus replacements in squad timestamp