arkitekt-next 0.7.44__py3-none-any.whl → 0.7.46__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.
Potentially problematic release.
This version of arkitekt-next might be problematic. Click here for more details.
- arkitekt_next/__blok__.py +2 -0
- arkitekt_next/bloks/arkitekt.py +14 -5
- arkitekt_next/bloks/fluss.py +4 -38
- arkitekt_next/bloks/funcs.py +52 -2
- arkitekt_next/bloks/kabinet.py +5 -39
- arkitekt_next/bloks/lok.py +16 -45
- arkitekt_next/bloks/mikro.py +4 -38
- arkitekt_next/bloks/orkestrator.py +60 -0
- arkitekt_next/bloks/rekuest.py +5 -47
- arkitekt_next/bloks/tailscale.py +42 -20
- {arkitekt_next-0.7.44.dist-info → arkitekt_next-0.7.46.dist-info}/METADATA +1 -1
- {arkitekt_next-0.7.44.dist-info → arkitekt_next-0.7.46.dist-info}/RECORD +15 -14
- {arkitekt_next-0.7.44.dist-info → arkitekt_next-0.7.46.dist-info}/LICENSE +0 -0
- {arkitekt_next-0.7.44.dist-info → arkitekt_next-0.7.46.dist-info}/WHEEL +0 -0
- {arkitekt_next-0.7.44.dist-info → arkitekt_next-0.7.46.dist-info}/entry_points.txt +0 -0
arkitekt_next/__blok__.py
CHANGED
|
@@ -2,6 +2,7 @@ from arkitekt_next.bloks.admin import AdminBlok
|
|
|
2
2
|
from arkitekt_next.bloks.arkitekt import ArkitektBlok
|
|
3
3
|
from arkitekt_next.bloks.mikro import MikroBlok
|
|
4
4
|
from arkitekt_next.bloks.fluss import FlussBlok
|
|
5
|
+
from arkitekt_next.bloks.orkestrator import OrkestratorBlok
|
|
5
6
|
from arkitekt_next.bloks.redis import RedisBlok
|
|
6
7
|
from arkitekt_next.bloks.gateway import GatewayBlok
|
|
7
8
|
from arkitekt_next.bloks.livekit import LocalLiveKitBlok
|
|
@@ -40,4 +41,5 @@ def get_bloks():
|
|
|
40
41
|
TailscaleBlok(),
|
|
41
42
|
SecretBlok(),
|
|
42
43
|
PreformedNamesBlok(),
|
|
44
|
+
OrkestratorBlok(),
|
|
43
45
|
]
|
arkitekt_next/bloks/arkitekt.py
CHANGED
|
@@ -9,6 +9,7 @@ from .rekuest import RekuestBlok
|
|
|
9
9
|
from .fluss import FlussBlok
|
|
10
10
|
from .gateway import GatewayBlok
|
|
11
11
|
from .internal_docker import InternalDockerBlok
|
|
12
|
+
from .orkestrator import OrkestratorBlok
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class AdminCredentials(BaseModel):
|
|
@@ -19,7 +20,6 @@ class AdminCredentials(BaseModel):
|
|
|
19
20
|
|
|
20
21
|
@blok("live.arkitekt")
|
|
21
22
|
class ArkitektBlok:
|
|
22
|
-
|
|
23
23
|
def entry(self, renderer: Renderer):
|
|
24
24
|
renderer.render(
|
|
25
25
|
Panel(
|
|
@@ -30,10 +30,19 @@ class ArkitektBlok:
|
|
|
30
30
|
)
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
def preflight(
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
def preflight(
|
|
34
|
+
self,
|
|
35
|
+
lok: LocalLiveKitBlok,
|
|
36
|
+
mikro: MikroBlok,
|
|
37
|
+
kabinet: KabinetBlok,
|
|
38
|
+
rekuest: RekuestBlok,
|
|
39
|
+
fluss: FlussBlok,
|
|
40
|
+
gateway: GatewayBlok,
|
|
41
|
+
internal_engine: InternalDockerBlok,
|
|
42
|
+
scale: TailscaleBlok,
|
|
43
|
+
orkestrator: OrkestratorBlok,
|
|
44
|
+
):
|
|
45
|
+
print(lok, mikro, kabinet, rekuest, fluss, gateway, internal_engine)
|
|
36
46
|
|
|
37
47
|
def build(self, cwd):
|
|
38
48
|
pass
|
|
39
|
-
|
arkitekt_next/bloks/fluss.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import secrets
|
|
2
2
|
from arkitekt_next.bloks.funcs import (
|
|
3
|
+
build_default_service_options,
|
|
3
4
|
create_default_service_dependencies,
|
|
4
5
|
create_default_service_yaml,
|
|
5
6
|
)
|
|
@@ -13,6 +14,7 @@ DEFAULT_ARKITEKT_URL = "http://localhost:8000"
|
|
|
13
14
|
@blok("live.arkitekt.fluss")
|
|
14
15
|
class FlussBlok:
|
|
15
16
|
def __init__(self) -> None:
|
|
17
|
+
self.dev = False
|
|
16
18
|
self.host = "fluss"
|
|
17
19
|
self.command = "bash run-debug.sh"
|
|
18
20
|
self.image = "jhnnsrs/fluss:next"
|
|
@@ -42,44 +44,8 @@ class FlussBlok:
|
|
|
42
44
|
context.docker_compose.set_nested("services", self.host, self.service)
|
|
43
45
|
|
|
44
46
|
def get_options(self):
|
|
45
|
-
|
|
46
|
-
subcommand="with_repo",
|
|
47
|
-
help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
|
|
48
|
-
default=self.repo,
|
|
49
|
-
)
|
|
50
|
-
with_command = Option(
|
|
51
|
-
subcommand="command",
|
|
52
|
-
help="Which command should be run when starting the service",
|
|
53
|
-
default=self.command,
|
|
54
|
-
)
|
|
55
|
-
mount_repo = Option(
|
|
56
|
-
subcommand="mount_repo",
|
|
57
|
-
help="Should we mount the repo into the container?",
|
|
58
|
-
type=bool,
|
|
59
|
-
default=self.mount_repo,
|
|
60
|
-
)
|
|
61
|
-
build_repo = Option(
|
|
62
|
-
subcommand="build_repo",
|
|
63
|
-
help="Should we build the container from the repo?",
|
|
64
|
-
type=bool,
|
|
65
|
-
default=self.build_repo,
|
|
66
|
-
)
|
|
67
|
-
with_host = Option(
|
|
68
|
-
subcommand="host",
|
|
69
|
-
help="How should the service be named inside the docker-compose file?",
|
|
70
|
-
default=self.host,
|
|
71
|
-
)
|
|
72
|
-
with_secret_key = Option(
|
|
73
|
-
subcommand="secret_key",
|
|
74
|
-
help="The secret key to use for the django service",
|
|
75
|
-
default=self.secret_key,
|
|
76
|
-
)
|
|
47
|
+
def_options = build_default_service_options(self)
|
|
77
48
|
|
|
78
49
|
return [
|
|
79
|
-
|
|
80
|
-
mount_repo,
|
|
81
|
-
build_repo,
|
|
82
|
-
with_host,
|
|
83
|
-
with_command,
|
|
84
|
-
with_secret_key,
|
|
50
|
+
*def_options,
|
|
85
51
|
]
|
arkitekt_next/bloks/funcs.py
CHANGED
|
@@ -19,6 +19,9 @@ from blok.bloks.services.dns import DnsService
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class DefaultService(Protocol):
|
|
22
|
+
dev: bool
|
|
23
|
+
repo: str
|
|
24
|
+
command: str
|
|
22
25
|
service_name: str
|
|
23
26
|
host: str
|
|
24
27
|
buckets: list[str]
|
|
@@ -47,6 +50,53 @@ def create_default_service_dependencies():
|
|
|
47
50
|
]
|
|
48
51
|
|
|
49
52
|
|
|
53
|
+
def build_default_service_options(self: DefaultService) -> list[Option]:
|
|
54
|
+
return [
|
|
55
|
+
Option(
|
|
56
|
+
subcommand="dev",
|
|
57
|
+
help="Shoud we run the service in development mode (includes withrepo, mountrepo)?",
|
|
58
|
+
default=self.dev,
|
|
59
|
+
),
|
|
60
|
+
Option(
|
|
61
|
+
subcommand="disable",
|
|
62
|
+
help="Shoud we disable the service?",
|
|
63
|
+
default=False,
|
|
64
|
+
),
|
|
65
|
+
Option(
|
|
66
|
+
subcommand="with_repo",
|
|
67
|
+
help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
|
|
68
|
+
default=self.repo,
|
|
69
|
+
),
|
|
70
|
+
Option(
|
|
71
|
+
subcommand="with_command",
|
|
72
|
+
help="Which command should we use when building the service?",
|
|
73
|
+
default=self.command,
|
|
74
|
+
),
|
|
75
|
+
Option(
|
|
76
|
+
subcommand="mount_repo",
|
|
77
|
+
help="Should we mount the repo into the container?",
|
|
78
|
+
type=bool,
|
|
79
|
+
default=self.mount_repo,
|
|
80
|
+
),
|
|
81
|
+
Option(
|
|
82
|
+
subcommand="build_repo",
|
|
83
|
+
help="Should we build the container from the repo?",
|
|
84
|
+
type=bool,
|
|
85
|
+
default=self.build_repo,
|
|
86
|
+
),
|
|
87
|
+
Option(
|
|
88
|
+
subcommand="host",
|
|
89
|
+
help="How should the service be named inside the docker-compose file?",
|
|
90
|
+
default=self.host,
|
|
91
|
+
),
|
|
92
|
+
Option(
|
|
93
|
+
subcommand="secret_key",
|
|
94
|
+
help="The secret key to use for the django service",
|
|
95
|
+
default=self.secret_key,
|
|
96
|
+
),
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
|
|
50
100
|
def create_default_service_yaml(
|
|
51
101
|
init: InitContext,
|
|
52
102
|
self: DefaultService,
|
|
@@ -118,13 +168,13 @@ def create_default_service_yaml(
|
|
|
118
168
|
"depends_on": depends_on,
|
|
119
169
|
}
|
|
120
170
|
|
|
121
|
-
if self.mount_repo:
|
|
171
|
+
if self.mount_repo or self.dev:
|
|
122
172
|
mount = init.get_service(MountService).register_mount(
|
|
123
173
|
self.host, Repo(self.repo)
|
|
124
174
|
)
|
|
125
175
|
service["volumes"].extend([f"{mount}:/workspace"])
|
|
126
176
|
|
|
127
|
-
if self.build_repo:
|
|
177
|
+
if self.build_repo or self.dev:
|
|
128
178
|
mount = init.get_service(MountService).register_mount(
|
|
129
179
|
self.host, Repo(self.repo)
|
|
130
180
|
)
|
arkitekt_next/bloks/kabinet.py
CHANGED
|
@@ -4,6 +4,7 @@ import secrets
|
|
|
4
4
|
from arkitekt_next.bloks.funcs import (
|
|
5
5
|
create_default_service_yaml,
|
|
6
6
|
create_default_service_dependencies,
|
|
7
|
+
build_default_service_options,
|
|
7
8
|
)
|
|
8
9
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
9
10
|
from blok.tree import Repo, YamlFile
|
|
@@ -12,9 +13,10 @@ from blok.tree import Repo, YamlFile
|
|
|
12
13
|
@blok("live.arkitekt.kabinet")
|
|
13
14
|
class KabinetBlok:
|
|
14
15
|
def __init__(self) -> None:
|
|
16
|
+
self.dev = False
|
|
15
17
|
self.host = "kabinet"
|
|
16
18
|
self.command = "bash run-debug.sh"
|
|
17
|
-
self.repo = "https://github.com/
|
|
19
|
+
self.repo = "https://github.com/arkitektio/kabinet-server"
|
|
18
20
|
self.scopes = {
|
|
19
21
|
"kabinet_deploy": "Deploy containers",
|
|
20
22
|
"kabinet_add_repo": "Add repositories to the database",
|
|
@@ -46,38 +48,7 @@ class KabinetBlok:
|
|
|
46
48
|
context.docker_compose.set_nested("services", self.host, self.service)
|
|
47
49
|
|
|
48
50
|
def get_options(self):
|
|
49
|
-
|
|
50
|
-
subcommand="with_repo",
|
|
51
|
-
help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
|
|
52
|
-
default=self.repo,
|
|
53
|
-
)
|
|
54
|
-
with_command = Option(
|
|
55
|
-
subcommand="command",
|
|
56
|
-
help="Which command should be run when starting the service",
|
|
57
|
-
default=self.command,
|
|
58
|
-
)
|
|
59
|
-
mount_repo = Option(
|
|
60
|
-
subcommand="mount_repo",
|
|
61
|
-
help="Should we mount the repo into the container?",
|
|
62
|
-
type=bool,
|
|
63
|
-
default=self.mount_repo,
|
|
64
|
-
)
|
|
65
|
-
build_repo = Option(
|
|
66
|
-
subcommand="build_repo",
|
|
67
|
-
help="Should we build the container from the repo?",
|
|
68
|
-
type=bool,
|
|
69
|
-
default=self.build_repo,
|
|
70
|
-
)
|
|
71
|
-
with_host = Option(
|
|
72
|
-
subcommand="host",
|
|
73
|
-
help="How should the service be named inside the docker-compose file?",
|
|
74
|
-
default=self.host,
|
|
75
|
-
)
|
|
76
|
-
with_secret_key = Option(
|
|
77
|
-
subcommand="secret_key",
|
|
78
|
-
help="The secret key to use for the django service",
|
|
79
|
-
default=self.secret_key,
|
|
80
|
-
)
|
|
51
|
+
def_options = build_default_service_options(self)
|
|
81
52
|
with_repos = Option(
|
|
82
53
|
subcommand="repos",
|
|
83
54
|
help="The default repos to enable for the service",
|
|
@@ -85,11 +56,6 @@ class KabinetBlok:
|
|
|
85
56
|
)
|
|
86
57
|
|
|
87
58
|
return [
|
|
88
|
-
|
|
89
|
-
mount_repo,
|
|
90
|
-
build_repo,
|
|
91
|
-
with_host,
|
|
92
|
-
with_command,
|
|
93
|
-
with_secret_key,
|
|
59
|
+
*def_options,
|
|
94
60
|
with_repos,
|
|
95
61
|
]
|
arkitekt_next/bloks/lok.py
CHANGED
|
@@ -5,6 +5,7 @@ from cryptography.hazmat.primitives import serialization as crypto_serialization
|
|
|
5
5
|
from cryptography.hazmat.primitives.asymmetric import rsa
|
|
6
6
|
from cryptography.hazmat.backends import default_backend as crypto_default_backend
|
|
7
7
|
from typing import Dict
|
|
8
|
+
from arkitekt_next.bloks.funcs import build_default_service_options
|
|
8
9
|
from arkitekt_next.bloks.secret import SecretBlok
|
|
9
10
|
from arkitekt_next.bloks.services.admin import AdminService
|
|
10
11
|
from arkitekt_next.bloks.services.db import DBService
|
|
@@ -124,6 +125,7 @@ class LokBlok:
|
|
|
124
125
|
self.private_key = None
|
|
125
126
|
self.public_key = None
|
|
126
127
|
self.host = "lok"
|
|
128
|
+
self.dev = False
|
|
127
129
|
self.with_repo = False
|
|
128
130
|
self.command = "bash run-debug.sh"
|
|
129
131
|
self.repo = "https://github.com/jhnnsrs/lok-server-next"
|
|
@@ -210,11 +212,11 @@ class LokBlok:
|
|
|
210
212
|
],
|
|
211
213
|
}
|
|
212
214
|
|
|
213
|
-
if self.mount_repo:
|
|
215
|
+
if self.mount_repo or self.dev:
|
|
214
216
|
context.file_tree.set_nested("mounts", "lok", Repo(self.repo))
|
|
215
|
-
db_service["volumes"].append("./mounts/lok:/
|
|
217
|
+
db_service["volumes"].append("./mounts/lok:/workspace")
|
|
216
218
|
|
|
217
|
-
if self.build_repo:
|
|
219
|
+
if self.build_repo or self.dev:
|
|
218
220
|
context.file_tree.set_nested("mounts", "lok", Repo(self.repo))
|
|
219
221
|
db_service["build"] = "./mounts/lok"
|
|
220
222
|
else:
|
|
@@ -281,6 +283,16 @@ class LokBlok:
|
|
|
281
283
|
.decode()
|
|
282
284
|
)
|
|
283
285
|
|
|
286
|
+
def_options = build_default_service_options(self)
|
|
287
|
+
|
|
288
|
+
with_dev = Option(
|
|
289
|
+
subcommand="dev",
|
|
290
|
+
help="Run the service in development mode",
|
|
291
|
+
type=bool,
|
|
292
|
+
default=self.dev,
|
|
293
|
+
show_default=True,
|
|
294
|
+
)
|
|
295
|
+
|
|
284
296
|
with_fakts_url = Option(
|
|
285
297
|
subcommand="db_name",
|
|
286
298
|
help="The name of the database",
|
|
@@ -303,38 +315,6 @@ class LokBlok:
|
|
|
303
315
|
type=GROUP,
|
|
304
316
|
show_default=True,
|
|
305
317
|
)
|
|
306
|
-
with_repo = Option(
|
|
307
|
-
subcommand="with_repo",
|
|
308
|
-
help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
|
|
309
|
-
default=self.repo,
|
|
310
|
-
show_default=True,
|
|
311
|
-
)
|
|
312
|
-
with_repo = Option(
|
|
313
|
-
subcommand="command",
|
|
314
|
-
help="Which command should be run when starting the service?",
|
|
315
|
-
default=self.command,
|
|
316
|
-
show_default=True,
|
|
317
|
-
)
|
|
318
|
-
mount_repo = Option(
|
|
319
|
-
subcommand="mount_repo",
|
|
320
|
-
help="The fakts url for connection",
|
|
321
|
-
type=bool,
|
|
322
|
-
default=False,
|
|
323
|
-
)
|
|
324
|
-
build_repo = Option(
|
|
325
|
-
subcommand="build_repo",
|
|
326
|
-
help="Should we build the container from the repo?",
|
|
327
|
-
type=bool,
|
|
328
|
-
default=False,
|
|
329
|
-
show_default=True,
|
|
330
|
-
)
|
|
331
|
-
with_host = Option(
|
|
332
|
-
subcommand="host",
|
|
333
|
-
help="Which internal hostname should be used",
|
|
334
|
-
default=self.host,
|
|
335
|
-
show_default=True,
|
|
336
|
-
)
|
|
337
|
-
#
|
|
338
318
|
with_public_key = Option(
|
|
339
319
|
subcommand="public_key",
|
|
340
320
|
help="The public key for the JWT creation",
|
|
@@ -349,23 +329,14 @@ class LokBlok:
|
|
|
349
329
|
callback=validate_private_key,
|
|
350
330
|
required=True,
|
|
351
331
|
)
|
|
352
|
-
with_secret_key = Option(
|
|
353
|
-
subcommand="secret_key",
|
|
354
|
-
help="The secret key to use for the django service",
|
|
355
|
-
default=self.secret_key,
|
|
356
|
-
)
|
|
357
332
|
|
|
358
333
|
return [
|
|
334
|
+
*def_options,
|
|
359
335
|
with_fakts_url,
|
|
360
336
|
with_users,
|
|
361
|
-
with_repo,
|
|
362
|
-
mount_repo,
|
|
363
337
|
with_groups,
|
|
364
|
-
build_repo,
|
|
365
|
-
with_host,
|
|
366
338
|
with_private_key,
|
|
367
339
|
with_public_key,
|
|
368
|
-
with_secret_key,
|
|
369
340
|
]
|
|
370
341
|
|
|
371
342
|
|
arkitekt_next/bloks/mikro.py
CHANGED
|
@@ -8,6 +8,7 @@ from blok import blok, InitContext
|
|
|
8
8
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
9
9
|
from blok.tree import YamlFile, Repo
|
|
10
10
|
from arkitekt_next.bloks.funcs import (
|
|
11
|
+
build_default_service_options,
|
|
11
12
|
create_default_service_dependencies,
|
|
12
13
|
create_default_service_yaml,
|
|
13
14
|
DefaultService,
|
|
@@ -25,6 +26,7 @@ class AccessCredentials(BaseModel):
|
|
|
25
26
|
@blok("live.arkitekt.mikro")
|
|
26
27
|
class MikroBlok:
|
|
27
28
|
def __init__(self) -> None:
|
|
29
|
+
self.dev = False
|
|
28
30
|
self.host = "mikro"
|
|
29
31
|
self.command = "bash run-debug.sh"
|
|
30
32
|
self.repo = "https://github.com/arkitektio/mikro-server-next"
|
|
@@ -56,44 +58,8 @@ class MikroBlok:
|
|
|
56
58
|
context.docker_compose.set_nested("services", self.host, self.service)
|
|
57
59
|
|
|
58
60
|
def get_options(self):
|
|
59
|
-
|
|
60
|
-
subcommand="with_repo",
|
|
61
|
-
help="The fakts url for connection",
|
|
62
|
-
default=self.repo,
|
|
63
|
-
)
|
|
64
|
-
with_command = Option(
|
|
65
|
-
subcommand="command",
|
|
66
|
-
help="The fakts url for connection",
|
|
67
|
-
default=self.command,
|
|
68
|
-
)
|
|
69
|
-
mount_repo = Option(
|
|
70
|
-
subcommand="mount_repo",
|
|
71
|
-
help="The fakts url for connection",
|
|
72
|
-
type=bool,
|
|
73
|
-
default=self.mount_repo,
|
|
74
|
-
)
|
|
75
|
-
build_repo = Option(
|
|
76
|
-
subcommand="build_repo",
|
|
77
|
-
help="The fakts url for connection",
|
|
78
|
-
type=bool,
|
|
79
|
-
default=self.build_repo,
|
|
80
|
-
)
|
|
81
|
-
with_host = Option(
|
|
82
|
-
subcommand="host",
|
|
83
|
-
help="The fakts url for connection",
|
|
84
|
-
default=self.host,
|
|
85
|
-
)
|
|
86
|
-
with_secret_key = Option(
|
|
87
|
-
subcommand="secret_key",
|
|
88
|
-
help="The fakts url for connection",
|
|
89
|
-
default=self.secret_key,
|
|
90
|
-
)
|
|
61
|
+
def_options = build_default_service_options(self)
|
|
91
62
|
|
|
92
63
|
return [
|
|
93
|
-
|
|
94
|
-
mount_repo,
|
|
95
|
-
build_repo,
|
|
96
|
-
with_host,
|
|
97
|
-
with_command,
|
|
98
|
-
with_secret_key,
|
|
64
|
+
*def_options,
|
|
99
65
|
]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from typing import Dict, Any
|
|
2
|
+
import secrets
|
|
3
|
+
|
|
4
|
+
from arkitekt_next.bloks.funcs import (
|
|
5
|
+
create_default_service_yaml,
|
|
6
|
+
create_default_service_dependencies,
|
|
7
|
+
build_default_service_options,
|
|
8
|
+
)
|
|
9
|
+
from arkitekt_next.bloks.services.mount import MountService
|
|
10
|
+
from blok import blok, InitContext, ExecutionContext, Option, Command
|
|
11
|
+
from blok.tree import Repo, YamlFile
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@blok("live.arkitekt.orkestrator")
|
|
15
|
+
class OrkestratorBlok:
|
|
16
|
+
def __init__(self) -> None:
|
|
17
|
+
self.dev = False
|
|
18
|
+
self.disable = True
|
|
19
|
+
self.repo = "https://github.com/arkitektio/orkestrator-next"
|
|
20
|
+
self.build_command = ["yarn"]
|
|
21
|
+
self.up_command = ["yarn", "start"]
|
|
22
|
+
|
|
23
|
+
def preflight(self, init: InitContext, mount: MountService):
|
|
24
|
+
for key, value in init.kwargs.items():
|
|
25
|
+
setattr(self, key, value)
|
|
26
|
+
|
|
27
|
+
if self.disable:
|
|
28
|
+
return
|
|
29
|
+
self.mount = mount.register_mount("orkestrator", Repo(self.repo))
|
|
30
|
+
|
|
31
|
+
self.initialized = True
|
|
32
|
+
|
|
33
|
+
def build(self, context: ExecutionContext):
|
|
34
|
+
if self.disable:
|
|
35
|
+
return
|
|
36
|
+
|
|
37
|
+
context.install_commands.set_nested(
|
|
38
|
+
"orkestrator", Command(self.build_command, cwd=self.mount)
|
|
39
|
+
)
|
|
40
|
+
context.up_commands.set_nested(
|
|
41
|
+
"orkestrator", Command(self.up_command, cwd=self.mount)
|
|
42
|
+
)
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
def get_options(self):
|
|
46
|
+
with_repos = Option(
|
|
47
|
+
subcommand="repo",
|
|
48
|
+
help="The default repo to use for the orkestrator",
|
|
49
|
+
default=self.repo,
|
|
50
|
+
)
|
|
51
|
+
with_disable = Option(
|
|
52
|
+
subcommand="disable",
|
|
53
|
+
help="Should we disable the orkestrator service?",
|
|
54
|
+
default=self.disable,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
return [
|
|
58
|
+
with_repos,
|
|
59
|
+
with_disable,
|
|
60
|
+
]
|
arkitekt_next/bloks/rekuest.py
CHANGED
|
@@ -2,6 +2,7 @@ from typing import Dict, Any
|
|
|
2
2
|
import secrets
|
|
3
3
|
|
|
4
4
|
from arkitekt_next.bloks.funcs import (
|
|
5
|
+
build_default_service_options,
|
|
5
6
|
create_default_service_dependencies,
|
|
6
7
|
create_default_service_yaml,
|
|
7
8
|
)
|
|
@@ -12,9 +13,10 @@ from blok.tree import Repo, YamlFile
|
|
|
12
13
|
@blok("live.arkitekt.rekuest")
|
|
13
14
|
class RekuestBlok:
|
|
14
15
|
def __init__(self) -> None:
|
|
16
|
+
self.dev = False
|
|
15
17
|
self.host = "rekuest"
|
|
16
18
|
self.command = "bash run-debug.sh"
|
|
17
|
-
self.repo = "https://github.com/jhnnsrs/rekuest-
|
|
19
|
+
self.repo = "https://github.com/jhnnsrs/rekuest-server-next"
|
|
18
20
|
self.scopes = {
|
|
19
21
|
"rekuest_agent": "Act as an agent",
|
|
20
22
|
"rekuest_call": "Call other apps with rekuest",
|
|
@@ -44,52 +46,8 @@ class RekuestBlok:
|
|
|
44
46
|
context.docker_compose.set_nested("services", self.host, self.service)
|
|
45
47
|
|
|
46
48
|
def get_options(self):
|
|
47
|
-
|
|
48
|
-
subcommand="with_repo",
|
|
49
|
-
help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
|
|
50
|
-
type=str,
|
|
51
|
-
default=self.repo,
|
|
52
|
-
)
|
|
53
|
-
with_command = Option(
|
|
54
|
-
subcommand="command",
|
|
55
|
-
help="Which command should be run when starting the service",
|
|
56
|
-
type=str,
|
|
57
|
-
default=self.command,
|
|
58
|
-
)
|
|
59
|
-
mount_repo = Option(
|
|
60
|
-
subcommand="mount_repo",
|
|
61
|
-
help="Should we mount the repo into the container?",
|
|
62
|
-
type=bool,
|
|
63
|
-
default=self.mount_repo,
|
|
64
|
-
)
|
|
65
|
-
build_repo = Option(
|
|
66
|
-
subcommand="build_repo",
|
|
67
|
-
help="Should we build the container from the repo?",
|
|
68
|
-
type=bool,
|
|
69
|
-
default=self.build_repo,
|
|
70
|
-
)
|
|
71
|
-
with_host = Option(
|
|
72
|
-
subcommand="host",
|
|
73
|
-
help="How should the service be named inside the docker-compose file?",
|
|
74
|
-
default=self.host,
|
|
75
|
-
)
|
|
76
|
-
with_secret_key = Option(
|
|
77
|
-
subcommand="secret_key",
|
|
78
|
-
help="The secret key to use for the django service",
|
|
79
|
-
default=self.secret_key,
|
|
80
|
-
)
|
|
81
|
-
with_repos = Option(
|
|
82
|
-
subcommand="repos",
|
|
83
|
-
help="The default repos to enable for the service",
|
|
84
|
-
default=self.secret_key,
|
|
85
|
-
)
|
|
49
|
+
def_options = build_default_service_options(self)
|
|
86
50
|
|
|
87
51
|
return [
|
|
88
|
-
|
|
89
|
-
mount_repo,
|
|
90
|
-
build_repo,
|
|
91
|
-
with_host,
|
|
92
|
-
with_command,
|
|
93
|
-
with_secret_key,
|
|
94
|
-
with_repos,
|
|
52
|
+
*def_options,
|
|
95
53
|
]
|
arkitekt_next/bloks/tailscale.py
CHANGED
|
@@ -9,11 +9,23 @@ from blok.tree import YamlFile
|
|
|
9
9
|
|
|
10
10
|
@blok("live.arkitekt.tailscale")
|
|
11
11
|
class TailscaleBlok:
|
|
12
|
-
|
|
13
12
|
def __init__(self, name: str = "arkitekt") -> None:
|
|
14
13
|
self.name = name
|
|
14
|
+
self.disable = False
|
|
15
15
|
|
|
16
|
-
def preflight(
|
|
16
|
+
def preflight(
|
|
17
|
+
self,
|
|
18
|
+
gateway: GatewayService,
|
|
19
|
+
mount_service: MountService,
|
|
20
|
+
dns: DnsService,
|
|
21
|
+
net_name: str,
|
|
22
|
+
auth_key: str,
|
|
23
|
+
host_name: str,
|
|
24
|
+
disable: bool = False,
|
|
25
|
+
):
|
|
26
|
+
self.disable = disable
|
|
27
|
+
if self.disable:
|
|
28
|
+
return
|
|
17
29
|
assert auth_key, "You need to provide an auth_key"
|
|
18
30
|
|
|
19
31
|
self.caddy_service = gateway.get_internal_host()
|
|
@@ -25,6 +37,8 @@ class TailscaleBlok:
|
|
|
25
37
|
self.host_name = host_name
|
|
26
38
|
|
|
27
39
|
def build(self, ex: ExecutionContext):
|
|
40
|
+
if self.disable:
|
|
41
|
+
return
|
|
28
42
|
|
|
29
43
|
if not self.tailnet_name:
|
|
30
44
|
# Trying to automatically find the hostname
|
|
@@ -36,33 +50,41 @@ class TailscaleBlok:
|
|
|
36
50
|
service = {
|
|
37
51
|
"image": "jhnnsrs/tailproxy:latest",
|
|
38
52
|
"volumes": [
|
|
39
|
-
f"{self.mount}:/var/lib/tailscale"
|
|
53
|
+
f"{self.mount}:/var/lib/tailscale" # Persist the tailscale state directory
|
|
40
54
|
],
|
|
41
55
|
"environment": [
|
|
42
56
|
"TS_STATE_DIR=/var/lib/tailscale",
|
|
43
57
|
f"TS_AUTH_KEY={self.auth_key}",
|
|
44
|
-
|
|
58
|
+
f"TS_HOSTNAME={self.host_name}",
|
|
45
59
|
f"TS_TAILNET={self.tailnet_name}",
|
|
46
60
|
f"CADDY_TARGET={self.caddy_service}:{self.caddy_port}",
|
|
47
61
|
],
|
|
48
|
-
|
|
49
|
-
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
ex.docker_compose.set_nested("services", "tailscale_proxy", service)
|
|
53
65
|
|
|
54
66
|
def get_options(self):
|
|
55
|
-
return [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
return [
|
|
68
|
+
Option(
|
|
69
|
+
subcommand="net_name",
|
|
70
|
+
help="The name of your tailnet",
|
|
71
|
+
type=str,
|
|
72
|
+
),
|
|
73
|
+
Option(
|
|
74
|
+
subcommand="auth_key",
|
|
75
|
+
help="The auth_key of your tailnet",
|
|
76
|
+
type=str,
|
|
77
|
+
),
|
|
78
|
+
Option(
|
|
79
|
+
subcommand="host_name",
|
|
80
|
+
help="The hostname of your tailnet",
|
|
81
|
+
default=self.name,
|
|
82
|
+
type=str,
|
|
83
|
+
),
|
|
84
|
+
Option(
|
|
85
|
+
subcommand="disable",
|
|
86
|
+
help="Should we disable the creation of the tailscale service?",
|
|
87
|
+
default=self.disable,
|
|
88
|
+
type=str,
|
|
89
|
+
),
|
|
90
|
+
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
arkitekt_next/__blok__.py,sha256=
|
|
1
|
+
arkitekt_next/__blok__.py,sha256=gQqlPrUPSeB-b3XkvXRwDoRWMfG-vYN-3a2pWHNjz_E,1563
|
|
2
2
|
arkitekt_next/__init__.py,sha256=KFM_HlnIQWX7hXSZnYba3rdmZrsBE69K58rwh8ewxoM,970
|
|
3
3
|
arkitekt_next/apps/__init__.py,sha256=cx_5Y-RkJFkSQJH-hUEC_L3eW1jU2E426c4e6_csIyM,42
|
|
4
4
|
arkitekt_next/apps/easy.py,sha256=8eu-0DCWit2Ok4SPw_QCyriBZHPnLc1oK9qxPUxnElg,3135
|
|
@@ -14,22 +14,23 @@ arkitekt_next/apps/service/herre_qt.py,sha256=GntkKHmwcQqEFab02SWwdd3xONo0fLVGEP
|
|
|
14
14
|
arkitekt_next/apps/types.py,sha256=cKRqHyKlNcGamPUxzvY0wyz0sEI4sBPa4CnvFnT1sTo,1140
|
|
15
15
|
arkitekt_next/bloks/__init__.py,sha256=gXny6-WJ3alV1__xveI_0wcvgDuglR1WB7v7-8h1Olo,30
|
|
16
16
|
arkitekt_next/bloks/admin.py,sha256=MlUQUYCHxCWtSD75mVHgs3DcDa0s8_D6_AIBslnYjZw,1300
|
|
17
|
-
arkitekt_next/bloks/arkitekt.py,sha256=
|
|
17
|
+
arkitekt_next/bloks/arkitekt.py,sha256=N0WcdEr_x2TzDdpIW_WP8lVodYxRbOU4I5IP-aKGLLQ,1417
|
|
18
18
|
arkitekt_next/bloks/config.py,sha256=SqJg9kB0AQ62b_WpIKgJ8Jpcqpc-AKN7gdEj87O-UGY,1268
|
|
19
|
-
arkitekt_next/bloks/fluss.py,sha256=
|
|
20
|
-
arkitekt_next/bloks/funcs.py,sha256=
|
|
19
|
+
arkitekt_next/bloks/fluss.py,sha256=5-luL5EeCb2DE9aRcjUTxjz5fu2EwgIoBWGGmdlypkc,1487
|
|
20
|
+
arkitekt_next/bloks/funcs.py,sha256=IdiMNUkQN5frHpgsiXJJfJib1lFhUEVwGYjJugpSlds,5350
|
|
21
21
|
arkitekt_next/bloks/gateway.py,sha256=Qfw_SkJbyMe5GrZ8YJaaLVyZ2ZlKpacJjUFLBk97vbg,6692
|
|
22
22
|
arkitekt_next/bloks/internal_docker.py,sha256=4jhKwfVKPCZzhkuEVq1iw4gIpc6_R0Cco-_s0L8PiZI,2891
|
|
23
|
-
arkitekt_next/bloks/kabinet.py,sha256=
|
|
23
|
+
arkitekt_next/bloks/kabinet.py,sha256=jJKLG2VCsnXk7ZVbtqtHiFbz3ezXJeoTxy8itScu64c,1860
|
|
24
24
|
arkitekt_next/bloks/livekit.py,sha256=yhre3PkIQwKGdGPFC-DhTID3rIbRQMts_UsAX9tw6-A,2561
|
|
25
|
-
arkitekt_next/bloks/lok.py,sha256=
|
|
26
|
-
arkitekt_next/bloks/mikro.py,sha256=
|
|
25
|
+
arkitekt_next/bloks/lok.py,sha256=pdhSaPPmz6v52gitPxhbKCP2CK7GSw3w-vbBB_pabNA,11575
|
|
26
|
+
arkitekt_next/bloks/mikro.py,sha256=JpWqEsV1-LktxSuWhEleZnDOdecHPZDqSR49VbcGxRo,1769
|
|
27
27
|
arkitekt_next/bloks/minio.py,sha256=k7t1J46lO3eaBO9KdP7iYF--Go-m25dEmOwisbbOoVQ,5496
|
|
28
28
|
arkitekt_next/bloks/mount.py,sha256=d14w7bMiaWbl5wgvanh4PwfIqEYsDEsw91360xfX0fU,1031
|
|
29
29
|
arkitekt_next/bloks/namegen.py,sha256=0k4PYya5J4EQyt3XZ3UKhDlO_k29pmUEQSaklZGN8MA,1035
|
|
30
|
+
arkitekt_next/bloks/orkestrator.py,sha256=D0WrSrVawy4wUZy1IrNk55xCSSTC73mt_efwkFg-9Q4,1756
|
|
30
31
|
arkitekt_next/bloks/postgres.py,sha256=FRUF2fobUlU6OmK1VC7aN_WuX1NctLmZhzJJA1uOOeY,2773
|
|
31
32
|
arkitekt_next/bloks/redis.py,sha256=_ddmcD3WwX7VA7zzzQ7-yjSM7f4reV0C8Pl70s7R2k8,2130
|
|
32
|
-
arkitekt_next/bloks/rekuest.py,sha256=
|
|
33
|
+
arkitekt_next/bloks/rekuest.py,sha256=X1U_5xEUt_Eb3E6UkOt52m78tn5zTsueXxTScvHNKks,1551
|
|
33
34
|
arkitekt_next/bloks/secret.py,sha256=P4Z56FhcgVD0KbokhcMNAXwDjo_86rI99nWh3gUGXSQ,1014
|
|
34
35
|
arkitekt_next/bloks/services/__init__.py,sha256=i9vGNd1lFBem3O2PblTouRzFVQkdwOYoUmqqU43dIWQ,592
|
|
35
36
|
arkitekt_next/bloks/services/admin.py,sha256=OXMAHph5lABNPFsXm8aboWffJ7CzSSNvke7xpmj9raI,463
|
|
@@ -45,7 +46,7 @@ arkitekt_next/bloks/services/s3.py,sha256=_mk_9NdaeHRVZ__1M9CL1Ec1gSQKkzlOiQXse7
|
|
|
45
46
|
arkitekt_next/bloks/services/secret.py,sha256=iUG1ZH_dR0tL48rueNOK2ILjEnyqNJjQCY-4KKrB_Zg,342
|
|
46
47
|
arkitekt_next/bloks/services/socket.py,sha256=eXACQPldS9I1xGVDcbF6LrVkHHsBcjvG1VtlvHnM-14,427
|
|
47
48
|
arkitekt_next/bloks/socket.py,sha256=YIrSKfQezrsKwRKDPdT1aXhlQzjgnx_UaNaQ9LiEfGY,1008
|
|
48
|
-
arkitekt_next/bloks/tailscale.py,sha256=
|
|
49
|
+
arkitekt_next/bloks/tailscale.py,sha256=IkMBA1CwslMTOF1m2UUmE6qH_gbaEet2eXsPDgBxcew,2915
|
|
49
50
|
arkitekt_next/builders.py,sha256=8HeQsNqyxpbFsnTrA9AAm0_BqxGjU1_ylS1Z-hbjAFw,6074
|
|
50
51
|
arkitekt_next/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
52
|
arkitekt_next/cli/commands/call/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -135,8 +136,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
|
|
|
135
136
|
arkitekt_next/service_registry.py,sha256=pczUuP_Nve7OYwB7-oDBLIw6bkjZPnzL3xFca5TF1io,3405
|
|
136
137
|
arkitekt_next/tqdm.py,sha256=DlrxPluHao7TvW-Cqgt0UokRS-fM2_ZNiWiddqvCqCc,1488
|
|
137
138
|
arkitekt_next/utils.py,sha256=gmKWy9M51vimohmmaoIpAJ0CaB22TFP0w3JszRrwiak,2379
|
|
138
|
-
arkitekt_next-0.7.
|
|
139
|
-
arkitekt_next-0.7.
|
|
140
|
-
arkitekt_next-0.7.
|
|
141
|
-
arkitekt_next-0.7.
|
|
142
|
-
arkitekt_next-0.7.
|
|
139
|
+
arkitekt_next-0.7.46.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
|
|
140
|
+
arkitekt_next-0.7.46.dist-info/METADATA,sha256=5qMLY6bJad_hv3y0qbowmRx82mDKW3fzu_5pPMWvyu4,5973
|
|
141
|
+
arkitekt_next-0.7.46.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
142
|
+
arkitekt_next-0.7.46.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
|
|
143
|
+
arkitekt_next-0.7.46.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|