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

@@ -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
- with_repo = Option(
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
- with_repo,
80
- mount_repo,
81
- build_repo,
82
- with_host,
83
- with_command,
84
- with_secret_key,
50
+ *def_options,
85
51
  ]
@@ -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 (
@@ -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,12 +50,61 @@ 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,
103
+ additional_keys: dict[str, Any] = None,
53
104
  ) -> YamlFile:
54
105
  check_protocol_compliance(self, DefaultService)
55
106
  deps = init.dependencies
107
+ additional_keys = additional_keys or {}
56
108
 
57
109
  init.get_service(LokService).register_scopes(self.scopes)
58
110
 
@@ -91,6 +143,7 @@ def create_default_service_yaml(
91
143
  "scopes": self.scopes,
92
144
  "force_script_name": path_name,
93
145
  "csrf_trusted_origins": csrf_trusted_origins,
146
+ **additional_keys,
94
147
  }
95
148
  )
96
149
 
@@ -115,13 +168,13 @@ def create_default_service_yaml(
115
168
  "depends_on": depends_on,
116
169
  }
117
170
 
118
- if self.mount_repo:
171
+ if self.mount_repo or self.dev:
119
172
  mount = init.get_service(MountService).register_mount(
120
173
  self.host, Repo(self.repo)
121
174
  )
122
175
  service["volumes"].extend([f"{mount}:/workspace"])
123
176
 
124
- if self.build_repo:
177
+ if self.build_repo or self.dev:
125
178
  mount = init.get_service(MountService).register_mount(
126
179
  self.host, Repo(self.repo)
127
180
  )
@@ -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 preflight(self, init: InitContext, dns: DnsService):
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": ["gateway", "default"],
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("networks", "gateway", {"driver": "bridge"})
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.2-vanilla"
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": "gateway",
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": 3,
66
- "window": "120s",
67
+ "max_attempts": 10,
68
+ "window": "300s",
67
69
  },
68
70
  },
69
71
  }
@@ -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/jhnnsrs/kabinet-server"
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",
@@ -23,7 +25,7 @@ class KabinetBlok:
23
25
  self.build_repo = False
24
26
  self.buckets = ["media"]
25
27
  self.secret_key = secrets.token_hex(16)
26
- self.ensured_repos = []
28
+ self.ensured_repos = ["jhnnsrs/ome:main", "jhnnsrs/renderer:main"]
27
29
  self.image = "jhnnsrs/kabinet:next"
28
30
 
29
31
  def get_builder(self):
@@ -36,7 +38,9 @@ class KabinetBlok:
36
38
  for key, value in init.kwargs.items():
37
39
  setattr(self, key, value)
38
40
 
39
- self.service = create_default_service_yaml(init, self)
41
+ self.service = create_default_service_yaml(
42
+ init, self, {"ensured_repos": self.ensured_repos}
43
+ )
40
44
 
41
45
  self.initialized = True
42
46
 
@@ -44,38 +48,7 @@ class KabinetBlok:
44
48
  context.docker_compose.set_nested("services", self.host, self.service)
45
49
 
46
50
  def get_options(self):
47
- with_repo = Option(
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
- default=self.repo,
51
- )
52
- with_command = Option(
53
- subcommand="command",
54
- help="Which command should be run when starting the service",
55
- default=self.command,
56
- )
57
- mount_repo = Option(
58
- subcommand="mount_repo",
59
- help="Should we mount the repo into the container?",
60
- type=bool,
61
- default=self.mount_repo,
62
- )
63
- build_repo = Option(
64
- subcommand="build_repo",
65
- help="Should we build the container from the repo?",
66
- type=bool,
67
- default=self.build_repo,
68
- )
69
- with_host = Option(
70
- subcommand="host",
71
- help="How should the service be named inside the docker-compose file?",
72
- default=self.host,
73
- )
74
- with_secret_key = Option(
75
- subcommand="secret_key",
76
- help="The secret key to use for the django service",
77
- default=self.secret_key,
78
- )
51
+ def_options = build_default_service_options(self)
79
52
  with_repos = Option(
80
53
  subcommand="repos",
81
54
  help="The default repos to enable for the service",
@@ -83,11 +56,6 @@ class KabinetBlok:
83
56
  )
84
57
 
85
58
  return [
86
- with_repo,
87
- mount_repo,
88
- build_repo,
89
- with_host,
90
- with_command,
91
- with_secret_key,
59
+ *def_options,
92
60
  with_repos,
93
61
  ]
@@ -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:/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
 
@@ -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
- with_repo = Option(
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
- with_repo,
94
- mount_repo,
95
- build_repo,
96
- with_host,
97
- with_command,
98
- with_secret_key,
64
+ *def_options,
99
65
  ]
@@ -0,0 +1,55 @@
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 blok import blok, InitContext, ExecutionContext, Option
10
+ from blok.tree import Repo, YamlFile
11
+
12
+
13
+ @blok("live.arkitekt.orkestrator")
14
+ class OrkestratorBlok:
15
+ def __init__(self) -> None:
16
+ self.dev = False
17
+ self.repo = "https://github.com/arkitektio/orkestrator-next"
18
+ self.scopes = {
19
+ "kabinet_deploy": "Deploy containers",
20
+ "kabinet_add_repo": "Add repositories to the database",
21
+ }
22
+ self.build_command = "yarn"
23
+ self.up_command = "yarn start"
24
+
25
+ def get_builder(self):
26
+ return "arkitekt.generic"
27
+
28
+ def get_dependencies(self):
29
+ return create_default_service_dependencies()
30
+
31
+ def preflight(self, init: InitContext):
32
+ for key, value in init.kwargs.items():
33
+ setattr(self, key, value)
34
+
35
+ self.service = create_default_service_yaml(
36
+ init, self, {"ensured_repos": self.ensured_repos}
37
+ )
38
+
39
+ self.initialized = True
40
+
41
+ def build(self, context: ExecutionContext):
42
+ context.docker_compose.set_nested("services", self.host, self.service)
43
+
44
+ def get_options(self):
45
+ def_options = build_default_service_options(self)
46
+ with_repos = Option(
47
+ subcommand="repos",
48
+ help="The default repos to enable for the service",
49
+ default=self.secret_key,
50
+ )
51
+
52
+ return [
53
+ *def_options,
54
+ with_repos,
55
+ ]
@@ -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-server_next"
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
- with_repo = Option(
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
- with_repo,
89
- mount_repo,
90
- build_repo,
91
- with_host,
92
- with_command,
93
- with_secret_key,
94
- with_repos,
52
+ *def_options,
95
53
  ]
@@ -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): ...
@@ -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(self, gateway: GatewayService, mount_service: MountService, dns: DnsService, net_name: str, auth_key: str, host_name: str):
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" # Persist the tailscale state directory
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
- f"TS_HOSTNAME={self.host_name}",
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 [Option(
56
- subcommand="net_name",
57
- help="The name of your tailnet",
58
- type=str,
59
- ), Option(
60
- subcommand="auth_key",
61
- help="The auth_key of your tailnet",
62
- type=str,
63
- ),Option(
64
- subcommand="host_name",
65
- help="The hostname of your tailnet",
66
- default=self.name,
67
- type=str,
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.7.43
3
+ Version: 0.7.45
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -16,26 +16,27 @@ arkitekt_next/bloks/__init__.py,sha256=gXny6-WJ3alV1__xveI_0wcvgDuglR1WB7v7-8h1O
16
16
  arkitekt_next/bloks/admin.py,sha256=MlUQUYCHxCWtSD75mVHgs3DcDa0s8_D6_AIBslnYjZw,1300
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
- arkitekt_next/bloks/fluss.py,sha256=07l8mdS35JyuEthv4xH9qpCCNepMkJGm02PxEakQBD0,2671
20
- arkitekt_next/bloks/funcs.py,sha256=z1b58hENZfTfXYEqg_pP_2hm3ogDyu9_Ek8wk1P5XkA,3633
21
- arkitekt_next/bloks/gateway.py,sha256=D3qP2LuMVQ8gQgR33stSXnk_BxJprrDh9gfgiteblT4,6369
22
- arkitekt_next/bloks/internal_docker.py,sha256=ETxPA0i_Wc0DTEfy7t49LOI6tU6RP5tkOnVFEBsCgP0,2812
23
- arkitekt_next/bloks/kabinet.py,sha256=RMetXRKFRO9z_eGPXyzGCHTo9HJlcPaew2lfCltGoMg,2937
19
+ arkitekt_next/bloks/fluss.py,sha256=5-luL5EeCb2DE9aRcjUTxjz5fu2EwgIoBWGGmdlypkc,1487
20
+ arkitekt_next/bloks/funcs.py,sha256=IdiMNUkQN5frHpgsiXJJfJib1lFhUEVwGYjJugpSlds,5350
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=jJKLG2VCsnXk7ZVbtqtHiFbz3ezXJeoTxy8itScu64c,1860
24
24
  arkitekt_next/bloks/livekit.py,sha256=yhre3PkIQwKGdGPFC-DhTID3rIbRQMts_UsAX9tw6-A,2561
25
- arkitekt_next/bloks/lok.py,sha256=MGXKg1NRvydA-wlncBQJwO2GfaQLl2shVo0g45r9J_8,12532
26
- arkitekt_next/bloks/mikro.py,sha256=vNM9K7I3AK2G0WooaMQl7U8-_TN96P2YUfblqAMsvdI,2772
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=hQZzD1Cuxi2BoU4PNfLNJ0yj5VS1QVRLtSSZP5gXRm0,1608
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=OgX_OeVeGVK-pSL3S8cocUWsYX929Yv5o9NuEvkwJr0,2975
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
36
37
  arkitekt_next/bloks/services/config.py,sha256=BLtbKXRRWmuZxvaaksuxt9EiDcazYwKL_IUIRhXBin8,393
37
38
  arkitekt_next/bloks/services/db.py,sha256=jMO751KJYjNmvHD0tOTWgkkemwTXc6mLHAge_i68JSA,600
38
- arkitekt_next/bloks/services/gateway.py,sha256=9dDv2aWCErkZ9JreqHdKax63_Imbc2EnWhpeScLnI7Q,799
39
+ arkitekt_next/bloks/services/gateway.py,sha256=8gxbVi7DP1pXv6d7Lm4sA8sKptIWeNIVtQHWa1M-YUk,844
39
40
  arkitekt_next/bloks/services/livekit.py,sha256=5u-GThgKsgXiiobEL4arm3JJOgNTZae15Q-75i-4D8g,366
40
41
  arkitekt_next/bloks/services/lok.py,sha256=fzOGum0VmcVaONUhTv4jHYky4WrFq2ygDAYJjBv2vAI,500
41
42
  arkitekt_next/bloks/services/mount.py,sha256=MDlwHl5cTfBO8IgkofuFjQBbfIMKDm_R9suWkiyVG48,289
@@ -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=YXsiIxjqJV5WeQTO81yIa2Ajj40K-95X0cxH46Sq66c,2356
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.43.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
139
- arkitekt_next-0.7.43.dist-info/METADATA,sha256=pTmq2hp1u2N5nkyC85ToBuYTS7YzKCJHEFNeY0XgkAI,5973
140
- arkitekt_next-0.7.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
141
- arkitekt_next-0.7.43.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
142
- arkitekt_next-0.7.43.dist-info/RECORD,,
139
+ arkitekt_next-0.7.45.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
140
+ arkitekt_next-0.7.45.dist-info/METADATA,sha256=gOWTppmwasS-a0vx2viZI58bQ10DNDnpRiAZzvLCj2c,5973
141
+ arkitekt_next-0.7.45.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
142
+ arkitekt_next-0.7.45.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
143
+ arkitekt_next-0.7.45.dist-info/RECORD,,