BIOS comes with default OS, non-upgradable
-
Use
poetry
to manage dependencies -
Simple script to install
./setup.sh
-
Join
venv
poetry shell
-
Build local binary
poetry run pyinstaller run.py -n rubix-bios-legacy --clean --onefile \ --add-data VERSION:. \ --add-data config:config \ --add-data systemd:systemd
The output is:
dist/rubix-bios-legacy
- Download release artifact
- Review help and start
./rubix-bios-legacy -h
Usage: run.py [OPTIONS]
Options:
-p, --port INTEGER Port [default: 1615]
-g, --global-dir PATH Global data dir
-d, --data-dir PATH Application data dir
-c, --config-dir PATH Global config dir
-a, --artifact-dir PATH Artifact downloaded dir
--prod Production mode
--device-type [amd64|arm64|armv7]
Device type [default: armv7]
--install Install rubix-bios-legacy
--uninstall Uninstall rubix-bios-legacy
--auth Enable JWT authentication
-h, --help Show this message and exit.
See here for dockerized install
Download appropriate rubix-bios-legacy file from the GitHub Release & extract it, then run following command to start from systemd file:
- Template:
sudo ./rubix-bios-legacy -p <port> -g <global_dir> -d <data_dir> -c <config_dir> -a <artifact_dir> --device-type <device_type> --prod --install
- Template2 (With JWT authorization):
sudo ./rubix-bios-legacy -p <port> -g <global_dir> -d <data_dir> -c <config_dir> -a <artifact_dir> --device-type <device_type> --prod --install --auth
- To Run on BBB & Pi:
sudo ./rubix-bios-legacy -p 1615 -g /data/rubix-bios-legacy -d data -c config -a apps --prod --install
- To Run on BBB & Pi with auth restriction:
sudo ./rubix-bios-legacy -p 1615 -g /data/rubix-bios-legacy -d data -c config -a apps --prod --install --auth
- To Run on Ubuntu:
sudo ./rubix-bios-legacy -p 1615 -g /data/rubix-bios-legacy -d data -c config -a apps --prod --install --device-type amd64
- To Run on Ubuntu with auth restriction:
sudo ./rubix-bios-legacy -p 1615 -g /data/rubix-bios-legacy -d data -c config -a apps --prod --install --auth --device-type amd64
- To Run on Ubuntu with auth restriction and GitHub token:
sudo ./rubix-bios-legacy -p 1615 -g /data/rubix-bios-legacy -d data -c config -a apps --prod --install --auth --device-type amd64 --token <token>
Note: if bios installed with --auth, services will also open with same auth protection
sudo ./rubix-bios-legacy --uninstall
POST:
/api/users/login
Body
{
"username": "<username>",
"password": "<password>"
}
Use that
access_token
on header of each request
curl http://localhost:1615/api/service/releases
curl http://localhost:1615/api/service/update_check
curl -X PUT http://localhost:1615/api/service/upgrade -H "Content-Type: application/json" -d '{"version": latest|<version>}
curl -X PUT http://localhost:1615/api/service/upload_upgrade -H "Content-Type: multipart/form-data" -F "version=<version>" -F "file=<file>"
curl -X PUT http://localhost:1615/api/service/token -H "Content-Type: application/json" -d '{"token": <TOKEN>|null}'