added ssl support based on default.
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / ceph.yaml
index 5dd544e..c46abeb 100644 (file)
@@ -4,20 +4,13 @@
       num_units: {{ unit_ceph_qty() }}
 {% if os.service.bindings %}
       bindings:
-        "": internal-api
-{% if opnfv.spaces_dict.storage is defined %}
-        cluster: storage-cluster
-{% endif %}
+        "": *oam-space
+        public: *ceph-public-space
+        cluster: *ceph-cluster-space
 {% endif %}
       options:
-        monitor-count: {{ unit_ceph_qty() }}
-        fsid: ecbb8960-0e21-11e2-b495-83a88f44db01
-        monitor-secret: AQD1P2xQiKglDhAA4NGUF5j38Mhq56qwz+45wg==
-{% if ubuntu.release == 'trusty' and os.release < 'newton' %}
-        source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
-        source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% endif %}
+        expected-osd-count: {{ unit_ceph_qty() }}
+        source: *openstack-origin
 {% if os.network.ipv6 %}
         prefer-ipv6: {{ os.network.ipv6 }}
 {% endif %}
 {% endfor %}
 {% else %}
         - "lxd:nodes/0"
-        - "lxd:nodes/1"
-        - "lxd:nodes/2"
+        - "lxd:nodes/0"
+        - "lxd:nodes/0"
 {% endif %}
 {% endif %}
     ceph-osd:
       charm: "./{{ ubuntu.release }}/ceph-osd"
 {% if os.hyperconverged %}
-{% if opnfv.units >= 3 %}
-      num_units: {{ unit_ceph_qty() }}
-{% else %}
       num_units: {{ opnfv.units }}
-{% endif %}
 {% else %}
       num_units: 3
 {% endif %}
 {% if os.service.bindings %}
       bindings:
-        "": internal-api
-{% if opnfv.spaces_dict.storage is defined %}
-        cluster: storage-cluster
-{% endif %}
+        "": *oam-space
+        public: *ceph-public-space
+        cluster: *ceph-cluster-space
 {% endif %}
       options:
-{% if os.lxd %}
-        osd-devices: /srv/ceph-osd
-{% else %}
-        osd-devices: {{ opnfv.storage_dict.ceph.disk }}
-{% endif %}
+        osd-devices: *osd-devices
+        osd-journal: *osd-journal
         osd-reformat: 'yes'
-{% if ubuntu.release == 'trusty' and os.release < 'newton' %}
-        source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
-        source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% endif %}
+        source: *openstack-origin
 {% if os.network.ipv6 %}
         prefer-ipv6: {{ os.network.ipv6 }}
 {% endif %}
       to:
 {% if os.hyperconverged %}
-{% if opnfv.units >= 3 %}
-{% for unit_id in range(0, 3) %}
-        - "nodes/{{ unit_id }}"
-{% endfor %}
-{% else %}
- {% for unit_id in range(0, opnfv.units) %}
+{% for unit_id in range(0, opnfv.units) %}
          - "nodes/{{ unit_id }}"
- {% endfor %}
-{% endif %}
+{% endfor %}
 {% else %}
 {% if os.ha.mode == 'ha' %}
 {% for unit_id in range(0, 3) %}
 {% endif %}
     ceph-radosgw:
       charm: "./{{ ubuntu.release }}/ceph-radosgw"
-      num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
+      num_units: {{ unit_qty() }}
 {% if os.service.bindings %}
+      constraints: *ceph-access-constr
       bindings:
-        "": internal-api
-        internal: internal-api
-        admin: internal-api
-{% if opnfv.spaces_dict.public is defined %}
-        public: public-api
-{% else %}
-        public: internal-api
-{% endif %}
+        "": *oam-space
+        public: *public-space
+        admin: *admin-space
+        internal: *internal-space
+        mon: *ceph-public-space
 {% endif %}
       options:
-        region: {{ os.region }}
-        operator-roles: "Member,admin"
-{% if ubuntu.release == 'trusty' and os.release < 'newton' %}
-        source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
-        source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
-{% endif %}
+        region: *openstack-region
+        operator-roles: "Member,admin,SwiftOperator"
+        source: *openstack-origin
 {% if os.network.ipv6 %}
         prefer-ipv6: {{ os.network.ipv6 }}
 {% endif %}
 {% if opnfv.storage_dict.ceph is defined %}
         ceph-osd-replication-count: {{ unit_ceph_qty() }}
+{% endif %}
+{% if os.ha.mode == 'ha' %}
+        vip: *rados-gateway-vip
+{% endif %}
+{% if os.api.ssl %}
+        ssl_ca: *ssl_ca
+        ssl_cert: *ssl_cert
+        ssl_key: *ssl_key
+        os-public-hostname: *hostname_radosgw_public
+        os-admin-hostname: *hostname_radosgw_public
+        os-internal-hostname: *hostname_radosgw_public
 {% endif %}
       to:
-{% for unit_id in to_select(unit_qty() if os.beta.hacluster_ceph_radosgw else 1) %}
+{% for unit_id in to_select(unit_qty()) %}
         - "lxd:nodes/{{ unit_id }}"
 {% endfor %}
 {% endif %}