diff --git a/doc/source/config/services.rst b/doc/source/config/services.rst new file mode 100644 index 00000000..08e1351d --- /dev/null +++ b/doc/source/config/services.rst @@ -0,0 +1,79 @@ +.. _services_section: + +================== +"services" section +================== + +You would want to have dedicated DB/messaging/memcached/etc for some of your +services. Or you could have several backends and want to switch between them +easily. This guide will describe how to make proper configuration for both +cases. + +All required configuration is located under `services` config group and can be +propagated via :file:`ccp.yaml`. + +The following abstractions are being used all over the CCP: + +* database +* rpc +* notifications + +You should explicitly define backends for them before deployment. For example: + +:: + + services: + database: + service_def: galera + rpc: + service_def: rabbitmq + notifications: + service_def: rabbitmq + +Those services can be used in topology definition. You don't have to define +anything else. By default will be assumed that service has a name of service +definition. + +In the following example will be created dedicated databases for keystone and +glance, dedicated memcached for keystone and horizon and those services will +be connected through `mapping` section. + +:: + + services: + database: + service_def: galera + keystone-db: + service_def: galera + glance-db: + service_def: galera + + keystone-memcached: + service_def: memcached + horizon-memcached: + service_def: memcached + + rpc: + service_def: rabbitmq + notifications: + service_def: rabbitmq + + keystone: + service_def: keystone + mapping: + database: keystone-db + memcached: keystone-memcached + glance-api: + service_def: glance-api + mapping: + database: glance-db + glance-registry: + service_def: glance-registry + mapping: + database: glance-db + horizon: + service_def: horizon + mapping: + memcached: horizon-memcached + +.. NOTE:: Each galera instance should have it's own subset of nodes. \ No newline at end of file diff --git a/doc/source/config/types.rst b/doc/source/config/types.rst index 4a517e1f..939e6aed 100644 --- a/doc/source/config/types.rst +++ b/doc/source/config/types.rst @@ -44,6 +44,7 @@ of the microservices and credentials for connecting to Kubernetes cluster. - :ref:`configs` - :ref:`files` - :ref:`kubernetes` +- :ref:`services` - :ref:`nodes` - :ref:`roles` - :ref:`replicas` @@ -470,6 +471,45 @@ For example: replicas: heat-engine: 3 + +.. _services + +services +-------- + +Isolation: + +- Not used in any template file, only used by the CCP CLI to create new + services and connect them between each other. + +Allowed content: + +- This is a dict that contains definitions for dedicated services. + Its keys are service names, values are dicts with the following keys: + +.. list-table:: + :widths: 10 25 10 10 + :header-rows: 1 + + * - Name + - Description + - Schema + - Default + * - service_def + - Name of the service definition associated with that service. + - string + - -- + * - mapping + - Dict to map service abstractions to defined services. + - dict + - -- + * - configs + - Config overrides for this particular service. + - dict + - -- + +You can find more information and examples in :doc:`services_section` page. + .. _nodes: nodes