Created
April 14, 2010 22:24
-
-
Save grantr/366418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# try to attach any of the available volumes | |
aws_ebs_volume "#{datanode_dir}_#{node[:hadoop][:cluster_name]}" do | |
aws_access_key aws['aws_access_key_id'] | |
aws_secret_access_key aws['aws_secret_access_key'] | |
size node[:hadoop][:datanode][:ebs_vol_size] | |
device ebs_vol_dev | |
volume_ids available_volumes.collect { |v| v['volume_id'] } | |
action :attach_first | |
provider "aws_ebs_volume" | |
end | |
# try to create a volume if none are available | |
aws_ebs_volume "#{datanode_dir}_#{node[:hadoop][:cluster_name]}" do | |
aws_access_key aws['aws_access_key_id'] | |
aws_secret_access_key aws['aws_secret_access_key'] | |
size node[:hadoop][:datanode][:ebs_vol_size] | |
device ebs_vol_dev | |
action [:create, :attach] | |
provider "aws_ebs_volume" | |
notifies :create, resources(:ruby_block => "store_#{datanode_dir}_#{node[:hadoop][:cluster_name]}_volid"), :immediately | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment