Browse Source

Proposed Service Architecture for Kosmos

Also including the old massive overview .dot file,
its not referenced, but it might be handy in the future.

Change-Id: I68dc4521afe4efb520748fbc323867a045a2eb77
Graham Hayes 3 years ago
parent
commit
4ee173564f

+ 3
- 0
doc/source/conf.py View File

@@ -26,6 +26,9 @@ extensions = [
26 26
     #'sphinx.ext.intersphinx',
27 27
     'oslosphinx',
28 28
     'yasfb',
29
+    'sphinx.ext.graphviz',
30
+    'sphinxcontrib.seqdiag',
31
+    'sphinxcontrib.httpdomain',
29 32
 ]
30 33
 
31 34
 # Feed configuration for yasfb

+ 8
- 0
doc/source/index.rst View File

@@ -14,6 +14,14 @@ Liberty approved specs:
14 14
 
15 15
    specs/liberty/*
16 16
 
17
+Mitaka approved specs:
18
+
19
+.. toctree::
20
+   :glob:
21
+   :maxdepth: 1
22
+
23
+   specs/mitaka/*
24
+
17 25
 
18 26
 kosmos-specs Repository Information
19 27
 ===================================================

+ 3
- 1
requirements.txt View File

@@ -1,4 +1,6 @@
1 1
 pbr>=0.11,<2.0
2 2
 oslosphinx
3 3
 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
4
-yasfb>=0.5.1
4
+yasfb>=0.5.1
5
+sphinxcontrib-seqdiag
6
+sphinxcontrib-httpdomain

+ 133
- 0
specs/mitaka/sysarch.rst View File

@@ -0,0 +1,133 @@
1
+..
2
+
3
+This work is licensed under a Creative Commons Attribution 3.0 Unported License.
4
+http://creativecommons.org/licenses/by/3.0/legalcode
5
+
6
+..
7
+  This template should be in ReSTructured text. The filename in the git
8
+  repository should match the launchpad URL, for example a URL of
9
+  https://blueprints.launchpad.net/kosmos/+spec/awesome-thing should be named
10
+  awesome-thing.rst .  Please do not delete any of the sections in this
11
+  template.  If you have nothing to say for a whole section, just write: None
12
+  For help with syntax, see http://sphinx-doc.org/rest.html
13
+  To test out your formatting, see http://www.tele3.cz/jbar/rest/rest.html
14
+
15
+=====================
16
+ System Architecture
17
+=====================
18
+
19
+Overview
20
+========
21
+
22
+The system should be made up of a few services, that are small, and horizontally scalable.
23
+
24
+The system should be the following:
25
+- Scalable
26
+- Fault Tolerant
27
+- Use other OpenStack projects as first class citizens
28
+    - For the GSLB appliance drivers the default should be `Designate`_
29
+    - For regional pool members Neutron `LBaaS V2`_ should be the default
30
+
31
+.. note:: This is for the MVP. Post MVP we need to also be able to run as a global service.
32
+
33
+
34
+Overview Diagram
35
+----------------
36
+
37
+.. graphviz:: sysarch/sysarch-diagram-overview.dot
38
+
39
+
40
+Services
41
+--------
42
+
43
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
44
+| service name          | deployment model                                | purpose                                                                       | notes                                                                                             |
45
++=======================+=================================================+===============================================================================+===================================================================================================+
46
+| kosmos-api            | multiple                                        | Configuration of GSLBs                                                        |                                                                                                   |
47
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
48
+| kosmos-conductor      | multiple - single region                        | Database Access                                                               |                                                                                                   |
49
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
50
+| kosmos-status-checker | multiple - global                               | Check status of endpoints                                                     |                                                                                                   |
51
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
52
+| kosmos-engine         | multiple - single region                        | Business Logic                                                                |                                                                                                   |
53
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
54
+| GSLB Appliance        | multiple - global (depending on appliance used) | Applicance that is used by Kosmos to direct traffic to the correct endpoints. | This is Designate in the reference Implementation                                                 |
55
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
56
+| Endpoints             | multiple - multiple regions                     | The destination for the traffic that is being load balanced by Kosmos         | This will be LBaaS V2 Load Balancers by default, but could also be IPs or Hardware Load Balancers |
57
++-----------------------+-------------------------------------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+
58
+
59
+kosmos-api
60
+^^^^^^^^^^
61
+
62
+The API would be a WSGI service that implements the API Spec previously approved.
63
+
64
+It should follow the standard OpenStack patterns (use Keystone / oslo.middleware / oslo.context)
65
+
66
+kosmos-conductor
67
+^^^^^^^^^^^^^^^^
68
+
69
+This will act as a single point of access to the DB, allowing for consistent data validation.
70
+
71
+As results are fed in from status-checkers, then engine will decide if an endpoint is suitable to be included in the pool. As it adds and removes nodes, it will
72
+update both the database, and the GSLB appliance, via the plugin. (e.g. if using the Designate plugin it would remove the endpoint's IP from the record)
73
+
74
+.. warning:: The logging component described below may be cut in the MVP
75
+
76
+There is a logging component that could be a separate DB, a timeseries DB, a columnar DB, elastic search or other storage system
77
+This will store a section of history for the pools, to allow users to see when / why endpoints were added / removed from the load balancer.
78
+
79
+.. graphviz:: sysarch/sysarch-diagram-conductor.dot
80
+
81
+kosmos-status-checker
82
+^^^^^^^^^^^^^^^^^^^^^
83
+
84
+This is a worker style service that will run status checks on the defined endpoints.
85
+
86
+This will have a plugin interface to allow for more checks to the loaded by different plugins, or for custom checks to be written by the deployer (using standard OpenStack plugin patterns)
87
+
88
+For example, any pool-members / endpoints that are LBaaS instances will not call into the VIP, but will call the LBaaS V2 API to get the health of the regional members.
89
+
90
+.. graphviz:: sysarch/sysarch-diagram-status-checker.dot
91
+
92
+kosmos-engine
93
+^^^^^^^^^^^^^
94
+
95
+This is where all the business logic resides. This service will consume status results and decide if an endpoint should be removed / added.
96
+This service will then use the plugin loaded for the GSLB backend to orchestrate this.
97
+
98
+The plugins will allow different types of GSLB appliances / services to be used, and will use standard OpenStack plugin patterns.
99
+
100
+.. graphviz:: sysarch/sysarch-diagram-engine.dot
101
+
102
+
103
+Entity Relationship Diagram
104
+---------------------------
105
+
106
+.. graphviz:: sysarch/erd-diagram.dot
107
+
108
+
109
+Example
110
+-------
111
+
112
+This is an example flow of information, when we are using Designate and checking the health info of a Neutron LBaaS load balancer.
113
+The plugin components are excluded for clarity, but would be between the "Status Check" and "Engine" components.
114
+
115
+.. seqdiag:: sysarch/example-flow.diag
116
+
117
+Implementation
118
+==============
119
+
120
+Assignee(s)
121
+-----------
122
+
123
+Primary assignee:
124
+  kosmos-drivers
125
+
126
+Milestones
127
+----------
128
+
129
+Target Milestone for completion:
130
+  M-2
131
+
132
+.. _Designate: http://wiki.openstack.org/wiki/Designate
133
+.. _LBaaS V2: http://https://wiki.openstack.org/wiki/Neutron/LBaaS

+ 91
- 0
specs/mitaka/sysarch/erd-diagram.dot View File

@@ -0,0 +1,91 @@
1
+digraph "models_diagram" {
2
+    graph[overlap=false, splines=true, fontname="sans-serif", fontsize=10 ]
3
+    node [ fontname="sans-serif"fontsize=10 ];
4
+    edge [ fontname="sans-serif"fontsize=10 ];
5
+
6
+
7
+    "LB" [shape=record, label="{\
8
+      loadbalancers|
9
+      id :uuid\l\
10
+      project_id :string\l\
11
+      domain_id :string\l\
12
+      name :string\l\
13
+      description :string\l\
14
+      fqdn :string\l\
15
+      zone_name :string\l\
16
+      flavor :enum\l\
17
+      appliance_id :string\l\
18
+      pool_ids :uuid\l\
19
+    }"]
20
+
21
+    "Pools" [shape=record, label="{\
22
+      pools|\l\
23
+      id :uuid\l\
24
+      project_id :string\l\
25
+      domain_id :string\l\
26
+      name :string\l\
27
+      description :string\l\
28
+    }"]
29
+
30
+    "PoolMembers" [shape=record, label="{\
31
+      pool_members|\l\
32
+      id :uuid\l\
33
+      project_id :string\l\
34
+      domain_id :string\l\
35
+      pool_id :string\l\
36
+      name :string\l\
37
+      description :string\l\
38
+      type :enum\l\
39
+    }"]
40
+
41
+    "PoolMemberParameters" [shape=record, label="{\
42
+      pool_member_parameters|\l\
43
+      id :uuid\l\
44
+      project_id :string\l\
45
+      domain_id :string\l\
46
+      pool_member_id :string\l\
47
+      key :enum\l\
48
+      value :string\l\
49
+    }"]
50
+
51
+    "Monitors" [shape=record, label="{\
52
+      monitors|\l\
53
+      id :uuid\l\
54
+      project_id :string\l\
55
+      domain_id :string\l\
56
+      name :string\l\
57
+      description :string\l\
58
+      type :string\l\
59
+      target :string\l\
60
+      auth :bool\l\
61
+    }"]
62
+
63
+    "MonitorParameters" [shape=record, label="{\
64
+      monitor_parameters|\l\
65
+      id :uuid\l\
66
+      project_id :string\l\
67
+      domain_id :string\l\
68
+      monitor_id :uuid\l\
69
+      key :enum\l\
70
+      value :string\l\
71
+    }"]
72
+
73
+    "PoolsMonitor" [shape=record, label="{\
74
+      pools_monitors|\l\
75
+      pool_id :uuid\l\
76
+      monitor_id :uuid\l\
77
+    }"]
78
+
79
+
80
+    { rank=same; "LB", "Pools" }
81
+    { rank=same; "PoolsMonitor" "PoolMembers" }
82
+    { rank=same; "Monitors" "PoolMemberParameters" "MonitorParameters" }
83
+
84
+    "LB" -> "Pools" [arrowtail=odot, arrowhead=crow, dir=both]
85
+
86
+    "Pools" -> "PoolsMonitor" [arrowtail=odot, arrowhead=crow, dir=both]
87
+    "PoolsMonitor" -> "Monitors" [arrowtail=crow, arrowhead=odot, dir=both]
88
+    "Monitors" -> "MonitorParameters" [arrowtail=odot, arrowhead=crow, dir=both]
89
+    "Pools" -> "PoolMembers" [arrowtail=odot, arrowhead=crow, dir=both]
90
+    "PoolMembers" -> "PoolMemberParameters" [arrowtail=odot, arrowhead=crow, dir=both]
91
+}

+ 19
- 0
specs/mitaka/sysarch/example-flow.diag View File

@@ -0,0 +1,19 @@
1
+seqdiag {
2
+
3
+    "End User";
4
+    Engine ->       Conductor                                                       [label = "Get Load Balancer Information"];
5
+    Engine <--      Conductor;
6
+
7
+    Engine ->       "Status Check"                                                  [label = "Tell Status Check to do a healthcheck"];
8
+                    "Status Check" ->   "Neutron LBaaS API"                         [label = "Get the Regional information from LBaaS V2 Status API"];
9
+                    "Status Check" <--  "Neutron LBaaS API";
10
+    "Engine" <--    "Status Check";
11
+
12
+    Engine ->       "Designate API"                                                 [label = "Tell Designate about what IPs to send traffic to"]
13
+                    "Designate API" -> "DNS Servers"                                [label = "Designate updates DNS Server"]
14
+                    "Designate API" <--"DNS Servers"
15
+    Engine <--      "Designate API"
16
+
17
+    "End User" ->   "DNS Servers"                                                   [label = "User asks for IPs of Service"]
18
+    "End User" <--  "DNS Servers"                                                   [label = "DNS Returns IPs for the LBaaS VIPs of currently available regions"]
19
+}

+ 34
- 0
specs/mitaka/sysarch/sysarch-diagram-conductor.dot View File

@@ -0,0 +1,34 @@
1
+digraph "Kosmos"{
2
+    rankdir=TB
3
+    node [ fontname="sans-serif"fontsize=10 ];
4
+    edge [ fontname="sans-serif"fontsize=10 ];
5
+    label="kosmos-conductor";
6
+    overlap="ortho";
7
+    fontname="sans-serif"
8
+    newrank=true
9
+
10
+    subgraph cluster_conductor_service {
11
+        fontname="sans-serif"
12
+        label="kosmos-conductor";
13
+        fontsize=12
14
+
15
+        Conductor[label="Conductor"];
16
+        Database[label="Database", shape="folder"];
17
+        Logger[label="Logger", shape="folder"];
18
+    }
19
+
20
+    { rank=same; "Conductor" "Engine" "WSGI" }
21
+
22
+    WSGI [style="invisible"]
23
+    Engine [style="invisible"]
24
+
25
+    WSGI -> Conductor [label="kosmos-api"];
26
+
27
+    Conductor -> Database [dir="both"];
28
+    Conductor -> Logger [dir="both"];
29
+
30
+    Conductor -> Engine [label="kosmos-engine"];
31
+
32
+
33
+
34
+}

+ 34
- 0
specs/mitaka/sysarch/sysarch-diagram-engine.dot View File

@@ -0,0 +1,34 @@
1
+digraph "Kosmos"{
2
+    rankdir=TB
3
+    node [ fontname="sans-serif"fontsize=10 ];
4
+    edge [ fontname="sans-serif"fontsize=10 ];
5
+    label="kosmos-engine";
6
+    overlap="ortho";
7
+    fontname="sans-serif"
8
+    newrank=true
9
+
10
+    Conductor [style="invisible"]
11
+
12
+    subgraph cluster_engine_service {
13
+        fontname="sans-serif"
14
+        label="kosmos-engine";
15
+        fontsize=12
16
+
17
+        node[shape=record];
18
+        Engine[label="<f0> Engine|<f1> GSLB Plugin Interface |<f2> Status Check Consumer"];
19
+        PluginDriver[label="GSLB Plugin Driver", shape="component"]
20
+    }
21
+
22
+
23
+    ApplicanceAPI [style="invisible"]
24
+    Worker [style="invisible"]
25
+
26
+    Engine:f0 -> Conductor [label="kosmos-conductor"];
27
+
28
+    Engine:f1 -> PluginDriver [dir="both"];
29
+    PluginDriver -> ApplicanceAPI [dir="both" label="GSLB Appliance API"];
30
+
31
+
32
+    Worker -> Engine:f2[label="kosmos-status-checker"];
33
+
34
+}

+ 67
- 0
specs/mitaka/sysarch/sysarch-diagram-overview.dot View File

@@ -0,0 +1,67 @@
1
+digraph "Kosmos"{
2
+    node [ fontname="sans-serif"fontsize=10; shape=record ];
3
+    edge [ fontname="sans-serif"fontsize=10 ];
4
+    label="Kosmos System Overview";
5
+    overlap="ortho";
6
+    fontname="sans-serif"
7
+    newrank=true
8
+
9
+
10
+    API_user [
11
+        label="API User"
12
+        style="dashed"
13
+    ]
14
+
15
+    cluster_keystone [
16
+        label="Keystone";
17
+        style="dashed"
18
+    ]
19
+
20
+    cluster_api_service [
21
+        label="kosmos-api";
22
+    ]
23
+
24
+    cluster_conductor_service [
25
+        label="kosmos-conductor";
26
+    ]
27
+
28
+    cluster_engine_service [
29
+        label="kosmos-engine";
30
+    ]
31
+
32
+    cluster_gslb_appliance [
33
+        label="GSLB Appliance";
34
+        style="dotted"
35
+    ]
36
+
37
+    cluster_status_checks [
38
+        label="kosmos-status-check";
39
+    ]
40
+
41
+    cluster_endpoints [
42
+        label="Endpoints";
43
+        style="dashed"
44
+    ]
45
+
46
+    end_user [
47
+        label="End User"
48
+        style="dashed"
49
+    ]
50
+
51
+    API_user -> cluster_api_service
52
+    cluster_api_service -> cluster_keystone
53
+    cluster_api_service -> cluster_conductor_service
54
+
55
+    { rank=same; "API_user" "cluster_api_service" "cluster_keystone" }
56
+
57
+    cluster_conductor_service -> cluster_engine_service
58
+    cluster_status_checks -> cluster_engine_service
59
+    cluster_status_checks -> cluster_endpoints
60
+    cluster_engine_service -> cluster_gslb_appliance
61
+
62
+    { rank=same; "cluster_engine_service" "cluster_gslb_appliance" "end_user"}
63
+    { rank=same; "cluster_endpoints"}
64
+    end_user -> cluster_gslb_appliance
65
+    end_user -> cluster_endpoints
66
+
67
+}

+ 35
- 0
specs/mitaka/sysarch/sysarch-diagram-status-checker.dot View File

@@ -0,0 +1,35 @@
1
+digraph "Kosmos"{
2
+    rankdir=TB
3
+    node [ fontname="sans-serif"fontsize=10 ];
4
+    edge [ fontname="sans-serif"fontsize=10 ];
5
+    label="kosmos-status-checker";
6
+    overlap="ortho";
7
+    fontname="sans-serif"
8
+    newrank=true
9
+
10
+    subgraph cluster_status_checks {
11
+        fontname="sans-serif"
12
+        fontsize=12
13
+        label="kosmos-status-checker";
14
+
15
+        Worker[label="Status Checking Worker"];
16
+
17
+        node[shape=record];
18
+        Checks[label="<f0> Build In Checks Interface |<f1> GSLB Plugin Checks Interface"];
19
+
20
+        BuiltInChecks[label="Built In Status Checks"]
21
+        PluginChecks[label="Plugin Status Checks", shape="component"]
22
+    }
23
+
24
+    Endpoints [style="invisible"]
25
+    Engine [style="invisible"]
26
+
27
+    Worker -> Engine [label="kosmos-engine"];
28
+    Worker -> Checks [dir="both"];
29
+    Checks:f0 -> BuiltInChecks [dir="both"];
30
+    Checks:f1 -> PluginChecks [dir="both"];
31
+    BuiltInChecks -> Endpoints [dir="both" label="Endpoints"];
32
+    PluginChecks -> Endpoints [dir="both" label="Endpoints"];
33
+
34
+
35
+}

+ 114
- 0
specs/mitaka/sysarch/sysarch-diagram.dot View File

@@ -0,0 +1,114 @@
1
+digraph "Kosmos"{
2
+    rankdir=TB
3
+    node [ fontname="sans-serif"fontsize=10 ];
4
+    edge [ fontname="sans-serif"fontsize=10 ];
5
+    label="Kosmos System Overview";
6
+    overlap="ortho";
7
+    fontname="sans-serif"
8
+    newrank=true
9
+
10
+    subgraph cluster_keystone {
11
+        fontname="sans-serif"
12
+        label="Keystone";
13
+        fontsize=12
14
+        style="dashed"
15
+
16
+        Keystone[label="Keystone API", style="dotted"];
17
+    }
18
+
19
+    subgraph cluster_api_service {
20
+        fontname="sans-serif"
21
+        label="API Service";
22
+        fontsize=12
23
+
24
+        WSGI[label="WSGI API"];
25
+    }
26
+
27
+
28
+    subgraph cluster_conductor_service {
29
+        fontname="sans-serif"
30
+        label="Conductor Service";
31
+        fontsize=12
32
+
33
+        Conductor[label="Conductor"];
34
+        Database[label="Database", shape="folder"];
35
+        Logger[label="Logger", shape="folder"];
36
+    }
37
+
38
+    subgraph cluster_engine_service {
39
+        fontname="sans-serif"
40
+        label="Engine Service";
41
+        fontsize=12
42
+
43
+        node[shape=record];
44
+        Engine[label="<f0> Engine|<f1> GSLB Plugin Interface |<f2> Status Check Consumer"];
45
+        PluginDriver[label="GSLB Plugin Driver", shape="component"]
46
+    }
47
+
48
+    subgraph cluster_gslb_appliance {
49
+        fontname="sans-serif"
50
+        fontsize=12
51
+        label="GSLB Appliance";
52
+        style="dashed"
53
+
54
+        Applicance[label="GSLB Traffic Director", style="dotted"];
55
+        ApplicanceAPI[label="GSLB Appliance API", style="dotted"];
56
+    }
57
+
58
+    subgraph cluster_status_checks {
59
+        fontname="sans-serif"
60
+        fontsize=12
61
+        label="Status Check Service";
62
+
63
+        Worker[label="Status Checking Worker"];
64
+
65
+        node[shape=record];
66
+        Checks[label="<f0> Build In Checks Interface |<f1> GSLB Plugin Checks Interface"];
67
+
68
+        BuiltInChecks[label="Built In Status Checks"]
69
+        PluginChecks[label="Plugin Status Checks", shape="component"]
70
+    }
71
+
72
+    subgraph cluster_endpoints {
73
+        fontname="sans-serif"
74
+        fontsize=12
75
+        label="Endpoints";
76
+        style="dashed"
77
+
78
+        Endpoint1[label="Endpoint", style="dotted"];
79
+        Endpoint2[label="Endpoint", style="dotted"];
80
+        Endpoint3[label="Endpoint", style="dotted"];
81
+        LBaaSAPI[label="LBaaS Status API", style="dotted"];
82
+
83
+    }
84
+
85
+    AdminUser[label="GSLB User", style="dashed"];
86
+    AdminUser -> WSGI [dir="both"];
87
+
88
+    Keystone -> WSGI [dir="both"];
89
+
90
+    WSGI -> Conductor:f0 [dir="both"];
91
+
92
+    Conductor -> Database [dir="both"];
93
+
94
+    Engine:f0 -> Conductor [dir="both"];
95
+
96
+    Engine:f1 -> PluginDriver [dir="both"];
97
+    PluginDriver -> ApplicanceAPI [dir="both"];
98
+
99
+    Applicance -> ApplicanceAPI [dir="both"];
100
+
101
+    Worker -> Engine:f2;
102
+    Worker -> Checks [dir="both"];
103
+    Checks:f0 -> BuiltInChecks [dir="both"];
104
+    Checks:f1 -> PluginChecks [dir="both"];
105
+    BuiltInChecks -> {Endpoint1; Endpoint2; Endpoint3; LBaaSAPI} [dir="both"];
106
+    LBaaSAPI -> {Endpoint1; Endpoint2; Endpoint3}
107
+    PluginChecks -> {Endpoint1; Endpoint2; Endpoint3} [dir="both"];
108
+
109
+    EndUser[label="End User", style="dashed"];
110
+
111
+    EndUser -> Applicance
112
+    EndUser -> {Endpoint1; Endpoint2; Endpoint3}
113
+
114
+}

Loading…
Cancel
Save