From 329cf9cf814b28661f521ef2e5426729cde24dd9 Mon Sep 17 00:00:00 2001 From: troymc Date: Wed, 17 Aug 2016 14:00:59 +0200 Subject: [PATCH] Make all fabfile.py use the SSH key path in ssh_key.py --- benchmarking-tests/fabfile.py | 3 ++- deploy-cluster-aws/fabfile.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/benchmarking-tests/fabfile.py b/benchmarking-tests/fabfile.py index ddfb36dd..44a31888 100644 --- a/benchmarking-tests/fabfile.py +++ b/benchmarking-tests/fabfile.py @@ -7,6 +7,7 @@ from fabric.operations import run, put from fabric.context_managers import settings from hostlist import public_dns_names +from ssh_key import ssh_key_path # Ignore known_hosts # http://docs.fabfile.org/en/1.10/usage/env.html#disable-known-hosts @@ -18,7 +19,7 @@ env.hosts = public_dns_names # SSH key files to try when connecting: # http://docs.fabfile.org/en/1.10/usage/env.html#key-filename -env.key_filename = 'pem/bigchaindb.pem' +env.key_filename = ssh_key_path @task diff --git a/deploy-cluster-aws/fabfile.py b/deploy-cluster-aws/fabfile.py index 3186811f..4898490e 100644 --- a/deploy-cluster-aws/fabfile.py +++ b/deploy-cluster-aws/fabfile.py @@ -15,6 +15,7 @@ from fabric.operations import run, put from fabric.context_managers import settings from hostlist import public_dns_names +from ssh_key import ssh_key_path # Ignore known_hosts # http://docs.fabfile.org/en/1.10/usage/env.html#disable-known-hosts @@ -26,7 +27,7 @@ env.hosts = public_dns_names # SSH key files to try when connecting: # http://docs.fabfile.org/en/1.10/usage/env.html#key-filename -env.key_filename = 'pem/bigchaindb.pem' +env.key_filename = ssh_key_path ###################################################################### @@ -48,6 +49,11 @@ def set_host(host_index): env.hosts = [public_dns_names[int(host_index)]] +@task +def test_ssh(): + run('echo "If you see this, then SSH to a remote host worked."') + + # Install base software @task @parallel