Revised configuration templates to use rack topology names AWS oriented

This commit is contained in:
Mauro Mugnaini 2020-11-02 13:27:22 +01:00
parent 90400ce8c3
commit 1aa5a12e26
3 changed files with 15 additions and 11 deletions

View File

@ -14,19 +14,22 @@ db=dynomite
# Dynomite Cluster details.
# format is host:port:rack separated by semicolon
workflow.dynomite.cluster.hosts={% set ns = namespace() %}
{% set ns.datacenter = "us-east-" %}
{% set ns.current_rack = "" %}
{% set ns.current_suffix = 0 %}
{% set ns.availability_zone = "" %}
{% for seed in seeds %}
{% set ns.seed_tokens = seed.split(':') %}
{% if ns.seed_tokens[2] != ns.current_rack %}
{% set ns.current_rack = ns.seed_tokens[2] %}
{% set ns.current_suffix = ns.current_suffix + 1 %}
{% if ns.availability_zone == "" %}
{% set ns.availability_zone = ns.seed_tokens[2] %}
{% endif %}
{% if ns.availability_zone == ns.seed_tokens[2] %}
{{ ns.seed_tokens[0] }}:8102:{{ ns.availability_zone }}{%- if not loop.last %};{%- endif %}
{% endif %}
{{ ns.seed_tokens[0] }}:8102:{{ ns.seed_tokens[3] }}-{{ ns.current_suffix }}{%- if not loop.last %};{%- endif %}
{%- 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
workflow.dynomite.cluster.name=dyno1
@ -37,7 +40,7 @@ workflow.namespace.prefix=conductor
workflow.namespace.queue.prefix=conductor_queues
# 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.
# When using redis directly, set this to the same port as redis server

View File

@ -17,8 +17,8 @@
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
#max_attempts: 3
#window: 120s
configs:
- source: seeds.list
target: /dynomite/seeds.list

View File

@ -1,6 +1,7 @@
{% set datacenter = "us-east-1" %}
{% for replica in range(1,dynomite_replicas+1) %}
{% set replicaloop = loop %}
{% 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 %}