unmanaged: false
networks:
- 192.169.142.0/24
- ...
+ spec:
+ # Additional service specific attributes.
In this example, the properties of this service specification are:
-* ``service_type``
- The type of the service. Needs to be either a Ceph
- service (``mon``, ``crash``, ``mds``, ``mgr``, ``osd`` or
- ``rbd-mirror``), a gateway (``nfs`` or ``rgw``), part of the
- monitoring stack (``alertmanager``, ``grafana``, ``node-exporter`` or
- ``prometheus``) or (``container``) for custom containers.
-* ``service_id``
- The name of the service.
-* ``placement``
- See :ref:`orchestrator-cli-placement-spec`.
-* ``networks``: A list of network identities instructing the daemons to only bind
- on the particular networks in that list. In case the cluster is distributed across multiple
- networks, you can add multiple networks. See :ref:`cephadm-monitoring-networks-ports`,
- :ref:`cephadm-rgw-networks` and :ref:`cephadm-mgr-networks`.
-* ``unmanaged`` If set to ``true``, the orchestrator will not deploy nor remove
- any daemon associated with this service. Placement and all other properties
- will be ignored. This is useful, if you do not want this service to be
- managed temporarily. For cephadm, See :ref:`cephadm-spec-unmanaged`
+.. py:currentmodule:: ceph.deployment.service_spec
+
+.. autoclass:: ServiceSpec
+ :members:
Each service type can have additional service-specific properties.
This structure is supposed to be enough information to
start the services.
-
"""
KNOWN_SERVICE_TYPES = 'alertmanager crash grafana iscsi mds mgr mon nfs ' \
'node-exporter osd prometheus rbd-mirror rgw ' \
preview_only: bool = False,
networks: Optional[List[str]] = None,
):
+
+ #: See :ref:`orchestrator-cli-placement-spec`.
self.placement = PlacementSpec() if placement is None else placement # type: PlacementSpec
assert service_type in ServiceSpec.KNOWN_SERVICE_TYPES, service_type
+ #: The type of the service. Needs to be either a Ceph
+ #: service (``mon``, ``crash``, ``mds``, ``mgr``, ``osd`` or
+ #: ``rbd-mirror``), a gateway (``nfs`` or ``rgw``), part of the
+ #: monitoring stack (``alertmanager``, ``grafana``, ``node-exporter`` or
+ #: ``prometheus``) or (``container``) for custom containers.
self.service_type = service_type
+
+ #: The name of the service. Required for ``iscsi``, ``mds``, ``nfs``, ``osd``, ``rgw``,
+ #: ``container``, ``ingress``
self.service_id = None
+
if self.service_type in self.REQUIRES_SERVICE_ID:
self.service_id = service_id
+
+ #: If set to ``true``, the orchestrator will not deploy nor remove
+ #: any daemon associated with this service. Placement and all other properties
+ #: will be ignored. This is useful, if you do not want this service to be
+ #: managed temporarily. For cephadm, See :ref:`cephadm-spec-unmanaged`
self.unmanaged = unmanaged
self.preview_only = preview_only
+
+ #: A list of network identities instructing the daemons to only bind
+ #: on the particular networks in that list. In case the cluster is distributed
+ #: across multiple networks, you can add multiple networks. See
+ #: :ref:`cephadm-monitoring-networks-ports`,
+ #: :ref:`cephadm-rgw-networks` and :ref:`cephadm-mgr-networks`.
self.networks: List[str] = networks or []
self.config: Optional[Dict[str, str]] = None
the next two major releases (octoups, pacific).
:param json_spec: A valid dict with ServiceSpec
+
+ :meta private:
"""
if not isinstance(json_spec, dict):
"""
Settings to configure a (multisite) Ceph RGW
+ .. code-block:: yaml
+
+ service_type: rgw
+ service_id: myrealm.myzone
+ spec:
+ rgw_realm: myrealm
+ rgw_zone: myzone
+ ssl: true
+ rgw_frontend_port: 1234
+ rgw_frontend_type: beast
+ rgw_frontend_ssl_certificate: ...
+
+ See also: :ref:`orchestrator-cli-service-spec`
"""
+
MANAGED_CONFIG_OPTIONS = ServiceSpec.MANAGED_CONFIG_OPTIONS + [
'rgw_zone',
'rgw_realm',
placement=placement, unmanaged=unmanaged,
preview_only=preview_only, config=config, networks=networks)
- self.rgw_realm = rgw_realm
- self.rgw_zone = rgw_zone
- self.rgw_frontend_port = rgw_frontend_port
- self.rgw_frontend_ssl_certificate = rgw_frontend_ssl_certificate
- self.rgw_frontend_type = rgw_frontend_type
+ #: The RGW realm associated with this service. Needs to be manually created
+ self.rgw_realm: Optional[str] = rgw_realm
+ #: The RGW zone associated with this service. Needs to be manually created
+ self.rgw_zone: Optional[str] = rgw_zone
+ #: Port of the RGW daemons
+ self.rgw_frontend_port: Optional[int] = rgw_frontend_port
+ #: List of SSL certificates
+ self.rgw_frontend_ssl_certificate: Optional[List[str]] = rgw_frontend_ssl_certificate
+ #: civetweb or beast (default: beast). See :ref:`rgw_frontends`
+ self.rgw_frontend_type: Optional[str] = rgw_frontend_type
+ #: enable SSL
self.ssl = ssl
def get_port_start(self) -> List[int]: