Adding "services" doc

Change-Id: Ida3c2f2a3ee4e40f43e4bf28898c66b145975560
This commit is contained in:
Andrey Pavlov 2017-03-02 19:34:08 +04:00
parent a5083dc520
commit 4f134c6dd1
2 changed files with 119 additions and 0 deletions

View File

@ -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.

View File

@ -44,6 +44,7 @@ of the microservices and credentials for connecting to Kubernetes cluster.
- :ref:`configs` - :ref:`configs`
- :ref:`files` - :ref:`files`
- :ref:`kubernetes` - :ref:`kubernetes`
- :ref:`services`
- :ref:`nodes` - :ref:`nodes`
- :ref:`roles` - :ref:`roles`
- :ref:`replicas` - :ref:`replicas`
@ -470,6 +471,45 @@ For example:
replicas: replicas:
heat-engine: 3 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:
nodes nodes