Skip to content

Commit

Permalink
Allow setting AWS region and endpoint settings in node attributes
Browse files Browse the repository at this point in the history
Closes #33.
  • Loading branch information
karmi committed Dec 12, 2012
1 parent bfd5881 commit 24bc9cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions attributes/aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
default.elasticsearch[:cloud][:ec2][:security_group] = ( aws['cloud']['ec2']['security_group'] rescue nil )
default.elasticsearch[:cloud][:aws][:access_key] = ( aws['cloud']['aws']['access_key'] rescue nil )
default.elasticsearch[:cloud][:aws][:secret_key] = ( aws['cloud']['aws']['secret_key'] rescue nil )
default.elasticsearch[:cloud][:aws][:region] = ( aws['cloud']['aws']['region'] rescue nil )
default.elasticsearch[:cloud][:ec2][:endpoint] = ( aws['cloud']['ec2']['endpoint'] rescue nil )
6 changes: 6 additions & 0 deletions templates/default/elasticsearch.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ cloud.node.auto_attributes: true
cloud.aws.access_key: '<%= node.elasticsearch[:cloud][:aws][:access_key] %>'
cloud.aws.secret_key: '<%= node.elasticsearch[:cloud][:aws][:secret_key] %>'
<% end %>
<% if node.elasticsearch[:cloud][:aws][:region] %>
cloud.aws.region: '<%= node.elasticsearch[:cloud][:aws][:region] %>'
<% end %>
<% if node.elasticsearch[:cloud][:ec2][:endpoint] %>
cloud.aws.ec2.endpoint: '<%= node.elasticsearch[:cloud][:ec2][:endpoint] %>'
<% end %>
<% if node.elasticsearch[:gateway][:type] %>
################################## Persistence ##################################
Expand Down

0 comments on commit 24bc9cc

Please sign in to comment.