Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redis-yml instructions #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cookbooks/redis-yml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Overview

Redis.yml will help you connect to Redis on the utility instance from your Rails application

Currently in the default.rb file under Recipes you utility instance is specified based on the first one it finds, if you have multiple utility instances you can specify it by removing "node['utility_instances'].first" and replace it with the commented out code. You can change the name of the instance based on whatever name you have chosen for your instance.
First, you have to modify the `recipes/default.rb`. Make sure where is the Redis server running on and set the `redis_instance`.

[1]: http://redis.io/
[2]: http://redis.io/topics/data-types#sorted-sets
Expand Down
8 changes: 4 additions & 4 deletions cookbooks/redis-yml/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
if ['app_master', 'app', 'solo', 'util'].include?(node[:instance_role])

# If you have only one utility instance uncomment the line below
#redis_instance = node['utility_instances'].first
#redis_instance = node.engineyard.environment.instances.find { |instance| instance[:role] == 'util' }
# Otherwise, if you have multiple utility instances you can specify it by uncommenting the line below
# You can change the name of the instance based on whatever name you have chosen for your instance.
#redis_instance = node['utility_instances'].find { |instance| instance['name'] == 'redis' }
#redis_instance = node.engineyard.environment.instances.find { |instance| instance[:name] == 'redis' }

if redis_instance
node[:applications].each do |app, data|
template "/data/#{app}/shared/config/redis.yml"do
Expand All @@ -21,4 +21,4 @@
end
end
end
end
end