1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17+ import os .path as osp
18+
1719from click import group , option , Choice
20+ from fabric .api import execute , get
1821
1922import eggo .cluster .director as director
20- from eggo .cluster .config import (
21- DEFAULT_DIRECTOR_CONF_PATH , DEFAULT_CF_TEMPLATE_PATH )
23+
24+
25+ DEFAULT_DIRECTOR_CONF_PATH = osp .join (
26+ osp .dirname (__file__ ), 'resources' , 'aws.conf' )
27+ DEFAULT_CF_TEMPLATE_PATH = osp .join (
28+ osp .dirname (__file__ ), 'resources' , 'cloudformation.template' )
2229
2330
2431# reusable options
@@ -93,7 +100,7 @@ def login(region, stack_name, node):
93100@option_stack_name
94101def describe (region , stack_name ):
95102 """Describe the EC2 instances in the cluster"""
96- director .list (region , stack_name )
103+ director .describe (region , stack_name )
97104
98105
99106@cli .command ()
@@ -109,7 +116,6 @@ def web_proxy(region, stack_name):
109116@option_stack_name
110117def get_director_log (region , stack_name ):
111118 """DEBUG: get the Director application log from the launcher instance"""
112- from fabric .api import execute , get
113119 ec2_conn = director .create_ec2_connection (region )
114120 hosts = [director .get_launcher_instance (ec2_conn , stack_name ).ip_address ]
115121 execute (
@@ -124,7 +130,6 @@ def get_director_log(region, stack_name):
124130@option ('-b' , '--branch' , default = 'master' , show_default = True )
125131def reinstall_eggo (region , stack_name , fork , branch ):
126132 """DEBUG: reinstall a specific version of eggo"""
127- from fabric .api import execute
128133 ec2_conn = director .create_ec2_connection (region )
129134 hosts = [director .get_master_instance (ec2_conn , stack_name ).ip_address ]
130135 execute (
0 commit comments