Skip to content

Commit

Permalink
DAOSGCP-80 Add functionality to propagate SSH keys to all nodes (#22)
Browse files Browse the repository at this point in the history
* DAOSGCP-80 Add functionality to propagate SSH keys to all nodes

Signed-off-by: Łukasz Sitkiewicz <lukasz.sitkiewicz@intel.com>

* Change pdsh to clush

Signed-off-by: Łukasz Sitkiewicz <lukasz.sitkiewicz@intel.com>
  • Loading branch information
lsitkiew authored Mar 10, 2022
1 parent bc0da1d commit f186bb8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terraform/examples/io500/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,16 @@ copy_files_to_first_client() {

}

propagate_ssh_keys_to_all_nodes () {
# Clear ~/.ssh/known_hosts so we don't run into any issues
ssh -q -F "${SSH_CONFIG_FILE}" "${FIRST_CLIENT_IP}" \
"clush --hostfile=hosts_all --dsh 'rm -f ~/.ssh/known_hosts'"

# Copy ~/.ssh directory to all instances
ssh -q -F "${SSH_CONFIG_FILE}" "${FIRST_CLIENT_IP}" \
"clush --hostfile=hosts_all --dsh --copy ~/.ssh --dest ~/"
}

configure_daos() {
log "Configure DAOS instances"
ssh -q -F "${SSH_CONFIG_FILE}" ${FIRST_CLIENT_IP} "~/configure_daos.sh"
Expand Down Expand Up @@ -485,6 +495,7 @@ main() {
configure_first_client_nat_ip
configure_ssh
copy_files_to_first_client
propagate_ssh_keys_to_all_nodes
show_instances
show_run_steps
}
Expand Down

0 comments on commit f186bb8

Please sign in to comment.