arkitekt-next 0.7.43__tar.gz → 0.7.45__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arkitekt-next might be problematic. Click here for more details.

Files changed (144) hide show
  1. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/PKG-INFO +1 -1
  2. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/fluss.py +4 -38
  3. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/funcs.py +56 -3
  4. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/gateway.py +12 -3
  5. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/internal_docker.py +6 -4
  6. arkitekt_next-0.7.45/arkitekt_next/bloks/kabinet.py +61 -0
  7. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/lok.py +16 -45
  8. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/mikro.py +4 -38
  9. arkitekt_next-0.7.45/arkitekt_next/bloks/orkestrator.py +55 -0
  10. arkitekt_next-0.7.45/arkitekt_next/bloks/rekuest.py +53 -0
  11. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/gateway.py +2 -0
  12. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/tailscale.py +42 -20
  13. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/pyproject.toml +1 -1
  14. arkitekt_next-0.7.43/arkitekt_next/bloks/kabinet.py +0 -93
  15. arkitekt_next-0.7.43/arkitekt_next/bloks/rekuest.py +0 -95
  16. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/LICENSE +0 -0
  17. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/README.md +0 -0
  18. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/__blok__.py +0 -0
  19. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/__init__.py +0 -0
  20. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/__init__.py +0 -0
  21. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/easy.py +0 -0
  22. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/next.py +0 -0
  23. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/qt.py +0 -0
  24. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/__init__.py +0 -0
  25. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/fakts.py +0 -0
  26. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/fakts_next.py +0 -0
  27. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/fakts_qt.py +0 -0
  28. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/grant_registry.py +0 -0
  29. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/herre.py +0 -0
  30. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/service/herre_qt.py +0 -0
  31. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/apps/types.py +0 -0
  32. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/__init__.py +0 -0
  33. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/admin.py +0 -0
  34. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/arkitekt.py +0 -0
  35. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/config.py +0 -0
  36. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/livekit.py +0 -0
  37. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/minio.py +0 -0
  38. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/mount.py +0 -0
  39. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/namegen.py +0 -0
  40. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/postgres.py +0 -0
  41. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/redis.py +0 -0
  42. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/secret.py +0 -0
  43. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/__init__.py +0 -0
  44. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/admin.py +0 -0
  45. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/config.py +0 -0
  46. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/db.py +0 -0
  47. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/livekit.py +0 -0
  48. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/lok.py +0 -0
  49. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/mount.py +0 -0
  50. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/name.py +0 -0
  51. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/redis.py +0 -0
  52. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/s3.py +0 -0
  53. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/secret.py +0 -0
  54. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/services/socket.py +0 -0
  55. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/bloks/socket.py +0 -0
  56. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/builders.py +0 -0
  57. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/__init__.py +0 -0
  58. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/call/__init__.py +0 -0
  59. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/call/local.py +0 -0
  60. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/call/main.py +0 -0
  61. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/call/remote.py +0 -0
  62. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/gen/__init__.py +0 -0
  63. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/gen/compile.py +0 -0
  64. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/gen/init.py +0 -0
  65. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/gen/main.py +0 -0
  66. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/gen/watch.py +0 -0
  67. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/init/__init__.py +0 -0
  68. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/init/main.py +0 -0
  69. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/inspect/__init__.py +0 -0
  70. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/inspect/main.py +0 -0
  71. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/inspect/requirements.py +0 -0
  72. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/inspect/templates.py +0 -0
  73. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/inspect/variables.py +0 -0
  74. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/__init__.py +0 -0
  75. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/build.py +0 -0
  76. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/init.py +0 -0
  77. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/main.py +0 -0
  78. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/publish.py +0 -0
  79. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/stage.py +0 -0
  80. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/utils.py +0 -0
  81. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/validate.py +0 -0
  82. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/kabinet/wizard.py +0 -0
  83. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/manifest/__init__.py +0 -0
  84. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/manifest/inspect.py +0 -0
  85. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/manifest/main.py +0 -0
  86. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/manifest/scopes.py +0 -0
  87. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/manifest/version.py +0 -0
  88. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/manifest/wizard.py +0 -0
  89. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/run/__init__.py +0 -0
  90. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/run/dev.py +0 -0
  91. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/run/main.py +0 -0
  92. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/run/prod.py +0 -0
  93. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/commands/run/utils.py +0 -0
  94. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/configs/base.yaml +0 -0
  95. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/constants.py +0 -0
  96. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +0 -0
  97. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/errors.py +0 -0
  98. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/inspect.py +0 -0
  99. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/io.py +0 -0
  100. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/main.py +0 -0
  101. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/options.py +0 -0
  102. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/fluss.schema.graphql +0 -0
  103. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/gucker.schema.graphql +0 -0
  104. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/kabinet.schema.graphql +0 -0
  105. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/kluster.schema.graphql +0 -0
  106. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/konviktion.schema.graphql +0 -0
  107. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/kuay.schema.graphql +0 -0
  108. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/mikro.schema.graphql +0 -0
  109. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/mikro_next.schema.graphql +0 -0
  110. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/napari.schema.graphql +0 -0
  111. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/omero_ark.schema.graphql +0 -0
  112. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/port.schema.graphql +0 -0
  113. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/rekuest.schema.graphql +0 -0
  114. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +0 -0
  115. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/schemas/unlok.schema.graphql +0 -0
  116. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/templates/filter.py +0 -0
  117. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/templates/simple.py +0 -0
  118. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/texts.py +0 -0
  119. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/types.py +0 -0
  120. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/ui.py +0 -0
  121. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/utils.py +0 -0
  122. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/validators.py +0 -0
  123. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/vars.py +0 -0
  124. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/cli/versions/v1.yaml +0 -0
  125. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/constants.py +0 -0
  126. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/model.py +0 -0
  127. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/__init__.py +0 -0
  128. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/dark/gear.png +0 -0
  129. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
  130. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
  131. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
  132. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
  133. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/light/gear.png +0 -0
  134. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
  135. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
  136. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
  137. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
  138. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/builders.py +0 -0
  139. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/magic_bar.py +0 -0
  140. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/types.py +0 -0
  141. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/qt/utils.py +0 -0
  142. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/service_registry.py +0 -0
  143. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/tqdm.py +0 -0
  144. {arkitekt_next-0.7.43 → arkitekt_next-0.7.45}/arkitekt_next/utils.py +0 -0
@@ -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
@@ -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
  }
@@ -0,0 +1,61 @@
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.kabinet")
14
+ class KabinetBlok:
15
+ def __init__(self) -> None:
16
+ self.dev = False
17
+ self.host = "kabinet"
18
+ self.command = "bash run-debug.sh"
19
+ self.repo = "https://github.com/arkitektio/kabinet-server"
20
+ self.scopes = {
21
+ "kabinet_deploy": "Deploy containers",
22
+ "kabinet_add_repo": "Add repositories to the database",
23
+ }
24
+ self.mount_repo = False
25
+ self.build_repo = False
26
+ self.buckets = ["media"]
27
+ self.secret_key = secrets.token_hex(16)
28
+ self.ensured_repos = ["jhnnsrs/ome:main", "jhnnsrs/renderer:main"]
29
+ self.image = "jhnnsrs/kabinet:next"
30
+
31
+ def get_builder(self):
32
+ return "arkitekt.generic"
33
+
34
+ def get_dependencies(self):
35
+ return create_default_service_dependencies()
36
+
37
+ def preflight(self, init: InitContext):
38
+ for key, value in init.kwargs.items():
39
+ setattr(self, key, value)
40
+
41
+ self.service = create_default_service_yaml(
42
+ init, self, {"ensured_repos": self.ensured_repos}
43
+ )
44
+
45
+ self.initialized = True
46
+
47
+ def build(self, context: ExecutionContext):
48
+ context.docker_compose.set_nested("services", self.host, self.service)
49
+
50
+ def get_options(self):
51
+ def_options = build_default_service_options(self)
52
+ with_repos = Option(
53
+ subcommand="repos",
54
+ help="The default repos to enable for the service",
55
+ default=self.secret_key,
56
+ )
57
+
58
+ return [
59
+ *def_options,
60
+ with_repos,
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
+ ]
@@ -0,0 +1,53 @@
1
+ from typing import Dict, Any
2
+ import secrets
3
+
4
+ from arkitekt_next.bloks.funcs import (
5
+ build_default_service_options,
6
+ create_default_service_dependencies,
7
+ create_default_service_yaml,
8
+ )
9
+ from blok import blok, InitContext, ExecutionContext, Option
10
+ from blok.tree import Repo, YamlFile
11
+
12
+
13
+ @blok("live.arkitekt.rekuest")
14
+ class RekuestBlok:
15
+ def __init__(self) -> None:
16
+ self.dev = False
17
+ self.host = "rekuest"
18
+ self.command = "bash run-debug.sh"
19
+ self.repo = "https://github.com/jhnnsrs/rekuest-server-next"
20
+ self.scopes = {
21
+ "rekuest_agent": "Act as an agent",
22
+ "rekuest_call": "Call other apps with rekuest",
23
+ }
24
+ self.mount_repo = False
25
+ self.build_repo = False
26
+ self.buckets = ["media"]
27
+ self.secret_key = secrets.token_hex(16)
28
+ self.ensured_repos = []
29
+ self.image = "jhnnsrs/rekuest:next"
30
+
31
+ def get_dependencies(self):
32
+ return create_default_service_dependencies()
33
+
34
+ def get_builder(self):
35
+ return "arkitekt.rekuest"
36
+
37
+ def preflight(self, init: InitContext):
38
+ for key, value in init.kwargs.items():
39
+ setattr(self, key, value)
40
+
41
+ self.service = create_default_service_yaml(init, self)
42
+
43
+ self.initialized = True
44
+
45
+ def build(self, context: ExecutionContext):
46
+ context.docker_compose.set_nested("services", self.host, self.service)
47
+
48
+ def get_options(self):
49
+ def_options = build_default_service_options(self)
50
+
51
+ return [
52
+ *def_options,
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): ...