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

Persist docker deployment infos to a file in the current directory #4109

Merged
merged 1 commit into from
Jun 6, 2022
Merged
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
17 changes: 10 additions & 7 deletions dallinger/command_line/docker_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,16 @@ def deploy(mode, server, dns_host, config_options, archive_path): # pragma: no
)
print(response.json()["recruitment_msg"])

print("To display the logs for this experiment you can run:")
print(
f"ssh {ssh_user}@{ssh_host} docker-compose -f '~/dallinger/{experiment_id}/docker-compose.yml' logs -f"
)
print(
f"You can now log in to the console at https://{experiment_id}.{dns_host}/dashboard as user {cfg['ADMIN_USER']} using password {cfg['dashboard_password']}"
)
deployment_infos = [
"To display the logs for this experiment you can run:",
f"ssh {ssh_user}@{ssh_host} docker-compose -f '~/dallinger/{experiment_id}/docker-compose.yml' logs -f",
f"You can now log in to the console at https://{experiment_id}.{dns_host}/dashboard as user {cfg['ADMIN_USER']} using password {cfg['dashboard_password']}",
]
for line in deployment_infos:
print(line)
with open(f"deployment-info_{experiment_id}.txt", "w") as f:
for line in deployment_infos:
f.write(f"{line}\n")


def get_experiment_id_from_archive(archive_path):
Expand Down