goosebit 0.1.2__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- goosebit/__init__.py +50 -19
- goosebit/__main__.py +7 -0
- goosebit/api/responses.py +5 -0
- goosebit/api/routes.py +5 -15
- goosebit/api/telemetry/__init__.py +1 -0
- goosebit/{telemetry/__init__.py → api/telemetry/metrics.py} +9 -3
- goosebit/api/telemetry/prometheus/__init__.py +2 -0
- goosebit/api/telemetry/prometheus/readers.py +3 -0
- goosebit/api/telemetry/prometheus/routes.py +18 -0
- goosebit/api/telemetry/routes.py +9 -0
- goosebit/api/v1/__init__.py +1 -0
- goosebit/api/v1/devices/__init__.py +1 -0
- goosebit/api/v1/devices/device/__init__.py +1 -0
- goosebit/api/v1/devices/device/responses.py +13 -0
- goosebit/api/v1/devices/device/routes.py +27 -0
- goosebit/api/v1/devices/requests.py +7 -0
- goosebit/api/v1/devices/responses.py +16 -0
- goosebit/api/v1/devices/routes.py +35 -0
- goosebit/api/v1/download/__init__.py +1 -0
- goosebit/api/v1/download/routes.py +22 -0
- goosebit/api/v1/rollouts/__init__.py +1 -0
- goosebit/api/v1/rollouts/requests.py +16 -0
- goosebit/api/v1/rollouts/responses.py +19 -0
- goosebit/api/v1/rollouts/routes.py +50 -0
- goosebit/api/v1/routes.py +9 -0
- goosebit/api/v1/software/__init__.py +1 -0
- goosebit/api/v1/software/requests.py +5 -0
- goosebit/api/v1/software/responses.py +16 -0
- goosebit/api/v1/software/routes.py +77 -0
- goosebit/auth/__init__.py +101 -101
- goosebit/db/__init__.py +11 -0
- goosebit/db/config.py +10 -0
- goosebit/db/migrations/models/0_20240830054046_init.py +136 -0
- goosebit/{models.py → db/models.py} +17 -10
- goosebit/realtime/logs.py +4 -3
- goosebit/realtime/routes.py +2 -2
- goosebit/schema/__init__.py +0 -0
- goosebit/schema/devices.py +73 -0
- goosebit/schema/rollouts.py +31 -0
- goosebit/schema/software.py +37 -0
- goosebit/settings/__init__.py +17 -0
- goosebit/settings/const.py +21 -0
- goosebit/settings/schema.py +86 -0
- goosebit/ui/bff/__init__.py +1 -0
- goosebit/ui/bff/devices/__init__.py +1 -0
- goosebit/ui/bff/devices/requests.py +12 -0
- goosebit/ui/bff/devices/responses.py +39 -0
- goosebit/ui/bff/devices/routes.py +72 -0
- goosebit/ui/bff/download/__init__.py +1 -0
- goosebit/ui/bff/download/routes.py +22 -0
- goosebit/ui/bff/rollouts/__init__.py +1 -0
- goosebit/ui/bff/rollouts/responses.py +37 -0
- goosebit/ui/bff/rollouts/routes.py +52 -0
- goosebit/ui/bff/routes.py +11 -0
- goosebit/ui/bff/software/__init__.py +1 -0
- goosebit/ui/bff/software/responses.py +37 -0
- goosebit/ui/bff/software/routes.py +83 -0
- goosebit/ui/nav.py +16 -0
- goosebit/ui/routes.py +29 -66
- goosebit/ui/static/favicon.ico +0 -0
- goosebit/ui/static/favicon.svg +1 -1
- goosebit/ui/static/js/devices.js +47 -71
- goosebit/ui/static/js/index.js +4 -9
- goosebit/ui/static/js/login.js +23 -0
- goosebit/ui/static/js/logs.js +1 -1
- goosebit/ui/static/js/rollouts.js +33 -19
- goosebit/ui/static/js/{firmware.js → software.js} +87 -86
- goosebit/ui/static/js/util.js +60 -6
- goosebit/ui/static/svg/goosebit-logo.svg +1 -1
- goosebit/ui/templates/__init__.py +9 -1
- goosebit/ui/templates/devices.html.jinja +75 -0
- goosebit/ui/templates/index.html.jinja +25 -0
- goosebit/ui/templates/login.html.jinja +57 -0
- goosebit/ui/templates/logs.html.jinja +31 -0
- goosebit/ui/templates/nav.html.jinja +84 -0
- goosebit/ui/templates/rollouts.html.jinja +93 -0
- goosebit/ui/templates/software.html.jinja +139 -0
- goosebit/updater/controller/v1/routes.py +101 -96
- goosebit/updater/controller/v1/schema.py +56 -0
- goosebit/updater/manager.py +65 -65
- goosebit/updater/routes.py +3 -11
- goosebit/updates/__init__.py +91 -32
- goosebit/updates/swdesc.py +2 -7
- goosebit-0.2.1.dist-info/METADATA +173 -0
- goosebit-0.2.1.dist-info/RECORD +95 -0
- goosebit/api/devices.py +0 -136
- goosebit/api/download.py +0 -34
- goosebit/api/firmware.py +0 -57
- goosebit/api/helper.py +0 -30
- goosebit/api/rollouts.py +0 -87
- goosebit/db.py +0 -37
- goosebit/permissions.py +0 -75
- goosebit/settings.py +0 -64
- goosebit/telemetry/prometheus.py +0 -10
- goosebit/ui/templates/devices.html +0 -115
- goosebit/ui/templates/firmware.html +0 -163
- goosebit/ui/templates/index.html +0 -23
- goosebit/ui/templates/login.html +0 -65
- goosebit/ui/templates/logs.html +0 -36
- goosebit/ui/templates/nav.html +0 -117
- goosebit/ui/templates/rollouts.html +0 -76
- goosebit-0.1.2.dist-info/METADATA +0 -123
- goosebit-0.1.2.dist-info/RECORD +0 -51
- {goosebit-0.1.2.dist-info → goosebit-0.2.1.dist-info}/LICENSE +0 -0
- {goosebit-0.1.2.dist-info → goosebit-0.2.1.dist-info}/WHEEL +0 -0
@@ -1,123 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: goosebit
|
3
|
-
Version: 0.1.2
|
4
|
-
Summary:
|
5
|
-
Author: Upstream Data
|
6
|
-
Author-email: brett@upstreamdata.ca
|
7
|
-
Requires-Python: >=3.11,<4.0
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Classifier: Programming Language :: Python :: 3.11
|
10
|
-
Classifier: Programming Language :: Python :: 3.12
|
11
|
-
Requires-Dist: aerich (>=0.7.2,<0.8.0)
|
12
|
-
Requires-Dist: aiocache (>=0.12.2,<0.13.0)
|
13
|
-
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
|
14
|
-
Requires-Dist: argon2-cffi (>=23.1.0,<24.0.0)
|
15
|
-
Requires-Dist: fastapi[uvicorn] (>=0.111.0,<0.112.0)
|
16
|
-
Requires-Dist: itsdangerous (>=2.2.0,<3.0.0)
|
17
|
-
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
|
18
|
-
Requires-Dist: joserfc (>=1.0.0,<2.0.0)
|
19
|
-
Requires-Dist: libconf (>=2.0.1,<3.0.0)
|
20
|
-
Requires-Dist: opentelemetry-distro (>=0.47b0,<0.48)
|
21
|
-
Requires-Dist: opentelemetry-exporter-prometheus (>=0.47b0,<0.48)
|
22
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi (>=0.47b0,<0.48)
|
23
|
-
Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
|
24
|
-
Requires-Dist: semver (>=3.0.2,<4.0.0)
|
25
|
-
Requires-Dist: tortoise-orm (>=0.21.4,<0.22.0)
|
26
|
-
Requires-Dist: websockets (>=12.0,<13.0)
|
27
|
-
Description-Content-Type: text/markdown
|
28
|
-
|
29
|
-
# gooseBit
|
30
|
-
|
31
|
-
<img src="docs/img/goosebit-logo.png" style="width: 100px; height: 100px; display: block;">
|
32
|
-
|
33
|
-
---
|
34
|
-
|
35
|
-
A simplistic, opinionated remote update server implementing hawkBit™'s [DDI API](https://eclipse.dev/hawkbit/apis/ddi_api/).
|
36
|
-
|
37
|
-
## Setup
|
38
|
-
|
39
|
-
To set up, install the dependencies in `pyproject.toml` with `poetry install`. Then you can run gooseBit by running `main.py`.
|
40
|
-
|
41
|
-
## Initial Startup
|
42
|
-
|
43
|
-
The first time you start gooseBit, you should change the default username and password inside `settings.yaml`.
|
44
|
-
The default login credentials for testing are `admin@goosebit.local`, `admin`.
|
45
|
-
|
46
|
-
## Assumptions
|
47
|
-
|
48
|
-
- [SWUpdate](https://swupdate.org) used on device side.
|
49
|
-
|
50
|
-
## Current Feature Set
|
51
|
-
|
52
|
-
### Firmware repository
|
53
|
-
|
54
|
-
Uploading firmware images through frontend. All files should follow the format `{model}_{revision}_{version}`, where
|
55
|
-
`version` is either a semantic version or a datetime version in the format `YYYYMMDD-HHmmSS`.
|
56
|
-
|
57
|
-
### Automatic device registration
|
58
|
-
|
59
|
-
First time a new device connects, its configuration data is requested. `hw_model` and `hw_revision` are captured from
|
60
|
-
the configuration data (both fall back to `default` if not provided) which allows to distinguish different device
|
61
|
-
types and their revisions.
|
62
|
-
|
63
|
-
### Automatically update device to newest firmware
|
64
|
-
|
65
|
-
Once a device is registered it will get the newest available firmware from the repository based on model and revision.
|
66
|
-
|
67
|
-
### Manually update device to specific firmware
|
68
|
-
|
69
|
-
Frontend allows to assign specific firmware to be rolled out.
|
70
|
-
|
71
|
-
### Firmware rollout
|
72
|
-
|
73
|
-
Rollouts allow a fine-grained assignment of firmwares to devices. The reported device model and revision is combined
|
74
|
-
with the manually set feed and flavor values on a device to determine a matching rollout.
|
75
|
-
|
76
|
-
The feed is meant to model either different environments (like: dev, qa, live) or update channels (like. candidate,
|
77
|
-
fast, stable).
|
78
|
-
|
79
|
-
The flavor can be used for different type of builds (like: debug, prod).
|
80
|
-
|
81
|
-
### Pause updates
|
82
|
-
|
83
|
-
Device can be pinned to its current firmware.
|
84
|
-
|
85
|
-
### Realtime update logs
|
86
|
-
|
87
|
-
While an update is running, the update logs are captured and visualized in the frontend.
|
88
|
-
|
89
|
-
## Development
|
90
|
-
|
91
|
-
### Code formatting and linting
|
92
|
-
|
93
|
-
Code is formatted using different tools
|
94
|
-
|
95
|
-
- black and isort for `*.py`
|
96
|
-
- biomejs for `*.js`, `*.json`
|
97
|
-
- prettier for `*.html`, `*.md`, `*.yml`, `*.yaml`
|
98
|
-
|
99
|
-
Code is linted using different tools as well
|
100
|
-
|
101
|
-
- flake8 for `*.py`
|
102
|
-
- biomejs for `*.js`
|
103
|
-
|
104
|
-
Best to have pre-commit install git hooks that run all those tools before a commit:
|
105
|
-
|
106
|
-
```bash
|
107
|
-
poetry run pre-commit install
|
108
|
-
```
|
109
|
-
|
110
|
-
To manually apply the hooks to all files use:
|
111
|
-
|
112
|
-
```bash
|
113
|
-
pre-commit run --all-files
|
114
|
-
```
|
115
|
-
|
116
|
-
### Testing
|
117
|
-
|
118
|
-
Tests are implemented using pytest. To run all tests
|
119
|
-
|
120
|
-
```bash
|
121
|
-
poetry run pytest
|
122
|
-
```
|
123
|
-
|
goosebit-0.1.2.dist-info/RECORD
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
goosebit/__init__.py,sha256=zoQORspnBSSDfv2MpqFWrZtE2U_pE8KLWFIpiPSZVE0,2026
|
2
|
-
goosebit/api/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
3
|
-
goosebit/api/devices.py,sha256=w7KVp1NjVPMeSG1lr6nbhFExiavCz2bWYhWlngIqegA,4940
|
4
|
-
goosebit/api/download.py,sha256=kyOs8iZDnSma-HXb2qB7d3CC2tqP_2EJEODXcVvmwTY,998
|
5
|
-
goosebit/api/firmware.py,sha256=AfWZy41N0LGfyPhOOZ8Y8TQVHQJSHc5YNp12GNf5GaQ,1696
|
6
|
-
goosebit/api/helper.py,sha256=ErvjXru-FKhScE_toNKaxLabFyx_uZgDRNEGBZks-60,1000
|
7
|
-
goosebit/api/rollouts.py,sha256=6WDhPtzx1iiAmhqEx7NjeIDfmi5io1yWUDPFxO7Yn44,2673
|
8
|
-
goosebit/api/routes.py,sha256=gnQGxgZBQGRXQjagAN2tAo7aNzcULClQlVfYZcsrdfk,698
|
9
|
-
goosebit/auth/__init__.py,sha256=BpneDLWS7yfW4QIjFejdTRsUP8rIOQJjC5nggC5FMsg,4222
|
10
|
-
goosebit/db.py,sha256=2jqsYhJklJQ8Zuh9D4sy9lYfcqg3E-R6bOUSAbvjpjk,984
|
11
|
-
goosebit/models.py,sha256=zrZr-bKFOnd3CxLFtgTMullwRS49614O4b51OLQX6wo,4312
|
12
|
-
goosebit/permissions.py,sha256=4WmoReDCK2oIZJQyMOU8eQvdczb-KGY1nqPn4hOf1n4,1836
|
13
|
-
goosebit/realtime/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
14
|
-
goosebit/realtime/logs.py,sha256=t-tYO5EM5J9PGHUrz_7VCPiyGHIr2zQ3nkObYNaS4-A,1248
|
15
|
-
goosebit/realtime/routes.py,sha256=DzL1xBsdSc4SF2FiOAeuVKmcAq3m4DYo6KqD_pCNMww,269
|
16
|
-
goosebit/settings.py,sha256=MaCmklqfDO75WSrHkVdZ978DnO-iq7nnKabqkv6MVI0,1589
|
17
|
-
goosebit/telemetry/__init__.py,sha256=Gxc2gRyX8CQy6cdHepa2Hsn6n50f07_fr-OS_OOFukY,707
|
18
|
-
goosebit/telemetry/prometheus.py,sha256=vORU7zgqlAepTk7IwTE5_vt18_tbILWlJhCfeGMwTsM,382
|
19
|
-
goosebit/ui/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
20
|
-
goosebit/ui/routes.py,sha256=-I0muVY2SDAhF57Vn6jR8oGMye8ouKG55f8z3wB461Y,3249
|
21
|
-
goosebit/ui/static/__init__.py,sha256=AsZiM3h9chQ_YaBbAD6TVFf0244Q9DetkDMl70q8swQ,135
|
22
|
-
goosebit/ui/static/favicon.ico,sha256=FLzKyAkMvQcMg58nzCJxQOfPFxT4yYbP7S82pdY6zng,4286
|
23
|
-
goosebit/ui/static/favicon.svg,sha256=2iEZocLSave4QTjaR3GxGVT1zaDNl6T_GtN61YHsvJU,6595
|
24
|
-
goosebit/ui/static/js/devices.js,sha256=hdGaB4_az6AyVeFs09Ah9obMaOEONgXMFeXp-VVXWm4,11686
|
25
|
-
goosebit/ui/static/js/firmware.js,sha256=cfaVeJz2It4JvO7POBd3nag1_Mc5w51vByja-04g5Ac,9062
|
26
|
-
goosebit/ui/static/js/index.js,sha256=sxguHagyK3agGqnNHMf2AbhhmawewP5YMts6IYKfGRI,5550
|
27
|
-
goosebit/ui/static/js/logs.js,sha256=e9gBfWC7WNS87sO6tBlU1c8oKIch_Ot9sVkUTta-vbU,862
|
28
|
-
goosebit/ui/static/js/rollouts.js,sha256=jzAnX-waTPWim_uY8mC99KzkIQvAP-CZOT0HNARPOqY,6619
|
29
|
-
goosebit/ui/static/js/util.js,sha256=zJJH3lUc_spskseRSAV57dCFJJPgZxpiVA3WUP0-_tk,2049
|
30
|
-
goosebit/ui/static/svg/goosebit-logo.svg,sha256=2iEZocLSave4QTjaR3GxGVT1zaDNl6T_GtN61YHsvJU,6595
|
31
|
-
goosebit/ui/templates/__init__.py,sha256=M-F9UIAOVyRdsVIjU-19cCiXh48-LZBAKvl8R4CLlkM,140
|
32
|
-
goosebit/ui/templates/devices.html,sha256=8NH9NJqtzi6quqTA8B3TTKRnydJcVvJg0jkGeqr1CNY,3899
|
33
|
-
goosebit/ui/templates/firmware.html,sha256=yBV7Jzx4cy_aXLpSQfni9DB0byQ8b44Xv1GNQ-Q0NyI,7254
|
34
|
-
goosebit/ui/templates/index.html,sha256=QxRMJwUb37dQCiLSR84ICsUOHfZmo1QuW-3mlSaPTHg,796
|
35
|
-
goosebit/ui/templates/login.html,sha256=Uql0T8JIUuTXYOzto_BNTfKRQiZAqZvyr3wPGjRjhWE,2729
|
36
|
-
goosebit/ui/templates/logs.html,sha256=rGqLPHALZoFxJzyB82_vOaWndzDbr7ZbvyAuah5nbxM,1289
|
37
|
-
goosebit/ui/templates/nav.html,sha256=njPQEUXst2tR_nKWh4reaOyslC2dfNXNOBIT8pbPnb4,4948
|
38
|
-
goosebit/ui/templates/rollouts.html,sha256=3BGmRpfj5RaRNljVAYUYgKSdMpv-Mkn88lS1-V29naE,2620
|
39
|
-
goosebit/updater/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
40
|
-
goosebit/updater/controller/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
41
|
-
goosebit/updater/controller/routes.py,sha256=8CnLb-kDuO-yFeWdu4apIyctCf9OzvJ011Az3QDGemU,123
|
42
|
-
goosebit/updater/controller/v1/__init__.py,sha256=4RRIzqC6KbCESIC9Vc6G4iAa28IWQH4KROTGd2S4AoI,41
|
43
|
-
goosebit/updater/controller/v1/routes.py,sha256=sbMJZ69vOS1P28jECHfq48HVZyct37FI7E3NJc9xst4,6585
|
44
|
-
goosebit/updater/manager.py,sha256=UIV3FOABplB0jmA4pZFSoL2yEtByX1Kw2CEydmt0g7U,11400
|
45
|
-
goosebit/updater/routes.py,sha256=B9ufgYIkSsdKniiUTeJnwYsa_MWdQtuu5m3MNmHXZQQ,717
|
46
|
-
goosebit/updates/__init__.py,sha256=uVpqyW2q3j7cf20zo9yIXzdHGaduyfWMjTWWpP4bUzY,1946
|
47
|
-
goosebit/updates/swdesc.py,sha256=wT4TQSE5S13akMLGrCGUfWWi2j1freFENhDvaC5oTx4,2545
|
48
|
-
goosebit-0.1.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
49
|
-
goosebit-0.1.2.dist-info/METADATA,sha256=CFvsYgfBtR0Ve4ejtAp6q-b-En6K43l3R-o0lWWx2Ec,3827
|
50
|
-
goosebit-0.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
51
|
-
goosebit-0.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|