I'd like to somehow get the public instance address or hostname from knife ec2 create ...
, but I can't find any mechanism for doing so.
Since I'm currently using chef-solo
, I've written a simple script that runs knife ec2 create
with a bootstrap template to prepare the node for chef-solo
. At the midpoint of that script (after knife ec2 create
has finished), I need to copy and paste the public IP for the instance, which is then used to "push" to the node (copies the cookbooks, roles, data_bags, host-dna, etc up to the node and runs chef-solo
).
When you bootstrap a node with chef-client
and chef-server
, you don't have this problem, because the new node reaches out to the chef-server
and pulls it config. But I'd prefer to stick with chef-solo
for now.