Browse Source

Adding "services" doc

Change-Id: Ida3c2f2a3ee4e40f43e4bf28898c66b145975560
changes/36/440636/4
Andrey Pavlov 2 years ago
parent
commit
4f134c6dd1
2 changed files with 119 additions and 0 deletions
  1. 79
    0
      doc/source/config/services.rst
  2. 40
    0
      doc/source/config/types.rst

+ 79
- 0
doc/source/config/services.rst View File

@@ -0,0 +1,79 @@
1
+.. _services_section:
2
+
3
+==================
4
+"services" section
5
+==================
6
+
7
+You would want to have dedicated DB/messaging/memcached/etc for some of your
8
+services. Or you could have several backends and want to switch between them
9
+easily. This guide will describe how to make proper configuration for both
10
+cases.
11
+
12
+All required configuration is located under `services` config group and can be
13
+propagated via :file:`ccp.yaml`.
14
+
15
+The following abstractions are being used all over the CCP:
16
+
17
+* database
18
+* rpc
19
+* notifications
20
+
21
+You should explicitly define backends for them before deployment. For example:
22
+
23
+::
24
+
25
+    services:
26
+      database:
27
+        service_def: galera
28
+      rpc:
29
+        service_def: rabbitmq
30
+      notifications:
31
+        service_def: rabbitmq
32
+
33
+Those services can be used in topology definition. You don't have to define
34
+anything else. By default will be assumed that service has a name of service
35
+definition.
36
+
37
+In the following example will be created dedicated databases for keystone and
38
+glance, dedicated memcached for keystone and horizon and those services will
39
+be connected through `mapping` section.
40
+
41
+::
42
+
43
+    services:
44
+      database:
45
+        service_def: galera
46
+      keystone-db:
47
+        service_def: galera
48
+      glance-db:
49
+        service_def: galera
50
+
51
+      keystone-memcached:
52
+        service_def: memcached
53
+      horizon-memcached:
54
+        service_def: memcached
55
+
56
+      rpc:
57
+        service_def: rabbitmq
58
+      notifications:
59
+        service_def: rabbitmq
60
+
61
+      keystone:
62
+        service_def: keystone
63
+        mapping:
64
+          database: keystone-db
65
+          memcached: keystone-memcached
66
+      glance-api:
67
+        service_def: glance-api
68
+        mapping:
69
+          database: glance-db
70
+      glance-registry:
71
+        service_def: glance-registry
72
+        mapping:
73
+          database: glance-db
74
+      horizon:
75
+        service_def: horizon
76
+        mapping:
77
+          memcached: horizon-memcached
78
+
79
+.. NOTE:: Each galera instance should have it's own subset of nodes.

+ 40
- 0
doc/source/config/types.rst View File

@@ -44,6 +44,7 @@ of the microservices and credentials for connecting to Kubernetes cluster.
44 44
 - :ref:`configs`
45 45
 - :ref:`files`
46 46
 - :ref:`kubernetes`
47
+- :ref:`services`
47 48
 - :ref:`nodes`
48 49
 - :ref:`roles`
49 50
 - :ref:`replicas`
@@ -470,6 +471,45 @@ For example:
470 471
  replicas:
471 472
    heat-engine: 3
472 473
 
474
+
475
+.. _services
476
+
477
+services
478
+--------
479
+
480
+Isolation:
481
+
482
+- Not used in any template file, only used by the CCP CLI to create new
483
+  services and connect them between each other.
484
+
485
+Allowed content:
486
+
487
+- This is a dict that contains definitions for dedicated services.
488
+  Its keys are service names, values are dicts with the following keys:
489
+
490
+.. list-table::
491
+   :widths: 10 25 10 10
492
+   :header-rows: 1
493
+
494
+   * - Name
495
+     - Description
496
+     - Schema
497
+     - Default
498
+   * - service_def
499
+     - Name of the service definition associated with that service.
500
+     - string
501
+     - --
502
+   * - mapping
503
+     - Dict to map service abstractions to defined services.
504
+     - dict
505
+     - --
506
+   * - configs
507
+     - Config overrides for this particular service.
508
+     - dict
509
+     - --
510
+
511
+You can find more information and examples in :doc:`services_section` page.
512
+
473 513
 .. _nodes:
474 514
 
475 515
 nodes

Loading…
Cancel
Save