Skip to content

Commit

Permalink
made filename of Ironfan::KnifeCommon and Ironfan::Script match the m…
Browse files Browse the repository at this point in the history
…odule name
  • Loading branch information
Philip (flip) Kromer committed Feb 19, 2012
1 parent e74f895 commit 69dbe6e
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 22 deletions.
5 changes: 2 additions & 3 deletions cluster_chef-knife.gemspec
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Gem::Specification.new do |s|
"lib/chef/knife/cluster_start.rb", "lib/chef/knife/cluster_start.rb",
"lib/chef/knife/cluster_stop.rb", "lib/chef/knife/cluster_stop.rb",
"lib/chef/knife/cluster_sync.rb", "lib/chef/knife/cluster_sync.rb",
"lib/chef/knife/generic_command.rb", "lib/chef/knife/ironfan_script.rb",
"lib/chef/knife/knife_common.rb", "lib/chef/knife/ironfan_knife_common.rb",
"lib/ironfan.rb", "lib/ironfan.rb",
"lib/ironfan/chef_layer.rb", "lib/ironfan/chef_layer.rb",
"lib/ironfan/cloud.rb", "lib/ironfan/cloud.rb",
Expand Down Expand Up @@ -120,4 +120,3 @@ Gem::Specification.new do |s|
s.add_dependency(%q<configliere>, ["~> 0.4.8"]) s.add_dependency(%q<configliere>, ["~> 0.4.8"])
end end
end end

4 changes: 2 additions & 2 deletions ironfan.gemspec
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Gem::Specification.new do |s|
"lib/chef/knife/cluster_start.rb", "lib/chef/knife/cluster_start.rb",
"lib/chef/knife/cluster_stop.rb", "lib/chef/knife/cluster_stop.rb",
"lib/chef/knife/cluster_sync.rb", "lib/chef/knife/cluster_sync.rb",
"lib/chef/knife/generic_command.rb", "lib/chef/knife/ironfan_script.rb",
"lib/chef/knife/knife_common.rb", "lib/chef/knife/ironfan_knife_common.rb",
"lib/ironfan.rb", "lib/ironfan.rb",
"lib/ironfan/chef_layer.rb", "lib/ironfan/chef_layer.rb",
"lib/ironfan/cloud.rb", "lib/ironfan/cloud.rb",
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/cluster_bootstrap.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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' require 'chef/knife/bootstrap'


class Chef class Chef
Expand Down
4 changes: 2 additions & 2 deletions lib/chef/knife/cluster_kick.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# limitations under the License. # 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 File.expand_path(File.dirname(__FILE__)+"/cluster_ssh.rb") require File.expand_path('cluster_ssh', File.dirname(File.realdirpath(__FILE__)))


class Chef class Chef
class Knife class Knife
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/cluster_kill.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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 Chef
class Knife class Knife
Expand Down
4 changes: 2 additions & 2 deletions lib/chef/knife/cluster_launch.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# limitations under the License. # 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 File.expand_path(File.dirname(__FILE__)+"/cluster_bootstrap.rb") require File.expand_path('cluster_bootstrap', File.dirname(File.realdirpath(__FILE__)))


class Chef class Chef
class Knife class Knife
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/cluster_list.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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 Chef
class Knife class Knife
Expand Down
5 changes: 2 additions & 3 deletions lib/chef/knife/cluster_proxy.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
# limitations under the License. # limitations under the License.
# #


require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb") require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
require File.expand_path(File.dirname(__FILE__)+"/cluster_ssh.rb") require File.expand_path('cluster_ssh', File.dirname(File.realdirpath(__FILE__)))
require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")


class Chef class Chef
class Knife class Knife
Expand Down
3 changes: 2 additions & 1 deletion lib/chef/knife/cluster_show.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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 Chef
class Knife class Knife
Expand All @@ -27,6 +27,7 @@ class ClusterShow < Knife
end end


banner "knife cluster show CLUSTER_NAME [FACET_NAME [INDEXES]] (options)" banner "knife cluster show CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"

option :cloud, option :cloud,
:long => "--[no-]cloud", :long => "--[no-]cloud",
:description => "Look up machines on AWS cloud (default is yes, look up machines; use --no-cloud to skip)", :description => "Look up machines on AWS cloud (default is yes, look up machines; use --no-cloud to skip)",
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/cluster_ssh.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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' require 'chef/knife/ssh'


class Chef class Chef
Expand Down
3 changes: 1 addition & 2 deletions lib/chef/knife/cluster_start.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# limitations under the License. # limitations under the License.
# #


require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb") require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")


class Chef class Chef
class Knife class Knife
Expand Down
3 changes: 2 additions & 1 deletion lib/chef/knife/cluster_stop.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 Chef
class Knife class Knife
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/cluster_sync.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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 Chef
class Knife class Knife
Expand Down
76 changes: 76 additions & 0 deletions lib/chef/knife/cluster_vm.rb
Original file line number Original file line Diff line number Diff line change
@@ -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
File renamed without changes.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License. # 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 module Ironfan
class Script < Chef::Knife class Script < Chef::Knife
Expand Down

0 comments on commit 69dbe6e

Please sign in to comment.