Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔨Cluster monitoring script: update due to latest changes in osparc-config #6672

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
DEFAULT_COMPUTATIONAL_EC2_FORMAT_WORKERS,
DEFAULT_DYNAMIC_EC2_FORMAT,
DEPLOY_SSH_KEY_PARSER,
UNIFIED_SSH_KEY_PARSE,
wallet_id_spec,
)
from .ec2 import autoscaling_ec2_client, cluster_keeper_ec2_client
Expand Down Expand Up @@ -78,16 +79,12 @@ def main(

# locate ssh key path
for file_path in deploy_config.glob("**/*.pem"):
if any(_ in file_path.name for _ in ["license", "pkcs8"]):
continue
# very bad HACK where the license file contain openssh in the name
if (
any(_ in f"{file_path}" for _ in ("sim4life.io", "osparc-master"))
and "openssh" not in f"{file_path}"
):
if any(_ in file_path.name for _ in ["license", "pkcs8", "dask"]):
continue

if DEPLOY_SSH_KEY_PARSER.parse(f"{file_path.name}") is not None:
if DEPLOY_SSH_KEY_PARSER.parse(
f"{file_path.name}"
) is not None or UNIFIED_SSH_KEY_PARSE.parse(f"{file_path.name}"):
rich.print(
f"will be using following ssh_key_path: {file_path}. "
"TIP: if wrong adapt the code or manually remove some of them."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def wallet_id_spec(text) -> None | int:
DEPLOY_SSH_KEY_PARSER: Final[parse.Parser] = parse.compile(
r"{prefix}-{random_name}.pem"
)
UNIFIED_SSH_KEY_PARSE: Final[parse.Parser] = parse.compile("sshkey.pem")

MINUTE: Final[int] = 60
HOUR: Final[int] = 60 * MINUTE
Expand Down