Implement remote-exec
We need to execute remote scripts from client, in order to collect data on each run. For practical reasons, we could use root and add id_rsa
key directly on provisioning time (that is, in the cloud-init templates, under /root/.ssh/id_rsa
).
Example from becnhPlatform:
## Remote actions from client to datanode
function remote-datanode-exec {
sshuser=$(getTag Sshuser)
project=$(getTag Project)
dbhost=$(getDbip)
ssh -o "StrictHostKeyChecking false" -i /home/${sshuser}/.ssh/id_rsa ${sshuser}@${dbhost} "${1}"
}
Once we have this executer, we can create scripts for collect sar
and perf
metrics on each pool node.
Edited by Emanuel Calvo