I started to use Chef to deal with DevOps automation and now I have a situation were there are two database servers(primary and secondary) being deployed using knife server create
, and during the chef-client bootstrap processes, there is a recipe that deals with a script that activates database replication between these two nodes.
The problem is, this database replication involves a ssh
at some point, but because these nodes are new, they don't know about each other (there is only the chef server machine in .ssh/authorized_keys
), so if I run the script, it will get stuck asking for the ssh password...
I'm new to ssh keys, so what could be the best approach to handle this?
Thanks in advance.
knife server create
creates the machine, it automatically adds the chef-server machine key as a 'authorized_key'