We need to connect to all the instances in one shot to perform several tasks in setting up the cluster as well as managing the cluster. Ansible will facilitate us to connect to multiple instances and take care of common tasks on all the nodes.
- We will be connecting to the first instance using external ip and then to other instances using FQDN derived from private ip
ssh -i ~/ssh/google_compute_engine email@example.com
ssh -i ~/ssh/google_compute_engine bigdataserver-2
- Test with all the servers once.
- Install ansible on bigdataserver-1 –
sudo yum -y install ansible
- Create working directory –
mkdir setup_cluster; cd setup_cluster
- Create hosts file with all internal ips