|
1 | 1 | # These initial groups are the only groups required to be modified. The
|
2 | 2 | # additional groups are for more control of the environment.
|
| 3 | + |
| 4 | +# NOTE(yoctozepto): In CI we want to test Masakari HA but not of other services, |
| 5 | +# to conserve the resources. Hence, we set Masakari groups to use both |
| 6 | +# primary and secondary while the parent group (control) uses only primary. |
| 7 | + |
3 | 8 | [control]
|
4 |
| -{% if scenario == 'monasca' %} |
| 9 | +{% if scenario == 'masakari' %} |
| 10 | +{% for host in hostvars if host in ['primary'] %} |
| 11 | +{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }} |
| 12 | +{% endfor %} |
| 13 | +{% elif scenario == 'monasca' %} |
5 | 14 | {% for host in hostvars if host in ['primary', 'secondary1', 'secondary2'] %}
|
6 | 15 | {{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
|
7 | 16 | {% endfor %}
|
|
11 | 20 | {% endfor %}
|
12 | 21 | {% endif %}
|
13 | 22 |
|
14 |
| -{% if scenario == 'monasca' %} |
15 | 23 | [network:children]
|
16 | 24 | control
|
17 |
| -{% else %} |
18 |
| -[network] |
19 |
| -{% for host in hostvars %} |
20 |
| -{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }} |
21 |
| -{% endfor %} |
22 |
| -{% endif %} |
| 25 | + |
| 26 | +# NOTE(yoctozepto): Until we are able to isolate network namespaces in k-a, |
| 27 | +# we are forced to separate Pacemaker remotes from full members. |
| 28 | +# This is not as bad as it sounds, because it would be enforced in |
| 29 | +# non-containerised environments anyway. |
| 30 | +# In CI we want Pacemaker remotes to run on ternaries (to test multiple remotes). |
23 | 31 |
|
24 | 32 | [compute]
|
| 33 | +{% if scenario == 'masakari' %} |
| 34 | +{% for host in hostvars if host in ['ternary1', 'ternary2'] %} |
| 35 | +{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }} |
| 36 | +{% endfor %} |
| 37 | +{% else %} |
25 | 38 | {% for host in hostvars %}
|
26 | 39 | {{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
|
27 | 40 | {% endfor %}
|
| 41 | +{% endif %} |
28 | 42 |
|
29 | 43 | [storage]
|
30 | 44 | {% for host in hostvars %}
|
@@ -126,30 +140,20 @@ storage
|
126 | 140 | control
|
127 | 141 |
|
128 | 142 | # NOTE(yoctozepto): Until we are able to isolate network namespaces in k-a,
|
129 |
| -# we are forced to separate remotes from full members. |
| 143 | +# we are forced to separate Pacemaker remotes from full members. |
130 | 144 | # This is not as bad as it sounds, because it would be enforced in
|
131 | 145 | # non-containerised environments anyway.
|
132 |
| -#[hacluster:children] |
133 |
| -#control |
| 146 | +# In CI we want Pacemaker to run on primary and secondary (to test with HA). |
| 147 | + |
134 | 148 | [hacluster]
|
135 | 149 | {% for host in hostvars %}
|
136 |
| -{% if 'ternary' not in host %} |
| 150 | +{% if host in ['primary', 'secondary'] %} |
137 | 151 | {{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
|
138 | 152 | {% endif %}
|
139 | 153 | {% endfor %}
|
140 | 154 |
|
141 |
| -# NOTE(yoctozepto): Until we are able to isolate network namespaces in k-a, |
142 |
| -# we are forced to separate remotes from full members. |
143 |
| -# This is not as bad as it sounds, because it would be enforced in |
144 |
| -# non-containerised environments anyway. |
145 |
| -#[hacluster-remote:children] |
146 |
| -#compute |
147 |
| -[hacluster-remote] |
148 |
| -{% for host in hostvars %} |
149 |
| -{% if 'ternary' in host %} |
150 |
| -{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }} |
151 |
| -{% endif %} |
152 |
| -{% endfor %} |
| 155 | +[hacluster-remote:children] |
| 156 | +compute |
153 | 157 |
|
154 | 158 | [haproxy:children]
|
155 | 159 | network
|
@@ -796,14 +800,18 @@ elasticsearch
|
796 | 800 | [prometheus-blackbox-exporter:children]
|
797 | 801 | monitoring
|
798 | 802 |
|
| 803 | +# NOTE(yoctozepto): In CI we want to test Masakari HA but not of other services, |
| 804 | +# to conserve the resources. Hence, we set Masakari groups to use both |
| 805 | +# primary and secondary while the parent group (control) uses only primary. |
| 806 | + |
799 | 807 | [masakari-api:children]
|
800 |
| -control |
| 808 | +hacluster |
801 | 809 |
|
802 | 810 | [masakari-engine:children]
|
803 |
| -control |
| 811 | +hacluster |
804 | 812 |
|
805 | 813 | [masakari-hostmonitor:children]
|
806 |
| -control |
| 814 | +hacluster |
807 | 815 |
|
808 | 816 | [masakari-instancemonitor:children]
|
809 | 817 | compute
|
|
0 commit comments