Skip to content

Local cluster (2FA bypass)#337

Merged
mesonepigreco merged 5 commits intomasterfrom
local_cluster
May 31, 2024
Merged

Local cluster (2FA bypass)#337
mesonepigreco merged 5 commits intomasterfrom
local_cluster

Conversation

@mesonepigreco
Copy link
Collaborator

@mesonepigreco mesonepigreco commented May 15, 2024

This branch improves the Cluster Module to be easier to be inherited.
Then, it introduces a new module, LocalCluster, that mocks the Cluster module, making all the submissions occur locally.
This enables the submission of jobs directly within the main job, allowing the user to run simulations inside the cluster but exploiting the scheduler.

As a similar example, all the configuration is the same as the Cluster module, except the hostname is not required:

import sscha.LocalCluster

my_cluster = sscha.LocalCluster.LocalCluster("my_fake_host")  # My fake host plays no role, it could probably be removed in a future release.

# Here the same configuration for my_cluster as it is for the full cluster
# To properly submit the calculation using the scheduler

The my_cluster variable is then used exactly like the original cluster; however, all submissions will be done within the same cluster without any SSH command.

This is the best way to bypass the restrictions imposed by the 2FA in many clusters. It allows everything to run from inside the cluster.

Soon, a guide on how to use it in practice will be prepared.

@mesonepigreco mesonepigreco added the enhancement New feature or request label May 15, 2024
@mesonepigreco mesonepigreco added this to the 1.5 milestone May 15, 2024
@mesonepigreco mesonepigreco merged commit ddfbd53 into master May 31, 2024
@mesonepigreco mesonepigreco deleted the local_cluster branch May 31, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant