aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/odl_cluster/templates/module-shards.conf
blob: 9a5d4c386be54e306cc49543bc5ce87b9d417964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# This file describes which shards live on which members
# The format for a module-shards is as follows,
# {
#    name = "<friendly_name_of_the_module>"
#    shards = [
#        {
#            name="<any_name_that_is_unique_for_the_module>"
#            replicas = [
#                "<name_of_member_on_which_to_run>"
#            ]
#     ]
# }
#
# For Helium we support only one shard per module. Beyond Helium
# we will support more than 1
# The replicas section is a collection of member names. This information
# will be used to decide on which members replicas of a particular shard will be
# located. Once replication is integrated with the distributed data store then
# this section can have multiple entries.
#
#


module-shards = [
    {
        name = "default"
        shards = [
            {
                name="default"
                replicas = [
{% set key = 0 %}
{% for host in groups['odl'] %}
    {% set key = key + 1 %}
        {% if loop.last %}
            "member-{{ key }}"
        {% else %}
            "member-{{ key }}",
        {% endif %}
{% endfor %}
                ]
            }
        ]
    },
    {
        name = "topology"
        shards = [
            {
                name="topology"
                replicas = [
{% set key = 0 %}
{% for host in groups['odl'] %}
    {% set key = key + 1 %}
        {% if loop.last %}
            "member-{{ key }}"
        {% else %}
            "member-{{ key }}",
        {% endif %}
{% endfor %}
                ]
            }
        ]
    },
    {
        name = "inventory"
        shards = [
            {
                name="inventory"
                replicas = [
{% set key = 0 %}
{% for host in groups['odl'] %}
    {% set key = key + 1 %}
        {% if loop.last %}
            "member-{{ key }}"
        {% else %}
            "member-{{ key }}",
        {% endif %}
{% endfor %}
                ]
            }
        ]
    },
         {
             name = "toaster"
             shards = [
                 {
                     name="toaster"
                     replicas = [
{% set key = 0 %}
{% for host in groups['odl'] %}
    {% set key = key + 1 %}
        {% if loop.last %}
            "member-{{ key }}"
        {% else %}
            "member-{{ key }}",
        {% endif %}
{% endfor %}
                     ]
                 }
             ]
         }
]