infochimps-labs / ironfan

Chef orchestration layer -- your system diagram come to life. Provision EC2, OpenStack or Vagrant without changes to cookbooks or configuration
http://infochimps.com
Other
501 stars 102 forks source link

Make cmdline args `--cloud` and `--chef` take an argument (not be boolean) #105

Open mrflip opened 12 years ago

mrflip commented 12 years ago

It looks like #28 is on the near horizon, and I'd like to use the --cloud param to target the provider. Right now saying knife cluster show foo --no-cloud keeps it from hitting AWS; knife cluster show foo --cloud is redundant as the default is 'true'.

The new behavior will be --cloud=[target or false] and --chef=false. Any blank? value or omitting the arg results in "yes, do hit the default cloud" and "yes do hit the chef server" respectively:

knife cluster show foo --cloud=false             # only hits the chef server
knife cluster kill foo --chef=false              # only kills the cloud machines

This opens up room to implement (soon, but not yet)

knife cluster show foo --cloud=rackspace         # test cluster on different provider
knife cluster show foo --cloud=rackspace-default # same as above
knife cluster show foo --cloud=vm-local          # target local vm 
knife cluster show foo --cloud=euca-east_1       # target openstack in one of several datacenters
temujin9 commented 12 years ago

@mrflip: I seem to remember you saying you'd coded the fix for this; if it has been pushed, would you please close this?

temujin9 commented 11 years ago

Not fixed, still needed in v4. Keep --no-cloud as (deprecated?) alias to --cloud=false