arkitekt-next 0.7.43__py3-none-any.whl → 0.7.44__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/bloks/funcs.py +4 -1
- arkitekt_next/bloks/gateway.py +12 -3
- arkitekt_next/bloks/internal_docker.py +6 -4
- arkitekt_next/bloks/kabinet.py +4 -2
- arkitekt_next/bloks/services/gateway.py +2 -0
- {arkitekt_next-0.7.43.dist-info → arkitekt_next-0.7.44.dist-info}/METADATA +1 -1
- {arkitekt_next-0.7.43.dist-info → arkitekt_next-0.7.44.dist-info}/RECORD +10 -10
- {arkitekt_next-0.7.43.dist-info → arkitekt_next-0.7.44.dist-info}/LICENSE +0 -0
- {arkitekt_next-0.7.43.dist-info → arkitekt_next-0.7.44.dist-info}/WHEEL +0 -0
- {arkitekt_next-0.7.43.dist-info → arkitekt_next-0.7.44.dist-info}/entry_points.txt +0 -0
arkitekt_next/bloks/funcs.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from blok import blok, InitContext, Option
|
|
2
2
|
from blok.tree import YamlFile, Repo
|
|
3
|
-
from typing import Protocol
|
|
3
|
+
from typing import Any, Protocol
|
|
4
4
|
from blok.utils import check_protocol_compliance
|
|
5
5
|
from dataclasses import asdict
|
|
6
6
|
from arkitekt_next.bloks.services import (
|
|
@@ -50,9 +50,11 @@ def create_default_service_dependencies():
|
|
|
50
50
|
def create_default_service_yaml(
|
|
51
51
|
init: InitContext,
|
|
52
52
|
self: DefaultService,
|
|
53
|
+
additional_keys: dict[str, Any] = None,
|
|
53
54
|
) -> YamlFile:
|
|
54
55
|
check_protocol_compliance(self, DefaultService)
|
|
55
56
|
deps = init.dependencies
|
|
57
|
+
additional_keys = additional_keys or {}
|
|
56
58
|
|
|
57
59
|
init.get_service(LokService).register_scopes(self.scopes)
|
|
58
60
|
|
|
@@ -91,6 +93,7 @@ def create_default_service_yaml(
|
|
|
91
93
|
"scopes": self.scopes,
|
|
92
94
|
"force_script_name": path_name,
|
|
93
95
|
"csrf_trusted_origins": csrf_trusted_origins,
|
|
96
|
+
**additional_keys,
|
|
94
97
|
}
|
|
95
98
|
)
|
|
96
99
|
|
arkitekt_next/bloks/gateway.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from arkitekt_next.bloks.services.name import NameService
|
|
1
2
|
from blok import blok, InitContext, ExecutionContext, Option
|
|
2
3
|
from blok.tree import YamlFile, Repo
|
|
3
4
|
from pydantic import BaseModel
|
|
@@ -54,12 +55,16 @@ class GatewayBlok:
|
|
|
54
55
|
def get_http_port(self):
|
|
55
56
|
return 80
|
|
56
57
|
|
|
57
|
-
def
|
|
58
|
+
def retrieve_gateway_network(self):
|
|
59
|
+
return self.gateway_network
|
|
60
|
+
|
|
61
|
+
def preflight(self, init: InitContext, dns: DnsService, name: NameService):
|
|
58
62
|
for key, value in init.kwargs.items():
|
|
59
63
|
setattr(self, key, value)
|
|
60
64
|
|
|
61
65
|
self.public_ips = dns.get_dns_result().ip_addresses
|
|
62
66
|
self.public_hosts = dns.get_dns_result().hostnames
|
|
67
|
+
self.gateway_network = name.retrieve_name().replace("-", "_")
|
|
63
68
|
|
|
64
69
|
def build(
|
|
65
70
|
self,
|
|
@@ -163,7 +168,7 @@ class GatewayBlok:
|
|
|
163
168
|
]
|
|
164
169
|
+ exposed_ports_strings,
|
|
165
170
|
"depends_on": caddy_depends_on,
|
|
166
|
-
"networks": [
|
|
171
|
+
"networks": [self.gateway_network, "default"],
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
context.docker_compose.set_nested("services", "caddy", caddy_container)
|
|
@@ -179,7 +184,11 @@ class GatewayBlok:
|
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
context.docker_compose.set_nested("services", "certer", certer_container)
|
|
182
|
-
context.docker_compose.set_nested(
|
|
187
|
+
context.docker_compose.set_nested(
|
|
188
|
+
"networks",
|
|
189
|
+
self.gateway_network,
|
|
190
|
+
{"driver": "bridge", "name": self.gateway_network},
|
|
191
|
+
)
|
|
183
192
|
|
|
184
193
|
def expose(self, path_name: str, port: int, host: str, strip_prefix: bool = False):
|
|
185
194
|
self.exposed_hosts[path_name] = ExposedHost(
|
|
@@ -14,7 +14,7 @@ class InternalDockerBlok:
|
|
|
14
14
|
def __init__(self) -> None:
|
|
15
15
|
self.host = "internal_docker"
|
|
16
16
|
|
|
17
|
-
self.image = "jhnnsrs/deployer:0.0.
|
|
17
|
+
self.image = "jhnnsrs/deployer:0.0.8-vanilla"
|
|
18
18
|
self.instance_id = "INTERNAL_DOCKER"
|
|
19
19
|
|
|
20
20
|
def preflight(
|
|
@@ -38,6 +38,8 @@ class InternalDockerBlok:
|
|
|
38
38
|
|
|
39
39
|
self.token = lok.retrieve_token()
|
|
40
40
|
|
|
41
|
+
self.gateway_network = gateway.retrieve_gateway_network()
|
|
42
|
+
|
|
41
43
|
self.command = f"arkitekt-next run prod --redeem-token={self.token} --url http://{self.gateway_host}:{self.gateway_port}"
|
|
42
44
|
|
|
43
45
|
self.initialized = True
|
|
@@ -56,14 +58,14 @@ class InternalDockerBlok:
|
|
|
56
58
|
"environment": {
|
|
57
59
|
"INSTANCE_ID": self.instance_id,
|
|
58
60
|
"ARKITEKT_GATEWAY": f"http://{self.gateway_host}:{self.gateway_port}",
|
|
59
|
-
"ARKITEKT_NETWORK":
|
|
61
|
+
"ARKITEKT_NETWORK": self.gateway_network,
|
|
60
62
|
},
|
|
61
63
|
"deploy": {
|
|
62
64
|
"restart_policy": {
|
|
63
65
|
"condition": "on-failure",
|
|
64
66
|
"delay": "10s",
|
|
65
|
-
"max_attempts":
|
|
66
|
-
"window": "
|
|
67
|
+
"max_attempts": 10,
|
|
68
|
+
"window": "300s",
|
|
67
69
|
},
|
|
68
70
|
},
|
|
69
71
|
}
|
arkitekt_next/bloks/kabinet.py
CHANGED
|
@@ -23,7 +23,7 @@ class KabinetBlok:
|
|
|
23
23
|
self.build_repo = False
|
|
24
24
|
self.buckets = ["media"]
|
|
25
25
|
self.secret_key = secrets.token_hex(16)
|
|
26
|
-
self.ensured_repos = []
|
|
26
|
+
self.ensured_repos = ["jhnnsrs/ome:main", "jhnnsrs/renderer:main"]
|
|
27
27
|
self.image = "jhnnsrs/kabinet:next"
|
|
28
28
|
|
|
29
29
|
def get_builder(self):
|
|
@@ -36,7 +36,9 @@ class KabinetBlok:
|
|
|
36
36
|
for key, value in init.kwargs.items():
|
|
37
37
|
setattr(self, key, value)
|
|
38
38
|
|
|
39
|
-
self.service = create_default_service_yaml(
|
|
39
|
+
self.service = create_default_service_yaml(
|
|
40
|
+
init, self, {"ensured_repos": self.ensured_repos}
|
|
41
|
+
)
|
|
40
42
|
|
|
41
43
|
self.initialized = True
|
|
42
44
|
|
|
@@ -12,6 +12,8 @@ class GatewayService(Protocol):
|
|
|
12
12
|
self, path_name: str, port: int, host: str, strip_prefix: bool = True
|
|
13
13
|
): ...
|
|
14
14
|
|
|
15
|
+
def retrieve_gateway_network(self): ...
|
|
16
|
+
|
|
15
17
|
def expose_mapped(self, path_name: str, port: int, host: str, to_name: str): ...
|
|
16
18
|
|
|
17
19
|
def expose_default(self, port: int, host: str): ...
|
|
@@ -17,10 +17,10 @@ arkitekt_next/bloks/admin.py,sha256=MlUQUYCHxCWtSD75mVHgs3DcDa0s8_D6_AIBslnYjZw,
|
|
|
17
17
|
arkitekt_next/bloks/arkitekt.py,sha256=1h2fyJK-TcuiOVFyE7iO2S1jwLv52APsQpfxddmHWjk,1263
|
|
18
18
|
arkitekt_next/bloks/config.py,sha256=SqJg9kB0AQ62b_WpIKgJ8Jpcqpc-AKN7gdEj87O-UGY,1268
|
|
19
19
|
arkitekt_next/bloks/fluss.py,sha256=07l8mdS35JyuEthv4xH9qpCCNepMkJGm02PxEakQBD0,2671
|
|
20
|
-
arkitekt_next/bloks/funcs.py,sha256=
|
|
21
|
-
arkitekt_next/bloks/gateway.py,sha256=
|
|
22
|
-
arkitekt_next/bloks/internal_docker.py,sha256=
|
|
23
|
-
arkitekt_next/bloks/kabinet.py,sha256=
|
|
20
|
+
arkitekt_next/bloks/funcs.py,sha256=CMGIWgsrYCr_QHiKMw9udsrjD1D7hOREHLNQNHtFVyE,3757
|
|
21
|
+
arkitekt_next/bloks/gateway.py,sha256=Qfw_SkJbyMe5GrZ8YJaaLVyZ2ZlKpacJjUFLBk97vbg,6692
|
|
22
|
+
arkitekt_next/bloks/internal_docker.py,sha256=4jhKwfVKPCZzhkuEVq1iw4gIpc6_R0Cco-_s0L8PiZI,2891
|
|
23
|
+
arkitekt_next/bloks/kabinet.py,sha256=IE-fuu1ABWl-LmUWAlRw6ohkDKtYe11FeAhsUckqOh0,3041
|
|
24
24
|
arkitekt_next/bloks/livekit.py,sha256=yhre3PkIQwKGdGPFC-DhTID3rIbRQMts_UsAX9tw6-A,2561
|
|
25
25
|
arkitekt_next/bloks/lok.py,sha256=MGXKg1NRvydA-wlncBQJwO2GfaQLl2shVo0g45r9J_8,12532
|
|
26
26
|
arkitekt_next/bloks/mikro.py,sha256=vNM9K7I3AK2G0WooaMQl7U8-_TN96P2YUfblqAMsvdI,2772
|
|
@@ -35,7 +35,7 @@ arkitekt_next/bloks/services/__init__.py,sha256=i9vGNd1lFBem3O2PblTouRzFVQkdwOYo
|
|
|
35
35
|
arkitekt_next/bloks/services/admin.py,sha256=OXMAHph5lABNPFsXm8aboWffJ7CzSSNvke7xpmj9raI,463
|
|
36
36
|
arkitekt_next/bloks/services/config.py,sha256=BLtbKXRRWmuZxvaaksuxt9EiDcazYwKL_IUIRhXBin8,393
|
|
37
37
|
arkitekt_next/bloks/services/db.py,sha256=jMO751KJYjNmvHD0tOTWgkkemwTXc6mLHAge_i68JSA,600
|
|
38
|
-
arkitekt_next/bloks/services/gateway.py,sha256=
|
|
38
|
+
arkitekt_next/bloks/services/gateway.py,sha256=8gxbVi7DP1pXv6d7Lm4sA8sKptIWeNIVtQHWa1M-YUk,844
|
|
39
39
|
arkitekt_next/bloks/services/livekit.py,sha256=5u-GThgKsgXiiobEL4arm3JJOgNTZae15Q-75i-4D8g,366
|
|
40
40
|
arkitekt_next/bloks/services/lok.py,sha256=fzOGum0VmcVaONUhTv4jHYky4WrFq2ygDAYJjBv2vAI,500
|
|
41
41
|
arkitekt_next/bloks/services/mount.py,sha256=MDlwHl5cTfBO8IgkofuFjQBbfIMKDm_R9suWkiyVG48,289
|
|
@@ -135,8 +135,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
|
|
|
135
135
|
arkitekt_next/service_registry.py,sha256=pczUuP_Nve7OYwB7-oDBLIw6bkjZPnzL3xFca5TF1io,3405
|
|
136
136
|
arkitekt_next/tqdm.py,sha256=DlrxPluHao7TvW-Cqgt0UokRS-fM2_ZNiWiddqvCqCc,1488
|
|
137
137
|
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.
|
|
138
|
+
arkitekt_next-0.7.44.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
|
|
139
|
+
arkitekt_next-0.7.44.dist-info/METADATA,sha256=dQWKNH07t3jsnXbDhkp_eNvwV2VI4TP_g74vEwzihkI,5973
|
|
140
|
+
arkitekt_next-0.7.44.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
141
|
+
arkitekt_next-0.7.44.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
|
|
142
|
+
arkitekt_next-0.7.44.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|