Revised configuration templates to use rack topology names AWS oriented
This commit is contained in:
parent
90400ce8c3
commit
1aa5a12e26
|
@ -14,19 +14,22 @@ db=dynomite
|
||||||
# Dynomite Cluster details.
|
# Dynomite Cluster details.
|
||||||
# format is host:port:rack separated by semicolon
|
# format is host:port:rack separated by semicolon
|
||||||
workflow.dynomite.cluster.hosts={% set ns = namespace() %}
|
workflow.dynomite.cluster.hosts={% set ns = namespace() %}
|
||||||
{% set ns.datacenter = "us-east-" %}
|
{% set ns.availability_zone = "" %}
|
||||||
{% set ns.current_rack = "" %}
|
|
||||||
{% set ns.current_suffix = 0 %}
|
|
||||||
{% for seed in seeds %}
|
{% for seed in seeds %}
|
||||||
{% set ns.seed_tokens = seed.split(':') %}
|
{% set ns.seed_tokens = seed.split(':') %}
|
||||||
{% if ns.seed_tokens[2] != ns.current_rack %}
|
{% if ns.availability_zone == "" %}
|
||||||
{% set ns.current_rack = ns.seed_tokens[2] %}
|
{% set ns.availability_zone = ns.seed_tokens[2] %}
|
||||||
{% set ns.current_suffix = ns.current_suffix + 1 %}
|
{% endif %}
|
||||||
|
{% if ns.availability_zone == ns.seed_tokens[2] %}
|
||||||
|
{{ ns.seed_tokens[0] }}:8102:{{ ns.availability_zone }}{%- if not loop.last %};{%- endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ ns.seed_tokens[0] }}:8102:{{ ns.seed_tokens[3] }}-{{ ns.current_suffix }}{%- if not loop.last %};{%- endif %}
|
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
# If you are running using dynomite, also add the following line to the property
|
||||||
|
# to set the rack/availability zone of the conductor server to be same as dynomite cluster config
|
||||||
|
EC2_AVAILABILTY_ZONE={{ ns.availability_zone }}
|
||||||
|
|
||||||
# Dynomite cluster name
|
# Dynomite cluster name
|
||||||
workflow.dynomite.cluster.name=dyno1
|
workflow.dynomite.cluster.name=dyno1
|
||||||
|
|
||||||
|
@ -37,7 +40,7 @@ workflow.namespace.prefix=conductor
|
||||||
workflow.namespace.queue.prefix=conductor_queues
|
workflow.namespace.queue.prefix=conductor_queues
|
||||||
|
|
||||||
# No. of threads allocated to dyno-queues (optional)
|
# No. of threads allocated to dyno-queues (optional)
|
||||||
queues.dynomite.threads=10
|
queues.dynomite.threads=3
|
||||||
|
|
||||||
# Non-quorum port used to connect to local redis. Used by dyno-queues.
|
# Non-quorum port used to connect to local redis. Used by dyno-queues.
|
||||||
# When using redis directly, set this to the same port as redis server
|
# When using redis directly, set this to the same port as redis server
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 5s
|
delay: 5s
|
||||||
max_attempts: 3
|
#max_attempts: 3
|
||||||
window: 120s
|
#window: 120s
|
||||||
configs:
|
configs:
|
||||||
- source: seeds.list
|
- source: seeds.list
|
||||||
target: /dynomite/seeds.list
|
target: /dynomite/seeds.list
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
{% set datacenter = "us-east-1" %}
|
||||||
{% for replica in range(1,dynomite_replicas+1) %}
|
{% for replica in range(1,dynomite_replicas+1) %}
|
||||||
{% set replicaloop = loop %}
|
{% set replicaloop = loop %}
|
||||||
{% for shard in range(1,dynomite_shards+1) %}
|
{% for shard in range(1,dynomite_shards+1) %}
|
||||||
dynomite{{ (replicaloop.index - 1) * dynomite_shards + shard}}:8101:rack{{ replicaloop.index }}:datacenter1:{{ (shard - 1) * (4294967295 // dynomite_shards) }}
|
dynomite{{ (replicaloop.index - 1) * dynomite_shards + shard}}:8101:{{ datacenter }}{{ "abcdefghijklmnopqrstuvwxyz"[replicaloop.index - 1] }}:{{ datacenter }}:{{ (shard - 1) * (4294967295 // dynomite_shards) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue