Skip to content
Browse files

Merge "add configurable nats props to all service jobs"

  • Loading branch information...
2 parents d976f0e + dc27271 commit 89b97bee11d46044915b96523df1bd70a7a5c5a5 @kushmerick kushmerick committed with Gerrit Code Review Nov 9, 2012
Showing with 122 additions and 53 deletions.
  1. +3 −1 jobs/atmos_gateway/templates/atmos_gateway.yml.erb
  2. +3 −1 jobs/backup_manager/templates/backup_manager.yml.erb
  3. +6 −1 jobs/backup_manager/templates/snapshot_manager.yml.erb
  4. +3 −1 jobs/filesystem_gateway/templates/filesystem_gateway.yml.erb
  5. +4 −2 jobs/memcached_gateway/templates/memcached_gateway.yml.erb
  6. +5 −2 jobs/memcached_node/templates/memcached_node.yml.erb
  7. +5 −2 jobs/memcached_node_ng/templates/memcached_node.yml.erb
  8. +4 −2 jobs/mongodb_gateway/templates/mongodb_gateway.yml.erb
  9. +5 −2 jobs/mongodb_node/templates/mongodb_node.yml.erb
  10. +6 −4 jobs/mongodb_node_ng/templates/mongodb_node.yml.erb
  11. +4 −2 jobs/mysql_gateway/templates/mysql_gateway.yml.erb
  12. +5 −2 jobs/mysql_node/templates/mysql_node.yml.erb
  13. +5 −3 jobs/mysql_node_ng/templates/mysql_node.yml.erb
  14. +4 −2 jobs/postgresql_gateway/templates/postgresql_gateway.yml.erb
  15. +5 −2 jobs/postgresql_node/templates/postgresql_node.yml.erb
  16. +5 −3 jobs/postgresql_node_ng/templates/postgresql_node.yml.erb
  17. +4 −2 jobs/rabbit_gateway/templates/rabbit_gateway.yml.erb
  18. +5 −2 jobs/rabbit_node/templates/rabbit_node.yml.erb
  19. +5 −2 jobs/rabbit_node_ng/templates/rabbit_node.yml.erb
  20. +4 −2 jobs/redis_gateway/templates/redis_gateway.yml.erb
  21. +6 −4 jobs/redis_node/templates/redis_node.yml.erb
  22. +5 −2 jobs/redis_node_ng/templates/redis_node.yml.erb
  23. +3 −1 jobs/serialization_data_server/templates/serialization_data_server.yml.erb
  24. +5 −1 jobs/service_broker/templates/service_broker.yml.erb
  25. +4 −2 jobs/vblob_gateway/templates/vblob_gateway.yml.erb
  26. +5 −2 jobs/vblob_node/templates/vblob_node.yml.erb
  27. +4 −1 jobs/vblob_node_ng/templates/vblob_node.yml.erb
View
4 jobs/atmos_gateway/templates/atmos_gateway.yml.erb
@@ -3,7 +3,9 @@
service = "atmos"
gateway = eval("properties.#{service}_gateway")
acls = gateway.acls
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
mbus: <%= nats %>
View
4 jobs/backup_manager/templates/backup_manager.yml.erb
@@ -1,5 +1,7 @@
---
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+<% nats_props_name = properties.nats_props || "nats" %>
+<% nats_props = properties.send(nats_props_name) || OpenStruct.new %>
+mbus: nats://<%= nats_props.user %>:<%= nats_props.password %>@<%= nats_props.address %>:<%= nats_props.port %>
z_interval: <%= properties.service_backup_manager && properties.service_backup_manager.z_interval || 30 %>
logging:
level: debug
View
7 jobs/backup_manager/templates/snapshot_manager.yml.erb
@@ -1,5 +1,10 @@
---
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+<%
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
+%>
+mbus: <%= nats %>
z_interval: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.z_interval || 30 %>
logging:
level: debug
View
4 jobs/filesystem_gateway/templates/filesystem_gateway.yml.erb
@@ -3,7 +3,9 @@
service = "filesystem"
gateway = eval("properties.#{service}_gateway")
acls = gateway.acls
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
mbus: <%= nats %>
index: <%= spec.index %>
View
6 jobs/memcached_gateway/templates/memcached_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
%>
index: <%= spec.index %>
@@ -66,4 +68,4 @@ pid: /var/vcap/sys/run/memcached_gateway/memcached_gateway.pid
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
View
7 jobs/memcached_node/templates/memcached_node.yml.erb
@@ -7,12 +7,15 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.memcached_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 16 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/memcached/memcached_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
base_dir: /var/vcap/store/memcached/instances
@@ -41,7 +44,7 @@ memcached_log_dir: /var/vcap/sys/service-log/memcached
# Putting this to 1GB for testing, this *MUST* be appropriately changed
memcached_memory: <%= properties.memcached_memory || 64 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
memcached_start_timeout: <%= properties.memcached_node.memcached_start_timeout || 3 %>
run_as_user: <%= properties.memcached_node.run_as_user || "" %>
View
7 jobs/memcached_node_ng/templates/memcached_node.yml.erb
@@ -7,12 +7,15 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.memcached_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 16 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/memcached/memcached_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
base_dir: /var/vcap/store/memcached/instances
@@ -40,7 +43,7 @@ service_log_dir: /var/vcap/sys/service-log/memcached
# Putting this to 1GB for testing, this *MUST* be appropriately changed
memcached_memory: <%= properties.memcached_memory || 64 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
memcached_start_timeout: <%= properties.memcached_node.memcached_start_timeout || 3 %>
run_as_user: <%= properties.memcached_node.run_as_user || "" %>
View
6 jobs/mongodb_gateway/templates/mongodb_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
%>
mbus: <%= nats %>
@@ -71,7 +73,7 @@ node_timeout: <%= gateway.node_timeout || 8 %>
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
<% if lifecycle and lifecycle.resque %>
resque:
View
7 jobs/mongodb_node/templates/mongodb_node.yml.erb
@@ -10,11 +10,14 @@ default_version = node.default_version
packages = {}
# convention, package contains mongodb 1.8 is mongodb18
supported_versions.each{|v| packages[v] = v.sub(".","")}
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/mongodb_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
base_dir: /var/vcap/store/mongodb
logging:
@@ -52,6 +55,6 @@ ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
mongod_log_dir: /var/vcap/sys/service-log/mongodb
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
View
10 jobs/mongodb_node_ng/templates/mongodb_node.yml.erb
@@ -8,13 +8,15 @@ node = properties.mongodb_node
supported_versions = node.supported_versions
default_version = node.default_version
packages = {}
-# convention, package contains mongodb 1.8 is mongodb18
-supported_versions.each{|v| packages[v] = v.sub(".","")}
+supported_versions.each{ |v| packages[v] = v.sub(".","") } # convention: package containing mongodb 1.8 is mongodb18
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/mongodb_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
base_dir: /var/vcap/store/mongodb
image_dir: /var/vcap/store/mongodb_image
@@ -62,7 +64,7 @@ ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
service_log_dir: /var/vcap/sys/service-log/mongodb
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
service_start_timeout: <%= node.service_start_timeout || 3 %>
View
6 jobs/mysql_gateway/templates/mysql_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
%>
index: <%= spec.index %>
@@ -73,7 +75,7 @@ pid: /var/vcap/sys/run/mysql_gateway/mysql_gateway.pid
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
<% if lifecycle and lifecycle.resque %>
resque:
host: <%= lifecycle.resque.host %>
View
7 jobs/mysql_node/templates/mysql_node.yml.erb
@@ -7,12 +7,15 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.mysql_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/mysql_node.db
base_dir: /var/vcap/store/mysql
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
logging:
level: debug
@@ -45,6 +48,6 @@ gzip_bin: /bin/gzip
ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
View
8 jobs/mysql_node_ng/templates/mysql_node.yml.erb
@@ -10,7 +10,6 @@ supported_versions = node.supported_versions
default_version = node.default_version
warden = plan_conf.warden
use_warden = warden && warden.enable
-
version_configs = {
'5.1' => {
'port' => 3306,
@@ -24,12 +23,15 @@ version_configs = {
'binary_dir' => '/var/vcap/packages/mysql55/bin',
}
}
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/mysql_node.db
base_dir: /var/vcap/store/mysql
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
logging:
level: debug
@@ -67,7 +69,7 @@ gzip_bin: /bin/gzip
ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
<%if use_warden %>
View
6 jobs/postgresql_gateway/templates/postgresql_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
%>
mbus: <%= nats %>
@@ -73,7 +75,7 @@ pid: /var/vcap/sys/run/postgresql_gateway/postgresql_gateway.pid
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
<% if lifecycle and lifecycle.resque %>
resque:
View
7 jobs/postgresql_node/templates/postgresql_node.yml.erb
@@ -7,12 +7,15 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.postgresql_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/postgresql_node.db
base_dir: /var/vcap/store/postgresql
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
logging:
level: debug
@@ -43,6 +46,6 @@ dump_bin: /var/vcap/packages/postgresql/bin/pg_dump
restore_bin: /var/vcap/packages/postgresql/bin/pg_restore
migration_nfs: <%= properties.service_migration && properties.service_migration.mount_point ? properties.service_migration.mount_point : "/var/vcap/services_migration" %>
z_interval: <%= node.z_interval || 30 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
View
8 jobs/postgresql_node_ng/templates/postgresql_node.yml.erb
@@ -9,7 +9,6 @@ supported_versions = node.supported_versions
default_version = node.default_version
warden = plan_enabled && plan_conf.warden
use_warden = warden && warden.enable
-
version_configs = {
'9.0' => {
'port' => 5432,
@@ -21,6 +20,9 @@ version_configs = {
'binary_dir' => '/var/vcap/packages/postgresql91/bin',
}
}
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
@@ -32,7 +34,7 @@ base_dir: /var/vcap/store/postgresql_data
<%else%>
base_dir: /var/vcap/store/postgresql
<%end%>
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
logging:
level: debug
@@ -70,7 +72,7 @@ ip_route: <%= node.ip_route %>
<% end %>
migration_nfs: <%= properties.service_migration && properties.service_migration.mount_point ? properties.service_migration.mount_point : "/var/vcap/services_migration" %>
z_interval: <%= node.z_interval || 30 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
<%if use_warden %>
View
6 jobs/rabbit_gateway/templates/rabbit_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
mbus: <%= nats %>
index: <%= spec.index %>
@@ -69,7 +71,7 @@ pid: /var/vcap/sys/run/rabbit_gateway/rabbit_gateway.pid
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
node_timeout: <%= gateway.node_timeout || 10 %>
<% if plan_enabled %>
View
7 jobs/rabbit_node/templates/rabbit_node.yml.erb
@@ -7,12 +7,15 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.rabbit_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/rabbit/rabbit_node.db
base_dir: /var/vcap/store/rabbit/instances
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
logging:
level: debug
@@ -32,7 +35,7 @@ ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
max_clients: <%= plan_enabled && plan_conf.max_clients || 500 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048577 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
port_range:
first: 10001
last: 20000
View
7 jobs/rabbit_node_ng/templates/rabbit_node.yml.erb
@@ -7,12 +7,15 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.rabbit_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/rabbit/rabbit_node.db
base_dir: /var/vcap/store/rabbit/instances
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
logging:
level: debug
@@ -31,7 +34,7 @@ ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
max_clients: <%= plan_enabled && plan_conf.max_clients || 500 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048577 %>
+max_nats_payload: <%= nats_props.max_payload || 1048577 %>
port_range:
first: 10001
last: 20000
View
6 jobs/redis_gateway/templates/redis_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
%>
index: <%= spec.index %>
@@ -71,7 +73,7 @@ node_timeout: <%= gateway.node_timeout || 8 %>
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
<% if lifecycle and lifecycle.resque %>
resque:
host: <%= lifecycle.resque.host %>
View
10 jobs/redis_node/templates/redis_node.yml.erb
@@ -8,13 +8,15 @@ node = properties.redis_node
supported_versions = node.supported_versions || ["2.2"]
default_version = node.default_version
packages = {}
-# convention, package contains redis 2.2 is redis22
-supported_versions.each{|v| packages[v] = v.sub(".","")}
+supported_versions.each{ |v| packages[v] = v.sub(".","") } # convention: package containing redis 2.2 is redis22
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/redis/redis_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
base_dir: /var/vcap/store/redis/instances
logging:
@@ -45,7 +47,7 @@ ip_route: <%= node.ip_route %>
z_interval: <%= node.z_interval || 30 %>
redis_log_dir: /var/vcap/sys/service-log/redis
command_rename_prefix: <%= node.command_rename_prefix || "magic-protect-command-prefix" %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
redis_start_timeout: <%= node.redis_start_timeout || 3 %>
op_time_limit: <%= node.op_time_limit || 6 %>
View
7 jobs/redis_node_ng/templates/redis_node.yml.erb
@@ -7,11 +7,14 @@ plan_conf = plan_enabled && properties.service_plans.send(service.to_sym).send(p
node = properties.redis_node
supported_versions = node.supported_versions
default_version = node.default_version
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/redis/redis_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
base_dir: /var/vcap/store/redis/instances
logging:
@@ -37,7 +40,7 @@ ip_route: <%= node.ip_route %>
z_interval: <%= node.z_interval || 30 %>
service_log_dir: /var/vcap/sys/service-log/redis
command_rename_prefix: <%= node.command_rename_prefix || "magic-protect-command-prefix" %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
service_start_timeout: <%= node.service_start_timeout || 3 %>
image_dir: /var/vcap/store/redis_image
View
4 jobs/serialization_data_server/templates/serialization_data_server.yml.erb
@@ -5,10 +5,12 @@ sds = properties.serialization_data_server
sds_port = sds.port || 8080
if lifecycle and lifecycle.resque
snapshot_dir = lifecycle.mount_point || "/var/vcap/services_snapshot"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
serialization_base_dir: <%= snapshot_dir %>
pid: /var/vcap/sys/run/serialization_data_server/serialization_data_server.pid
-<% nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}" %>
mbus: <%= nats %>
<% if sds and sds.ip_route %>
ip_route: <%= sds.ip_route %>
View
6 jobs/service_broker/templates/service_broker.yml.erb
@@ -12,7 +12,11 @@ logging:
<% if properties.syslog_aggregator %>
syslog: vcap.service_broker
<% end %>
-<% nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}" %>
+<%
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
+%>
mbus: <%= nats %>
pid: /var/vcap/sys/run/service_broker/service_broker.pid
local_db: sqlite3:/var/vcap/store/service_broker.db
View
6 jobs/vblob_gateway/templates/vblob_gateway.yml.erb
@@ -9,7 +9,9 @@ plan_mgmt.instance_eval("def fields; @table.keys; end;") if plan_mgmt
supported_versions = gateway.supported_versions
version_aliases = gateway.version_aliases
version_aliases.instance_eval("def fields; @table.keys; end;") if version_aliases
-nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
mbus: <%= nats %>
index: <%= spec.index %>
@@ -70,7 +72,7 @@ node_timeout: <%= gateway.node_timeout || 8 %>
z_interval: <%= gateway.z_interval || 30 %>
check_orphan_interval: <%= gateway.check_orphan_interval || -1 %>
double_check_orphan_interval: <%= gateway.double_check_orphan_interval || 300 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
<% if plan_enabled %>
plan_management:
View
7 jobs/vblob_node/templates/vblob_node.yml.erb
@@ -8,11 +8,14 @@ node = properties.vblob_node
supported_versions = node.supported_versions
default_version = node.default_version
node_id = "#{service}_node#{'_' + plan if plan != 'free'}_#{spec.index.to_i + 1}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/vblob_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
<% if (node.nfs_server && node.nfs_server.address && node.nfs_server.export_dir) %>
base_dir: <%= node.nfs_mount_point || "/var/vcap/vblob_nfs_mount" %>/<%= node_id %>
@@ -43,6 +46,6 @@ port_range:
ip_route: <%= node.ip_route %>
<% end %>
z_interval: <%= node.z_interval || 30 %>
-max_nats_payload: <%= properties.nats.max_payload || 1048576 %>
+max_nats_payload: <%= nats_props.max_payload || 1048576 %>
fqdn_hosts: <%= properties.services && properties.services.fqdn_hosts || "false" %>
op_time_limit: <%= node.op_time_limit || 6 %>
View
5 jobs/vblob_node_ng/templates/vblob_node.yml.erb
@@ -8,11 +8,14 @@ node = properties.vblob_node
supported_versions = node.supported_versions
default_version = node.default_version
node_id = "#{service}_node_#{plan}_#{spec.index}"
+nats_props_name = properties.nats_props || "nats"
+nats_props = properties.send(nats_props_name) || OpenStruct.new
+nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
%>
capacity: <%= plan_enabled && plan_conf.capacity || 200 %>
plan: <%= plan %>
local_db: sqlite3:/var/vcap/store/vblob_node.db
-mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
+mbus: <%= nats %>
index: <%= spec.index %>
<% if (node.nfs_server && node.nfs_server.address && node.nfs_server.export_dir) %>
base_dir: <%= node.nfs_mount_point || "/var/vcap/vblob_nfs_mount" %>/<%= node_id %>

0 comments on commit 89b97be

Please sign in to comment.
Something went wrong with that request. Please try again.