Hello I am using an Amazon EC2 instance to go through the Chef tutorial. If I restart the EC2 instance I get a new IP Address. How do I update the chef node with the new IP address so that I can upload changes to my cookbook. For example when I execute the following command,
knife ssh ‘name:node2-rhel’ sudo chef-client --ssh-user ec2-user --identity-file …\ChefTutorial.pem --attribute cloud.public_hostname
I get the following error,
WARNING: Failed to connect to ec2-52-55-19-236.compute-1.amazonaws.com – Net::SSH::ConnectionTimeout: Net::SSH::ConnectionTimeout
The address it is trying to connect to is the original address amazon assigned not the new one assigned after rebooting my instance.
Thanks in advance