modfiied to not to expose api on admin network if public is not
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / mysql.yaml
1     mysql:
2       charm: "./{{ ubuntu.release }}/percona-cluster"
3       num_units: {{ unit_qty() }}
4 {% if os.service.bindings %}
5       bindings:
6         access: internal-api
7         shared-db: internal-api
8 {% endif %}
9       options:
10 {% if os.ha.mode == 'ha' %}
11         innodb-buffer-pool-size: 1G
12 {% else %}
13         innodb-buffer-pool-size: 1G
14 {% endif %}
15         max-connections: 2000
16         root-password: {{ get_password('mysql_root') }}
17         sst-password: {{ get_password('mysql_sst') }}
18 {% if os.network.ipv6 %}
19         prefer-ipv6: {{ os.network.ipv6 }}
20 {% endif %}
21 {% if os.ha.mode == 'ha' %}
22         vip: {{ opnfv.vip.mysql }}
23 {% endif %}
24         min-cluster-size: {{ unit_qty() }}
25       to:
26 {% for unit_id in to_select() %}
27         - "lxd:nodes/{{ unit_id }}"
28 {% endfor %}