A very specific format of projects, accounts, and groups is used to represent studies, devices, and the relations between them.
Each study is represented by a Gerrit project. Experiments are stored on a branch of the project, there may be multiple experiment branches.
If the study is a private one, and thus results may be uploaded, each device will push it’s results to a unique branch of the project.
A study with no branches has got 2 groups associated with it. A
study-committers
group which the owner of the project has access to, and
study-devices
group, which is a supergroup containing all the experiment
branch groups.
Each experiment branch has in turn 1 group associated with it, which provides
read access to that specific branch. This experiment branch group
is included
in the study-devices
group.
Devices can be registered through the apex-study web page and all information needed to create the Gerrit account is extracted from the public key generated by APEX.
The name is user_host on Windows/Linux, and serial_serial on Android. The email is user@host on Windows/Linux and serial@serial on Android. This email will also appear on results commits made if the device pushes results.
A device can have multiple ssh keys associated with it.
Because Gerrit can’t attach permissions to an account, each device has 1 group
(1-device group
). This group is added to an experiment branch group
for read
access.
If the study is private the 1-device-group
is also given write access to a
specific branch of a project, called results-user_host (Windows/Linux) or
results-serial_serial (Android).
The entire structure is hierarchical, read ↓ as owns/includes:
Project: experiments | ||
---|---|---|
↓ | ||
Device supergroup | ||
↓ | ↓ | |
Experiment branch group | Experiment branch group | |
↓ | ↓ | ↓ |
1-device group | 1-device group | 1-device group |
For results the structure is a lot simpler:
Project: results | ||
---|---|---|
↓ | ↓ | ↓ |
1-device group | 1-device group | 1-device group |
A collection of scripts is present in apex/tools/study
which interact with a
gerrit instance and create projects, accounts, and groups; and edit project
configurations.