Setup ansible on first server

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 itversity@35.196.243.128
    • ssh -i ~/ssh/google_compute_engine bigdataserver-2
  • Test with all the servers once.

https://gist.github.com/dgadiraju/eb76b34b2d746189876f4f8692b726d6

  • 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
[gist]25286a545cb1ed8f4682581a69e1a423[/gist]

Share this post