arkitekt-next 0.7.33__tar.gz → 0.7.34__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.33 → arkitekt_next-0.7.34}/PKG-INFO +1 -1
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/__blok__.py +14 -2
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/__init__.py +1 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/admin.py +7 -15
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/arkitekt.py +10 -23
- arkitekt_next-0.7.34/arkitekt_next/bloks/config.py +42 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/fluss.py +88 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/funcs.py +86 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/gateway.py +48 -28
- arkitekt_next-0.7.34/arkitekt_next/bloks/internal_docker.py +80 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/kabinet.py +93 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/livekit.py +33 -12
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/lok.py +69 -33
- arkitekt_next-0.7.34/arkitekt_next/bloks/mikro.py +98 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/minio.py +28 -28
- arkitekt_next-0.7.34/arkitekt_next/bloks/mount.py +35 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/postgres.py +13 -19
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/bloks/redis.py +8 -17
- arkitekt_next-0.7.34/arkitekt_next/bloks/rekuest.py +93 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/admin.py +22 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/config.py +18 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/db.py +27 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/gateway.py +20 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/livekit.py +19 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/lok.py +27 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/mount.py +15 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/redis.py +28 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/s3.py +26 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/services/socket.py +16 -0
- arkitekt_next-0.7.34/arkitekt_next/bloks/socket.py +38 -0
- arkitekt_next-0.7.34/arkitekt_next/cli/commands/server/__init__.py +0 -0
- arkitekt_next-0.7.34/arkitekt_next/cli/commands/server/init.py +15 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/pyproject.toml +1 -1
- arkitekt_next-0.7.33/arkitekt_next/bloks/fluss.py +0 -138
- arkitekt_next-0.7.33/arkitekt_next/bloks/kabinet.py +0 -143
- arkitekt_next-0.7.33/arkitekt_next/bloks/mikro.py +0 -152
- arkitekt_next-0.7.33/arkitekt_next/bloks/services.py +0 -2
- arkitekt_next-0.7.33/arkitekt_next/cli/commands/server/init.py +0 -74
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/LICENSE +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/README.md +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/easy.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/next.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/qt.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/fakts.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/fakts_next.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/fakts_qt.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/grant_registry.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/herre.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/service/herre_qt.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/apps/types.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli → arkitekt_next-0.7.34/arkitekt_next/bloks/services}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/builders.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/call → arkitekt_next-0.7.34/arkitekt_next/cli}/__init__.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/gen → arkitekt_next-0.7.34/arkitekt_next/cli/commands/call}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/call/local.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/call/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/call/remote.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/init → arkitekt_next-0.7.34/arkitekt_next/cli/commands/gen}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/gen/compile.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/gen/init.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/gen/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/gen/watch.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/inspect → arkitekt_next-0.7.34/arkitekt_next/cli/commands/init}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/init/main.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/kabinet → arkitekt_next-0.7.34/arkitekt_next/cli/commands/inspect}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/inspect/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/inspect/requirements.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/inspect/templates.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/inspect/variables.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/manifest → arkitekt_next-0.7.34/arkitekt_next/cli/commands/kabinet}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/build.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/init.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/publish.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/stage.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/utils.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/validate.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/kabinet/wizard.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/run → arkitekt_next-0.7.34/arkitekt_next/cli/commands/manifest}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/manifest/inspect.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/manifest/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/manifest/scopes.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/manifest/version.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/manifest/wizard.py +0 -0
- {arkitekt_next-0.7.33/arkitekt_next/cli/commands/server → arkitekt_next-0.7.34/arkitekt_next/cli/commands/run}/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/run/dev.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/run/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/run/prod.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/run/utils.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/down.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/inspect.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/open.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/remove.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/stop.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/up.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/commands/server/utils.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/configs/base.yaml +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/constants.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/errors.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/inspect.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/io.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/main.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/options.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/fluss.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/gucker.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/kabinet.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/kluster.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/konviktion.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/kuay.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/mikro.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/mikro_next.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/napari.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/omero_ark.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/port.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/rekuest.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/schemas/unlok.schema.graphql +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/templates/filter.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/templates/simple.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/texts.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/types.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/ui.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/utils.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/validators.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/vars.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/cli/versions/v1.yaml +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/constants.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/model.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/__init__.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/dark/gear.png +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/light/gear.png +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/builders.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/magic_bar.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/types.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/qt/utils.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/service_registry.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/tqdm.py +0 -0
- {arkitekt_next-0.7.33 → arkitekt_next-0.7.34}/arkitekt_next/utils.py +0 -0
|
@@ -4,10 +4,16 @@ from arkitekt_next.bloks.mikro import MikroBlok
|
|
|
4
4
|
from arkitekt_next.bloks.fluss import FlussBlok
|
|
5
5
|
from arkitekt_next.bloks.redis import RedisBlok
|
|
6
6
|
from arkitekt_next.bloks.gateway import GatewayBlok
|
|
7
|
-
from arkitekt_next.bloks.livekit import
|
|
7
|
+
from arkitekt_next.bloks.livekit import LocalLiveKitBlok
|
|
8
8
|
from arkitekt_next.bloks.postgres import PostgresBlok
|
|
9
9
|
from arkitekt_next.bloks.minio import MinioBlok
|
|
10
|
+
from arkitekt_next.bloks.kabinet import KabinetBlok
|
|
10
11
|
from arkitekt_next.bloks.lok import LokBlok
|
|
12
|
+
from arkitekt_next.bloks.config import ConfigBlok
|
|
13
|
+
from arkitekt_next.bloks.mount import MountBlok
|
|
14
|
+
from arkitekt_next.bloks.internal_docker import InternalDockerBlok
|
|
15
|
+
from arkitekt_next.bloks.socket import DockerSocketBlok
|
|
16
|
+
from arkitekt_next.bloks.rekuest import RekuestBlok
|
|
11
17
|
|
|
12
18
|
|
|
13
19
|
def get_bloks():
|
|
@@ -18,8 +24,14 @@ def get_bloks():
|
|
|
18
24
|
FlussBlok(),
|
|
19
25
|
RedisBlok(),
|
|
20
26
|
GatewayBlok(),
|
|
21
|
-
|
|
27
|
+
LocalLiveKitBlok(),
|
|
22
28
|
PostgresBlok(),
|
|
23
29
|
MinioBlok(),
|
|
24
30
|
LokBlok(),
|
|
31
|
+
KabinetBlok(),
|
|
32
|
+
MountBlok(),
|
|
33
|
+
ConfigBlok(),
|
|
34
|
+
InternalDockerBlok(),
|
|
35
|
+
DockerSocketBlok(),
|
|
36
|
+
RekuestBlok(),
|
|
25
37
|
]
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
from pydantic import BaseModel
|
|
2
2
|
from typing import Dict, Any
|
|
3
|
-
from blok import blok, InitContext,
|
|
3
|
+
from blok import blok, InitContext, Option
|
|
4
|
+
from arkitekt_next.bloks.services.admin import AdminService, AdminCredentials
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
password: str
|
|
8
|
-
username: str
|
|
9
|
-
email: str
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@blok("live.arkitekt.admin")
|
|
7
|
+
@blok(AdminService)
|
|
13
8
|
class AdminBlok:
|
|
14
9
|
def __init__(self) -> None:
|
|
15
10
|
self.password = "admin"
|
|
16
11
|
self.username = "admin"
|
|
17
12
|
self.email = "admin@admin.com"
|
|
18
13
|
|
|
19
|
-
def
|
|
14
|
+
def preflight(self, init: InitContext):
|
|
20
15
|
for key, value in init.kwargs.items():
|
|
21
16
|
setattr(self, key, value)
|
|
22
17
|
|
|
23
|
-
def build(self, cwd):
|
|
24
|
-
pass
|
|
25
|
-
|
|
26
18
|
def retrieve(self):
|
|
27
19
|
return AdminCredentials(
|
|
28
20
|
password=self.password,
|
|
@@ -31,19 +23,19 @@ class AdminBlok:
|
|
|
31
23
|
)
|
|
32
24
|
|
|
33
25
|
def get_options(self):
|
|
34
|
-
with_username =
|
|
26
|
+
with_username = Option(
|
|
35
27
|
subcommand="username",
|
|
36
28
|
help="Which admin username to use",
|
|
37
29
|
default=self.username,
|
|
38
30
|
show_default=True,
|
|
39
31
|
)
|
|
40
|
-
with_username =
|
|
32
|
+
with_username = Option(
|
|
41
33
|
subcommand="password",
|
|
42
34
|
help="Which password to use",
|
|
43
35
|
default=self.password,
|
|
44
36
|
show_default=True,
|
|
45
37
|
)
|
|
46
|
-
with_email =
|
|
38
|
+
with_email = Option(
|
|
47
39
|
subcommand="password",
|
|
48
40
|
help="Which password to use",
|
|
49
41
|
default=self.password,
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
from pydantic import BaseModel
|
|
2
2
|
from typing import Dict, Any
|
|
3
3
|
from blok import blok, InitContext, Renderer, Panel
|
|
4
|
+
from .livekit import LocalLiveKitBlok
|
|
5
|
+
from .mikro import MikroBlok
|
|
6
|
+
from .kabinet import KabinetBlok
|
|
7
|
+
from .rekuest import RekuestBlok
|
|
8
|
+
from .fluss import FlussBlok
|
|
9
|
+
from .gateway import GatewayBlok
|
|
10
|
+
from .internal_docker import InternalDockerBlok
|
|
4
11
|
|
|
5
12
|
|
|
6
13
|
class AdminCredentials(BaseModel):
|
|
@@ -11,17 +18,6 @@ class AdminCredentials(BaseModel):
|
|
|
11
18
|
|
|
12
19
|
@blok("live.arkitekt")
|
|
13
20
|
class ArkitektBlok:
|
|
14
|
-
def __init__(self) -> None:
|
|
15
|
-
pass
|
|
16
|
-
|
|
17
|
-
def get_dependencies(self):
|
|
18
|
-
return [
|
|
19
|
-
"live.arkitekt.lok",
|
|
20
|
-
"live.arkitekt.mikro",
|
|
21
|
-
"live.arkitekt.kabinet",
|
|
22
|
-
"live.arkitekt.gateway",
|
|
23
|
-
"io.livekit.livekit",
|
|
24
|
-
]
|
|
25
21
|
|
|
26
22
|
def entry(self, renderer: Renderer):
|
|
27
23
|
renderer.render(
|
|
@@ -33,19 +29,10 @@ class ArkitektBlok:
|
|
|
33
29
|
)
|
|
34
30
|
)
|
|
35
31
|
|
|
36
|
-
def
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
def preflight(self, lok: LocalLiveKitBlok, mikro: MikroBlok, kabinet: KabinetBlok, rekuest: RekuestBlok, fluss: FlussBlok, gateway: GatewayBlok, internal_engine: InternalDockerBlok):
|
|
33
|
+
print (lok, mikro, kabinet, rekuest, fluss, gateway, internal_engine)
|
|
34
|
+
|
|
39
35
|
|
|
40
36
|
def build(self, cwd):
|
|
41
37
|
pass
|
|
42
38
|
|
|
43
|
-
def retrieve(self):
|
|
44
|
-
return AdminCredentials(
|
|
45
|
-
password=self.password,
|
|
46
|
-
username=self.username,
|
|
47
|
-
email=self.email,
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
def get_options(self):
|
|
51
|
-
return []
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from typing import Dict, Any
|
|
3
|
+
from blok import blok, InitContext, Option, ExecutionContext
|
|
4
|
+
from blok.tree import YamlFile
|
|
5
|
+
from arkitekt_next.bloks.services.config import ConfigService
|
|
6
|
+
|
|
7
|
+
class AdminCredentials(BaseModel):
|
|
8
|
+
password: str
|
|
9
|
+
username: str
|
|
10
|
+
email: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@blok(ConfigService)
|
|
14
|
+
class ConfigBlok:
|
|
15
|
+
def __init__(self) -> None:
|
|
16
|
+
self.config_path = "configs"
|
|
17
|
+
self.registered_configs = {}
|
|
18
|
+
|
|
19
|
+
def preflight(self, init: InitContext):
|
|
20
|
+
for key, value in init.kwargs.items():
|
|
21
|
+
setattr(self, key, value)
|
|
22
|
+
|
|
23
|
+
def build(self, ex: ExecutionContext):
|
|
24
|
+
for name, file in self.registered_configs.items():
|
|
25
|
+
ex.file_tree.set_nested(*f"{self.config_path}/{name}".split("/"), file)
|
|
26
|
+
|
|
27
|
+
def register_config(self, name: str, file: YamlFile) -> str:
|
|
28
|
+
self.registered_configs[name] = file
|
|
29
|
+
return f"./{self.config_path}/" + name
|
|
30
|
+
|
|
31
|
+
def get_path(self, name: str) -> str:
|
|
32
|
+
return f"./{self.config_path}/" + name
|
|
33
|
+
|
|
34
|
+
def get_options(self):
|
|
35
|
+
config_path = Option(
|
|
36
|
+
subcommand="config_path",
|
|
37
|
+
help="Which path to use for configs",
|
|
38
|
+
default=self.config_path,
|
|
39
|
+
show_default=True,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
return [config_path]
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import secrets
|
|
2
|
+
from arkitekt_next.bloks.funcs import create_default_service_yaml
|
|
3
|
+
from blok import blok, InitContext, ExecutionContext, Option
|
|
4
|
+
from blok.tree import YamlFile, Repo
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
DEFAULT_ARKITEKT_URL = "http://localhost:8000"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@blok("live.arkitekt.fluss")
|
|
11
|
+
class FlussBlok:
|
|
12
|
+
def __init__(self) -> None:
|
|
13
|
+
self.host = "fluss"
|
|
14
|
+
self.command = "bash run-debug.sh"
|
|
15
|
+
self.image = "jhnnsrs/fluss:next"
|
|
16
|
+
self.repo = "https://github.com/jhnnsrs/fluss-server-next"
|
|
17
|
+
self.scopes = {"read_image": "Read image from the database"}
|
|
18
|
+
self.mount_repo = False
|
|
19
|
+
self.build_repo = False
|
|
20
|
+
self.buckets = ["media"]
|
|
21
|
+
self.secret_key = secrets.token_hex(16)
|
|
22
|
+
self.ensured_repos = []
|
|
23
|
+
|
|
24
|
+
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
|
+
]
|
|
35
|
+
|
|
36
|
+
def preflight(self, init: InitContext):
|
|
37
|
+
for key, value in init.kwargs.items():
|
|
38
|
+
setattr(self, key, value)
|
|
39
|
+
|
|
40
|
+
self.service = create_default_service_yaml(init, self)
|
|
41
|
+
|
|
42
|
+
self.initialized = True
|
|
43
|
+
|
|
44
|
+
def build(self, context: ExecutionContext):
|
|
45
|
+
context.docker_compose.set_nested("services", self.host, self.service)
|
|
46
|
+
|
|
47
|
+
def get_options(self):
|
|
48
|
+
with_repo = Option(
|
|
49
|
+
subcommand="with_repo",
|
|
50
|
+
help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
|
|
51
|
+
default=self.repo,
|
|
52
|
+
)
|
|
53
|
+
with_command = Option(
|
|
54
|
+
subcommand="command",
|
|
55
|
+
help="Which command should be run when starting the service",
|
|
56
|
+
default=self.command,
|
|
57
|
+
)
|
|
58
|
+
mount_repo = Option(
|
|
59
|
+
subcommand="mount_repo",
|
|
60
|
+
help="Should we mount the repo into the container?",
|
|
61
|
+
is_flag=True,
|
|
62
|
+
default=self.mount_repo,
|
|
63
|
+
)
|
|
64
|
+
build_repo = Option(
|
|
65
|
+
subcommand="build_repo",
|
|
66
|
+
help="Should we build the container from the repo?",
|
|
67
|
+
is_flag=True,
|
|
68
|
+
default=self.build_repo,
|
|
69
|
+
)
|
|
70
|
+
with_host = Option(
|
|
71
|
+
subcommand="host",
|
|
72
|
+
help="How should the service be named inside the docker-compose file?",
|
|
73
|
+
default=self.host,
|
|
74
|
+
)
|
|
75
|
+
with_secret_key = Option(
|
|
76
|
+
subcommand="secret_key",
|
|
77
|
+
help="The secret key to use for the django service",
|
|
78
|
+
default=self.secret_key,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return [
|
|
82
|
+
with_repo,
|
|
83
|
+
mount_repo,
|
|
84
|
+
build_repo,
|
|
85
|
+
with_host,
|
|
86
|
+
with_command,
|
|
87
|
+
with_secret_key,
|
|
88
|
+
]
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
|
|
7
|
+
class DefaultService(Protocol):
|
|
8
|
+
service_name: str
|
|
9
|
+
host: str
|
|
10
|
+
buckets: list[str]
|
|
11
|
+
scopes: dict[str, str]
|
|
12
|
+
secret_key: str
|
|
13
|
+
mount_repo: bool
|
|
14
|
+
build_repo: bool
|
|
15
|
+
|
|
16
|
+
def get_identifier(self) -> str: ...
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def create_default_service_yaml(
|
|
20
|
+
init: InitContext,
|
|
21
|
+
self: DefaultService,
|
|
22
|
+
) -> YamlFile:
|
|
23
|
+
check_protocol_compliance(self, DefaultService)
|
|
24
|
+
deps = init.dependencies
|
|
25
|
+
deps["live.arkitekt.lok"].register_scopes(self.scopes)
|
|
26
|
+
|
|
27
|
+
gateway_access = deps["live.arkitekt.gateway"].expose(self.host, 80, self.host)
|
|
28
|
+
|
|
29
|
+
postgress_access = deps["live.arkitekt.postgres"].register_db(self.host)
|
|
30
|
+
redis_access = deps["live.arkitekt.redis"].register()
|
|
31
|
+
lok_access = deps["live.arkitekt.lok"].retrieve_credentials()
|
|
32
|
+
admin_access = deps["live.arkitekt.admin"].retrieve()
|
|
33
|
+
minio_access = deps["live.arkitekt.s3"].create_buckets(self.buckets)
|
|
34
|
+
lok_access = deps["live.arkitekt.lok"].retrieve_credentials()
|
|
35
|
+
lok_labels = deps["live.arkitekt.lok"].retrieve_labels(self.get_identifier())
|
|
36
|
+
|
|
37
|
+
configuration = YamlFile(
|
|
38
|
+
**{
|
|
39
|
+
"db": asdict(postgress_access),
|
|
40
|
+
"django": {
|
|
41
|
+
"admin": asdict(admin_access),
|
|
42
|
+
"debug": True,
|
|
43
|
+
"hosts": ["*"],
|
|
44
|
+
"secret_key": self.secret_key,
|
|
45
|
+
},
|
|
46
|
+
"redis": asdict(redis_access),
|
|
47
|
+
"lok": asdict(lok_access),
|
|
48
|
+
"s3": asdict(minio_access),
|
|
49
|
+
"scopes": self.scopes,
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
config_mount = deps["live.arkitekt.config"].register_config(
|
|
54
|
+
f"{self.host}.yaml", configuration
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
depends_on = []
|
|
58
|
+
|
|
59
|
+
if redis_access.dependency:
|
|
60
|
+
depends_on.append(redis_access.dependency)
|
|
61
|
+
|
|
62
|
+
if postgress_access.dependency:
|
|
63
|
+
depends_on.append(postgress_access.dependency)
|
|
64
|
+
|
|
65
|
+
if minio_access.dependency:
|
|
66
|
+
depends_on.append(minio_access.dependency)
|
|
67
|
+
|
|
68
|
+
service = {
|
|
69
|
+
"labels": lok_labels,
|
|
70
|
+
"volumes": [f"{config_mount}:/workspace/config.yaml"],
|
|
71
|
+
"depends_on": depends_on,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if self.mount_repo:
|
|
75
|
+
mount = deps["live.arkitekt.mount"].register_mount(self.host, Repo(self.repo))
|
|
76
|
+
service["volumes"].extend([f"{mount}:/workspace"])
|
|
77
|
+
|
|
78
|
+
if self.build_repo:
|
|
79
|
+
mount = deps["live.arkitekt.mount"].register_mount(self.host, Repo(self.repo))
|
|
80
|
+
service["build"] = mount
|
|
81
|
+
else:
|
|
82
|
+
service["image"] = self.image
|
|
83
|
+
|
|
84
|
+
service["command"] = self.command
|
|
85
|
+
|
|
86
|
+
return service
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from blok import blok, InitContext, ExecutionContext,
|
|
1
|
+
from blok import blok, InitContext, ExecutionContext, Option
|
|
2
2
|
from blok.tree import YamlFile, Repo
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
from typing import Dict, Any
|
|
@@ -30,16 +30,16 @@ class GatewayBlok:
|
|
|
30
30
|
self.exposed_ports = {}
|
|
31
31
|
self.with_certer = True
|
|
32
32
|
self.with_tailscale = True
|
|
33
|
+
self.certer_image = "jhnnsrs/certer:next"
|
|
33
34
|
self.http_port = 80
|
|
34
35
|
self.https_port = 443
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return "live.arkitekt.gateway"
|
|
36
|
+
self.public_ips = DEFAULT_PUBLIC_URLS
|
|
37
|
+
self.public_hosts = DEFAULT_PUBLIC_HOSTS
|
|
38
38
|
|
|
39
39
|
def get_dependencies(self):
|
|
40
40
|
return []
|
|
41
41
|
|
|
42
|
-
def
|
|
42
|
+
def preflight(self, init: InitContext):
|
|
43
43
|
for key, value in init.kwargs.items():
|
|
44
44
|
setattr(self, key, value)
|
|
45
45
|
|
|
@@ -65,10 +65,18 @@ class GatewayBlok:
|
|
|
65
65
|
}}
|
|
66
66
|
"""
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
for protocol in ["http", "https"]:
|
|
69
|
+
caddyfile += f"""
|
|
70
|
+
{protocol}:// {{
|
|
71
|
+
"""
|
|
72
|
+
caddyfile += (
|
|
73
|
+
"""
|
|
70
74
|
tls /certs/caddy.crt /certs/caddy.key
|
|
71
|
-
|
|
75
|
+
"""
|
|
76
|
+
if protocol == "https"
|
|
77
|
+
else ""
|
|
78
|
+
)
|
|
79
|
+
caddyfile += """
|
|
72
80
|
header {
|
|
73
81
|
-Server
|
|
74
82
|
X-Forwarded-Proto {scheme}
|
|
@@ -78,26 +86,35 @@ https:// {
|
|
|
78
86
|
}
|
|
79
87
|
"""
|
|
80
88
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
@{path_name} path /{path_name}
|
|
89
|
+
for path_name, exposed_host in self.exposed_hosts.items():
|
|
90
|
+
if exposed_host.stip_prefix:
|
|
91
|
+
caddyfile += f"""
|
|
92
|
+
@{path_name} path /{path_name}*
|
|
93
|
+
handle @{path_name} {{
|
|
85
94
|
uri strip_prefix /{path_name}
|
|
86
95
|
reverse_proxy {exposed_host.host}:{exposed_host.port}
|
|
87
96
|
}}
|
|
88
97
|
"""
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
@{path_name} path /{path_name}
|
|
98
|
+
else:
|
|
99
|
+
caddyfile += f"""
|
|
100
|
+
@{path_name} path /{path_name}*
|
|
101
|
+
handle @{path_name} {{
|
|
92
102
|
reverse_proxy {exposed_host.host}:{exposed_host.port}
|
|
93
103
|
}}
|
|
94
104
|
"""
|
|
95
105
|
|
|
96
|
-
|
|
106
|
+
if self.http_expose_default:
|
|
107
|
+
caddyfile += f"""
|
|
108
|
+
handle {{
|
|
109
|
+
reverse_proxy {self.http_expose_default.host}:{self.http_expose_default.port}
|
|
110
|
+
}}
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
caddyfile += """
|
|
97
114
|
}
|
|
98
115
|
"""
|
|
99
116
|
|
|
100
|
-
context.file_tree.set_nested("
|
|
117
|
+
context.file_tree.set_nested("configs", "Caddyfile", caddyfile)
|
|
101
118
|
|
|
102
119
|
caddy_depends_on = []
|
|
103
120
|
if self.with_certer:
|
|
@@ -105,21 +122,24 @@ https:// {
|
|
|
105
122
|
|
|
106
123
|
caddy_container = {
|
|
107
124
|
"image": "caddy:latest",
|
|
108
|
-
"volumes": ["./
|
|
125
|
+
"volumes": ["./configs/Caddyfile:/etc/caddy/Caddyfile", "./certs:/certs"],
|
|
109
126
|
"ports": [f"{self.http_port}:80", f"{self.https_port}:443"],
|
|
110
127
|
"depends_on": caddy_depends_on,
|
|
111
128
|
}
|
|
112
129
|
|
|
113
130
|
context.docker_compose.set_nested("services", "caddy", caddy_container)
|
|
114
131
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
}
|
|
132
|
+
context.file_tree.set_nested("certs", {})
|
|
133
|
+
certer_container = {
|
|
134
|
+
"image": self.certer_image,
|
|
135
|
+
"volumes": ["./certs:/certs"],
|
|
136
|
+
"environment": {
|
|
137
|
+
"DOMAIN_NAMES": ",".join(self.public_hosts),
|
|
138
|
+
"IP_ADDRESSED": ",".join(self.public_ips),
|
|
139
|
+
},
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
context.docker_compose.set_nested("services", "certer", certer_container)
|
|
123
143
|
|
|
124
144
|
def expose(self, path_name: str, port: int, host: str, strip_prefix: bool = True):
|
|
125
145
|
self.exposed_hosts[path_name] = ExposedHost(
|
|
@@ -133,7 +153,7 @@ https:// {
|
|
|
133
153
|
self.exposed_ports[port] = ExposedPort(port=port, host=host, tls=tls)
|
|
134
154
|
|
|
135
155
|
def get_options(self):
|
|
136
|
-
with_public_urls =
|
|
156
|
+
with_public_urls = Option(
|
|
137
157
|
subcommand="public_url",
|
|
138
158
|
help="Which public urls to use",
|
|
139
159
|
type=str,
|
|
@@ -141,7 +161,7 @@ https:// {
|
|
|
141
161
|
default=DEFAULT_PUBLIC_URLS,
|
|
142
162
|
show_default=True,
|
|
143
163
|
)
|
|
144
|
-
with_public_services =
|
|
164
|
+
with_public_services = Option(
|
|
145
165
|
subcommand="public_hosts",
|
|
146
166
|
help="Which public hosts to use",
|
|
147
167
|
type=str,
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from typing import Dict, Any
|
|
2
|
+
import secrets
|
|
3
|
+
|
|
4
|
+
from blok import blok, InitContext, ExecutionContext, Option
|
|
5
|
+
from blok.tree import YamlFile, Repo
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@blok("live.arkitekt.internal_engine")
|
|
9
|
+
class InternalDockerBlok:
|
|
10
|
+
def __init__(self) -> None:
|
|
11
|
+
self.host = "internal_docker"
|
|
12
|
+
self.command = (
|
|
13
|
+
"arkitekt-next run prod --redeem-token=mylittletoken --url http://caddy:80"
|
|
14
|
+
)
|
|
15
|
+
self.image = "jhnnsrs/deployer:0.0.1-vanilla"
|
|
16
|
+
self.instance_id = "INTERNAL_DOCKER"
|
|
17
|
+
|
|
18
|
+
def get_dependencies(self):
|
|
19
|
+
return ["live.arkitekt.docker_socket"]
|
|
20
|
+
|
|
21
|
+
def preflight(self, init: InitContext):
|
|
22
|
+
for key, value in init.kwargs.items():
|
|
23
|
+
setattr(self, key, value)
|
|
24
|
+
|
|
25
|
+
deps = init.dependencies
|
|
26
|
+
|
|
27
|
+
if self.skip:
|
|
28
|
+
return
|
|
29
|
+
|
|
30
|
+
self._socket = deps["live.arkitekt.docker_socket"].register_socket(self.host)
|
|
31
|
+
|
|
32
|
+
self.initialized = True
|
|
33
|
+
|
|
34
|
+
def build(self, context: ExecutionContext):
|
|
35
|
+
if self.skip:
|
|
36
|
+
return
|
|
37
|
+
db_service = {
|
|
38
|
+
"labels": [
|
|
39
|
+
"fakts.service=io.livekit.livekit",
|
|
40
|
+
"fakts.builder=livekitio.livekit",
|
|
41
|
+
],
|
|
42
|
+
"image": self.image,
|
|
43
|
+
"command": self.command,
|
|
44
|
+
"volumes": [f"{self._socket}:/var/run/docker.sock"],
|
|
45
|
+
"environment": {
|
|
46
|
+
"INSTANCE_ID": self.instance_id,
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
context.docker_compose.set_nested("services", self.host, db_service)
|
|
51
|
+
|
|
52
|
+
def get_options(self):
|
|
53
|
+
with_command = Option(
|
|
54
|
+
subcommand="command",
|
|
55
|
+
help="The fakts url for connection",
|
|
56
|
+
default=self.command,
|
|
57
|
+
)
|
|
58
|
+
with_host = Option(
|
|
59
|
+
subcommand="host",
|
|
60
|
+
help="The fakts url for connection",
|
|
61
|
+
default=self.host,
|
|
62
|
+
)
|
|
63
|
+
with_skip = Option(
|
|
64
|
+
subcommand="skip",
|
|
65
|
+
help="The fakts url for connection",
|
|
66
|
+
default=False,
|
|
67
|
+
type=bool,
|
|
68
|
+
is_flag=True,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return [
|
|
72
|
+
with_host,
|
|
73
|
+
with_command,
|
|
74
|
+
with_skip,
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
def __str__(self) -> str:
|
|
78
|
+
return (
|
|
79
|
+
f"InterDocker(host={self.host}, command={self.command}, image={self.image})"
|
|
80
|
+
)
|