Skip to content

Commit

Permalink
Merge pull request #4109 from Dallinger/4096_persist-docker-deploymen…
Browse files Browse the repository at this point in the history
…t-info

Persist docker deployment infos to a file in the current directory
  • Loading branch information
fmhoeger committed Jun 6, 2022
2 parents 2e2b484 + b466967 commit 228acac
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dallinger/command_line/docker_ssh.py
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

0 comments on commit 228acac

Please sign in to comment.