Closed kent37 closed 10 years ago
Are you using the fabfile directly? You should use ./bin/aws do [instance-name] [fabric options]
I use the command aws do dynamic_canvas show_in_browser
. show_in_browser just opens a webbrowser to the host. It is going to http://dynamic_canvas instead of the actual EC2 name. The code for do_cmd()
sets hoststr = argv[0]
which is the instance name from the config file. That is passed as the -H argument to fab.
Prior to the revision I cited, hoststr was set to the host
result of calling init_ssh_key()
which is the public_dns_name for the instance.
OK, I get it. The translation from instance name to public DNS name happens in HostConnectionCache in fabric_integration.py. This means that the host name in the fabfile is the instance name and the public DNS name is not available to the fabfile.
I guess the best fix then would be to expose the public and maybe private DNS name to the fabfile.
Yes. Ideally the host name passed to the fabfile would be the correct hostname.
The env contains server
which is the instance object which has all one needs, like the config etc.
The fabfile integration seems to be broken for EC2 instances, the fabfile is run with the name of the instance from aws.conf rather than the public_dns_name of the running server. I think this was broken in https://github.com/fschulze/mr.awsome/commit/d671f7f595db1380e2a9604cfd3c5df12ce45224.