arkitekt-next 0.14.1__py3-none-any.whl → 0.16.0__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.

@@ -66,7 +66,10 @@ class AlpakaBlok(BaseArkitektService):
66
66
 
67
67
  path_name = self.host
68
68
 
69
- gateway.expose(path_name, 80, self.host)
69
+ gateway_path = gateway.expose_service(path_name, 80, self.host)
70
+ lok.register_service_on_subpath(
71
+ self.get_blok_meta().service_identifier, gateway_path, "ht"
72
+ )
70
73
 
71
74
  postgress_access = db.register_db(self.host)
72
75
  redis_access = redis.register()
@@ -83,17 +83,20 @@ class BaseArkitektService:
83
83
 
84
84
  path_name = self.host
85
85
 
86
- if gateway:
87
- print("Registering gateway access")
88
- gateway_access = gateway.expose(path_name, 80, self.host)
89
-
90
86
  postgress_access = db.register_db(self.host)
91
87
  redis_access = redis.register()
92
88
  lok_access = lok.retrieve_credentials()
93
89
  admin_access = admin.retrieve()
94
90
  minio_access = s3.create_buckets(self.buckets)
95
- lok_labels = lok.retrieve_labels(
96
- self.get_blok_meta().service_identifier, self.get_builder()
91
+
92
+ self.service_identifier = self.get_blok_meta().service_identifier
93
+
94
+ gateway_path = gateway.expose_service(
95
+ path_name, 80, self.host, strip_prefix=False
96
+ )
97
+
98
+ lok_labels = lok.register_service_on_subpath(
99
+ self.service_identifier, gateway_path, "ht"
97
100
  )
98
101
 
99
102
  django_secret = secret.retrieve_secret()
@@ -135,7 +138,6 @@ class BaseArkitektService:
135
138
  depends_on.append(minio_access.dependency)
136
139
 
137
140
  service = {
138
- "labels": lok_labels,
139
141
  "volumes": [f"{config_mount}:/workspace/config.yaml"],
140
142
  "depends_on": depends_on,
141
143
  }
@@ -42,9 +42,7 @@ class CaddyBlok:
42
42
  self.exposed_to_hosts = {}
43
43
  self.http_expose_default = None
44
44
  self.exposed_ports = {}
45
- self.with_certer = True
46
- self.with_tailscale = True
47
- self.certer_image = "jhnnsrs/certer:next"
45
+ self.with_certer = False
48
46
  self.http_port = 80
49
47
  self.https_port = 443
50
48
  self.public_ips = DEFAULT_PUBLIC_URLS
@@ -68,14 +66,10 @@ class CaddyBlok:
68
66
  self,
69
67
  init: InitContext,
70
68
  name: NameService,
71
- certs: CerterService,
72
69
  ):
73
70
  for key, value in init.kwargs.items():
74
71
  setattr(self, key, value)
75
72
 
76
- self.cert_mount = certs.retrieve_certs_mount()
77
- self.depends_on = certs.retrieve_depends_on()
78
-
79
73
  self.gateway_network = name.retrieve_name().replace("-", "_")
80
74
 
81
75
  def build(
@@ -102,7 +96,7 @@ class CaddyBlok:
102
96
  }}
103
97
  """
104
98
 
105
- for protocol in ["http", "https"]:
99
+ for protocol in ["http"]:
106
100
  caddyfile += f"""
107
101
  {protocol}:// {{
108
102
  """
@@ -168,14 +162,11 @@ class CaddyBlok:
168
162
  ]
169
163
 
170
164
  volumes = ["./configs/Caddyfile:/etc/caddy/Caddyfile"]
171
- if self.cert_mount:
172
- volumes.append(f"{self.cert_mount}:/certs")
173
165
 
174
166
  caddy_container = {
175
167
  "image": "caddy:latest",
176
168
  "ports": [
177
169
  f"{self.http_port}:80",
178
- f"{self.https_port}:443",
179
170
  ]
180
171
  + exposed_ports_strings,
181
172
  "volumes": volumes,
@@ -190,10 +181,13 @@ class CaddyBlok:
190
181
  {"driver": "bridge", "name": self.gateway_network},
191
182
  )
192
183
 
193
- def expose(self, path_name: str, port: int, host: str, strip_prefix: bool = False):
184
+ def expose_service(
185
+ self, path_name: str, port: int, host: str, strip_prefix: bool = False
186
+ ):
194
187
  self.exposed_hosts[path_name] = ExposedHost(
195
188
  host=host, port=port, stip_prefix=strip_prefix
196
189
  )
190
+ return path_name
197
191
 
198
192
  def expose_mapped(self, path_name: str, port: int, host: str, to: str):
199
193
  self.exposed_to_hosts[path_name] = ExpostedToHost(host=host, port=port, to=to)
@@ -15,7 +15,7 @@ from blok.tree import YamlFile, Repo
15
15
  )
16
16
  class InternalDockerBlok:
17
17
  def __init__(self) -> None:
18
- self.host = "internal_docker"
18
+ self.host = "deployer"
19
19
 
20
20
  self.image = "jhnnsrs/deployer:nightly"
21
21
  self.instance_id = "INTERNAL_DOCKER"
@@ -32,9 +32,6 @@ class InternalDockerBlok:
32
32
 
33
33
  deps = init.dependencies
34
34
 
35
- if self.skip:
36
- return
37
-
38
35
  self._socket = socket.register_socket(self.host)
39
36
  self.gateway_host = gateway.get_internal_host()
40
37
  self.gateway_port = gateway.get_http_port()
@@ -48,8 +45,6 @@ class InternalDockerBlok:
48
45
  self.initialized = True
49
46
 
50
47
  def build(self, context: ExecutionContext):
51
- if self.skip:
52
- return
53
48
  db_service = {
54
49
  "image": self.image,
55
50
  "command": self.command,
@@ -51,10 +51,6 @@ class LocalLiveKitBlok:
51
51
  if self.skip:
52
52
  return
53
53
  db_service = {
54
- "labels": [
55
- "fakts.service=io.livekit.livekit",
56
- "fakts.builder=livekitio.livekit",
57
- ],
58
54
  "image": self.image,
59
55
  "command": self.command,
60
56
  "ports": [
@@ -139,6 +139,13 @@ class LokBlok:
139
139
  "read": "A generic read access",
140
140
  "write": "A generic write access",
141
141
  }
142
+ self.email_service: str = "smtp"
143
+ self.email_host: str = "NOT_SET"
144
+ self.email_port: int = 587
145
+ self.email_user: str = "NOT_SET"
146
+ self.email_password: str = "NOT_SET"
147
+ self.email_from: str = "NOT_SET"
148
+
142
149
  self.buckets = ["media"]
143
150
  self.key = None
144
151
  self.deployment_name = "default"
@@ -146,6 +153,31 @@ class LokBlok:
146
153
  self.preformed_redeem_tokens = [secrets.token_hex(16) for i in range(80)]
147
154
  self.registered_tokens = {}
148
155
  self.local_access = None
156
+ self.registered_instances = [
157
+ {
158
+ "identifier": "local-lok",
159
+ "service": "live.arkitekt.lok",
160
+ "aliases": [
161
+ {
162
+ "layer": "public",
163
+ "kind": "relative",
164
+ "path": "lok",
165
+ "challenge": "ht",
166
+ }
167
+ ],
168
+ },
169
+ {
170
+ "identifier": "local-datalayer",
171
+ "service": "live.arkitekt.s3",
172
+ "aliases": [
173
+ {
174
+ "layer": "public",
175
+ "kind": "relative",
176
+ "challenge": "minio/health/live",
177
+ }
178
+ ],
179
+ },
180
+ ]
149
181
 
150
182
  def retrieve_credentials(self) -> LokCredentials:
151
183
  return LokCredentials(
@@ -167,6 +199,21 @@ class LokBlok:
167
199
  def register_scopes(self, scopes_dict: Dict[str, str]) -> LokCredentials:
168
200
  self.scopes = self.scopes | scopes_dict
169
201
 
202
+ def register_service_on_subpath(self, service_name: str, subpath: str, htpath: str):
203
+ registered_instance = {
204
+ "identifier": f"local-{service_name}",
205
+ "service": service_name,
206
+ "aliases": [
207
+ {
208
+ "layer": "public",
209
+ "kind": "relative",
210
+ "path": subpath,
211
+ "challenge": htpath,
212
+ }
213
+ ],
214
+ }
215
+ self.registered_instances.append(registered_instance)
216
+
170
217
  def preflight(
171
218
  self,
172
219
  init: InitContext,
@@ -183,7 +230,11 @@ class LokBlok:
183
230
  assert self.public_key, "Public key is required"
184
231
  assert self.private_key, "Private key is required"
185
232
 
186
- gateway.expose("lok", 80, self.host, strip_prefix=False)
233
+ self.exposed_path = gateway.expose_service(
234
+ "lok", 80, self.host, strip_prefix=False
235
+ )
236
+ self.exposed_services = {"live.arkitekt.lok": {}}
237
+
187
238
  gateway.expose_mapped(".well-known", 80, self.host, "lok")
188
239
 
189
240
  self.secret_blok = secrets
@@ -206,13 +257,8 @@ class LokBlok:
206
257
  depends_on.append(self.s3_access.dependency)
207
258
 
208
259
  db_service = {
209
- "labels": [
210
- "fakts.service=live.arkitekt.lok",
211
- "fakts.builder=arkitekt.lok",
212
- ],
213
260
  "depends_on": depends_on,
214
261
  "volumes": [
215
- "/var/run/docker.sock:/var/run/docker.sock",
216
262
  "./configs/lok.yaml:/workspace/config.yaml",
217
263
  ],
218
264
  }
@@ -255,7 +301,22 @@ class LokBlok:
255
301
  "s3": asdict(self.s3_access),
256
302
  "token_expire_seconds": self.token_expiry_seconds,
257
303
  "force_script_name": "lok",
304
+ "layers": [
305
+ {
306
+ "identifier": "public",
307
+ "kind": "public",
308
+ }
309
+ ],
310
+ "instances": self.registered_instances,
258
311
  "csrf_trusted_origins": trusted_origins,
312
+ "email": {
313
+ "service": self.email_service,
314
+ "host": self.email_host,
315
+ "port": self.email_port,
316
+ "user": self.email_user,
317
+ "password": self.email_password,
318
+ "from": self.email_from,
319
+ },
259
320
  }
260
321
  )
261
322
 
@@ -64,7 +64,10 @@ class LovekitBlok:
64
64
 
65
65
  path_name = self.host
66
66
 
67
- gateway.expose(path_name, 80, self.host)
67
+ gateway_path = gateway.expose_service(path_name, 80, self.host)
68
+ lok.register_service_on_subpath(
69
+ self.get_blok_meta().service_identifier, gateway_path, "ht"
70
+ )
68
71
 
69
72
  postgress_access = db.register_db(self.host)
70
73
  redis_access = redis.register()
@@ -66,10 +66,13 @@ class MinioBlok:
66
66
  for bucket in buckets:
67
67
  bucket_name = self.name_service.retrieve_name()
68
68
  bucket_map[bucket] = bucket_name
69
- self.gateway_service.expose(bucket_name, 9000, self.host)
69
+ self.gateway_service.expose_service(bucket_name, 9000, self.host)
70
70
 
71
71
  self.buckets.extend(bucket_map.values())
72
72
 
73
+ # expose the health check endpoints
74
+ self.gateway_service.expose_service("minio/health/live", 9000, self.host)
75
+
73
76
  creds = S3Credentials(
74
77
  name=self.name_service.retrieve_name(),
75
78
  access_key=new_access_key,
@@ -126,7 +129,6 @@ class MinioBlok:
126
129
  },
127
130
  "image": self.minio_image,
128
131
  "volumes": ["./data:/data"],
129
- "labels": ["fakts.service=live.arkitekt.s3", "fakts.builder=arkitekt.s3"],
130
132
  }
131
133
 
132
134
  context.file_tree.set_nested("data", {})
@@ -38,10 +38,6 @@ class OllamaBlok:
38
38
  if self.skip:
39
39
  return
40
40
  db_service = {
41
- "labels": [
42
- "fakts.service=io.ollama.ollama",
43
- "fakts.builder=ollama.ollama",
44
- ],
45
41
  "image": self.image,
46
42
  "environment": {
47
43
  "OLLAMA_KEEP_ALIVE": "24h",
@@ -61,7 +61,6 @@ class PostgresBlok(BaseModel):
61
61
  "POSTGRES_PASSWORD": self.password,
62
62
  "POSTGRES_MULTIPLE_DATABASES": "",
63
63
  },
64
- "labels": ["fakts.service=live.arkitekt.postgres"],
65
64
  }
66
65
 
67
66
  if self.build_repo or self.dev:
@@ -73,7 +72,6 @@ class PostgresBlok(BaseModel):
73
72
  self.build_image["image"] = self.image
74
73
 
75
74
  def build(self, context: ExecutionContext):
76
-
77
75
  self.build_image["environment"]["POSTGRES_MULTIPLE_DATABASES"] = ",".join(
78
76
  self.registered_dbs.keys()
79
77
  )
@@ -8,9 +8,19 @@ from blok import blok, InitContext, service
8
8
 
9
9
  @service("live.arkitekt.gateway")
10
10
  class GatewayService(Protocol):
11
- def expose(
11
+ def expose_service(
12
12
  self, path_name: str, port: int, host: str, strip_prefix: bool = True
13
- ): ...
13
+ ) -> str:
14
+ """
15
+ Expose a service on the gateway.
16
+
17
+ :param path_name: The name of the path to expose.
18
+ :param port: The port to expose the service on.
19
+ :param host: The host to expose the service on.
20
+ :param strip_prefix: Whether to strip the prefix from the path.
21
+ :return: The name of the exposed service.
22
+ """
23
+ ...
14
24
 
15
25
  def retrieve_gateway_network(self): ...
16
26
 
@@ -18,3 +18,7 @@ class LokService(Protocol):
18
18
  def retrieve_labels(self, service_name: str, builder_name: str) -> list[str]: ...
19
19
 
20
20
  def register_scopes(self, scopes_dict: Dict[str, str]): ...
21
+
22
+ def register_service_on_subpath(
23
+ self, service_name: str, subpath: str, htpath: str = ""
24
+ ) -> None: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arkitekt-next
3
- Version: 0.14.1
3
+ Version: 0.16.0
4
4
  Summary: client for the arkitekt_next platform
5
5
  Author-email: jhnnsrs <jhnnsrs@gmail.com>
6
6
  License-Expression: MIT
@@ -12,20 +12,20 @@ Requires-Dist: fakts-next>=2
12
12
  Requires-Dist: kabinet>=0.5
13
13
  Requires-Dist: koil>=2.0.4
14
14
  Requires-Dist: rath>=3.4
15
- Requires-Dist: rekuest-next>=0.11
15
+ Requires-Dist: rekuest-next>=0.11.1
16
16
  Requires-Dist: rich-click>=1.8.8
17
17
  Requires-Dist: semver>=3.0.4
18
18
  Requires-Dist: watchfiles>=1.0.5
19
19
  Provides-Extra: all
20
20
  Requires-Dist: fluss-next>=0.2.0; extra == 'all'
21
21
  Requires-Dist: kabinet>=0.2.0; extra == 'all'
22
- Requires-Dist: mikro-next>=0.4; extra == 'all'
22
+ Requires-Dist: mikro-next>=0.6; extra == 'all'
23
23
  Requires-Dist: reaktion-next>=0.2.0; extra == 'all'
24
24
  Requires-Dist: rekuest-next>=0.7; extra == 'all'
25
25
  Requires-Dist: rich-click>=1.6.1; extra == 'all'
26
26
  Requires-Dist: semver>=3.0.1; extra == 'all'
27
27
  Requires-Dist: turms>=0.9; extra == 'all'
28
- Requires-Dist: unlok-next>=0.2.0; extra == 'all'
28
+ Requires-Dist: unlok-next>=1.1.1; extra == 'all'
29
29
  Requires-Dist: watchfiles>=0.18.1; extra == 'all'
30
30
  Provides-Extra: alpaka
31
31
  Requires-Dist: alpaka>=0.2.0; extra == 'alpaka'
@@ -47,11 +47,11 @@ Requires-Dist: kraph>=0.2.0; extra == 'kraph'
47
47
  Provides-Extra: lovekit
48
48
  Requires-Dist: lovekit>=0.2.0; extra == 'lovekit'
49
49
  Provides-Extra: mikro
50
- Requires-Dist: mikro-next>=0.4.0; extra == 'mikro'
50
+ Requires-Dist: mikro-next>=0.6.0; extra == 'mikro'
51
51
  Provides-Extra: reaktion
52
52
  Requires-Dist: reaktion-next>=0.2.0; extra == 'reaktion'
53
53
  Provides-Extra: unlok
54
- Requires-Dist: unlok-next>=0.2.0; extra == 'unlok'
54
+ Requires-Dist: unlok-next>=1.1.1; extra == 'unlok'
55
55
  Description-Content-Type: text/markdown
56
56
 
57
57
  # arkitekt-next
@@ -13,28 +13,27 @@ arkitekt_next/app/app.py,sha256=zj8RWXtB9d_C7mfeFxQSOO_flC9hDddmmCRwbIzHeSE,1945
13
13
  arkitekt_next/app/fakts.py,sha256=M6UcECwx-Hc0nXjyQ8qDmYyrg4pNV_26G8eZgqLuFMw,2659
14
14
  arkitekt_next/bloks/__init__.py,sha256=_4EeR63d6avQUWLG4mK2n_FvogTPQ_Jx6f2_RvNbWeA,29
15
15
  arkitekt_next/bloks/admin.py,sha256=BP2Wh3Q4BkLabX5lV8CkyyreJYH7jGIvYkzOlnhRdjM,1293
16
- arkitekt_next/bloks/alpaka.py,sha256=37pyi0K6sW2cYurLBH1-lfPLkV0ahfbe9CTsEEXgjvA,4546
16
+ arkitekt_next/bloks/alpaka.py,sha256=aAVQ_3OX66nPCIJRebzDyloxWSHtn-BN-Mrd-vKgfJA,4692
17
17
  arkitekt_next/bloks/arkitekt.py,sha256=mY4NJ067Tqh-_zRU-Ylwhn-4WfWGMJgjkdu56BGsgpg,1699
18
- arkitekt_next/bloks/base.py,sha256=n3cfEF-7OFJFUDMA5UDEfH118Mg-9aKBxFEFtm8Vb5E,6271
18
+ arkitekt_next/bloks/base.py,sha256=BDAmXpNSdTcRjclpv5-wnzH2uKn3K2ZMZduujSX-LPk,6285
19
19
  arkitekt_next/bloks/channel.py,sha256=PsFlb1qjL9ULtbVt8g1dsuaa9bd60zJCT059LztUkGA,739
20
20
  arkitekt_next/bloks/config.py,sha256=YMQChT4SCdc_vvvbkAj_qGyA--6JVEHds7MalqUp3lw,1269
21
21
  arkitekt_next/bloks/elektro.py,sha256=7UlSZ6EjwCV3SEN7Wn0En2pDZwZcLF_wa5nQvZmKvGI,1288
22
22
  arkitekt_next/bloks/fluss.py,sha256=8nf5Z2k-tA3CNRQeIqh7-aaFe5my_NN2lAhbyYbwKEs,1074
23
- arkitekt_next/bloks/gateway.py,sha256=8eQxIk7hlrmSlsOocqV0mGHVyRYCR6zdinPav4jxm-o,6431
24
- arkitekt_next/bloks/internal_docker.py,sha256=4onnegXts8zOaXEgg4kw8zaqlACRNwvdknJeFHipGtQ,2829
23
+ arkitekt_next/bloks/gateway.py,sha256=mtUTbBUnuPpCzVicKmOKaU1bZjjatJ7K8JrLMER-tls,6119
24
+ arkitekt_next/bloks/internal_docker.py,sha256=pugf1Ng6ssUPlDJq9cGHAWBJJq7Q9rI_lWQxlrsl4WU,2739
25
25
  arkitekt_next/bloks/kabinet.py,sha256=NKP6tpr8XcVvvFifX-lxgBPkP0P810kJ4URv25jf2z8,1489
26
26
  arkitekt_next/bloks/kraph.py,sha256=vbDkLNC5X644pwM_rpUpTNl4uwGpswFm0iNsyMPWY6c,1292
27
- arkitekt_next/bloks/l.py,sha256=37pyi0K6sW2cYurLBH1-lfPLkV0ahfbe9CTsEEXgjvA,4546
28
- arkitekt_next/bloks/livekit.py,sha256=HmAkmHgriGLhjOAlmX1g2v6Saal3eME6kooeferih6U,2653
29
- arkitekt_next/bloks/lok.py,sha256=LL5yoFwIXO4INGKHEha5k2VmkWyHgQIHmy1roDxEae0,11500
30
- arkitekt_next/bloks/lovekit.py,sha256=7_6eL7UiV1QCi8-3tsySmL8N1iOO50LED_BRyoJwYY0,6823
27
+ arkitekt_next/bloks/livekit.py,sha256=fNTJ_w5UnmY6EwyzdRgo8e7ezq_zsy7og20jJctBEsE,2511
28
+ arkitekt_next/bloks/lok.py,sha256=FnOYVuIhK5B8U1NDAineRsRGTsKjFfCtx9Bdn9r-vHg,13530
29
+ arkitekt_next/bloks/lovekit.py,sha256=zKDYgLbzN-WKVGcTyP1_xqWUKaygC823EOtjSITSuME,6969
31
30
  arkitekt_next/bloks/mikro.py,sha256=bnI9lWd6FXyOViog0Xko3_yhKOt7AAdB_PA4N0XkXAU,1291
32
- arkitekt_next/bloks/minio.py,sha256=gVFVoq5Po7yWO-CeTxQQecK4b3bBr_vdnEodF991WR4,5595
31
+ arkitekt_next/bloks/minio.py,sha256=oH8cKemO41EEk-7vofC-23Ytho1P-4CnM10Snzicdhs,5643
33
32
  arkitekt_next/bloks/mount.py,sha256=IEod6LDuV5NNKvvRJ3Xgo8l2caVZnNmJYDgGGBUB3Cg,1088
34
33
  arkitekt_next/bloks/namegen.py,sha256=W9xco2d3eJLdL2NYpTFmqw2d4s3vCpBREIFNm38gMYY,1087
35
- arkitekt_next/bloks/ollama.py,sha256=UtJ-ghtkDb-wHbQt2h6I1-xZHUSVT3Kv6FRjJB4BBT0,2679
34
+ arkitekt_next/bloks/ollama.py,sha256=_aEVbzEEW7hXo_sk-Xz2vd7sIvnsO8zicFi3l92MfoI,2543
36
35
  arkitekt_next/bloks/orkestrator.py,sha256=pjLvcvQ11XF94BORi8uaGMGMBvLu4BiE-WnCi59MH6k,3537
37
- arkitekt_next/bloks/postgres.py,sha256=UbQnbedEUf_VKAfavz1sCGvAa-ZweDwrUeEj76lo_L8,4276
36
+ arkitekt_next/bloks/postgres.py,sha256=-H941jU5FDgZoNKf2LHAjoLUiemYAIJ2_zHwZKY8sJ8,4211
38
37
  arkitekt_next/bloks/redis.py,sha256=A9scMZohACsk-k1LQZo-rTFTB_eq12dqL4zVZkKdKLQ,2274
39
38
  arkitekt_next/bloks/rekuest.py,sha256=mfBjFKNGDMd9t1Wqkxeu2ZxAvYyMpAvHRS30PdchYCQ,1056
40
39
  arkitekt_next/bloks/secret.py,sha256=06J9f6-o1NCE0ReakVOyA0KbmQ-xr2fCYQWKOc_z1QQ,1067
@@ -47,9 +46,9 @@ arkitekt_next/bloks/services/certer.py,sha256=5KuWf6h7-8t2M3yvNJUfatR3J40Rnb7sIh
47
46
  arkitekt_next/bloks/services/channel.py,sha256=OQm_qI748o60V2wbFz3kuCO8rQoIAqqYbfohor-ziOQ,269
48
47
  arkitekt_next/bloks/services/config.py,sha256=E0X-AweMxbbVQihqPuUEUzt9Y5J2DKY5sFX2efORtS0,378
49
48
  arkitekt_next/bloks/services/db.py,sha256=Lc8uL8xibz99-16YPxtB_ls6CP3dN_jCaOzJ9uZ8b_0,588
50
- arkitekt_next/bloks/services/gateway.py,sha256=X7ghhLXZ9hDQIMXMTkfBMcS9o9oc16y0C-b_3r3uwCo,847
49
+ arkitekt_next/bloks/services/gateway.py,sha256=pVO23e-4Q0fByYfM27UK7e9cK5xSBlt-n4qbdxMsXSs,1228
51
50
  arkitekt_next/bloks/services/livekit.py,sha256=Z8iwVgpJhyJOqb6y5lGR0kFReU5RDFAtC6-aH02gckY,428
52
- arkitekt_next/bloks/services/lok.py,sha256=fzOGum0VmcVaONUhTv4jHYky4WrFq2ygDAYJjBv2vAI,500
51
+ arkitekt_next/bloks/services/lok.py,sha256=v-T9J-_XU2z_5JXUUy8zJGo-FBcSv-08raJBmw_vsmo,621
53
52
  arkitekt_next/bloks/services/mount.py,sha256=UAp7IzUNGYtqrh8ACAVgRtc5jYVGvzsKjKdegBdK_i0,273
54
53
  arkitekt_next/bloks/services/name.py,sha256=ysr7b8Hn9yIeuBlqv9Zz-ngWKdQtwl3V1I1TeDvhLlA,254
55
54
  arkitekt_next/bloks/services/ollama.py,sha256=ZQ963XvQeFufTL1NEWkf7Wn6QLRWjIXutmKsU8Xdmbc,507
@@ -139,8 +138,8 @@ arkitekt_next/qt/assets/light/green pulse.gif,sha256=cUd2F3Qlvjb7SnsU-LjGgeLTa8K
139
138
  arkitekt_next/qt/assets/light/orange pulse.gif,sha256=0gDvrRed0mzZZPHB4tP6vptx7myUCAa_hEVGdjRhNy8,94769
140
139
  arkitekt_next/qt/assets/light/pink pulse.gif,sha256=rxd6ZTHSIG9JZuuHhi3jiSB_JYFBZpy7OWUeZETlhQ4,107513
141
140
  arkitekt_next/qt/assets/light/red pulse.gif,sha256=U7WLbZvSl5e-Ob5RmawtlC0Rh9VVHxkjDbGjj7NYVUo,108749
142
- arkitekt_next-0.14.1.dist-info/METADATA,sha256=hh6ll8JfjDAgpdOOV6SHnh_YJjHtCwBxtjK_7l0i40Q,5742
143
- arkitekt_next-0.14.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
144
- arkitekt_next-0.14.1.dist-info/entry_points.txt,sha256=IY-mUEDBU6QncqnYw-Ufw5bvNNXjqSlLf1uexZZCJhc,61
145
- arkitekt_next-0.14.1.dist-info/licenses/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
146
- arkitekt_next-0.14.1.dist-info/RECORD,,
141
+ arkitekt_next-0.16.0.dist-info/METADATA,sha256=psuhwjuUadZxqMOaU7atiWG4Sio4RPrpe4xDpGRE4ns,5744
142
+ arkitekt_next-0.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
143
+ arkitekt_next-0.16.0.dist-info/entry_points.txt,sha256=IY-mUEDBU6QncqnYw-Ufw5bvNNXjqSlLf1uexZZCJhc,61
144
+ arkitekt_next-0.16.0.dist-info/licenses/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
145
+ arkitekt_next-0.16.0.dist-info/RECORD,,
arkitekt_next/bloks/l.py DELETED
@@ -1,136 +0,0 @@
1
- from dataclasses import asdict
2
- from typing import Dict, Any
3
- import secrets
4
-
5
-
6
- from arkitekt_next.bloks.services.admin import AdminService
7
- from arkitekt_next.bloks.services.channel import ChannelService
8
- from arkitekt_next.bloks.services.config import ConfigService
9
- from arkitekt_next.bloks.services.db import DBService
10
- from arkitekt_next.bloks.services.gateway import GatewayService
11
- from arkitekt_next.bloks.services.lok import LokService
12
- from arkitekt_next.bloks.services.mount import MountService
13
- from arkitekt_next.bloks.services.ollama import OllamaService
14
- from arkitekt_next.bloks.services.redis import RedisService
15
- from arkitekt_next.bloks.services.s3 import S3Service
16
- from arkitekt_next.bloks.services.secret import SecretService
17
- from blok import blok, InitContext, ExecutionContext, Option
18
- from blok.bloks.services.dns import DnsService
19
- from blok.tree import Repo, YamlFile
20
- from arkitekt_next.bloks.base import BaseArkitektService
21
-
22
-
23
- @blok("live.arkitekt.alpaka", description="a container and app management service")
24
- class AlpakaBlok(BaseArkitektService):
25
- def get_builder(self):
26
- return "arkitekt.generic"
27
-
28
- def __init__(self) -> None:
29
- self.dev = False
30
- self.host = "alpaka"
31
- self.command = "bash run-debug.sh"
32
- self.repo = "https://github.com/arkitektio/alpaka-server"
33
- self.scopes = {
34
- "alpaka_pull": "Pull new Models",
35
- "alpaka_chat": "Add repositories to the database",
36
- }
37
- self.mount_repo = False
38
- self.build_repo = False
39
- self.buckets = ["media"]
40
- self.secret_key = secrets.token_hex(16)
41
- self.image = "jhnnsrs/alpaka:nightly"
42
-
43
- def preflight(
44
- self,
45
- lok: LokService,
46
- db: DBService,
47
- redis: RedisService,
48
- s3: S3Service,
49
- config: ConfigService,
50
- ollama: OllamaService,
51
- mount: MountService,
52
- admin: AdminService,
53
- secret: SecretService,
54
- gateway: GatewayService,
55
- mount_repo: bool = False,
56
- host: str = "",
57
- image: str = "",
58
- secret_key: str = "",
59
- build_repo: bool = False,
60
- command: str = "",
61
- repo: str = "",
62
- disable: bool = False,
63
- dev: bool = False,
64
- ):
65
- lok.register_scopes(self.scopes)
66
-
67
- path_name = self.host
68
-
69
- gateway.expose(path_name, 80, self.host)
70
-
71
- postgress_access = db.register_db(self.host)
72
- redis_access = redis.register()
73
- lok_access = lok.retrieve_credentials()
74
- admin_access = admin.retrieve()
75
- minio_access = s3.create_buckets(self.buckets)
76
- lok_labels = lok.retrieve_labels("live.arkitekt.alpaka", self.get_builder())
77
- ollama_access = ollama.get_access()
78
-
79
- django_secret = secret.retrieve_secret()
80
-
81
- csrf_trusted_origins = []
82
-
83
- configuration = YamlFile(
84
- **{
85
- "db": asdict(postgress_access),
86
- "django": {
87
- "admin": asdict(admin_access),
88
- "debug": True,
89
- "hosts": ["*"],
90
- "secret_key": django_secret,
91
- },
92
- "redis": asdict(redis_access),
93
- "lok": asdict(lok_access),
94
- "s3": asdict(minio_access),
95
- "scopes": self.scopes,
96
- "force_script_name": path_name,
97
- "csrf_trusted_origins": csrf_trusted_origins,
98
- **self.get_additional_config(),
99
- }
100
- )
101
-
102
- config_mount = config.register_config(f"{self.host}.yaml", configuration)
103
-
104
- depends_on = []
105
-
106
- if redis_access.dependency:
107
- depends_on.append(redis_access.dependency)
108
-
109
- if postgress_access.dependency:
110
- depends_on.append(postgress_access.dependency)
111
-
112
- if minio_access.dependency:
113
- depends_on.append(minio_access.dependency)
114
-
115
- if ollama_access.dependency:
116
- depends_on.append(ollama_access.dependency)
117
-
118
- service = {
119
- "labels": lok_labels,
120
- "volumes": [f"{config_mount}:/workspace/config.yaml"],
121
- "depends_on": depends_on,
122
- }
123
-
124
- if mount_repo or dev:
125
- mount = mount.register_mount(self.host, Repo(repo))
126
- service["volumes"].extend([f"{mount}:/workspace"])
127
-
128
- if build_repo or dev:
129
- mount = mount.register_mount(self.host, Repo(repo))
130
- service["build"] = mount
131
- else:
132
- service["image"] = image
133
-
134
- service["command"] = command
135
-
136
- self.service = service