arkitekt-next 0.7.38__tar.gz → 0.7.39__tar.gz
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.
Potentially problematic release.
This version of arkitekt-next might be problematic. Click here for more details.
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/PKG-INFO +11 -11
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/fluss.py +8 -11
- arkitekt_next-0.7.39/arkitekt_next/bloks/funcs.py +134 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/gateway.py +45 -8
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/kabinet.py +13 -13
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/livekit.py +10 -15
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/lok.py +34 -24
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/mikro.py +13 -12
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/minio.py +28 -10
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/rekuest.py +13 -13
- arkitekt_next-0.7.39/arkitekt_next/bloks/services/__init__.py +27 -0
- arkitekt_next-0.7.39/arkitekt_next/bloks/services/gateway.py +27 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/lok.py +4 -11
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/redis.py +2 -11
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/s3.py +3 -8
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/pyproject.toml +8 -8
- arkitekt_next-0.7.38/arkitekt_next/bloks/funcs.py +0 -86
- arkitekt_next-0.7.38/arkitekt_next/bloks/services/gateway.py +0 -30
- arkitekt_next-0.7.38/arkitekt_next/cli/commands/server/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/LICENSE +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/README.md +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/__blok__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/easy.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/next.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/qt.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/fakts.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/fakts_next.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/fakts_qt.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/grant_registry.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/herre.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/service/herre_qt.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/apps/types.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/admin.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/arkitekt.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/config.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/internal_docker.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/mount.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/namegen.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/postgres.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/redis.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/secret.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/admin.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/config.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/db.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/livekit.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/mount.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/name.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/secret.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/services/socket.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/socket.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/bloks/tailscale.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/builders.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/bloks/services → arkitekt_next-0.7.39/arkitekt_next/cli}/__init__.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli → arkitekt_next-0.7.39/arkitekt_next/cli/commands/call}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/call/local.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/call/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/call/remote.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/call → arkitekt_next-0.7.39/arkitekt_next/cli/commands/gen}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/gen/compile.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/gen/init.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/gen/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/gen/watch.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/gen → arkitekt_next-0.7.39/arkitekt_next/cli/commands/init}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/init/main.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/init → arkitekt_next-0.7.39/arkitekt_next/cli/commands/inspect}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/inspect/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/inspect/requirements.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/inspect/templates.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/inspect/variables.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/inspect → arkitekt_next-0.7.39/arkitekt_next/cli/commands/kabinet}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/build.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/init.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/publish.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/stage.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/utils.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/validate.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/kabinet/wizard.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/kabinet → arkitekt_next-0.7.39/arkitekt_next/cli/commands/manifest}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/manifest/inspect.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/manifest/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/manifest/scopes.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/manifest/version.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/manifest/wizard.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/manifest → arkitekt_next-0.7.39/arkitekt_next/cli/commands/run}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/run/dev.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/run/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/run/prod.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/run/utils.py +0 -0
- {arkitekt_next-0.7.38/arkitekt_next/cli/commands/run → arkitekt_next-0.7.39/arkitekt_next/cli/commands/server}/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/down.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/init.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/inspect.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/open.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/remove.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/stop.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/up.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/commands/server/utils.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/configs/base.yaml +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/constants.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/errors.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/inspect.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/io.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/main.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/options.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/fluss.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/gucker.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/kabinet.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/kluster.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/konviktion.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/kuay.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/mikro.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/mikro_next.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/napari.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/omero_ark.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/port.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/rekuest.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/schemas/unlok.schema.graphql +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/templates/filter.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/templates/simple.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/texts.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/types.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/ui.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/utils.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/validators.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/vars.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/cli/versions/v1.yaml +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/constants.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/model.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/__init__.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/dark/gear.png +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/light/gear.png +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/builders.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/magic_bar.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/types.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/qt/utils.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/service_registry.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/tqdm.py +0 -0
- {arkitekt_next-0.7.38 → arkitekt_next-0.7.39}/arkitekt_next/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: arkitekt-next
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.39
|
|
4
4
|
Summary: client for the arkitekt_next platform
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: jhnnsrs
|
|
@@ -14,25 +14,25 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Provides-Extra: all
|
|
17
|
+
Provides-Extra: blok
|
|
17
18
|
Provides-Extra: cli
|
|
18
|
-
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist: cryptography (>=40.0.8) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "server")
|
|
19
|
+
Requires-Dist: blok (>=0.0.9) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "blok")
|
|
20
|
+
Requires-Dist: cryptography (>=40.0.8) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "blok")
|
|
21
21
|
Requires-Dist: dokker (>=0.1.21)
|
|
22
22
|
Requires-Dist: fakts (>=0.5.0)
|
|
23
|
-
Requires-Dist: fluss-next (>=0.1.
|
|
23
|
+
Requires-Dist: fluss-next (>=0.1.70) ; extra == "all"
|
|
24
24
|
Requires-Dist: herre (>=0.4.3)
|
|
25
|
-
Requires-Dist: kabinet (>=0.1.
|
|
25
|
+
Requires-Dist: kabinet (>=0.1.8) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "all")
|
|
26
26
|
Requires-Dist: koil (>=0.3.6)
|
|
27
|
-
Requires-Dist: mikro-next (>=0.1.
|
|
28
|
-
Requires-Dist: namegenerator (>=1.0.6) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "
|
|
29
|
-
Requires-Dist: netifaces (>=0.11.0) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "
|
|
27
|
+
Requires-Dist: mikro-next (>=0.1.25) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
|
|
28
|
+
Requires-Dist: namegenerator (>=1.0.6) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "blok")
|
|
29
|
+
Requires-Dist: netifaces (>=0.11.0) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all" or extra == "blok")
|
|
30
30
|
Requires-Dist: reaktion-next (>=0.1.59) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
|
|
31
|
-
Requires-Dist: rekuest-next (>=0.2.
|
|
31
|
+
Requires-Dist: rekuest-next (>=0.2.14) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
|
|
32
32
|
Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all"
|
|
33
33
|
Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
|
|
34
34
|
Requires-Dist: turms (>=0.5.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
|
|
35
|
-
Requires-Dist: unlok-next (>=0.1.
|
|
35
|
+
Requires-Dist: unlok-next (>=0.1.65) ; python_version >= "3.8" and python_version < "4.0"
|
|
36
36
|
Requires-Dist: watchfiles (>=0.18.1) ; extra == "cli" or extra == "all"
|
|
37
37
|
Description-Content-Type: text/markdown
|
|
38
38
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import secrets
|
|
2
|
-
from arkitekt_next.bloks.funcs import
|
|
2
|
+
from arkitekt_next.bloks.funcs import (
|
|
3
|
+
create_default_service_dependencies,
|
|
4
|
+
create_default_service_yaml,
|
|
5
|
+
)
|
|
3
6
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
4
7
|
from blok.tree import YamlFile, Repo
|
|
5
8
|
|
|
@@ -21,17 +24,11 @@ class FlussBlok:
|
|
|
21
24
|
self.secret_key = secrets.token_hex(16)
|
|
22
25
|
self.ensured_repos = []
|
|
23
26
|
|
|
27
|
+
def get_builder(self):
|
|
28
|
+
return "arkitekt.generic"
|
|
29
|
+
|
|
24
30
|
def get_dependencies(self):
|
|
25
|
-
return
|
|
26
|
-
"live.arkitekt.mount",
|
|
27
|
-
"live.arkitekt.config",
|
|
28
|
-
"live.arkitekt.gateway",
|
|
29
|
-
"live.arkitekt.postgres",
|
|
30
|
-
"live.arkitekt.lok",
|
|
31
|
-
"live.arkitekt.admin",
|
|
32
|
-
"live.arkitekt.redis",
|
|
33
|
-
"live.arkitekt.s3",
|
|
34
|
-
]
|
|
31
|
+
return create_default_service_dependencies()
|
|
35
32
|
|
|
36
33
|
def preflight(self, init: InitContext):
|
|
37
34
|
for key, value in init.kwargs.items():
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
from blok import blok, InitContext, Option
|
|
2
|
+
from blok.tree import YamlFile, Repo
|
|
3
|
+
from typing import Protocol
|
|
4
|
+
from blok.utils import check_protocol_compliance
|
|
5
|
+
from dataclasses import asdict
|
|
6
|
+
from arkitekt_next.bloks.services import (
|
|
7
|
+
GatewayService,
|
|
8
|
+
DBService,
|
|
9
|
+
RedisService,
|
|
10
|
+
S3Service,
|
|
11
|
+
ConfigService,
|
|
12
|
+
MountService,
|
|
13
|
+
AdminService,
|
|
14
|
+
SecretService,
|
|
15
|
+
LokService,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
from blok.bloks.services.dns import DnsService
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class DefaultService(Protocol):
|
|
22
|
+
service_name: str
|
|
23
|
+
host: str
|
|
24
|
+
buckets: list[str]
|
|
25
|
+
scopes: dict[str, str]
|
|
26
|
+
secret_key: str
|
|
27
|
+
mount_repo: bool
|
|
28
|
+
build_repo: bool
|
|
29
|
+
|
|
30
|
+
def get_identifier(self) -> str: ...
|
|
31
|
+
|
|
32
|
+
def get_builder(self) -> str: ...
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def create_default_service_dependencies():
|
|
36
|
+
return [
|
|
37
|
+
DnsService,
|
|
38
|
+
GatewayService,
|
|
39
|
+
DBService,
|
|
40
|
+
RedisService,
|
|
41
|
+
S3Service,
|
|
42
|
+
ConfigService,
|
|
43
|
+
MountService,
|
|
44
|
+
AdminService,
|
|
45
|
+
SecretService,
|
|
46
|
+
LokService,
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def create_default_service_yaml(
|
|
51
|
+
init: InitContext,
|
|
52
|
+
self: DefaultService,
|
|
53
|
+
) -> YamlFile:
|
|
54
|
+
check_protocol_compliance(self, DefaultService)
|
|
55
|
+
deps = init.dependencies
|
|
56
|
+
|
|
57
|
+
init.get_service(LokService).register_scopes(self.scopes)
|
|
58
|
+
|
|
59
|
+
path_name = self.host
|
|
60
|
+
|
|
61
|
+
gateway_access = init.get_service(GatewayService).expose(path_name, 80, self.host)
|
|
62
|
+
|
|
63
|
+
postgress_access = init.get_service(DBService).register_db(self.host)
|
|
64
|
+
redis_access = init.get_service(RedisService).register()
|
|
65
|
+
lok_access = init.get_service(LokService).retrieve_credentials()
|
|
66
|
+
admin_access = init.get_service(AdminService).retrieve()
|
|
67
|
+
minio_access = init.get_service(S3Service).create_buckets(self.buckets)
|
|
68
|
+
lok_labels = init.get_service(LokService).retrieve_labels(
|
|
69
|
+
self.get_identifier(), self.get_builder()
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
dns_result = init.get_service(DnsService).get_dns_result()
|
|
73
|
+
|
|
74
|
+
csrf_trusted_origins = []
|
|
75
|
+
for hostname in dns_result.hostnames:
|
|
76
|
+
csrf_trusted_origins.append(f"http://{hostname}")
|
|
77
|
+
csrf_trusted_origins.append(f"https://{hostname}")
|
|
78
|
+
|
|
79
|
+
configuration = YamlFile(
|
|
80
|
+
**{
|
|
81
|
+
"db": asdict(postgress_access),
|
|
82
|
+
"django": {
|
|
83
|
+
"admin": asdict(admin_access),
|
|
84
|
+
"debug": True,
|
|
85
|
+
"hosts": ["*"],
|
|
86
|
+
"secret_key": self.secret_key,
|
|
87
|
+
},
|
|
88
|
+
"redis": asdict(redis_access),
|
|
89
|
+
"lok": asdict(lok_access),
|
|
90
|
+
"s3": asdict(minio_access),
|
|
91
|
+
"scopes": self.scopes,
|
|
92
|
+
"force_script_name": path_name,
|
|
93
|
+
"csrf_trusted_origins": csrf_trusted_origins,
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
config_mount = init.get_service(ConfigService).register_config(
|
|
98
|
+
f"{self.host}.yaml", configuration
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
depends_on = []
|
|
102
|
+
|
|
103
|
+
if redis_access.dependency:
|
|
104
|
+
depends_on.append(redis_access.dependency)
|
|
105
|
+
|
|
106
|
+
if postgress_access.dependency:
|
|
107
|
+
depends_on.append(postgress_access.dependency)
|
|
108
|
+
|
|
109
|
+
if minio_access.dependency:
|
|
110
|
+
depends_on.append(minio_access.dependency)
|
|
111
|
+
|
|
112
|
+
service = {
|
|
113
|
+
"labels": lok_labels,
|
|
114
|
+
"volumes": [f"{config_mount}:/workspace/config.yaml"],
|
|
115
|
+
"depends_on": depends_on,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if self.mount_repo:
|
|
119
|
+
mount = init.get_service(MountService).register_mount(
|
|
120
|
+
self.host, Repo(self.repo)
|
|
121
|
+
)
|
|
122
|
+
service["volumes"].extend([f"{mount}:/workspace"])
|
|
123
|
+
|
|
124
|
+
if self.build_repo:
|
|
125
|
+
mount = init.get_service(MountService).register_mount(
|
|
126
|
+
self.host, Repo(self.repo)
|
|
127
|
+
)
|
|
128
|
+
service["build"] = mount
|
|
129
|
+
else:
|
|
130
|
+
service["image"] = self.image
|
|
131
|
+
|
|
132
|
+
service["command"] = self.command
|
|
133
|
+
|
|
134
|
+
return service
|
|
@@ -16,16 +16,25 @@ class ExposedHost(BaseModel):
|
|
|
16
16
|
stip_prefix: bool = True
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
class ExpostedToHost(BaseModel):
|
|
20
|
+
port: int
|
|
21
|
+
host: str
|
|
22
|
+
to: str
|
|
23
|
+
tls: bool = False
|
|
24
|
+
|
|
25
|
+
|
|
19
26
|
class ExposedPort(BaseModel):
|
|
20
27
|
port: int
|
|
21
28
|
host: str
|
|
22
29
|
tls: bool = False
|
|
30
|
+
to: int
|
|
23
31
|
|
|
24
32
|
|
|
25
33
|
@blok("live.arkitekt.gateway")
|
|
26
34
|
class GatewayBlok:
|
|
27
35
|
def __init__(self) -> None:
|
|
28
36
|
self.exposed_hosts = {}
|
|
37
|
+
self.exposed_to_hosts = {}
|
|
29
38
|
self.http_expose_default = None
|
|
30
39
|
self.exposed_ports = {}
|
|
31
40
|
self.with_certer = True
|
|
@@ -38,10 +47,10 @@ class GatewayBlok:
|
|
|
38
47
|
|
|
39
48
|
def get_internal_host(self):
|
|
40
49
|
return "caddy"
|
|
41
|
-
|
|
50
|
+
|
|
42
51
|
def get_https_port(self):
|
|
43
52
|
return 443
|
|
44
|
-
|
|
53
|
+
|
|
45
54
|
def get_http_port(self):
|
|
46
55
|
return 80
|
|
47
56
|
|
|
@@ -52,7 +61,10 @@ class GatewayBlok:
|
|
|
52
61
|
self.public_ips = dns.get_dns_result().ip_addresses
|
|
53
62
|
self.public_hosts = dns.get_dns_result().hostnames
|
|
54
63
|
|
|
55
|
-
def build(
|
|
64
|
+
def build(
|
|
65
|
+
self,
|
|
66
|
+
context: ExecutionContext,
|
|
67
|
+
):
|
|
56
68
|
caddyfile = """
|
|
57
69
|
{
|
|
58
70
|
auto_https off
|
|
@@ -64,13 +76,13 @@ class GatewayBlok:
|
|
|
64
76
|
caddyfile += f"""
|
|
65
77
|
:{port.port} {{
|
|
66
78
|
tls /certs/caddy.crt /certs/caddy.key
|
|
67
|
-
reverse_proxy {port.host}:{port.
|
|
79
|
+
reverse_proxy {port.host}:{port.to}
|
|
68
80
|
}}
|
|
69
81
|
"""
|
|
70
82
|
else:
|
|
71
83
|
caddyfile += f"""
|
|
72
84
|
:{port.port} {{
|
|
73
|
-
reverse_proxy {port.host}:{port.
|
|
85
|
+
reverse_proxy {port.host}:{port.to}
|
|
74
86
|
}}
|
|
75
87
|
"""
|
|
76
88
|
|
|
@@ -112,6 +124,15 @@ class GatewayBlok:
|
|
|
112
124
|
}}
|
|
113
125
|
"""
|
|
114
126
|
|
|
127
|
+
for path_name, exposed_to_host in self.exposed_to_hosts.items():
|
|
128
|
+
caddyfile += f"""
|
|
129
|
+
@{path_name} path /{path_name}*
|
|
130
|
+
handle @{path_name} {{
|
|
131
|
+
rewrite * /{exposed_to_host.to}{{uri}}
|
|
132
|
+
reverse_proxy {exposed_to_host.host}:{exposed_to_host.port}
|
|
133
|
+
}}
|
|
134
|
+
"""
|
|
135
|
+
|
|
115
136
|
if self.http_expose_default:
|
|
116
137
|
caddyfile += f"""
|
|
117
138
|
handle {{
|
|
@@ -129,10 +150,18 @@ class GatewayBlok:
|
|
|
129
150
|
if self.with_certer:
|
|
130
151
|
caddy_depends_on.append("certer")
|
|
131
152
|
|
|
153
|
+
exposed_ports_strings = [
|
|
154
|
+
f"{port.port}:{port.port}" for port in self.exposed_ports.values()
|
|
155
|
+
]
|
|
156
|
+
|
|
132
157
|
caddy_container = {
|
|
133
158
|
"image": "caddy:latest",
|
|
134
159
|
"volumes": ["./configs/Caddyfile:/etc/caddy/Caddyfile", "./certs:/certs"],
|
|
135
|
-
"ports": [
|
|
160
|
+
"ports": [
|
|
161
|
+
f"{self.http_port}:80",
|
|
162
|
+
f"{self.https_port}:443",
|
|
163
|
+
]
|
|
164
|
+
+ exposed_ports_strings,
|
|
136
165
|
"depends_on": caddy_depends_on,
|
|
137
166
|
}
|
|
138
167
|
|
|
@@ -150,16 +179,24 @@ class GatewayBlok:
|
|
|
150
179
|
|
|
151
180
|
context.docker_compose.set_nested("services", "certer", certer_container)
|
|
152
181
|
|
|
153
|
-
def expose(self, path_name: str, port: int, host: str, strip_prefix: bool =
|
|
182
|
+
def expose(self, path_name: str, port: int, host: str, strip_prefix: bool = False):
|
|
154
183
|
self.exposed_hosts[path_name] = ExposedHost(
|
|
155
184
|
host=host, port=port, stip_prefix=strip_prefix
|
|
156
185
|
)
|
|
157
186
|
|
|
187
|
+
def expose_mapped(self, path_name: str, port: int, host: str, to: str):
|
|
188
|
+
self.exposed_to_hosts[path_name] = ExpostedToHost(host=host, port=port, to=to)
|
|
189
|
+
|
|
158
190
|
def expose_default(self, port: int, host: str):
|
|
159
191
|
self.http_expose_default = ExposedHost(host=host, port=port, stip_prefix=False)
|
|
160
192
|
|
|
161
193
|
def expose_port(self, port: int, host: str, tls: bool = False):
|
|
162
|
-
self.exposed_ports[port] = ExposedPort(port=port, host=host, tls=tls)
|
|
194
|
+
self.exposed_ports[port] = ExposedPort(port=port, host=host, tls=tls, to=port)
|
|
195
|
+
|
|
196
|
+
def expose_port_to(self, port: int, host: str, to_port: int, tls: bool = False):
|
|
197
|
+
self.exposed_ports[port] = ExposedPort(
|
|
198
|
+
port=port, host=host, tls=tls, to=to_port
|
|
199
|
+
)
|
|
163
200
|
|
|
164
201
|
def get_options(self):
|
|
165
202
|
with_public_urls = Option(
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
from typing import Dict, Any
|
|
2
2
|
import secrets
|
|
3
3
|
|
|
4
|
-
from arkitekt_next.bloks.funcs import
|
|
4
|
+
from arkitekt_next.bloks.funcs import (
|
|
5
|
+
create_default_service_yaml,
|
|
6
|
+
create_default_service_dependencies,
|
|
7
|
+
)
|
|
5
8
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
6
9
|
from blok.tree import Repo, YamlFile
|
|
7
10
|
|
|
@@ -12,7 +15,10 @@ class KabinetBlok:
|
|
|
12
15
|
self.host = "kabinet"
|
|
13
16
|
self.command = "bash run-debug.sh"
|
|
14
17
|
self.repo = "https://github.com/jhnnsrs/kabinet-server"
|
|
15
|
-
self.scopes = {
|
|
18
|
+
self.scopes = {
|
|
19
|
+
"kabinet_deploy": "Deploy containers",
|
|
20
|
+
"kabinet_add_repo": "Add repositories to the database",
|
|
21
|
+
}
|
|
16
22
|
self.mount_repo = False
|
|
17
23
|
self.build_repo = False
|
|
18
24
|
self.buckets = ["media"]
|
|
@@ -20,17 +26,11 @@ class KabinetBlok:
|
|
|
20
26
|
self.ensured_repos = []
|
|
21
27
|
self.image = "jhnnsrs/kabinet:next"
|
|
22
28
|
|
|
29
|
+
def get_builder(self):
|
|
30
|
+
return "arkitekt.generic"
|
|
31
|
+
|
|
23
32
|
def get_dependencies(self):
|
|
24
|
-
return
|
|
25
|
-
"live.arkitekt.mount",
|
|
26
|
-
"live.arkitekt.config",
|
|
27
|
-
"live.arkitekt.gateway",
|
|
28
|
-
"live.arkitekt.postgres",
|
|
29
|
-
"live.arkitekt.lok",
|
|
30
|
-
"live.arkitekt.admin",
|
|
31
|
-
"live.arkitekt.redis",
|
|
32
|
-
"live.arkitekt.s3",
|
|
33
|
-
]
|
|
33
|
+
return create_default_service_dependencies()
|
|
34
34
|
|
|
35
35
|
def preflight(self, init: InitContext):
|
|
36
36
|
for key, value in init.kwargs.items():
|
|
@@ -57,7 +57,7 @@ class KabinetBlok:
|
|
|
57
57
|
mount_repo = Option(
|
|
58
58
|
subcommand="mount_repo",
|
|
59
59
|
help="Should we mount the repo into the container?",
|
|
60
|
-
|
|
60
|
+
type=bool,
|
|
61
61
|
default=self.mount_repo,
|
|
62
62
|
)
|
|
63
63
|
build_repo = Option(
|
|
@@ -22,7 +22,6 @@ class LocalLiveKitBlok:
|
|
|
22
22
|
self.api_secret = "secret"
|
|
23
23
|
self.skip = False
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
def preflight(self, init: InitContext, gateway: GatewayService):
|
|
27
26
|
for key, value in init.kwargs.items():
|
|
28
27
|
setattr(self, key, value)
|
|
@@ -33,16 +32,18 @@ class LocalLiveKitBlok:
|
|
|
33
32
|
return
|
|
34
33
|
|
|
35
34
|
gateway.expose_port(7880, self.host, True)
|
|
36
|
-
gateway.
|
|
35
|
+
gateway.expose_port_to(7882, self.host, 7880, False)
|
|
37
36
|
|
|
38
37
|
self.initialized = True
|
|
39
38
|
|
|
40
39
|
def retrieve_access(self):
|
|
41
|
-
return LivekitCredentials(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
return LivekitCredentials(
|
|
41
|
+
**{
|
|
42
|
+
"api_key": self.api_key,
|
|
43
|
+
"api_secret": self.api_secret,
|
|
44
|
+
"api_url": f"http://{self.host}:7880",
|
|
45
|
+
}
|
|
46
|
+
)
|
|
46
47
|
|
|
47
48
|
def build(self, context: ExecutionContext):
|
|
48
49
|
if self.skip:
|
|
@@ -55,18 +56,14 @@ class LocalLiveKitBlok:
|
|
|
55
56
|
"image": self.image,
|
|
56
57
|
"command": self.command,
|
|
57
58
|
"ports": [
|
|
58
|
-
f"{self.port_range[0]}-{self.port_range[1]}:{self.port_range[0]}-{self.port_range[1]}"
|
|
59
|
+
f"{self.port_range[0]}-{self.port_range[1]}:{self.port_range[0]}-{self.port_range[1]}",
|
|
60
|
+
"7881:7881",
|
|
59
61
|
],
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
context.docker_compose.set_nested("services", self.host, db_service)
|
|
63
65
|
|
|
64
66
|
def get_options(self):
|
|
65
|
-
with_command = Option(
|
|
66
|
-
subcommand="command",
|
|
67
|
-
help="The fakts url for connection",
|
|
68
|
-
default=self.command,
|
|
69
|
-
)
|
|
70
67
|
with_host = Option(
|
|
71
68
|
subcommand="host",
|
|
72
69
|
help="The fakts url for connection",
|
|
@@ -77,12 +74,10 @@ class LocalLiveKitBlok:
|
|
|
77
74
|
help="The fakts url for connection",
|
|
78
75
|
default=False,
|
|
79
76
|
type=bool,
|
|
80
|
-
|
|
81
77
|
)
|
|
82
78
|
|
|
83
79
|
return [
|
|
84
80
|
with_host,
|
|
85
|
-
with_command,
|
|
86
81
|
with_skip,
|
|
87
82
|
]
|
|
88
83
|
|
|
@@ -17,11 +17,11 @@ from dataclasses import asdict
|
|
|
17
17
|
|
|
18
18
|
from arkitekt_next.bloks.services.redis import RedisService
|
|
19
19
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
20
|
+
from blok.bloks.services.dns import DnsService
|
|
20
21
|
from blok.tree import YamlFile, Repo
|
|
21
22
|
from blok import blok, InitContext
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
|
|
25
25
|
DEFAULT_ARKITEKT_URL = "http://localhost:8000"
|
|
26
26
|
|
|
27
27
|
|
|
@@ -132,35 +132,24 @@ class LokBlok:
|
|
|
132
132
|
self.tokens = []
|
|
133
133
|
self.groups = []
|
|
134
134
|
self.secret_key = secrets.token_hex(16)
|
|
135
|
-
self.scopes = {"
|
|
135
|
+
self.scopes = {"openid": "The open id connect scope"}
|
|
136
136
|
self.key = None
|
|
137
137
|
self.deployment_name = "default"
|
|
138
|
-
self.base_routes = [
|
|
139
|
-
"ht",
|
|
140
|
-
"o",
|
|
141
|
-
"graphql",
|
|
142
|
-
".well-known",
|
|
143
|
-
"f",
|
|
144
|
-
"admin",
|
|
145
|
-
"static",
|
|
146
|
-
"accounts",
|
|
147
|
-
]
|
|
148
138
|
self.token_expiry_seconds = 700000
|
|
149
139
|
self.preformed_redeem_tokens = [secrets.token_hex(16) for i in range(80)]
|
|
150
140
|
self.registered_tokens = {}
|
|
151
141
|
|
|
152
|
-
|
|
153
142
|
def retrieve_credentials(self) -> LokCredentials:
|
|
154
143
|
return LokCredentials(
|
|
155
144
|
public_key=self.public_key, key_type="RS256", issuer="lok"
|
|
156
145
|
)
|
|
157
146
|
|
|
158
|
-
def retrieve_labels(self, service_name: str) -> list[str]:
|
|
147
|
+
def retrieve_labels(self, service_name: str, builder_name: str) -> list[str]:
|
|
159
148
|
return [
|
|
160
149
|
f"fakts.service={service_name}",
|
|
161
|
-
f"fakts.builder=
|
|
150
|
+
f"fakts.builder={builder_name}",
|
|
162
151
|
]
|
|
163
|
-
|
|
152
|
+
|
|
164
153
|
def retrieve_token(self, user: str = "admin") -> str:
|
|
165
154
|
new_token = self.secret_blok.retrieve_secret()
|
|
166
155
|
self.registered_tokens[user] = new_token
|
|
@@ -170,7 +159,18 @@ class LokBlok:
|
|
|
170
159
|
def register_scopes(self, scopes_dict: Dict[str, str]) -> LokCredentials:
|
|
171
160
|
self.scopes = self.scopes | scopes_dict
|
|
172
161
|
|
|
173
|
-
def preflight(
|
|
162
|
+
def preflight(
|
|
163
|
+
self,
|
|
164
|
+
init: InitContext,
|
|
165
|
+
gateway: GatewayService,
|
|
166
|
+
db: DBService,
|
|
167
|
+
redis: RedisService,
|
|
168
|
+
admin: AdminService,
|
|
169
|
+
secrets: SecretBlok,
|
|
170
|
+
livekit: LivekitService,
|
|
171
|
+
dns: DnsService,
|
|
172
|
+
scopes: list[Dict[str, str]],
|
|
173
|
+
):
|
|
174
174
|
for key, value in init.kwargs.items():
|
|
175
175
|
setattr(self, key, value)
|
|
176
176
|
|
|
@@ -179,16 +179,15 @@ class LokBlok:
|
|
|
179
179
|
|
|
180
180
|
self.scopes = {scope["scope"]: scope["description"] for scope in scopes}
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
i, 80, self.host, strip_prefix=False
|
|
185
|
-
)
|
|
182
|
+
gateway.expose("lok", 80, self.host, strip_prefix=False)
|
|
183
|
+
gateway.expose_mapped(".well-known", 80, self.host, "lok")
|
|
186
184
|
|
|
187
185
|
self.secret_blok = secrets
|
|
188
186
|
self.postgress_access = db.register_db(self.host)
|
|
189
187
|
self.redis_access = redis.register()
|
|
190
188
|
self.admin_access = admin.retrieve()
|
|
191
189
|
self.local_access = livekit.retrieve_access()
|
|
190
|
+
self.dns_result = dns.get_dns_result()
|
|
192
191
|
self.initialized = True
|
|
193
192
|
|
|
194
193
|
def build(self, context: ExecutionContext):
|
|
@@ -222,6 +221,12 @@ class LokBlok:
|
|
|
222
221
|
|
|
223
222
|
db_service["command"] = self.command
|
|
224
223
|
|
|
224
|
+
trusted_origins = []
|
|
225
|
+
|
|
226
|
+
for i in self.dns_result.hostnames:
|
|
227
|
+
trusted_origins.append(f"http://{i}")
|
|
228
|
+
trusted_origins.append(f"https://{i}")
|
|
229
|
+
|
|
225
230
|
configuration = YamlFile(
|
|
226
231
|
**{
|
|
227
232
|
"db": asdict(self.postgress_access),
|
|
@@ -232,17 +237,22 @@ class LokBlok:
|
|
|
232
237
|
"hosts": ["*"],
|
|
233
238
|
"secret_key": self.secret_key,
|
|
234
239
|
},
|
|
235
|
-
"redis":
|
|
240
|
+
"redis": asdict(self.redis_access),
|
|
236
241
|
"lok": asdict(self.retrieve_credentials()),
|
|
237
242
|
"private_key": self.private_key,
|
|
238
243
|
"public_key": self.public_key,
|
|
239
244
|
"scopes": self.scopes,
|
|
240
|
-
"redeem_tokens": [
|
|
245
|
+
"redeem_tokens": [
|
|
246
|
+
{"user": name, "token": token}
|
|
247
|
+
for name, token in self.registered_tokens.items()
|
|
248
|
+
],
|
|
241
249
|
"groups": [group for group in self.groups],
|
|
242
250
|
"deployment": {"name": self.deployment_name},
|
|
243
251
|
"livekit": asdict(self.local_access),
|
|
244
252
|
"token_expire_seconds": self.token_expiry_seconds,
|
|
245
253
|
"apps": [],
|
|
254
|
+
"force_script_name": "lok",
|
|
255
|
+
"csrf_trusted_origins": trusted_origins,
|
|
246
256
|
}
|
|
247
257
|
)
|
|
248
258
|
|
|
@@ -314,7 +324,7 @@ class LokBlok:
|
|
|
314
324
|
mount_repo = Option(
|
|
315
325
|
subcommand="mount_repo",
|
|
316
326
|
help="The fakts url for connection",
|
|
317
|
-
|
|
327
|
+
type=bool,
|
|
318
328
|
default=False,
|
|
319
329
|
)
|
|
320
330
|
build_repo = Option(
|
|
@@ -7,7 +7,11 @@ from blok import blok, InitContext
|
|
|
7
7
|
|
|
8
8
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
9
9
|
from blok.tree import YamlFile, Repo
|
|
10
|
-
from arkitekt_next.bloks.funcs import
|
|
10
|
+
from arkitekt_next.bloks.funcs import (
|
|
11
|
+
create_default_service_dependencies,
|
|
12
|
+
create_default_service_yaml,
|
|
13
|
+
DefaultService,
|
|
14
|
+
)
|
|
11
15
|
|
|
12
16
|
|
|
13
17
|
class AccessCredentials(BaseModel):
|
|
@@ -24,7 +28,10 @@ class MikroBlok:
|
|
|
24
28
|
self.host = "mikro"
|
|
25
29
|
self.command = "bash run-debug.sh"
|
|
26
30
|
self.repo = "https://github.com/arkitektio/mikro-server-next"
|
|
27
|
-
self.scopes = {
|
|
31
|
+
self.scopes = {
|
|
32
|
+
"mikro_read": "Read image from the database",
|
|
33
|
+
"mikro_write": "Write image to the database",
|
|
34
|
+
}
|
|
28
35
|
self.image = "jhnnsrs/mikro:next"
|
|
29
36
|
self.mount_repo = False
|
|
30
37
|
self.build_repo = False
|
|
@@ -32,16 +39,10 @@ class MikroBlok:
|
|
|
32
39
|
self.secret_key = secrets.token_hex(16)
|
|
33
40
|
|
|
34
41
|
def get_dependencies(self):
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"live.arkitekt.postgres",
|
|
40
|
-
"live.arkitekt.lok",
|
|
41
|
-
"live.arkitekt.admin",
|
|
42
|
-
"live.arkitekt.redis",
|
|
43
|
-
"live.arkitekt.s3",
|
|
44
|
-
]
|
|
42
|
+
return create_default_service_dependencies()
|
|
43
|
+
|
|
44
|
+
def get_builder(self):
|
|
45
|
+
return "arkitekt.generic"
|
|
45
46
|
|
|
46
47
|
def preflight(self, init: InitContext):
|
|
47
48
|
for key, value in init.kwargs.items():
|