chef 0.9.6 → 0.9.8.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/application.rb +19 -3
- data/lib/chef/application/client.rb +7 -8
- data/lib/chef/application/knife.rb +9 -3
- data/lib/chef/application/solo.rb +5 -5
- data/lib/chef/cache/checksum.rb +2 -2
- data/lib/chef/client.rb +30 -64
- data/lib/chef/config.rb +52 -30
- data/lib/chef/cookbook/metadata.rb +12 -1
- data/lib/chef/cookbook_site_streaming_uploader.rb +211 -0
- data/lib/chef/cookbook_uploader.rb +102 -0
- data/lib/chef/cookbook_version.rb +47 -30
- data/lib/chef/couchdb.rb +1 -11
- data/lib/chef/exceptions.rb +1 -0
- data/lib/chef/file_access_control.rb +1 -1
- data/lib/chef/index_queue/amqp_client.rb +10 -3
- data/lib/chef/knife.rb +154 -58
- data/lib/chef/knife/bootstrap.rb +84 -48
- data/lib/chef/knife/bootstrap/centos5-gems.erb +41 -0
- data/lib/chef/knife/bootstrap/fedora13-gems.erb +38 -0
- data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +44 -0
- data/lib/chef/knife/client_bulk_delete.rb +1 -1
- data/lib/chef/knife/client_create.rb +1 -1
- data/lib/chef/knife/client_delete.rb +1 -1
- data/lib/chef/knife/client_edit.rb +1 -1
- data/lib/chef/knife/client_list.rb +1 -1
- data/lib/chef/knife/client_reregister.rb +1 -1
- data/lib/chef/knife/client_show.rb +1 -1
- data/lib/chef/knife/configure.rb +1 -1
- data/lib/chef/knife/configure_client.rb +1 -1
- data/lib/chef/knife/cookbook_bulk_delete.rb +1 -1
- data/lib/chef/knife/cookbook_create.rb +159 -0
- data/lib/chef/knife/cookbook_delete.rb +6 -6
- data/lib/chef/knife/cookbook_download.rb +1 -1
- data/lib/chef/knife/cookbook_list.rb +1 -1
- data/lib/chef/knife/cookbook_metadata.rb +1 -1
- data/lib/chef/knife/cookbook_metadata_from_file.rb +1 -1
- data/lib/chef/knife/cookbook_show.rb +1 -1
- data/lib/chef/knife/cookbook_site_download.rb +2 -1
- data/lib/chef/knife/cookbook_site_list.rb +2 -1
- data/lib/chef/knife/cookbook_site_search.rb +2 -1
- data/lib/chef/knife/cookbook_site_share.rb +108 -0
- data/lib/chef/knife/cookbook_site_show.rb +2 -1
- data/lib/chef/knife/cookbook_site_unshare.rb +52 -0
- data/lib/chef/knife/cookbook_site_vendor.rb +3 -2
- data/lib/chef/knife/cookbook_test.rb +1 -1
- data/lib/chef/knife/cookbook_upload.rb +22 -155
- data/lib/chef/knife/data_bag_create.rb +2 -1
- data/lib/chef/knife/data_bag_delete.rb +2 -1
- data/lib/chef/knife/data_bag_edit.rb +2 -1
- data/lib/chef/knife/data_bag_from_file.rb +2 -1
- data/lib/chef/knife/data_bag_list.rb +2 -1
- data/lib/chef/knife/data_bag_show.rb +2 -1
- data/lib/chef/knife/ec2_instance_data.rb +1 -1
- data/lib/chef/knife/ec2_server_create.rb +16 -4
- data/lib/chef/knife/ec2_server_delete.rb +8 -2
- data/lib/chef/knife/ec2_server_list.rb +8 -2
- data/lib/chef/knife/index_rebuild.rb +1 -1
- data/lib/chef/knife/node_bulk_delete.rb +1 -1
- data/lib/chef/knife/node_create.rb +1 -1
- data/lib/chef/knife/node_delete.rb +1 -1
- data/lib/chef/knife/node_edit.rb +1 -1
- data/lib/chef/knife/node_from_file.rb +1 -1
- data/lib/chef/knife/node_list.rb +1 -1
- data/lib/chef/knife/node_run_list_add.rb +1 -1
- data/lib/chef/knife/node_run_list_remove.rb +1 -1
- data/lib/chef/knife/node_show.rb +1 -1
- data/lib/chef/knife/rackspace_server_create.rb +1 -1
- data/lib/chef/knife/rackspace_server_delete.rb +1 -1
- data/lib/chef/knife/rackspace_server_list.rb +1 -1
- data/lib/chef/knife/recipe_list.rb +1 -1
- data/lib/chef/knife/role_bulk_delete.rb +1 -1
- data/lib/chef/knife/role_create.rb +1 -1
- data/lib/chef/knife/role_delete.rb +1 -1
- data/lib/chef/knife/role_edit.rb +1 -1
- data/lib/chef/knife/role_from_file.rb +1 -1
- data/lib/chef/knife/role_list.rb +1 -1
- data/lib/chef/knife/role_show.rb +1 -1
- data/lib/chef/knife/search.rb +1 -1
- data/lib/chef/knife/slicehost_images_list.rb +1 -1
- data/lib/chef/knife/slicehost_server_create.rb +1 -1
- data/lib/chef/knife/slicehost_server_delete.rb +1 -1
- data/lib/chef/knife/slicehost_server_list.rb +1 -1
- data/lib/chef/knife/ssh.rb +49 -9
- data/lib/chef/knife/status.rb +2 -2
- data/lib/chef/knife/terremark_server_create.rb +1 -1
- data/lib/chef/knife/terremark_server_delete.rb +1 -1
- data/lib/chef/knife/terremark_server_list.rb +1 -1
- data/lib/chef/mixin/command.rb +17 -204
- data/lib/chef/mixin/command/unix.rb +215 -0
- data/lib/chef/mixin/command/windows.rb +72 -0
- data/lib/chef/mixin/find_preferred_file.rb +3 -3
- data/lib/chef/mixin/language.rb +64 -23
- data/lib/chef/node.rb +27 -3
- data/lib/chef/node/attribute.rb +20 -10
- data/lib/chef/platform.rb +3 -9
- data/lib/chef/provider/cron.rb +1 -1
- data/lib/chef/provider/deploy.rb +4 -1
- data/lib/chef/provider/group.rb +1 -1
- data/lib/chef/provider/group/dscl.rb +2 -2
- data/lib/chef/provider/mount/mount.rb +6 -6
- data/lib/chef/provider/package/easy_install.rb +8 -7
- data/lib/chef/provider/package/pacman.rb +1 -1
- data/lib/chef/provider/package/rpm.rb +4 -4
- data/lib/chef/provider/package/solaris.rb +127 -0
- data/lib/chef/provider/package/yum.rb +51 -28
- data/lib/chef/provider/remote_directory.rb +5 -2
- data/lib/chef/provider/remote_file.rb +1 -1
- data/lib/chef/provider/ruby_block.rb +1 -0
- data/lib/chef/provider/script.rb +2 -2
- data/lib/chef/provider/service/debian.rb +40 -4
- data/lib/chef/provider/service/freebsd.rb +1 -1
- data/lib/chef/provider/service/upstart.rb +3 -10
- data/lib/chef/provider/user/dscl.rb +2 -2
- data/lib/chef/providers.rb +1 -0
- data/lib/chef/resource.rb +7 -8
- data/lib/chef/resource/service.rb +17 -0
- data/lib/chef/resource/solaris_package.rb +36 -0
- data/lib/chef/resource/yum_package.rb +11 -4
- data/lib/chef/rest/rest_request.rb +18 -1
- data/lib/chef/run_list/run_list_expansion.rb +4 -0
- data/lib/chef/run_list/run_list_item.rb +8 -1
- data/lib/chef/shef/ext.rb +1 -1
- data/lib/chef/shef/shef_session.rb +7 -3
- data/lib/chef/tasks/chef_repo.rake +1 -0
- data/lib/chef/version.rb +2 -1
- metadata +23 -8
- data/lib/chef/cache/file_cache_by_checksum.rb +0 -52
@@ -23,7 +23,8 @@ class Chef
|
|
23
23
|
class Knife
|
24
24
|
class DataBagCreate < Knife
|
25
25
|
|
26
|
-
banner "
|
26
|
+
banner "knife data bag create BAG [ITEM] (options)"
|
27
|
+
category "data bag"
|
27
28
|
|
28
29
|
def run
|
29
30
|
@data_bag_name, @data_bag_item_name = @name_args
|
@@ -24,7 +24,8 @@ class Chef
|
|
24
24
|
class Knife
|
25
25
|
class DataBagFromFile < Knife
|
26
26
|
|
27
|
-
banner "
|
27
|
+
banner "knife data bag from file BAG FILE (options)"
|
28
|
+
category "data bag"
|
28
29
|
|
29
30
|
def run
|
30
31
|
updated = load_from_file(Chef::DataBagItem, @name_args[1], @name_args[0])
|
@@ -23,7 +23,7 @@ class Chef
|
|
23
23
|
class Knife
|
24
24
|
class Ec2ServerCreate < Knife
|
25
25
|
|
26
|
-
banner "
|
26
|
+
banner "knife ec2 server create [RUN LIST...] (options)"
|
27
27
|
|
28
28
|
option :flavor,
|
29
29
|
:short => "-f FLAVOR",
|
@@ -60,7 +60,12 @@ class Chef
|
|
60
60
|
:long => "--ssh-user USERNAME",
|
61
61
|
:description => "The ssh username",
|
62
62
|
:default => "root"
|
63
|
-
|
63
|
+
|
64
|
+
option :identity_file,
|
65
|
+
:short => "-i IDENTITY_FILE",
|
66
|
+
:long => "--identity-file IDENTITY_FILE",
|
67
|
+
:description => "The SSH identity file used for authentication"
|
68
|
+
|
64
69
|
option :aws_access_key_id,
|
65
70
|
:short => "-A ID",
|
66
71
|
:long => "--aws-access-key-id KEY",
|
@@ -77,6 +82,11 @@ class Chef
|
|
77
82
|
:long => "--prerelease",
|
78
83
|
:description => "Install the pre-release chef gems"
|
79
84
|
|
85
|
+
option :region,
|
86
|
+
:long => "--region REGION",
|
87
|
+
:description => "Your AWS region",
|
88
|
+
:default => "us-east-1"
|
89
|
+
|
80
90
|
def h
|
81
91
|
@highline ||= HighLine.new
|
82
92
|
end
|
@@ -91,7 +101,8 @@ class Chef
|
|
91
101
|
|
92
102
|
connection = Fog::AWS::EC2.new(
|
93
103
|
:aws_access_key_id => Chef::Config[:knife][:aws_access_key_id],
|
94
|
-
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key]
|
104
|
+
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key],
|
105
|
+
:region => config[:region]
|
95
106
|
)
|
96
107
|
|
97
108
|
server = connection.servers.create(
|
@@ -124,7 +135,8 @@ class Chef
|
|
124
135
|
begin
|
125
136
|
bootstrap = Chef::Knife::Bootstrap.new
|
126
137
|
bootstrap.name_args = [ server.ip_address, @name_args ].flatten
|
127
|
-
bootstrap.config[:ssh_user] = config[:ssh_user]
|
138
|
+
bootstrap.config[:ssh_user] = config[:ssh_user]
|
139
|
+
bootstrap.config[:identity_file] = config[:identity_file]
|
128
140
|
bootstrap.config[:chef_node_name] = server.id
|
129
141
|
bootstrap.config[:prerelease] = config[:prerelease]
|
130
142
|
bootstrap.run
|
@@ -23,7 +23,7 @@ class Chef
|
|
23
23
|
class Knife
|
24
24
|
class Ec2ServerDelete < Knife
|
25
25
|
|
26
|
-
banner "
|
26
|
+
banner "knife ec2 server delete SERVER [SERVER] (options)"
|
27
27
|
|
28
28
|
option :aws_access_key_id,
|
29
29
|
:short => "-A ID",
|
@@ -37,6 +37,11 @@ class Chef
|
|
37
37
|
:description => "Your AWS API Secret Access Key",
|
38
38
|
:proc => Proc.new { |key| Chef::Config[:knife][:aws_secret_access_key] = key }
|
39
39
|
|
40
|
+
option :region,
|
41
|
+
:long => "--region REGION",
|
42
|
+
:description => "Your AWS region",
|
43
|
+
:default => "us-east-1"
|
44
|
+
|
40
45
|
def h
|
41
46
|
@highline ||= HighLine.new
|
42
47
|
end
|
@@ -49,7 +54,8 @@ class Chef
|
|
49
54
|
|
50
55
|
connection = Fog::AWS::EC2.new(
|
51
56
|
:aws_access_key_id => Chef::Config[:knife][:aws_access_key_id],
|
52
|
-
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key]
|
57
|
+
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key],
|
58
|
+
:region => config[:region]
|
53
59
|
)
|
54
60
|
|
55
61
|
@name_args.each do |instance_id|
|
@@ -23,7 +23,7 @@ class Chef
|
|
23
23
|
class Knife
|
24
24
|
class Ec2ServerList < Knife
|
25
25
|
|
26
|
-
banner "
|
26
|
+
banner "knife ec2 server list [RUN LIST...] (options)"
|
27
27
|
|
28
28
|
option :aws_access_key_id,
|
29
29
|
:short => "-A ID",
|
@@ -37,6 +37,11 @@ class Chef
|
|
37
37
|
:description => "Your AWS API Secret Access Key",
|
38
38
|
:proc => Proc.new { |key| Chef::Config[:knife][:aws_secret_access_key] = key }
|
39
39
|
|
40
|
+
option :region,
|
41
|
+
:long => "--region REGION",
|
42
|
+
:description => "Your AWS region",
|
43
|
+
:default => "us-east-1"
|
44
|
+
|
40
45
|
def h
|
41
46
|
@highline ||= HighLine.new
|
42
47
|
end
|
@@ -51,7 +56,8 @@ class Chef
|
|
51
56
|
|
52
57
|
connection = Fog::AWS::EC2.new(
|
53
58
|
:aws_access_key_id => Chef::Config[:knife][:aws_access_key_id],
|
54
|
-
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key]
|
59
|
+
:aws_secret_access_key => Chef::Config[:knife][:aws_secret_access_key],
|
60
|
+
:region => config[:region]
|
55
61
|
)
|
56
62
|
|
57
63
|
server_list = [
|
data/lib/chef/knife/node_edit.rb
CHANGED
data/lib/chef/knife/node_list.rb
CHANGED
data/lib/chef/knife/node_show.rb
CHANGED
data/lib/chef/knife/role_edit.rb
CHANGED
data/lib/chef/knife/role_list.rb
CHANGED
data/lib/chef/knife/role_show.rb
CHANGED
data/lib/chef/knife/search.rb
CHANGED