From 947b9ce31e4ae5765eedf86358c189373c723fb5 Mon Sep 17 00:00:00 2001 From: rajarshi Date: Fri, 12 Jul 2024 14:57:34 +0100 Subject: [PATCH 1/6] added ssh_port sothat one can connect to machines which work on ports other than 22 via ssh --- covalent_slurm_plugin/slurm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/covalent_slurm_plugin/slurm.py b/covalent_slurm_plugin/slurm.py index 96c0191..f5b5e64 100644 --- a/covalent_slurm_plugin/slurm.py +++ b/covalent_slurm_plugin/slurm.py @@ -120,6 +120,8 @@ def __init__( address: Optional[str] = None, ssh_key_file: Optional[str] = None, cert_file: Optional[str] = None, + # added ssh port option: Rajarshi + ssh_port: Optional[int] = 22, remote_workdir: Optional[str] = None, create_unique_workdir: bool = False, options: Optional[Dict] = None, @@ -150,6 +152,8 @@ def __init__( self.address = address or get_config("executors.slurm.address") self.ssh_key_file = ssh_key_file or get_config("executors.slurm.ssh_key_file") self.cert_file = cert_file or get_config("executors.slurm").get("cert_file", None) + # add ssh port: Rajarshi + self.ssh_port = ssh_port or get_config("executors.slurm").get("ssh_port", 22) self.remote_workdir = remote_workdir or get_config("executors.slurm.remote_workdir") self.variables = variables or get_config("executors.slurm.variables") self.conda_env = conda_env or get_config("executors.slurm.conda_env") @@ -235,6 +239,7 @@ async def _client_connect(self) -> asyncssh.SSHClientConnection: try: conn = await asyncssh.connect( self.address, + port=self.ssh_port, username=self.username, client_keys=client_keys, known_hosts=None, From 0bab87aee06b83628826251d78b6bb383023cd8b Mon Sep 17 00:00:00 2001 From: rajarshi Date: Fri, 30 Aug 2024 09:37:14 +0100 Subject: [PATCH 2/6] added attribute --- covalent_slurm_plugin/slurm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/covalent_slurm_plugin/slurm.py b/covalent_slurm_plugin/slurm.py index f5b5e64..7f94d54 100644 --- a/covalent_slurm_plugin/slurm.py +++ b/covalent_slurm_plugin/slurm.py @@ -47,6 +47,7 @@ class ExecutorPluginDefaults(BaseModel): address: Optional[str] = "" ssh_key_file: Optional[str] = "" cert_file: Optional[str] = None + ssh_port: Optional[int] = 22 remote_workdir: Optional[str] = "covalent-workdir" create_unique_workdir: bool = False variables: Optional[Dict[str, str]] = Field(default_factory=dict) From fa46c6b7229fb788b1d12c69511b3b96abc7b5c3 Mon Sep 17 00:00:00 2001 From: rajarshi Date: Fri, 11 Oct 2024 11:11:39 +0100 Subject: [PATCH 3/6] changed --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 4a9e052..d31c71e 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,17 @@ pip install covalent-slurm-plugin On the remote system, the Python version in the environment you plan to use must match that used when dispatching the calculations. Additionally, the remote system's Python environment must have the base [covalent package](https://github.com/AgnostiqHQ/covalent) installed (e.g. `pip install covalent`). + +For development use the following to build it. + +- Create a python environment, and in that environment install `pip install build` +- Go to the source folder, and run + +```bash +python -m build +``` + + ## Usage The following shows an example of a Covalent [configuration](https://covalent.readthedocs.io/en/latest/how_to/config/customization.html) that is modified to support Slurm: From dc7c22362ed1dcdea51d1a1944e314f808383d0c Mon Sep 17 00:00:00 2001 From: rajarshi Date: Mon, 25 Nov 2024 13:47:47 +0000 Subject: [PATCH 4/6] version change --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6633391..249afd5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.0 +0.18.1 From be88d2fb3c4ecb944a3f37fff56ba1628ea29eab Mon Sep 17 00:00:00 2001 From: rajarshi Date: Mon, 25 Nov 2024 13:50:30 +0000 Subject: [PATCH 5/6] updated changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f03c8f9..31dc2d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added a docker based SLURM cluster in the CI pipeline for testing the plugin. - Ignoring `tests/docker_tests` directory from pytest. + +## [0.18.1] - 24-11-25 + +### Added + +- `ssh_port` options in the slurmExecutor to allow connection to HPC system that use alternative port for `ssh`. + ## [0.18.0] - 2024-01-26 ### Added From d7fe802207fa240192e782b5c66b938ac765eab9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:53:11 +0000 Subject: [PATCH 6/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31dc2d4..2e44414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- `ssh_port` options in the slurmExecutor to allow connection to HPC system that use alternative port for `ssh`. +- `ssh_port` options in the slurmExecutor to allow connection to HPC system that use alternative port for `ssh`. ## [0.18.0] - 2024-01-26