For parallel installation of cloudwatch agent we are using pssh,Its distributed power shell which can execute same command on multiple servers.The shell script in this repository is only for linux servers,same thing can be done for windows servers.Follow the following steps to setup Cloudwatch agent on linux servers.
step1:
sudo apt-get install -y pssh
step2:
Add severs list to servers.txt
For exp:
ec2-x-x-46-218.compute-1.amazonaws.com
ec2-x-x-2-22.compute-1.amazonaws.com
step3:
parallel-ssh -i -h servers.txt -l ubuntu -x "-oStrictHostKeyChecking=no -i " 'git clone https://:@github.com/kapilsingh421/cloudwatch'
step4:
parallel-ssh -i -h servers.txt -l ubuntu -x "-oStrictHostKeyChecking=no -i " 'cd cloudwatch && chmod +x install_CWagent.sh && ./install_CWagent.sh'