I want to write a fish script to run Locust on the amazon servers. I wrote the code as below, the problem is that when the shell connects to first server it cant send the other commands there.
Any helps, recommedationa are appreciated.
set labs 'ubuntu@compute1.amazonaws.com' 'ubuntu@compute2.amazonaws.com' 'ubuntu@compute3.amazonaws.com' 'ubuntu@compute4.amazonaws.com'
set key /Users/mesutgunes/Desktop/project-key.pem
for lab in $labs
ssh -i $key $lab
cd /path/to/project/
screen
locust -f file.py --master
exit
end
Aucun commentaire:
Enregistrer un commentaire