NubeIO / rubix-bios-legacy

Package Installer which comes with OS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rubix BIOS

BIOS comes with default OS, non-upgradable

Running in development

  • 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

Deploy on Production

  • 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.

How To Install:

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

How To Uninstall:

sudo ./rubix-bios-legacy --uninstall

Authentication

POST: /api/users/login Body

{
    "username": "<username>",
    "password": "<password>"
}

Use that access_token on header of each request

Get Rubix Service releases

curl http://localhost:1615/api/service/releases

Update check Rubix Service

curl http://localhost:1615/api/service/update_check

Upgrade Rubix Service

curl -X PUT http://localhost:1615/api/service/upgrade -H "Content-Type: application/json" -d '{"version": latest|<version>}

Upload artifact and Upgrade Rubix Service

curl -X PUT http://localhost:1615/api/service/upload_upgrade -H "Content-Type: multipart/form-data" -F "version=<version>" -F "file=<file>"

Update Token if your Rubix Service repo is private

curl -X PUT http://localhost:1615/api/service/token -H "Content-Type: application/json" -d '{"token": <TOKEN>|null}'

About

Package Installer which comes with OS


Languages

Language:Python 95.7%Language:Dockerfile 2.2%Language:Shell 2.1%