modfiied to support the new spaces in juju.
[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         shared-db: internal-api
7 {% endif %}
8       options:
9 {% if os.ha.mode == 'ha' %}
10         innodb-buffer-pool-size: 10G
11 {% else %}
12         innodb-buffer-pool-size: 1G
13 {% endif %}
14         max-connections: 2000
15         root-password: {{ get_password('mysql_root') }}
16         sst-password: {{ get_password('mysql_sst') }}
17 {% if os.network.ipv6 %}
18         prefer-ipv6: {{ os.network.ipv6 }}
19 {% endif %}
20 {% if os.ha.mode == 'ha' %}
21         vip: {{ opnfv.vip.mysql }}
22 {% endif %}
23         min-cluster-size: {{ unit_qty() }}
24       to:
25 {% for unit_id in to_select() %}
26         - "lxd:nodes/{{ unit_id }}"
27 {% endfor %}