seto 2.3.2__tar.gz → 2.4.1__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.
- {seto-2.3.2 → seto-2.4.1}/PKG-INFO +1 -1
- {seto-2.3.2 → seto-2.4.1}/pyproject.toml +1 -1
- {seto-2.3.2 → seto-2.4.1}/seto/core/docker.py +13 -5
- {seto-2.3.2 → seto-2.4.1}/LICENSE +0 -0
- {seto-2.3.2 → seto-2.4.1}/LICENSE_HEADER.txt +0 -0
- {seto-2.3.2 → seto-2.4.1}/README.md +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/__init__.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/__main__.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/config.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/deploy.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/down.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/mount.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/setup.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/umount.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/commands/volumes.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/command.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/dns.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/driver.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/network.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/parser.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/permissions.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/shell.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/swarm.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/traefik.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/core/volume.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/drivers/gluster.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/drivers/nfs.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/shells/local.py +0 -0
- {seto-2.3.2 → seto-2.4.1}/seto/shells/remote.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "seto"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.4.1"
|
|
8
8
|
description = "A Docker Swarm Deployment Manager"
|
|
9
9
|
keywords = ["docker", "swarm", "manager"]
|
|
10
10
|
authors = ["Sébastien Demanou <demsking@gmail.com>"]
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# ==============================================================================
|
|
15
15
|
import functools
|
|
16
16
|
import json
|
|
17
|
+
import socket
|
|
17
18
|
|
|
18
19
|
from docker import DockerClient
|
|
19
20
|
|
|
@@ -101,6 +102,10 @@ class DockerCompose(Docker):
|
|
|
101
102
|
def placement(self) -> str | None:
|
|
102
103
|
return self.config['x-placement']
|
|
103
104
|
|
|
105
|
+
@property
|
|
106
|
+
def current_hostname(self) -> str:
|
|
107
|
+
return socket.gethostname()
|
|
108
|
+
|
|
104
109
|
@property
|
|
105
110
|
@functools.lru_cache(maxsize=128)
|
|
106
111
|
def node_hostname(self) -> str | None:
|
|
@@ -136,11 +141,14 @@ class DockerCompose(Docker):
|
|
|
136
141
|
self._exec(f'docker compose -p {self.driver.stack_id} -f - down')
|
|
137
142
|
|
|
138
143
|
def _exec(self, command: str) -> None:
|
|
139
|
-
|
|
140
|
-
command,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
if self.current_hostname == self.node_hostname:
|
|
145
|
+
Shell.pipe_exec(command=command, pipe_input=self.resolved_config)
|
|
146
|
+
else:
|
|
147
|
+
Docker.remote_node_run(
|
|
148
|
+
command,
|
|
149
|
+
hostname=self.node_hostname,
|
|
150
|
+
pipe_input=self.resolved_config,
|
|
151
|
+
)
|
|
144
152
|
|
|
145
153
|
|
|
146
154
|
class DockerSwarm(Docker):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|