Permalink
Browse files

made filename of Ironfan::KnifeCommon and Ironfan::Script match the m…

…odule name
  • Loading branch information...
1 parent e74f895 commit 69dbe6e9b1b3be5ca7789b1fedacba5f2ebd93a6 Philip (flip) Kromer committed Feb 19, 2012
@@ -46,8 +46,8 @@ Gem::Specification.new do |s|
"lib/chef/knife/cluster_start.rb",
"lib/chef/knife/cluster_stop.rb",
"lib/chef/knife/cluster_sync.rb",
- "lib/chef/knife/generic_command.rb",
- "lib/chef/knife/knife_common.rb",
+ "lib/chef/knife/ironfan_script.rb",
+ "lib/chef/knife/ironfan_knife_common.rb",
"lib/ironfan.rb",
"lib/ironfan/chef_layer.rb",
"lib/ironfan/cloud.rb",
@@ -120,4 +120,3 @@ Gem::Specification.new do |s|
s.add_dependency(%q<configliere>, ["~> 0.4.8"])
end
end
-
View
@@ -47,8 +47,8 @@ Gem::Specification.new do |s|
"lib/chef/knife/cluster_start.rb",
"lib/chef/knife/cluster_stop.rb",
"lib/chef/knife/cluster_sync.rb",
- "lib/chef/knife/generic_command.rb",
- "lib/chef/knife/knife_common.rb",
+ "lib/chef/knife/ironfan_script.rb",
+ "lib/chef/knife/ironfan_knife_common.rb",
"lib/ironfan.rb",
"lib/ironfan/chef_layer.rb",
"lib/ironfan/cloud.rb",
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
+require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
require 'chef/knife/bootstrap'
class Chef
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
-require File.expand_path(File.dirname(__FILE__)+"/cluster_ssh.rb")
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
+require File.expand_path('cluster_ssh', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
+require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
-require File.expand_path(File.dirname(__FILE__)+"/cluster_bootstrap.rb")
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
+require File.expand_path('cluster_bootstrap', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -16,9 +16,8 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
-require File.expand_path(File.dirname(__FILE__)+"/cluster_ssh.rb")
-require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
+require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
+require File.expand_path('cluster_ssh', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -27,6 +27,7 @@ class ClusterShow < Knife
end
banner "knife cluster show CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"
+
option :cloud,
:long => "--[no-]cloud",
:description => "Look up machines on AWS cloud (default is yes, look up machines; use --no-cloud to skip)",
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
require 'chef/knife/ssh'
class Chef
@@ -16,8 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
-require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
+require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -15,7 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
+
+require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
+require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
class Chef
class Knife
@@ -0,0 +1,76 @@
+#
+# Author:: Philip (flip) Kromer (<flip@infochimps.com>)
+# Copyright:: Copyright (c) 2011 Infochimps, Inc
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
+
+class Chef
+ class Knife
+ class ClusterVm < Knife
+ include Ironfan::KnifeCommon
+
+ deps do
+ Ironfan::KnifeCommon.load_deps
+ require 'vagrant'
+ end
+
+ banner "knife cluster vm CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"
+
+ option :cloud,
+ :long => "--[no-]cloud",
+ :description => "Look up machines on AWS cloud (default is no, don't look up machines; use --cloud to force)",
+ :default => false,
+ :boolean => true
+
+ def run
+ load_ironfan
+ die(banner) if @name_args.empty?
+ configure_dry_run
+
+
+ env = Vagrant::Environment.new(:cwd => "/Users/flip/ics/sysadmin/ironfan-ci/vagrants/cocina-sandbox")
+
+ p [ env ]
+
+ # #
+ # # Load the facet
+ # #
+ # full_target = get_slice(*@name_args)
+ # display(full_target)
+ # # target = full_target.select(&:launchable?)
+ # target = full_target
+ #
+ # # warn_or_die_on_bogus_servers(full_target) unless full_target.bogus_servers.empty?
+ # die("", "#{ui.color("All servers are running -- not launching any.",:blue)}", "", 1) if target.empty?
+ #
+ # # Pre-populate information in chef
+ # section("Sync'ing to chef and cloud")
+ # # target.sync_to_cloud
+ # target.sync_to_chef
+ #
+ # # Launch servers
+ # section("Launching machines", :green)
+ # # target.create_vms
+ #
+ # ui.info("")
+ # display(target)
+
+ end
+
+ end
+ end
+end
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
+require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
module Ironfan
class Script < Chef::Knife

0 comments on commit 69dbe6e

Please sign in to comment.