arkitekt-next 0.7.40__py3-none-any.whl → 0.7.42__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arkitekt-next might be problematic. Click here for more details.
- arkitekt_next/cli/main.py +0 -2
- {arkitekt_next-0.7.40.dist-info → arkitekt_next-0.7.42.dist-info}/METADATA +1 -1
- {arkitekt_next-0.7.40.dist-info → arkitekt_next-0.7.42.dist-info}/RECORD +6 -16
- arkitekt_next/cli/commands/server/__init__.py +0 -0
- arkitekt_next/cli/commands/server/down.py +0 -56
- arkitekt_next/cli/commands/server/init.py +0 -15
- arkitekt_next/cli/commands/server/inspect.py +0 -59
- arkitekt_next/cli/commands/server/main.py +0 -33
- arkitekt_next/cli/commands/server/open.py +0 -66
- arkitekt_next/cli/commands/server/remove.py +0 -60
- arkitekt_next/cli/commands/server/stop.py +0 -56
- arkitekt_next/cli/commands/server/up.py +0 -70
- arkitekt_next/cli/commands/server/utils.py +0 -33
- {arkitekt_next-0.7.40.dist-info → arkitekt_next-0.7.42.dist-info}/LICENSE +0 -0
- {arkitekt_next-0.7.40.dist-info → arkitekt_next-0.7.42.dist-info}/WHEEL +0 -0
- {arkitekt_next-0.7.40.dist-info → arkitekt_next-0.7.42.dist-info}/entry_points.txt +0 -0
arkitekt_next/cli/main.py
CHANGED
|
@@ -16,7 +16,6 @@ from arkitekt_next.cli.constants import *
|
|
|
16
16
|
from arkitekt_next.cli.texts import *
|
|
17
17
|
from arkitekt_next.cli.commands.run.main import run
|
|
18
18
|
from arkitekt_next.cli.commands.gen.main import gen
|
|
19
|
-
from arkitekt_next.cli.commands.server.main import server
|
|
20
19
|
from arkitekt_next.cli.commands.kabinet.main import kabinet
|
|
21
20
|
from arkitekt_next.cli.commands.init.main import init
|
|
22
21
|
from arkitekt_next.cli.commands.manifest.main import manifest
|
|
@@ -76,7 +75,6 @@ cli.add_command(gen, "gen")
|
|
|
76
75
|
cli.add_command(kabinet, "kabinet")
|
|
77
76
|
cli.add_command(manifest, "manifest")
|
|
78
77
|
cli.add_command(inspect, "inspect")
|
|
79
|
-
cli.add_command(server, "server")
|
|
80
78
|
cli.add_command(call, "call")
|
|
81
79
|
|
|
82
80
|
if __name__ == "__main__":
|
|
@@ -84,23 +84,13 @@ arkitekt_next/cli/commands/run/dev.py,sha256=mobsKX155O6NXGzLK-c4_l2RN4vlM4-1lj2
|
|
|
84
84
|
arkitekt_next/cli/commands/run/main.py,sha256=0bNO3DqwbZ4ddMsDWbCGmlPD6Cs3Jlg4yh2-zilsEbY,552
|
|
85
85
|
arkitekt_next/cli/commands/run/prod.py,sha256=5wbpKt8atp_Cz81v3iRUcOWCInStzlmlA2UmNQmg9Tw,1532
|
|
86
86
|
arkitekt_next/cli/commands/run/utils.py,sha256=zH-MNNEfKgyOYQvwP6Ph8KUHVqH48fw3ZI6tiQ9unwQ,325
|
|
87
|
-
arkitekt_next/cli/commands/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
|
-
arkitekt_next/cli/commands/server/down.py,sha256=POFe9OtzhSdlwWY7JBakGqVDZvQ9LrsiFDRSik2Hn2U,1490
|
|
89
|
-
arkitekt_next/cli/commands/server/init.py,sha256=mVXjXWILuQaeqsmrtTrFRL1qVVMCUv-Bf4zeTquNccg,281
|
|
90
|
-
arkitekt_next/cli/commands/server/inspect.py,sha256=3K9OVMJmzD_HJH6e2OJZSIbyVG5QWttQxefvx265n7M,1493
|
|
91
|
-
arkitekt_next/cli/commands/server/main.py,sha256=z9Z2C4BSNZcrXbRsr6x4LqWSXnj6_u9Hgp7WXosfWZ8,945
|
|
92
|
-
arkitekt_next/cli/commands/server/open.py,sha256=gvId-pnmsCrKDCCS8KZZoEkXoghtLHbyjPbLtCJCZeg,1711
|
|
93
|
-
arkitekt_next/cli/commands/server/remove.py,sha256=ObL7FZPlZJCFpcd577vF91BSmjono3tZdVaip6I3itk,1522
|
|
94
|
-
arkitekt_next/cli/commands/server/stop.py,sha256=fPiF5zBa4zOEdchMIQqi88gsNAEhq6Wlunmxz-Y7b0w,1436
|
|
95
|
-
arkitekt_next/cli/commands/server/up.py,sha256=QfXEN_IDYrL4kFJ-DZ4BGK3eMfkW4YpoSkr9bGpzFjM,1757
|
|
96
|
-
arkitekt_next/cli/commands/server/utils.py,sha256=GhUiJx2eXSBMdIfukEaZAetAtkfy_dZG4yb2L6vxTio,846
|
|
97
87
|
arkitekt_next/cli/configs/base.yaml,sha256=9IJ7B4Fq3swHsLUbKn1MlhhzJKqDI1wnR5PAG_VKs8A,30097
|
|
98
88
|
arkitekt_next/cli/constants.py,sha256=xHG2lfXw_4atx9B4ICAY45fbNbQN0UQAfdxZQbduz_w,1411
|
|
99
89
|
arkitekt_next/cli/dockerfiles/vanilla.dockerfile,sha256=jRbY9qqrlFGafXdNbc1AfSP_oyRiZFhdWWCveWYXSHA,168
|
|
100
90
|
arkitekt_next/cli/errors.py,sha256=zLTjaCbun6qM2nTldjyZd-DvykqKn5A3Gn80uYdx7Vc,93
|
|
101
91
|
arkitekt_next/cli/inspect.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
102
92
|
arkitekt_next/cli/io.py,sha256=Jp8F8vYPIcAow7IAh_tgWFrsM9KRaElipAH7wj26lIo,6899
|
|
103
|
-
arkitekt_next/cli/main.py,sha256=
|
|
93
|
+
arkitekt_next/cli/main.py,sha256=aMArNPvmreSCJI30UN3plueWfGzVvUL5Fx53Z-5dtkw,2237
|
|
104
94
|
arkitekt_next/cli/options.py,sha256=hSKdSYabK1MuioBRUsADjQIPSp9H2YeczmcyAsFUprI,3791
|
|
105
95
|
arkitekt_next/cli/schemas/fluss.schema.graphql,sha256=MqrSpOxtWO9kWFCoUn9ySBPhIH3XozFiqrQl2zjEbiQ,35803
|
|
106
96
|
arkitekt_next/cli/schemas/gucker.schema.graphql,sha256=r_KL-MoFRCGUobbtcBLCnpmFcali2A12TguynqQgmN4,152947
|
|
@@ -145,8 +135,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
|
|
|
145
135
|
arkitekt_next/service_registry.py,sha256=pczUuP_Nve7OYwB7-oDBLIw6bkjZPnzL3xFca5TF1io,3405
|
|
146
136
|
arkitekt_next/tqdm.py,sha256=DlrxPluHao7TvW-Cqgt0UokRS-fM2_ZNiWiddqvCqCc,1488
|
|
147
137
|
arkitekt_next/utils.py,sha256=gmKWy9M51vimohmmaoIpAJ0CaB22TFP0w3JszRrwiak,2379
|
|
148
|
-
arkitekt_next-0.7.
|
|
149
|
-
arkitekt_next-0.7.
|
|
150
|
-
arkitekt_next-0.7.
|
|
151
|
-
arkitekt_next-0.7.
|
|
152
|
-
arkitekt_next-0.7.
|
|
138
|
+
arkitekt_next-0.7.42.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
|
|
139
|
+
arkitekt_next-0.7.42.dist-info/METADATA,sha256=WquBq_hol07JNoTaJQDpv2yHpAafBBvxBbfDud7DlGM,5973
|
|
140
|
+
arkitekt_next-0.7.42.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
141
|
+
arkitekt_next-0.7.42.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
|
|
142
|
+
arkitekt_next-0.7.42.dist-info/RECORD,,
|
|
File without changes
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from dokker.projects.dokker import DokkerProject
|
|
4
|
-
from dokker.loggers.print import PrintLogger
|
|
5
|
-
from dokker.deployment import Deployment
|
|
6
|
-
from typing import Optional
|
|
7
|
-
import os
|
|
8
|
-
from .utils import compile_options
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@click.command()
|
|
12
|
-
@click.option(
|
|
13
|
-
"--name",
|
|
14
|
-
help="The name of the deployment",
|
|
15
|
-
default=None,
|
|
16
|
-
required=False,
|
|
17
|
-
type=click.Choice(compile_options()),
|
|
18
|
-
)
|
|
19
|
-
@click.pass_context
|
|
20
|
-
def down(
|
|
21
|
-
ctx: Context,
|
|
22
|
-
name: Optional[str] = None,
|
|
23
|
-
) -> None:
|
|
24
|
-
"""
|
|
25
|
-
Down a deployment
|
|
26
|
-
|
|
27
|
-
Removing a deployment will stop all containers and call docker compose down
|
|
28
|
-
on the project. This will remove all containers and networks created by the
|
|
29
|
-
deployment. The deployment will still be available in the .dokker folder
|
|
30
|
-
However (depending on your settings) data that was stored in volumes managed
|
|
31
|
-
by the deployment will be removed.
|
|
32
|
-
|
|
33
|
-
If you want to simple Stop the deployment, use the stop command instead.
|
|
34
|
-
|
|
35
|
-
"""
|
|
36
|
-
if not name:
|
|
37
|
-
options = compile_options()
|
|
38
|
-
if not options:
|
|
39
|
-
raise click.ClickException(
|
|
40
|
-
"No deployments found. Please run arkitekt_next server init first"
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
name = options[0]
|
|
44
|
-
|
|
45
|
-
print(f"Running {name}")
|
|
46
|
-
|
|
47
|
-
project = DokkerProject(
|
|
48
|
-
name=name,
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
deployment = Deployment(project=project, logger=PrintLogger())
|
|
52
|
-
with deployment:
|
|
53
|
-
deployment.down()
|
|
54
|
-
print("Shutting down...")
|
|
55
|
-
|
|
56
|
-
print("Done")
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from blok.cli import create_cli
|
|
4
|
-
import asyncio
|
|
5
|
-
from typing import Optional
|
|
6
|
-
import os
|
|
7
|
-
from arkitekt_next.cli.vars import get_console
|
|
8
|
-
from arkitekt_next.__blok__ import get_bloks
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
bloks = get_bloks()
|
|
13
|
-
|
|
14
|
-
init = create_cli(*bloks)
|
|
15
|
-
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from dokker.projects.dokker import DokkerProject
|
|
4
|
-
from dokker.loggers.print import PrintLogger
|
|
5
|
-
from dokker.deployment import Deployment
|
|
6
|
-
from typing import Optional
|
|
7
|
-
import os
|
|
8
|
-
from .utils import compile_options
|
|
9
|
-
from rich.table import Table
|
|
10
|
-
from rich.live import Live
|
|
11
|
-
from arkitekt_next.cli.vars import get_console
|
|
12
|
-
import json
|
|
13
|
-
|
|
14
|
-
DEFAULT_REPO_URL = (
|
|
15
|
-
"https://raw.githubusercontent.com/jhnnsrs/konstruktor/master/repo/channels.json"
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@click.command()
|
|
20
|
-
@click.option(
|
|
21
|
-
"--name",
|
|
22
|
-
help="The name of the deployment",
|
|
23
|
-
default=None,
|
|
24
|
-
required=False,
|
|
25
|
-
type=click.Choice(compile_options()),
|
|
26
|
-
)
|
|
27
|
-
@click.pass_context
|
|
28
|
-
def inspect(
|
|
29
|
-
ctx: Context,
|
|
30
|
-
name: Optional[str] = None,
|
|
31
|
-
) -> None:
|
|
32
|
-
"""
|
|
33
|
-
Inspect a deployment
|
|
34
|
-
|
|
35
|
-
Inspect helps you find information about a deployment. It will show you
|
|
36
|
-
information about the containers, networks and volumes created by the
|
|
37
|
-
deployment. If you have not run arkitekt_next server init before, this will
|
|
38
|
-
fail.
|
|
39
|
-
|
|
40
|
-
"""
|
|
41
|
-
if not name:
|
|
42
|
-
options = compile_options()
|
|
43
|
-
if not options:
|
|
44
|
-
raise click.ClickException(
|
|
45
|
-
"No deployments found. Please run arkitekt_next server init first"
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
name = options[0]
|
|
49
|
-
|
|
50
|
-
project = DokkerProject(
|
|
51
|
-
name=name,
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
console = get_console(ctx)
|
|
55
|
-
|
|
56
|
-
deployment = Deployment(project=project)
|
|
57
|
-
|
|
58
|
-
with deployment:
|
|
59
|
-
print(json.dumps(deployment.inspect().dict(), indent=4))
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from .init import init
|
|
3
|
-
from .up import up
|
|
4
|
-
from .down import down
|
|
5
|
-
from .inspect import inspect
|
|
6
|
-
from .remove import remove
|
|
7
|
-
from .open import open
|
|
8
|
-
from .stop import stop
|
|
9
|
-
from click import Context
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@click.group()
|
|
13
|
-
@click.pass_context
|
|
14
|
-
def server(ctx: Context) -> None:
|
|
15
|
-
"""Manages your arkitekt_next deployments
|
|
16
|
-
|
|
17
|
-
You can directly deploy your app to a server with the arkitekt_next server command. This will
|
|
18
|
-
create a local docker-compose.yml file and a .arkitekt_next folder in your project. You can then
|
|
19
|
-
use the arkitekt_next server build command to build your app for port and the arkitekt_next server run
|
|
20
|
-
command to run your app on the server.
|
|
21
|
-
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
pass
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
server.add_command(init, "init")
|
|
28
|
-
server.add_command(up, "up")
|
|
29
|
-
server.add_command(down, "down")
|
|
30
|
-
server.add_command(remove, "remove")
|
|
31
|
-
server.add_command(inspect, "inspect")
|
|
32
|
-
server.add_command(open, "open")
|
|
33
|
-
server.add_command(stop, "stop")
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from dokker.projects.dokker import DokkerProject
|
|
4
|
-
from dokker.loggers.print import PrintLogger
|
|
5
|
-
from dokker.deployment import Deployment
|
|
6
|
-
from typing import Optional, List
|
|
7
|
-
import os
|
|
8
|
-
from .utils import compile_options
|
|
9
|
-
from rich.table import Table
|
|
10
|
-
from rich.live import Live
|
|
11
|
-
from arkitekt_next.cli.vars import get_console
|
|
12
|
-
import webbrowser
|
|
13
|
-
|
|
14
|
-
DEFAULT_REPO_URL = (
|
|
15
|
-
"https://raw.githubusercontent.com/jhnnsrs/konstruktor/master/repo/channels.json"
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@click.command()
|
|
20
|
-
@click.option(
|
|
21
|
-
"--name",
|
|
22
|
-
help="The name of the deployment",
|
|
23
|
-
default=None,
|
|
24
|
-
required=False,
|
|
25
|
-
type=click.Choice(compile_options()),
|
|
26
|
-
)
|
|
27
|
-
@click.argument("services", nargs=-1, required=False)
|
|
28
|
-
@click.pass_context
|
|
29
|
-
def open(
|
|
30
|
-
ctx: Context,
|
|
31
|
-
name: Optional[str] = None,
|
|
32
|
-
services: List[str] = None,
|
|
33
|
-
) -> None:
|
|
34
|
-
"""
|
|
35
|
-
Opens a service in the browser
|
|
36
|
-
|
|
37
|
-
This will open the service in the browser. If you have not run arkitekt_next server init
|
|
38
|
-
before, this will fail.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"""
|
|
42
|
-
if not name:
|
|
43
|
-
options = compile_options()
|
|
44
|
-
if not options:
|
|
45
|
-
raise click.ClickException(
|
|
46
|
-
"No deployments found. Please run arkitekt_next server init first"
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
name = options[0]
|
|
50
|
-
|
|
51
|
-
project = DokkerProject(
|
|
52
|
-
name=name,
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
console = get_console(ctx)
|
|
56
|
-
|
|
57
|
-
deployment = Deployment(project=project)
|
|
58
|
-
|
|
59
|
-
if not services:
|
|
60
|
-
services = ["orkestrator"]
|
|
61
|
-
|
|
62
|
-
with deployment:
|
|
63
|
-
for service in services:
|
|
64
|
-
link = deployment.inspect().find_service(service).get_label("arkitekt_next.link")
|
|
65
|
-
console.print(f"Opening {service} at [link={link}]{link}[/link]")
|
|
66
|
-
webbrowser.open(link)
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from dokker.projects.dokker import DokkerProject
|
|
4
|
-
from dokker.loggers.print import PrintLogger
|
|
5
|
-
from dokker.deployment import Deployment
|
|
6
|
-
from typing import Optional
|
|
7
|
-
import os
|
|
8
|
-
from .utils import compile_options
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@click.command()
|
|
12
|
-
@click.option(
|
|
13
|
-
"--name",
|
|
14
|
-
help="The name of the deployment",
|
|
15
|
-
default=None,
|
|
16
|
-
required=False,
|
|
17
|
-
type=click.Choice(compile_options()),
|
|
18
|
-
)
|
|
19
|
-
@click.pass_context
|
|
20
|
-
def remove(
|
|
21
|
-
ctx: Context,
|
|
22
|
-
name: Optional[str] = None,
|
|
23
|
-
) -> None:
|
|
24
|
-
"""
|
|
25
|
-
Remove a deployment
|
|
26
|
-
|
|
27
|
-
Removing a deployment will stop all containers and call docker compose down
|
|
28
|
-
on the project. This will remove all containers and networks created by the
|
|
29
|
-
deployment. As opposed to the down command, the deployment will also be
|
|
30
|
-
removed from the .dokker folder, and all data stored in volumes managed by
|
|
31
|
-
the deployment will be removed.
|
|
32
|
-
|
|
33
|
-
This step is irreversible, so use with caution.
|
|
34
|
-
|
|
35
|
-
"""
|
|
36
|
-
if not name:
|
|
37
|
-
options = compile_options()
|
|
38
|
-
if not options:
|
|
39
|
-
raise click.ClickException(
|
|
40
|
-
"No deployments found. Please run arkitekt_next server init first"
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
name = options[0]
|
|
44
|
-
|
|
45
|
-
print(f"Running {name}")
|
|
46
|
-
|
|
47
|
-
project = DokkerProject(
|
|
48
|
-
name=name,
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
deployment = Deployment(project=project, logger=PrintLogger())
|
|
52
|
-
|
|
53
|
-
with deployment:
|
|
54
|
-
print("Shutting down...")
|
|
55
|
-
deployment.down()
|
|
56
|
-
|
|
57
|
-
print("Removing...")
|
|
58
|
-
deployment.remove()
|
|
59
|
-
|
|
60
|
-
print("Done")
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from dokker.projects.dokker import DokkerProject
|
|
4
|
-
from dokker.loggers.print import PrintLogger
|
|
5
|
-
from dokker.deployment import Deployment
|
|
6
|
-
from typing import Optional
|
|
7
|
-
import os
|
|
8
|
-
from .utils import compile_options
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@click.command()
|
|
12
|
-
@click.option(
|
|
13
|
-
"--name",
|
|
14
|
-
help="The name of the deployment",
|
|
15
|
-
default=None,
|
|
16
|
-
required=False,
|
|
17
|
-
type=click.Choice(compile_options()),
|
|
18
|
-
)
|
|
19
|
-
@click.pass_context
|
|
20
|
-
def stop(
|
|
21
|
-
ctx: Context,
|
|
22
|
-
name: Optional[str] = None,
|
|
23
|
-
) -> None:
|
|
24
|
-
"""
|
|
25
|
-
Stop a deployment
|
|
26
|
-
|
|
27
|
-
Stopping a deployment will stop all containers and call docker compose stop
|
|
28
|
-
on the project. This will stop all containers and networks created by the
|
|
29
|
-
deployment. The deployment will still be available in the .dokker folder
|
|
30
|
-
|
|
31
|
-
This should not be confused with the down command, which will remove all
|
|
32
|
-
containers and remove all networks created by the deployment.
|
|
33
|
-
|
|
34
|
-
"""
|
|
35
|
-
if not name:
|
|
36
|
-
options = compile_options()
|
|
37
|
-
if not options:
|
|
38
|
-
raise click.ClickException(
|
|
39
|
-
"No deployments found. Please run arkitekt_next server init first"
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
name = options[0]
|
|
43
|
-
|
|
44
|
-
print(f"Stopping {name}")
|
|
45
|
-
|
|
46
|
-
project = DokkerProject(
|
|
47
|
-
name=name,
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
deployment = Deployment(project=project, logger=PrintLogger())
|
|
51
|
-
|
|
52
|
-
with deployment:
|
|
53
|
-
print("Shutting down...")
|
|
54
|
-
deployment.stop()
|
|
55
|
-
|
|
56
|
-
print("Done")
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import rich_click as click
|
|
2
|
-
from click import Context
|
|
3
|
-
from dokker.projects.dokker import DokkerProject
|
|
4
|
-
from dokker.loggers.print import PrintLogger
|
|
5
|
-
from dokker.deployment import Deployment
|
|
6
|
-
from typing import Optional
|
|
7
|
-
import os
|
|
8
|
-
from .utils import compile_options
|
|
9
|
-
from rich.table import Table
|
|
10
|
-
from rich.live import Live
|
|
11
|
-
from arkitekt_next.cli.vars import get_console
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
DEFAULT_REPO_URL = (
|
|
15
|
-
"https://raw.githubusercontent.com/jhnnsrs/konstruktor/master/repo/channels.json"
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@click.command()
|
|
20
|
-
@click.option(
|
|
21
|
-
"--name",
|
|
22
|
-
help="The name of the deployment",
|
|
23
|
-
default=None,
|
|
24
|
-
required=False,
|
|
25
|
-
type=click.Choice(compile_options()),
|
|
26
|
-
)
|
|
27
|
-
@click.pass_context
|
|
28
|
-
def up(
|
|
29
|
-
ctx: Context,
|
|
30
|
-
name: Optional[str] = None,
|
|
31
|
-
) -> None:
|
|
32
|
-
"""
|
|
33
|
-
Ups a deployment
|
|
34
|
-
|
|
35
|
-
Up starts your deployment. This will create all containers and networks
|
|
36
|
-
needed for your deployment. If you have not run arkitekt_next server init
|
|
37
|
-
before, this will fail.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"""
|
|
41
|
-
if not name:
|
|
42
|
-
options = compile_options()
|
|
43
|
-
if not options:
|
|
44
|
-
raise click.ClickException(
|
|
45
|
-
"No deployments found. Please run arkitekt_next server init first"
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
name = options[0]
|
|
49
|
-
|
|
50
|
-
print(f"Running {name}")
|
|
51
|
-
|
|
52
|
-
project = DokkerProject(
|
|
53
|
-
name=name,
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
console = get_console(ctx)
|
|
57
|
-
|
|
58
|
-
logger = PrintLogger(print_function=lambda x: console.log(x))
|
|
59
|
-
|
|
60
|
-
deployment = Deployment(project=project, logger=logger)
|
|
61
|
-
|
|
62
|
-
with deployment:
|
|
63
|
-
port = deployment.inspect().find_service("lok").get_label("arkitekt_next.link")
|
|
64
|
-
|
|
65
|
-
status = console.status(
|
|
66
|
-
f"[bold green]Running on the Lok Server Port {port} Press Ctrl+c once to cancel..."
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
with status:
|
|
70
|
-
x = deployment.up(detach=False)
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from typing import List
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def compile_options() -> List[str]:
|
|
6
|
-
"""Compiles the available options for the server up and down commands:
|
|
7
|
-
|
|
8
|
-
All deployments in the .arkitekt_next/deployments folder
|
|
9
|
-
"""
|
|
10
|
-
deployments = os.path.join(os.getcwd(), ".dokker")
|
|
11
|
-
|
|
12
|
-
available_deployments = []
|
|
13
|
-
|
|
14
|
-
if not os.path.exists(deployments):
|
|
15
|
-
return available_deployments
|
|
16
|
-
|
|
17
|
-
for deployment in os.listdir(deployments):
|
|
18
|
-
if os.path.isdir(os.path.join(deployments, deployment)):
|
|
19
|
-
available_deployments.append(deployment)
|
|
20
|
-
|
|
21
|
-
return available_deployments
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def build_server_path(name: str) -> str:
|
|
25
|
-
"""Builds the path to the server
|
|
26
|
-
|
|
27
|
-
Args:
|
|
28
|
-
name (str): The name of the server
|
|
29
|
-
|
|
30
|
-
Returns:
|
|
31
|
-
str: The path to the server
|
|
32
|
-
"""
|
|
33
|
-
return os.path.join(os.getcwd(), ".arkitekt_next", "servers", name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|