knife-rackspace 0.5.12 → 0.5.14

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ ## v0.5.14
2
+ * KNIFE_RACKSPACE-25 version bump to match knife-ec2's dependencies
3
+ * KNIFE_RACKSPACE-33 chef-full is new default
4
+ * updated authors
5
+ * Fix of small typo "backspace" > "rackspace".
6
+ * KNIFE_RACKSPACE-31 chef dependency needed, add explicit gem deps
7
+ * KNIFE_RACKSPACE-7 switch to uneven_columns_across for prettier output
8
+ * updated for rackspace_api_username and the correct current image number for Ubuntu 10.04 LTS
9
+ * KNIFE-RACKSPACE-26 fog doesn't provide cores enumeration anymore
10
+ * updated copyright and removed trailing comma
11
+ * KNIFE_RACKSPACE-30 Make use of --json-attributes option for knife
12
+ bootstrap.
13
+
14
+ ## v0.5.12
15
+ * remove dependency on net-ssh and net-ssh-multi..neither is access directly in plugin
16
+ * KNIFE_RACKSPACE-18: Increase net-ssh-multi dependecy to 1.1.0
data/README.rdoc CHANGED
@@ -18,22 +18,22 @@ Depending on your system's configuration, you may need to run this command with
18
18
 
19
19
  = CONFIGURATION:
20
20
 
21
- In order to communicate with the Rackspace Cloud API you will have to tell Knife about your Username and API Key. The easiest way to accomplish this is to create some entries in your <tt>knife.rb</tt> file:
21
+ In order to communicate with the Rackspace Cloud API you will have to tell Knife about your Username and API Key. The easiest way to accomplish this is to create some entries in your <tt>knife.rb</tt> file:
22
22
 
23
- knife[:rackspace_username] = "Your Rackspace API username"
24
- knife[:rackspace_api_key] = "Your Rackspace API Key"
23
+ knife[:rackspace_api_username] = "Your Rackspace API username"
24
+ knife[:rackspace_api_key] = "Your Rackspace API Key"
25
25
 
26
26
  If your knife.rb file will be checked into a SCM system (ie readable by others) you may want to read the values from environment variables:
27
27
 
28
- knife[:rackspace_username] = "#{ENV['RACKSPACE_USERNAME']}"
28
+ knife[:rackspace_api_username] = "#{ENV['RACKSPACE_USERNAME']}"
29
29
  knife[:rackspace_api_key] = "#{ENV['RACKSPACE_API_KEY']}"
30
30
 
31
31
  You also have the option of passing your Rackspace API Username/Key into the individual knife subcommands using the <tt>-A</tt> (or <tt>--rackspace-api-username</tt>) <tt>-K</tt> (or <tt>--rackspace-api-key</tt>) command options
32
32
 
33
33
  # provision a new 1GB Ubuntu 10.04 webserver
34
- knife rackspace server create 'role[webserver]' -I 49 -f 3 -A 'Your Rackspace API username' -K "Your Rackspace API Key"
34
+ knife rackspace server create -I 112 -f 3 -A 'Your Rackspace API username' -K "Your Rackspace API Key" -r 'role[webserver]'
35
35
 
36
- This plugin also has support for authenticating against an alternate API Auth URL. This is useful if you are a Rackspace Cloud UK user or OpenStack early adopter. Here is an example of configuring knife for Rackspace Cloud UK:
36
+ This plugin also has support for authenticating against an alternate API Auth URL. This is useful if you are a Rackspace Cloud UK user or OpenStack early adopter. Here is an example of configuring knife for Rackspace Cloud UK:
37
37
 
38
38
  knife[:rackspace_api_auth_url] = "lon.auth.api.rackspacecloud.com"
39
39
 
@@ -46,34 +46,34 @@ Additionally the following options may be set in your `knife.rb`:
46
46
 
47
47
  = SUBCOMMANDS:
48
48
 
49
- This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a <tt>--help</tt> flag
49
+ This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a <tt>--help</tt> flag
50
50
 
51
51
  == knife rackspace server create
52
52
 
53
- Provisions a new server in the Rackspace Cloud and then perform a Chef bootstrap (using the SSH protocol). The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily intended for Chef Client systems that talk to a Chef server. By default the server is bootstrapped using the {ubuntu10.04-gems}[https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb] template. This can be overridden using the <tt>-d</tt> or <tt>--template-file</tt> command options.
53
+ Provisions a new server in the Rackspace Cloud and then perform a Chef bootstrap (using the SSH protocol). The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily intended for Chef Client systems that talk to a Chef server. By default the server is bootstrapped using the {ubuntu10.04-gems}[https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb] template. This can be overridden using the <tt>-d</tt> or <tt>--template-file</tt> command options.
54
54
 
55
55
  == knife rackspace server delete
56
56
 
57
- Deletes an existing server in the currently configured Rackspace Cloud account by the server/instance id. You can find the instance id by entering 'knife backspace server list'. Please note - this does not delete the associated node and client objects from the Chef server.
57
+ Deletes an existing server in the currently configured Rackspace Cloud account by the server/instance id. You can find the instance id by entering 'knife rackspace server list'. Please note - this does not delete the associated node and client objects from the Chef server.
58
58
 
59
59
  == knife rackspace server list
60
60
 
61
- Outputs a list of all servers in the currently configured Rackspace Cloud account. Please note - this shows all instances associated with the account, some of which may not be currently managed by the Chef server.
61
+ Outputs a list of all servers in the currently configured Rackspace Cloud account. Please note - this shows all instances associated with the account, some of which may not be currently managed by the Chef server.
62
62
 
63
63
  == knife rackspace flavor list
64
64
 
65
- Outputs a list of all available flavors (available hardware configuration for a server) available to the currently configured Rackspace Cloud account. Each flavor has a unique combination of disk space, memory capacity and priority for CPU time. This data can be useful when choosing a flavor id to pass to the <tt>knife rackspace server create</tt> subcommand.
65
+ Outputs a list of all available flavors (available hardware configuration for a server) available to the currently configured Rackspace Cloud account. Each flavor has a unique combination of disk space, memory capacity and priority for CPU time. This data can be useful when choosing a flavor id to pass to the <tt>knife rackspace server create</tt> subcommand.
66
66
 
67
67
  == knife rackspace image list
68
68
 
69
- Outputs a list of all available images available to the currently configured Rackspace Cloud account. An image is a collection of files used to create or rebuild a server. Rackspace provides a number of pre-built OS images by default. This data can be useful when choosing an image id to pass to the <tt>knife rackspace server create</tt> subcommand.
69
+ Outputs a list of all available images available to the currently configured Rackspace Cloud account. An image is a collection of files used to create or rebuild a server. Rackspace provides a number of pre-built OS images by default. This data can be useful when choosing an image id to pass to the <tt>knife rackspace server create</tt> subcommand.
70
70
 
71
71
 
72
72
  = LICENSE:
73
73
 
74
74
  Author:: Adam Jacob (<adam@opscode.com>)
75
75
  Author:: Seth Chisamore (<schisamo@opscode.com>)
76
- Copyright:: Copyright (c) 2009-2011 Opscode, Inc.
76
+ Copyright:: Copyright (c) 2009-2012 Opscode, Inc.
77
77
  License:: Apache License, Version 2.0
78
78
 
79
79
  Licensed under the Apache License, Version 2.0 (the "License");
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  s.name = "knife-rackspace"
7
7
  s.version = Knife::Rackspace::VERSION
8
8
  s.has_rdoc = true
9
- s.authors = ["Adam Jacob","Seth Chisamore"]
10
- s.email = ["adam@opscode.com","schisamo@opscode.com"]
9
+ s.authors = ["Adam Jacob","Seth Chisamore", "Matt Ray"]
10
+ s.email = ["adam@opscode.com","schisamo@opscode.com", "matt@opscode.com"]
11
11
  s.homepage = "http://wiki.opscode.com/display/chef"
12
12
  s.summary = "Rackspace Support for Chef's Knife Command"
13
13
  s.description = s.summary
@@ -16,7 +16,8 @@ Gem::Specification.new do |s|
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.add_dependency "fog", "~> 0.8.2"
19
+ s.add_dependency "fog", "~> 1.3"
20
+ s.add_dependency "chef", ">= 0.10.10"
20
21
  s.require_paths = ["lib"]
21
22
 
22
23
  end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Seth Chisamore (<schisamo@opscode.com>)
3
- # Copyright:: Copyright (c) 2011 Opscode, Inc.
3
+ # Copyright:: Copyright (c) 2011-2012 Opscode, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,13 +27,12 @@ class Chef
27
27
  banner "knife rackspace flavor list (options)"
28
28
 
29
29
  def run
30
- flavor_list = [
30
+ flavor_list = [
31
31
  ui.color('ID', :bold),
32
32
  ui.color('Name', :bold),
33
33
  ui.color('Architecture', :bold),
34
34
  ui.color('RAM', :bold),
35
- ui.color('Disk', :bold),
36
- ui.color('Cores', :bold)
35
+ ui.color('Disk', :bold)
37
36
  ]
38
37
  connection.flavors.sort_by(&:id).each do |flavor|
39
38
  flavor_list << flavor.id.to_s
@@ -41,9 +40,8 @@ class Chef
41
40
  flavor_list << "#{flavor.bits.to_s}-bit"
42
41
  flavor_list << "#{flavor.ram.to_s}"
43
42
  flavor_list << "#{flavor.disk.to_s} GB"
44
- flavor_list << flavor.cores.to_s
45
43
  end
46
- puts ui.list(flavor_list, :columns_across, 6)
44
+ puts ui.list(flavor_list, :uneven_columns_across, 5)
47
45
  end
48
46
  end
49
47
  end
@@ -37,7 +37,7 @@ class Chef
37
37
  image_list << image.name
38
38
  end
39
39
 
40
- puts ui.list(image_list, :columns_across, 2)
40
+ puts ui.list(image_list, :uneven_columns_across, 2)
41
41
  end
42
42
  end
43
43
  end
@@ -85,9 +85,9 @@ class Chef
85
85
  option :distro,
86
86
  :short => "-d DISTRO",
87
87
  :long => "--distro DISTRO",
88
- :description => "Bootstrap a distro using a template; default is 'ubuntu10.04-gems'",
88
+ :description => "Bootstrap a distro using a template; default is 'chef-full'",
89
89
  :proc => Proc.new { |d| Chef::Config[:knife][:distro] = d },
90
- :default => "ubuntu10.04-gems"
90
+ :default => "chef-full"
91
91
 
92
92
  option :template_file,
93
93
  :long => "--template-file TEMPLATE",
@@ -101,6 +101,13 @@ class Chef
101
101
  :description => "Comma separated list of roles/recipes to apply",
102
102
  :proc => lambda { |o| o.split(/[\s,]+/) },
103
103
  :default => []
104
+
105
+ option :first_boot_attributes,
106
+ :short => "-j JSON_ATTRIBS",
107
+ :long => "--json-attributes",
108
+ :description => "A JSON string to be added to the first run of chef-client",
109
+ :proc => lambda { |o| JSON.parse(o) },
110
+ :default => {}
104
111
 
105
112
  option :rackspace_metadata,
106
113
  :short => "-M JSON",
@@ -192,6 +199,7 @@ class Chef
192
199
  bootstrap = Chef::Knife::Bootstrap.new
193
200
  bootstrap.name_args = [public_dns_name(server)]
194
201
  bootstrap.config[:run_list] = config[:run_list]
202
+ bootstrap.config[:first_boot_attributes] = config[:first_boot_attributes]
195
203
  bootstrap.config[:ssh_user] = config[:ssh_user] || "root"
196
204
  bootstrap.config[:ssh_password] = server.password
197
205
  bootstrap.config[:identity_file] = config[:identity_file]
@@ -56,7 +56,7 @@ class Chef
56
56
  end
57
57
  end
58
58
  end
59
- puts ui.list(server_list, :columns_across, 7)
59
+ puts ui.list(server_list, :uneven_columns_across, 7)
60
60
 
61
61
  end
62
62
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Rackspace
3
- VERSION = "0.5.12"
3
+ VERSION = "0.5.14"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,43 +1,53 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: knife-rackspace
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.14
4
5
  prerelease:
5
- version: 0.5.12
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Adam Jacob
9
9
  - Seth Chisamore
10
+ - Matt Ray
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
-
14
- date: 2011-08-15 00:00:00 -04:00
15
- default_executable:
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
14
+ date: 2012-05-15 00:00:00.000000000Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
18
17
  name: fog
19
- prerelease: false
20
- requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirement: &70301854701640 !ruby/object:Gem::Requirement
21
19
  none: false
22
- requirements:
20
+ requirements:
23
21
  - - ~>
24
- - !ruby/object:Gem::Version
25
- version: 0.8.2
22
+ - !ruby/object:Gem::Version
23
+ version: '1.3'
26
24
  type: :runtime
27
- version_requirements: *id001
25
+ prerelease: false
26
+ version_requirements: *70301854701640
27
+ - !ruby/object:Gem::Dependency
28
+ name: chef
29
+ requirement: &70301854701140 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: 0.10.10
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: *70301854701140
28
38
  description: Rackspace Support for Chef's Knife Command
29
- email:
39
+ email:
30
40
  - adam@opscode.com
31
41
  - schisamo@opscode.com
42
+ - matt@opscode.com
32
43
  executables: []
33
-
34
44
  extensions: []
35
-
36
- extra_rdoc_files:
45
+ extra_rdoc_files:
37
46
  - README.rdoc
38
47
  - LICENSE
39
- files:
48
+ files:
40
49
  - .gitignore
50
+ - CHANGELOG.md
41
51
  - Gemfile
42
52
  - LICENSE
43
53
  - README.rdoc
@@ -50,33 +60,28 @@ files:
50
60
  - lib/chef/knife/rackspace_server_delete.rb
51
61
  - lib/chef/knife/rackspace_server_list.rb
52
62
  - lib/knife-rackspace/version.rb
53
- has_rdoc: true
54
63
  homepage: http://wiki.opscode.com/display/chef
55
64
  licenses: []
56
-
57
65
  post_install_message:
58
66
  rdoc_options: []
59
-
60
- require_paths:
67
+ require_paths:
61
68
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
69
+ required_ruby_version: !ruby/object:Gem::Requirement
63
70
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: "0"
68
- required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
76
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: "0"
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
74
81
  requirements: []
75
-
76
82
  rubyforge_project:
77
- rubygems_version: 1.6.2
83
+ rubygems_version: 1.8.17
78
84
  signing_key:
79
85
  specification_version: 3
80
86
  summary: Rackspace Support for Chef's Knife Command
81
87
  test_files: []
82
-