Skip to content

Commit

Permalink
Add group addrs to log cache scheduler
Browse files Browse the repository at this point in the history
[#154864738]

Signed-off-by: Brady Love <[email protected]>
  • Loading branch information
Andrew Poydence authored and bradylove committed Mar 15, 2018
1 parent 2321fb6 commit 3a4d779
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions jobs/log-cache-scheduler/templates/environment.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ export KEY_PATH="/var/vcap/jobs/log-cache-scheduler/config/certs/log_cache.key"

# Clustered Configuration
<%=
sorted_instances=link("log-cache-group-reader").instances.sort_by {|i|i.address}
addrs=sorted_instances.map{|i| "#{i.address}:#{link("log-cache-group-reader").p('port')}"}
sorted_cache_instances=link("log-cache").instances.sort_by {|i|i.address}
cache_addrs=sorted_cache_instances.map{|i| "#{i.address}:#{link("log-cache").p('port')}"}

sorted_group_instances=link("log-cache-group-reader").instances.sort_by {|i|i.address}
group_addrs=sorted_group_instances.map{|i| "#{i.address}:#{link("log-cache-group-reader").p('port')}"}

"
export NODE_ADDRS=#{addrs.join(",")}
export NODE_ADDRS=#{cache_addrs.join(",")}
export GROUP_READER_NODE_ADDRS=#{group_addrs.join(",")}
export COUNT=#{p('count')}
export INTERVAL=#{p('interval')}
"
Expand Down

0 comments on commit 3a4d779

Please sign in to comment.