Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #77 from rackspace/KNIFE-459
Browse files Browse the repository at this point in the history
KNIFE-459 Adds support for config drive.
  • Loading branch information
Kyle Rames committed Mar 4, 2014
2 parents 2f9e510 + 12b9912 commit 59c7f0b
Show file tree
Hide file tree
Showing 5 changed files with 580 additions and 448 deletions.
7 changes: 7 additions & 0 deletions lib/chef/knife/rackspace_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ class RackspaceServerCreate < Knife
:proc => Proc.new { |k| Chef::Config[:knife][:rackspace_disk_config] = k },
:default => "AUTO"

option :rackspace_config_drive,
:long => "--rackspace_config_drive CONFIGDRIVE",
:description => "Creates a config drive device in /dev/disk/by-label/config-2 if set to TRUE",
:proc => Proc.new { |k| Chef::Config[:knife][:rackspace_config_drive] = k },
:default => "false"

option :ssh_keypair,
:long => "--ssh-keypair KEYPAIR_NAME",
:description => "Name of existing nova SSH keypair. Public key will be injected into the instance.",
Expand Down Expand Up @@ -330,6 +336,7 @@ def run
:flavor_id => locate_config_value(:flavor),
:metadata => Chef::Config[:knife][:rackspace_metadata],
:disk_config => Chef::Config[:knife][:rackspace_disk_config],
:config_drive => locate_config_value(:rackspace_config_drive) || false,
:personality => files,
:keypair => Chef::Config[:knife][:rackspace_ssh_keypair]
)
Expand Down
Loading

0 comments on commit 59c7f0b

Please sign in to comment.