Compare commits

..

No commits in common. "20cc984799965a3fec0deec8c4d15886d377a957" and "2f3c7d5433d3d472c8ce868f8caaa8ea7d471f64" have entirely different histories.

5 changed files with 18 additions and 36 deletions

View File

@ -97,7 +97,7 @@ build:pacman:
- "*.pkg.tar.zst"
test:
image: python:3.11-slim-bullseye
image: python:3.10-slim-bullseye
stage: test
rules:
- if: $CI_COMMIT_BRANCH
@ -113,9 +113,6 @@ test:
- cd test
script:
- pytest main.py
artifacts:
reports:
dotenv: version.env
.test:linux:
stage: test
@ -274,11 +271,24 @@ deploy:pacman:
- 'echo "EXPORT_NAME: ${EXPORT_NAME}"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${EXPORT_NAME} "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${PACKAGE_VERSION}/${EXPORT_NAME}"'
release:prepare:
stage: .pre
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- source version.env
- echo $VERSION
artifacts:
reports:
dotenv: version.env
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
stage: .post
needs:
- job: test
- job: release:prepare
artifacts: true
rules:
- if: $CI_COMMIT_TAG

View File

@ -1,4 +1,4 @@
FROM python:3.11-alpine
FROM python:3.10-alpine
COPY requirements.txt /tmp/requirements.txt

17
FAQ.md
View File

@ -1,17 +0,0 @@
# FAQ
## `Failed to acquire license from <ip> (Info: <license> - Error: The allowed time to process response has expired)`
- Did your timezone settings are correct on fastapi-dls **and your guest**?
- Did you download the client-token more than an hour ago?
Please download a new client-token. The guest have to register within an hour after client-token was created.
## `jose.exceptions.JWTError: Signature verification failed.`
- Did you recreated `instance.public.pem` / `instance.private.pem`?
Then you have to download a **new** client-token on each of your guests.

View File

@ -70,7 +70,7 @@ volumes:
dls-db:
```
## Debian/Ubuntu (manual method using `git clone` and python virtual environment)
## Debian/Ubuntu (manual method using `git clone`)
Tested on `Debian 11 (bullseye)`, Ubuntu may also work.
@ -176,7 +176,6 @@ Successful tested with:
- Ubuntu 22.10 (Kinetic Kudu)
Not working with:
- Debian 11 (Bullseye) and lower (missing `python-jose` dependency)
- Ubuntu 22.04 (Jammy Jellyfish) (not supported as for 15.01.2023 due to [fastapi - uvicorn version missmatch](https://bugs.launchpad.net/ubuntu/+source/fastapi/+bug/1970557))
@ -250,16 +249,6 @@ After first success you have to replace `--issue` with `--renew`.
every 4.8 hours. If network connectivity is lost, the loss of connectivity is detected during license renewal and the
client has 19.2 hours in which to re-establish connectivity before its license expires.
```python
from datetime import timedelta
LEASE_RENEWAL_PERIOD=0.2 # 20%
delta = timedelta(days=1)
renew = delta.total_seconds() * LEASE_RENEWAL_PERIOD
renew = timedelta(seconds=renew)
expires = delta - renew # 19.2
```
\*2 Always use `https`, since guest-drivers only support secure connections!
\*3 If you recreate instance keys you need to **recreate client-token for each guest**!

View File

@ -1,4 +1,4 @@
fastapi==0.89.1
fastapi==0.88.0
uvicorn[standard]==0.20.0
python-jose==3.3.0
pycryptodome==3.16.0