arkitekt-next 0.15.0__py3-none-any.whl → 0.17.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.

Files changed (58) hide show
  1. arkitekt_next/app/fakts.py +27 -1
  2. arkitekt_next/cli/commands/call/local.py +1 -1
  3. arkitekt_next/cli/commands/call/main.py +14 -7
  4. arkitekt_next/cli/templates/filter.py +7 -7
  5. arkitekt_next/cli/templates/simple.py +4 -1
  6. arkitekt_next/py.typed +0 -0
  7. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/METADATA +3 -3
  8. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/RECORD +11 -57
  9. arkitekt_next/__blok__.py +0 -58
  10. arkitekt_next/bloks/__init__.py +0 -1
  11. arkitekt_next/bloks/admin.py +0 -43
  12. arkitekt_next/bloks/alpaka.py +0 -136
  13. arkitekt_next/bloks/arkitekt.py +0 -55
  14. arkitekt_next/bloks/base.py +0 -215
  15. arkitekt_next/bloks/channel.py +0 -27
  16. arkitekt_next/bloks/config.py +0 -43
  17. arkitekt_next/bloks/elektro.py +0 -42
  18. arkitekt_next/bloks/fluss.py +0 -33
  19. arkitekt_next/bloks/gateway.py +0 -230
  20. arkitekt_next/bloks/internal_docker.py +0 -95
  21. arkitekt_next/bloks/kabinet.py +0 -46
  22. arkitekt_next/bloks/kraph.py +0 -45
  23. arkitekt_next/bloks/l.py +0 -136
  24. arkitekt_next/bloks/livekit.py +0 -89
  25. arkitekt_next/bloks/lok.py +0 -354
  26. arkitekt_next/bloks/lovekit.py +0 -199
  27. arkitekt_next/bloks/mikro.py +0 -42
  28. arkitekt_next/bloks/minio.py +0 -176
  29. arkitekt_next/bloks/mount.py +0 -34
  30. arkitekt_next/bloks/namegen.py +0 -34
  31. arkitekt_next/bloks/ollama.py +0 -94
  32. arkitekt_next/bloks/orkestrator.py +0 -122
  33. arkitekt_next/bloks/postgres.py +0 -136
  34. arkitekt_next/bloks/redis.py +0 -79
  35. arkitekt_next/bloks/rekuest.py +0 -30
  36. arkitekt_next/bloks/secret.py +0 -32
  37. arkitekt_next/bloks/self_signed.py +0 -91
  38. arkitekt_next/bloks/services/__init__.py +0 -27
  39. arkitekt_next/bloks/services/admin.py +0 -21
  40. arkitekt_next/bloks/services/certer.py +0 -14
  41. arkitekt_next/bloks/services/channel.py +0 -12
  42. arkitekt_next/bloks/services/config.py +0 -13
  43. arkitekt_next/bloks/services/db.py +0 -23
  44. arkitekt_next/bloks/services/gateway.py +0 -29
  45. arkitekt_next/bloks/services/livekit.py +0 -20
  46. arkitekt_next/bloks/services/lok.py +0 -20
  47. arkitekt_next/bloks/services/mount.py +0 -9
  48. arkitekt_next/bloks/services/name.py +0 -11
  49. arkitekt_next/bloks/services/ollama.py +0 -21
  50. arkitekt_next/bloks/services/redis.py +0 -19
  51. arkitekt_next/bloks/services/s3.py +0 -21
  52. arkitekt_next/bloks/services/secret.py +0 -16
  53. arkitekt_next/bloks/services/socket.py +0 -13
  54. arkitekt_next/bloks/socket.py +0 -40
  55. arkitekt_next/bloks/tailscale.py +0 -90
  56. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/WHEEL +0 -0
  57. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/entry_points.txt +0 -0
  58. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,199 +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.livekit import LivekitService
12
- from arkitekt_next.bloks.services.lok import LokService
13
- from arkitekt_next.bloks.services.mount import MountService
14
- from arkitekt_next.bloks.services.ollama import OllamaService
15
- from arkitekt_next.bloks.services.redis import RedisService
16
- from arkitekt_next.bloks.services.s3 import S3Service
17
- from arkitekt_next.bloks.services.secret import SecretService
18
- from blok import blok, InitContext, ExecutionContext, Option
19
- from blok.bloks.services.dns import DnsService
20
- from blok.tree import Repo, YamlFile
21
- from arkitekt_next.bloks.base import BaseArkitektService
22
-
23
-
24
- @blok("live.arkitekt.lovekit", description="Stream live video and audio with Arkitekt")
25
- class LovekitBlok:
26
- def __init__(self) -> None:
27
- self.dev = False
28
- self.host = "lovekit"
29
- self.command = "bash run-debug.sh"
30
- self.repo = "https://github.com/arkitektio/lovekit-server"
31
- self.scopes = {
32
- "alpaka_pull": "Pull new Models",
33
- "alpaka_chat": "Add repositories to the database",
34
- }
35
- self.mount_repo = False
36
- self.build_repo = False
37
- self.buckets = ["media"]
38
- self.secret_key = secrets.token_hex(16)
39
- self.image = "jhnnsrs/lovekit:nightly"
40
-
41
- def preflight(
42
- self,
43
- lok: LokService,
44
- db: DBService,
45
- redis: RedisService,
46
- s3: S3Service,
47
- config: ConfigService,
48
- livekit: LivekitService,
49
- mount: MountService,
50
- admin: AdminService,
51
- secret: SecretService,
52
- gateway: GatewayService,
53
- mount_repo: bool = False,
54
- host: str = "",
55
- image: str = "",
56
- secret_key: str = "",
57
- build_repo: bool = False,
58
- command: str = "",
59
- repo: str = "",
60
- disable: bool = False,
61
- dev: bool = False,
62
- ):
63
- lok.register_scopes(self.scopes)
64
-
65
- path_name = self.host
66
-
67
- gateway.expose(path_name, 80, self.host)
68
-
69
- postgress_access = db.register_db(self.host)
70
- redis_access = redis.register()
71
- lok_access = lok.retrieve_credentials()
72
- admin_access = admin.retrieve()
73
- minio_access = s3.create_buckets(self.buckets)
74
- lok_labels = lok.retrieve_labels("live.arkitekt.alpaka", self.get_builder())
75
-
76
- livekit_access = livekit.get_access()
77
-
78
- django_secret = secret.retrieve_secret()
79
-
80
- csrf_trusted_origins = []
81
-
82
- configuration = YamlFile(
83
- **{
84
- "db": asdict(postgress_access),
85
- "django": {
86
- "admin": asdict(admin_access),
87
- "debug": True,
88
- "hosts": ["*"],
89
- "secret_key": django_secret,
90
- },
91
- "redis": asdict(redis_access),
92
- "lok": asdict(lok_access),
93
- "s3": asdict(minio_access),
94
- "scopes": self.scopes,
95
- "force_script_name": path_name,
96
- "csrf_trusted_origins": csrf_trusted_origins,
97
- "livekit": {
98
- "host": livekit_access.host,
99
- "port": livekit_access.port,
100
- "api_key": livekit_access.api_key,
101
- "api_secret": livekit_access.api_secret,
102
- },
103
- }
104
- )
105
-
106
- config_mount = config.register_config(f"{self.host}.yaml", configuration)
107
-
108
- depends_on = []
109
-
110
- if redis_access.dependency:
111
- depends_on.append(redis_access.dependency)
112
-
113
- if postgress_access.dependency:
114
- depends_on.append(postgress_access.dependency)
115
-
116
- if minio_access.dependency:
117
- depends_on.append(minio_access.dependency)
118
-
119
- service = {
120
- "labels": lok_labels,
121
- "volumes": [f"{config_mount}:/workspace/config.yaml"],
122
- "depends_on": depends_on,
123
- }
124
-
125
- if mount_repo or dev:
126
- mount = mount.register_mount(self.host, Repo(repo))
127
- service["volumes"].extend([f"{mount}:/workspace"])
128
-
129
- if build_repo or dev:
130
- mount = mount.register_mount(self.host, Repo(repo))
131
- service["build"] = mount
132
- else:
133
- service["image"] = image
134
-
135
- service["command"] = command
136
-
137
- self.service = service
138
-
139
- def get_builder(self):
140
- return "arkitekt.generic"
141
-
142
- def build(self, context: ExecutionContext):
143
- context.docker_compose.set_nested("services", self.host, self.service)
144
-
145
- def get_options(self):
146
- return [
147
- Option(
148
- subcommand="dev",
149
- help="Shoud we run the service in development mode (includes withrepo, mountrepo)?",
150
- default=self.dev,
151
- ),
152
- Option(
153
- subcommand="host",
154
- help="The name we should use for the host?",
155
- default=self.host,
156
- ),
157
- Option(
158
- subcommand="disable",
159
- help="Shoud we disable the service?",
160
- default=False,
161
- ),
162
- Option(
163
- subcommand="repo",
164
- help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
165
- default=self.repo,
166
- ),
167
- Option(
168
- subcommand="command",
169
- help="Which command should we use when building the service?",
170
- default=self.command,
171
- ),
172
- Option(
173
- subcommand="mount_repo",
174
- help="Should we mount the repo into the container?",
175
- type=bool,
176
- default=self.mount_repo,
177
- ),
178
- Option(
179
- subcommand="build_repo",
180
- help="Should we build the container from the repo?",
181
- type=bool,
182
- default=self.build_repo,
183
- ),
184
- Option(
185
- subcommand="host",
186
- help="How should the service be named inside the docker-compose file?",
187
- default=self.host,
188
- ),
189
- Option(
190
- subcommand="secret_key",
191
- help="The secret key to use for the django service",
192
- default=self.secret_key,
193
- ),
194
- Option(
195
- subcommand="image",
196
- help="The image to use for the service",
197
- default=self.image,
198
- ),
199
- ]
@@ -1,42 +0,0 @@
1
- import click
2
- from pydantic import BaseModel
3
- from typing import Dict, Any
4
- import yaml
5
- import secrets
6
- from blok import blok, InitContext
7
-
8
- from blok import blok, InitContext, ExecutionContext, Option
9
- from blok.tree import YamlFile, Repo
10
- from arkitekt_next.bloks.base import BaseArkitektService
11
-
12
-
13
- class AccessCredentials(BaseModel):
14
- password: str
15
- username: str
16
- host: str
17
- port: str
18
- db_name: str
19
-
20
-
21
- @blok("live.arkitekt.mikro", description="Mikro is the bio-image database for arkitekt")
22
- class MikroBlok(BaseArkitektService):
23
- def __init__(self) -> None:
24
- self.dev = False
25
- self.host = "mikro"
26
- self.command = "bash run-debug.sh"
27
- self.repo = "https://github.com/arkitektio/mikro-server-next"
28
- self.scopes = {
29
- "mikro_read": "Read image from the database",
30
- "mikro_write": "Write image to the database",
31
- }
32
- self.image = "jhnnsrs/mikro_next:nightly"
33
- self.mount_repo = False
34
- self.build_repo = False
35
- self.buckets = ["media", "zarr", "parquet"]
36
- self.secret_key = secrets.token_hex(16)
37
-
38
- def get_builder(self):
39
- return "arkitekt.generic"
40
-
41
- def build(self, context: ExecutionContext):
42
- context.docker_compose.set_nested("services", self.host, self.service)
@@ -1,176 +0,0 @@
1
- import click
2
-
3
- from arkitekt_next.bloks.services.config import ConfigService
4
- from arkitekt_next.bloks.services.gateway import GatewayService
5
- from arkitekt_next.bloks.services.name import NameService
6
- from arkitekt_next.bloks.services.secret import SecretService
7
- from blok import blok, InitContext, ExecutionContext, Option
8
- from blok.tree import YamlFile, Repo
9
- from pydantic import BaseModel
10
- from typing import Dict, Optional
11
- import secrets
12
- from blok import blok, InitContext
13
- from arkitekt_next.bloks.services.s3 import S3Credentials, S3Service
14
-
15
-
16
- class BucketMapParamType(click.ParamType):
17
- name = "redeem_token"
18
-
19
- def convert(self, value, param, ctx):
20
- if isinstance(value, dict):
21
- return value
22
- try:
23
- user, token = value.split(":")
24
- return {"user": user, "token": token}
25
- except ValueError:
26
- self.fail(
27
- f"RedeemToken '{value}' is not in the correct format. It should be 'username:token'.",
28
- param,
29
- ctx,
30
- )
31
-
32
-
33
- TOKEN = BucketMapParamType()
34
-
35
-
36
- @blok(
37
- S3Service,
38
- description="Minio is an easy use self-hosted object storage service",
39
- )
40
- class MinioBlok:
41
- db_name: str
42
-
43
- def __init__(self) -> None:
44
- self.users = []
45
- self.username = secrets.token_hex(16)
46
- self.password = secrets.token_hex(16)
47
- self.protocol = "http"
48
- self.host = "minio"
49
- self.port = 9000
50
- self.skip = False
51
- self.scopes = {}
52
- self.init_image = "jhnnsrs/init:nightly"
53
- self.minio_image = "minio/minio:RELEASE.2025-02-18T16-25-55Z"
54
- self.buckets = []
55
- self.registered_clients = []
56
- self.preformed_bucket_names = [secrets.token_hex(16) for i in range(100)]
57
- self.preformed_access_keys = [secrets.token_hex(16) for i in range(100)]
58
- self.preformed_secret_keys = [secrets.token_hex(16) for i in range(100)]
59
-
60
- def create_buckets(self, buckets: list[str]) -> S3Credentials:
61
- new_access_key = self.secret_service.retrieve_secret()
62
- new_secret_key = self.secret_service.retrieve_secret()
63
-
64
- bucket_map = {}
65
-
66
- for bucket in buckets:
67
- bucket_name = self.name_service.retrieve_name()
68
- bucket_map[bucket] = bucket_name
69
- self.gateway_service.expose(bucket_name, 9000, self.host)
70
-
71
- self.buckets.extend(bucket_map.values())
72
-
73
- creds = S3Credentials(
74
- name=self.name_service.retrieve_name(),
75
- access_key=new_access_key,
76
- buckets=bucket_map,
77
- host=self.host,
78
- port=self.port,
79
- secret_key=new_secret_key,
80
- protocol=self.protocol,
81
- dependency=self.host if not self.skip else None,
82
- )
83
-
84
- self.registered_clients.append(creds)
85
-
86
- return creds
87
-
88
- def preflight(
89
- self,
90
- init: InitContext,
91
- secret: SecretService,
92
- name: NameService,
93
- gateway: GatewayService,
94
- config: ConfigService,
95
- ):
96
- for key, value in init.kwargs.items():
97
- setattr(self, key, value)
98
-
99
- self.secret_service = secret
100
- self.name_service = name
101
- self.gateway_service = gateway
102
-
103
- self.config_path = config.get_path(self.host + ".yaml")
104
-
105
- def build(self, context: ExecutionContext):
106
- minio_service_init = {
107
- "depends_on": {
108
- "minio": {
109
- "condition": "service_started",
110
- },
111
- },
112
- "environment": {
113
- "MINIO_ROOT_PASSWORD": self.password,
114
- "MINIO_ROOT_USER": self.username,
115
- "MINIO_HOST": f"http://{self.host}:9000",
116
- },
117
- "image": self.init_image,
118
- "volumes": [f"{self.config_path}:/workspace/config.yaml"],
119
- }
120
-
121
- minio_service = {
122
- "command": ["server", "/data"],
123
- "environment": {
124
- "MINIO_ROOT_PASSWORD": self.password,
125
- "MINIO_ROOT_USER": self.username,
126
- },
127
- "image": self.minio_image,
128
- "volumes": ["./data:/data"],
129
- "labels": ["fakts.service=live.arkitekt.s3", "fakts.builder=arkitekt.s3"],
130
- }
131
-
132
- context.file_tree.set_nested("data", {})
133
-
134
- context.docker_compose.set_nested("services", self.host, minio_service)
135
- context.docker_compose.set_nested(
136
- "services", f"{self.host}_init", minio_service_init
137
- )
138
-
139
- context.file_tree.set_nested(
140
- *self.config_path.split("/"),
141
- YamlFile(
142
- buckets=[{"name": i} for i in self.buckets],
143
- users=[
144
- {
145
- "access_key": i.access_key,
146
- "secret_key": i.secret_key,
147
- "name": i.name,
148
- "policies": ["readwrite"],
149
- }
150
- for i in self.registered_clients
151
- ],
152
- ),
153
- )
154
-
155
- def get_options(self):
156
- with_host = Option(
157
- subcommand="host",
158
- help="The fakts_next url for connection",
159
- default=self.host,
160
- )
161
- with_username = Option(
162
- subcommand="username",
163
- help="The fakts_next url for connection",
164
- default=self.username,
165
- )
166
- with_password = Option(
167
- subcommand="password",
168
- help="The fakts_next url for connection",
169
- default=self.password,
170
- )
171
-
172
- return [
173
- with_host,
174
- with_password,
175
- with_username,
176
- ]
@@ -1,34 +0,0 @@
1
- from pydantic import BaseModel
2
- from typing import Dict, Any
3
- from arkitekt_next.bloks.services.mount import MountService
4
- from blok import blok, InitContext, Option, ExecutionContext
5
-
6
- from blok.tree import YamlFile
7
-
8
-
9
- @blok(MountService, description="Mounting files into the file tree for use")
10
- class MountBlok:
11
- def __init__(self) -> None:
12
- self.mount_path = "mounts"
13
- self.registered_configs = {}
14
-
15
- def preflight(self, mount_path: str):
16
- self.mount_path = mount_path
17
-
18
- def build(self, ex: ExecutionContext):
19
- for name, file in self.registered_configs.items():
20
- ex.file_tree.set_nested(*f"{self.mount_path}/{name}".split("/"), file)
21
-
22
- def register_mount(self, name: str, file: YamlFile) -> str:
23
- self.registered_configs[name] = file
24
- return f"./{self.mount_path}/" + name
25
-
26
- def get_options(self):
27
- config_path = Option(
28
- subcommand="mount_path",
29
- help="Which path to use for configs",
30
- default=self.mount_path,
31
- show_default=True,
32
- )
33
-
34
- return [config_path]
@@ -1,34 +0,0 @@
1
- from pydantic import BaseModel
2
- from typing import Dict, Any
3
- from arkitekt_next.bloks.services.name import NameService
4
- from blok import blok, InitContext, Option, ExecutionContext
5
- from blok.tree import YamlFile
6
- from arkitekt_next.bloks.services.secret import SecretService
7
- import secrets
8
- import namegenerator
9
-
10
-
11
- @blok(NameService, description="Preformed names that will not change")
12
- class PreformedNamesBlok:
13
- def __init__(self) -> None:
14
- self.preformed_names = [namegenerator.gen() for _ in range(100)]
15
- self.used_names = []
16
-
17
- def preflight(self, init: InitContext, preformed_names: list[str]):
18
- self.preformed_names = list(preformed_names)
19
- self.used_names = []
20
-
21
- def retrieve_name(self) -> str:
22
- name = self.preformed_names.pop()
23
- self.used_names.append(name)
24
- return name
25
-
26
- def get_options(self):
27
- config_path = Option(
28
- subcommand="preformed_names",
29
- help="A list of preformed names",
30
- default=self.preformed_names,
31
- multiple=True,
32
- )
33
-
34
- return [config_path]
@@ -1,94 +0,0 @@
1
- from typing import Dict, Any
2
- import secrets
3
-
4
- from arkitekt_next.bloks.services.gateway import GatewayService
5
- from arkitekt_next.bloks.services.ollama import OllamaService, OllamaAccess
6
- from blok import blok, InitContext, ExecutionContext, Option
7
- from blok.tree import YamlFile, Repo
8
-
9
-
10
- @blok(OllamaService, description="a self-hosted Ollama LLM server")
11
- class OllamaBlok:
12
- def __init__(self) -> None:
13
- self.host = "ollama"
14
- self.image = "ollama/ollama:latest"
15
- self.port = 11434
16
- self.skip = False
17
- self.gpu = bool
18
-
19
- def get_access(self) -> OllamaAccess:
20
- """Get the credentials for the Ollama service."""
21
- return OllamaAccess(
22
- api_key="",
23
- api_secret="",
24
- api_url=f"http://{self.host}:{self.port}",
25
- dependency=self.host,
26
- )
27
-
28
- def preflight(self, init: InitContext):
29
- for key, value in init.kwargs.items():
30
- setattr(self, key, value)
31
-
32
- if self.skip:
33
- return
34
-
35
- self.initialized = True
36
-
37
- def build(self, context: ExecutionContext):
38
- if self.skip:
39
- return
40
- db_service = {
41
- "labels": [
42
- "fakts.service=io.ollama.ollama",
43
- "fakts.builder=ollama.ollama",
44
- ],
45
- "image": self.image,
46
- "environment": {
47
- "OLLAMA_KEEP_ALIVE": "24h",
48
- },
49
- }
50
-
51
- if self.gpu:
52
- db_service["deploy"] = {
53
- "resources": {
54
- "reservations": {
55
- "devices": [
56
- {
57
- "driver": "nvidia",
58
- "count": 1,
59
- "capabilities": ["gpu"],
60
- }
61
- ]
62
- }
63
- }
64
- }
65
-
66
- context.docker_compose.set_nested("services", self.host, db_service)
67
-
68
- def get_options(self):
69
- with_host = Option(
70
- subcommand="host",
71
- help="The fakts url for connection",
72
- default=self.host,
73
- )
74
- with_skip = Option(
75
- subcommand="skip",
76
- help="The fakts_next url for connection",
77
- default=False,
78
- type=bool,
79
- )
80
- with_gpu = Option(
81
- subcommand="gpu",
82
- help="Whether to use a gpu",
83
- default=False,
84
- type=self.gpu,
85
- )
86
-
87
- return [
88
- with_host,
89
- with_skip,
90
- with_gpu,
91
- ]
92
-
93
- def __str__(self) -> str:
94
- return f"Ollama(host={self.host}, command={self.command}, image={self.image})"
@@ -1,122 +0,0 @@
1
- from typing import Dict, Any
2
- import secrets
3
- from arkitekt_next.bloks.services.gateway import GatewayService
4
- from arkitekt_next.bloks.services.mount import MountService
5
- from blok import blok, InitContext, ExecutionContext, Option, Command
6
- from blok.bloks.services.dns import DnsService
7
- from blok.bloks.services.vscode import VsCodeService
8
- from blok.tree import Repo, YamlFile
9
-
10
-
11
- @blok(
12
- "live.arkitekt.orkestrator",
13
- description="Orkestrator in its web-based UI",
14
- )
15
- class OrkestratorBlok:
16
- def __init__(self) -> None:
17
- self.dev = False
18
- self.disable = False
19
- self.host = "orkestrator"
20
- self.path_name = "orkestrator"
21
- self.repo = "https://github.com/arkitektio/orkestrator-next"
22
- self.build_command = ["yarn"]
23
- self.up_command = ["yarn", "start"]
24
-
25
- def preflight(
26
- self,
27
- init: InitContext,
28
- gateway: GatewayService,
29
- mount: MountService,
30
- vscode: VsCodeService | None = None,
31
- ):
32
- for key, value in init.kwargs.items():
33
- setattr(self, key, value)
34
-
35
- if self.disable:
36
- return
37
-
38
- if not self.dev:
39
- gateway.expose(self.path_name, 80, self.host)
40
-
41
- self.service = {
42
- "image": "jhnnsrs/orkestrator_next:nightly",
43
- "environment": {
44
- "PATH_NAME": self.path_name,
45
- },
46
- }
47
-
48
- return
49
-
50
- else:
51
-
52
- self.mount = mount.register_mount("orkestrator", Repo(self.repo))
53
-
54
- if vscode is not None:
55
- vscode.register_task(
56
- "Run Orkestrator",
57
- "shell",
58
- "yarn",
59
- ["start"],
60
- {"cwd": f"{self.mount}"},
61
- )
62
- vscode.register_task(
63
- "Build Orkestrator",
64
- "shell",
65
- "yarn",
66
- [],
67
- {"cwd": f"{self.mount}"},
68
- )
69
-
70
- self.initialized = True
71
-
72
- def build(self, context: ExecutionContext):
73
- if self.disable:
74
- return
75
-
76
- if self.dev:
77
-
78
- context.install_commands.set_nested(
79
- "orkestrator", Command(self.build_command, cwd=self.mount)
80
- )
81
- context.up_commands.set_nested(
82
- "orkestrator", Command(self.up_command, cwd=self.mount)
83
- )
84
- return
85
-
86
- context.docker_compose.set_nested("services", self.host, self.service)
87
- pass
88
-
89
- def get_options(self):
90
- with_repos = Option(
91
- subcommand="repo",
92
- help="The default repo to use for the orkestrator",
93
- default=self.repo,
94
- )
95
- with_disable = Option(
96
- subcommand="disable",
97
- help="Should we disable the orkestrator service?",
98
- default=self.disable,
99
- )
100
- with_dev = Option(
101
- subcommand="dev",
102
- help="Should we mount orkestrator as dev?",
103
- default=self.dev,
104
- )
105
- with_path_name = Option(
106
- subcommand="path_name",
107
- help="The path name for the orkestrator service",
108
- default=self.path_name,
109
- )
110
- with_host = Option(
111
- subcommand="host",
112
- help="The host for the orkestrator service",
113
- default=self.host,
114
- )
115
-
116
- return [
117
- with_dev,
118
- with_repos,
119
- with_path_name,
120
- with_disable,
121
- with_host,
122
- ]