Browse Source

Added Stein directory for stein specs

Created Stein directory and required files for Stein release.

Change-Id: Ie4568225dbb85c63c71f5447d5484a975564d0d7
gecong1973 6 months ago
parent
commit
83011b4e76

+ 9
- 0
priorities/stein-priorities.rst View File

@@ -0,0 +1,9 @@
1
+.. _stein-priorities:
2
+
3
+========================
4
+Stein Project Priorities
5
+========================
6
+
7
+List of themes (in the form of use cases) the freezer development team will
8
+prioritize in Stein.
9
+

+ 365
- 0
specs/stein-template.rst View File

@@ -0,0 +1,365 @@
1
+..
2
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
3
+ License.
4
+
5
+ http://creativecommons.org/licenses/by/3.0/legalcode
6
+
7
+==========================================
8
+Example Spec - The title of your blueprint
9
+==========================================
10
+
11
+Include the URL of your launchpad blueprint:
12
+
13
+https://blueprints.launchpad.net/freezer/+spec/example
14
+
15
+Introduction paragraph -- why are we doing anything? A single paragraph of
16
+prose that operators can understand. The title and this first paragraph
17
+should be used as the subject line and body of the commit message
18
+respectively.
19
+
20
+Some notes about the freezer-spec and blueprint process:
21
+
22
+* Not all blueprints need a spec. For more information see
23
+  https://docs.openstack.org/nova/latest/contributor/blueprints.html?highlight=when%20blueprint%20needed
24
+
25
+* The aim of this document is first to define the problem we need to solve,
26
+  and second agree the overall approach to solve that problem.
27
+
28
+* This is not intended to be extensive documentation for a new feature.
29
+  For example, there is no need to specify the exact configuration changes,
30
+
31
+  nor the exact details of any DB model changes. But you should still define
32
+  that such changes are required, and be clear on how that will affect
33
+  upgrades.
34
+
35
+* You should aim to get your spec approved before writing your code.
36
+  While you are free to write prototypes and code before getting your spec
37
+  approved, its possible that the outcome of the spec review process leads
38
+  you towards a fundamentally different solution than you first envisaged.
39
+
40
+* But, API changes are held to a much higher level of scrutiny.
41
+  As soon as an API change merges, we must assume it could be in production
42
+  somewhere, and as such, we then need to support that API change forever.
43
+  To avoid getting that wrong, we do want lots of details about API changes
44
+  upfront.
45
+
46
+Some notes about using this template:
47
+
48
+* Your spec should be in ReSTructured text, like this template.
49
+
50
+* Please wrap text at 79 columns.
51
+
52
+* The filename in the git repository should match the launchpad URL, for
53
+  example a URL of: https://blueprints.launchpad.net/freezer/+spec/awesome-thing
54
+  should be named awesome-thing.rst
55
+
56
+* Please do not delete any of the sections in this template.  If you have
57
+  nothing to say for a whole section, just write: None
58
+
59
+* For help with syntax, see http://sphinx-doc.org/rest.html
60
+
61
+* To test out your formatting, build the docs using tox and see the generated
62
+  HTML file in doc/build/html/specs/<path_of_your_file>
63
+
64
+* If you would like to provide a diagram with your spec, ascii diagrams are
65
+  required.  http://asciiflow.com/ is a very nice tool to assist with making
66
+  ascii diagrams.  The reason for this is that the tool used to review specs is
67
+  based purely on plain text.  Plain text will allow review to proceed without
68
+  having to look at additional files which can not be viewed in gerrit.  It
69
+  will also allow inline feedback on the diagram itself.
70
+
71
+
72
+Problem description
73
+===================
74
+
75
+A detailed description of the problem. What problem is this blueprint
76
+addressing?
77
+
78
+Use Cases
79
+---------
80
+
81
+What use cases does this address? What impact on actors does this change have?
82
+Ensure you are clear about the actors in each use case: Developer, End User,
83
+Deployer etc.
84
+
85
+Proposed change
86
+===============
87
+
88
+Here is where you cover the change you propose to make in detail. How do you
89
+propose to solve this problem?
90
+
91
+If this is one part of a larger effort make it clear where this piece ends. In
92
+other words, what's the scope of this effort?
93
+
94
+At this point, if you would like to just get feedback on if the problem and
95
+proposed change fit in freezer, you can stop here and post this for review to get
96
+preliminary feedback. If so please say:
97
+Posting to get preliminary feedback on the scope of this spec.
98
+
99
+Alternatives
100
+------------
101
+
102
+What other ways could we do this thing? Why aren't we using those? This doesn't
103
+have to be a full literature review, but it should demonstrate that thought has
104
+been put into why the proposed solution is an appropriate one.
105
+
106
+Data model impact
107
+-----------------
108
+
109
+Changes which require modifications to the data model often have a wider impact
110
+on the system.  The community often has strong opinions on how the data model
111
+should be evolved, from both a functional and performance perspective. It is
112
+therefore important to capture and gain agreement as early as possible on any
113
+proposed changes to the data model.
114
+
115
+Questions which need to be addressed by this section include:
116
+
117
+* What new data objects and/or database schema changes is this going to
118
+  require?
119
+
120
+* What database migrations will accompany this change.
121
+
122
+* How will the initial set of new data objects be generated, for example if you
123
+  need to take into account existing backups/jobs/... , or modify other
124
+  existing data describe how that will work.
125
+
126
+REST API impact
127
+---------------
128
+
129
+Each API method which is either added or changed should have the following
130
+
131
+* Specification for the method
132
+
133
+  * A description of what the method does suitable for use in
134
+    user documentation
135
+
136
+  * Method type (POST/PUT/GET/DELETE)
137
+
138
+  * Normal http response code(s)
139
+
140
+  * Expected error http response code(s)
141
+
142
+    * A description for each possible error code should be included
143
+      describing semantic errors which can cause it such as
144
+      inconsistent parameters supplied to the method, or when an
145
+      instance is not in an appropriate state for the request to
146
+      succeed. Errors caused by syntactic problems covered by the JSON
147
+      schema definition do not need to be included.
148
+
149
+  * URL for the resource
150
+
151
+    * URL should not include underscores, and use hyphens instead.
152
+
153
+  * Parameters which can be passed via the url
154
+
155
+  * JSON schema definition for the request body data if allowed
156
+
157
+    * Field names should use snake_case style, not CamelCase or MixedCase
158
+      style.
159
+
160
+  * JSON schema definition for the response body data if any
161
+
162
+    * Field names should use snake_case style, not CamelCase or MixedCase
163
+      style.
164
+
165
+* Example use case including typical API samples for both data supplied
166
+  by the caller and the response
167
+
168
+* Discuss any policy changes, and discuss what things a deployer needs to
169
+  think about when defining their policy.
170
+
171
+Reuse of existing predefined parameter types such as regexps for
172
+passwords and user defined names is highly encouraged.
173
+
174
+Security impact
175
+---------------
176
+
177
+Describe any potential security impact on the system.  Some of the items to
178
+consider include:
179
+
180
+* Does this change touch sensitive data such as tokens, keys, or user data?
181
+
182
+* Does this change alter the API in a way that may impact security, such as
183
+  a new way to access sensitive information or a new way to login?
184
+
185
+* Does this change involve cryptography or hashing?
186
+
187
+* Does this change require the use of sudo or any elevated privileges?
188
+
189
+* Does this change involve using or parsing user-provided data? This could
190
+  be directly at the API level or indirectly such as changes to a cache layer.
191
+
192
+* Can this change enable a resource exhaustion attack, such as allowing a
193
+  single API interaction to consume significant server resources? Some examples
194
+  of this include launching subprocesses for each connection, or entity
195
+  expansion attacks in XML.
196
+
197
+For more detailed guidance, please see the OpenStack Security Guidelines as
198
+a reference (https://wiki.openstack.org/wiki/Security/Guidelines).  These
199
+guidelines are a work in progress and are designed to help you identify
200
+security best practices.  For further information, feel free to reach out
201
+to the OpenStack Security Group at openstack-security@lists.openstack.org.
202
+
203
+Notifications impact
204
+--------------------
205
+
206
+Please specify any changes to notifications. Be that an extra notification,
207
+changes to an existing notification, or removing a notification.
208
+
209
+Other end user impact
210
+---------------------
211
+
212
+Aside from the API, are there other ways a user will interact with this
213
+feature?
214
+
215
+* Does this change have an impact on python-freezerclient? What does the user
216
+  interface there look like?
217
+
218
+* Does this change have an impact on freezer-web-ui? What does the user
219
+  interface there look like?
220
+
221
+* Does this change have an impact on freezeri-dr?
222
+
223
+Performance Impact
224
+------------------
225
+
226
+Describe any potential performance impact on the system, for example
227
+how often will new code be called, and is there a major change to the calling
228
+pattern of existing code.
229
+
230
+Examples of things to consider here include:
231
+
232
+* A small change in a utility function or a commonly used decorator can have a
233
+  large impacts on performance.
234
+
235
+* Calls which result in a database queries can have a profound impact on
236
+  performance when called in critical sections of the code.
237
+
238
+* Will the change include any locking, and if so what considerations are there
239
+  on holding the lock?
240
+
241
+Other deployer impact
242
+---------------------
243
+
244
+Discuss things that will affect how you deploy and configure OpenStack
245
+that have not already been mentioned, such as:
246
+
247
+* What config options are being added? Should they be more generic than
248
+  proposed? Are the default values ones which will work well in real
249
+  deployments?
250
+
251
+* Is this a change that takes immediate effect after its merged, or is it
252
+  something that has to be explicitly enabled?
253
+
254
+* If this change is a new binary, how would it be deployed?
255
+
256
+* Please state anything that those doing continuous deployment, or those
257
+  upgrading from the previous release, need to be aware of. Also describe
258
+  any plans to deprecate configuration values or features.  For example, if we
259
+  change the directory name that instances are stored in, how do we handle
260
+  instance directories created before the change landed?  Do we move them?  Do
261
+  we have a special case in the code? Do we assume that the operator will
262
+  recreate all the instances in their cloud?
263
+
264
+Developer impact
265
+----------------
266
+
267
+Discuss things that will affect other developers working on OpenStack.
268
+
269
+Implementation
270
+==============
271
+
272
+Assignee(s)
273
+-----------
274
+
275
+Who is leading the writing of the code? Or is this a blueprint where you're
276
+throwing it out there to see who picks it up?
277
+
278
+If more than one person is working on the implementation, please designate the
279
+primary author and contact.
280
+
281
+Primary assignee:
282
+  <launchpad-id or None>
283
+
284
+Other contributors:
285
+  <launchpad-id or None>
286
+
287
+Work Items
288
+----------
289
+
290
+Work items or tasks -- break the feature up into the things that need to be
291
+done to implement it. Those parts might end up being done by different people,
292
+but we're mostly trying to understand the timeline for implementation.
293
+
294
+
295
+Dependencies
296
+============
297
+
298
+* Include specific references to specs and/or blueprints in freezer, or in
299
+  other projects, that this one either depends on or is related to.
300
+
301
+* If this requires functionality of another project that is not currently used
302
+  by Freezer (such as the glance v2 API when we previously only required v1),
303
+  document that fact.
304
+
305
+* Does this feature require any new library dependencies or code otherwise not
306
+  included in OpenStack? Or does it depend on a specific version of library?
307
+
308
+
309
+Testing
310
+=======
311
+
312
+Please discuss the important scenarios needed to test here, as well as
313
+specific edge cases we should be ensuring work correctly.
314
+
315
+Please discuss how the change will be tested. We especially want to know what
316
+tempest tests will be added. It is assumed that unit test coverage will be
317
+added so that doesn't need to be mentioned explicitly, but discussion of why
318
+you think unit tests are sufficient and we don't need to add more tempest
319
+tests would need to be included.
320
+
321
+Is this untestable in gate given current limitations (specific hardware /
322
+software configurations available)? If so, are there mitigation plans (3rd
323
+party testing, gate enhancements, etc).
324
+
325
+
326
+Documentation Impact
327
+====================
328
+
329
+Please describe how and where this change will be documented.
330
+
331
+
332
+References
333
+==========
334
+
335
+Please add any useful references here. You are not required to have any
336
+reference. Moreover, this specification should still make sense when your
337
+references are unavailable. Examples of what you could include are:
338
+
339
+* Links to mailing list or IRC discussions
340
+
341
+* Links to notes from a summit session
342
+
343
+* Links to relevant research, if appropriate
344
+
345
+* Related specifications as appropriate (e.g.  if it's an EC2 thing, link the
346
+  EC2 docs)
347
+
348
+* Anything else you feel it is worthwhile to refer to
349
+
350
+
351
+History
352
+=======
353
+
354
+Optional section for Pike intended to be used each time the spec
355
+is updated to describe new design, API or any database schema
356
+updated. Useful to let reader understand what's happened along the
357
+time.
358
+
359
+.. list-table:: Revisions
360
+   :header-rows: 1
361
+
362
+   * - Release Name
363
+     - Description
364
+   * - Pike
365
+     - Introduced

+ 229
- 0
specs/stein/approved/add-mysql-support-for-freezer.rst View File

@@ -0,0 +1,229 @@
1
+..
2
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
3
+ License.
4
+
5
+ http://creativecommons.org/licenses/by/3.0/legalcode
6
+
7
+=============================
8
+Add mysql support for freezer
9
+=============================
10
+
11
+* https://storyboard.openstack.org/#!/story/2004132
12
+
13
+Provide more db options for users to store the management data.
14
+
15
+Problem description
16
+===================
17
+
18
+Currently, freezer can only support elasticsearch as db management engine,
19
+so we should increase support for mysql .
20
+
21
+Use Cases
22
+---------
23
+
24
+* Users that want to backup management data to mysql database.
25
+
26
+* OpenStack distributions deployed without elasticsearch.
27
+
28
+Proposed change
29
+===============
30
+
31
+Implement in the freezer-api a new db engine mysql.
32
+
33
+With specifying the backend = sqlalchemy and driver = sqlalchemy in storage
34
+section of conf file , the management data will be stored on mysql db server
35
+
36
+Alternatives
37
+------------
38
+
39
+None
40
+
41
+Technical details
42
+-----------------
43
+
44
+Related docs:
45
+-----------------
46
+
47
+None
48
+
49
+Data model impact
50
+-----------------
51
+
52
+* Add clients table::
53
+
54
+    clients = Table(
55
+        'clients', meta,
56
+        Column('created_at', DateTime(timezone=False)),
57
+        Column('updated_at', DateTime(timezone=False)),
58
+        Column('deleted_at', DateTime),
59
+        Column('deleted', Boolean),
60
+        Column('user_id', String(36), nullable=False),
61
+        Column('id', String(255), primary_key=True, nullable=False),
62
+        Column('project_id', String(36), nullable=False),
63
+        Column('config_id', String(255), nullable=False),
64
+        Column('hostname', String(255), nullable=False),
65
+        Column('description', String(255)),
66
+        Column('uuid', String(36), nullable=False),
67
+        mysql_engine='InnoDB',
68
+        mysql_charset='utf8'
69
+    )
70
+
71
+* Add sessions table::
72
+
73
+    sessions = Table(
74
+        'sessions', meta,
75
+        Column('created_at', DateTime(timezone=False)),
76
+        Column('updated_at', DateTime(timezone=False)),
77
+        Column('deleted_at', DateTime),
78
+        Column('deleted', Boolean),
79
+        Column('id', String(36), primary_key=True, nullable=False),
80
+        Column('session_tag', Integer, default=0),
81
+        Column('description', String(255)),
82
+        Column('hold_off', Integer, default=30),
83
+        Column('scheduling', Text),
84
+        Column('job', Text),
85
+        Column('project_id', String(36), nullable=False),
86
+        Column('user_id', String(36), nullable=False),
87
+        Column('time_start', Integer),
88
+        Column('time_end', Integer),
89
+        Column('time_started', Integer),
90
+        Column('time_ended', Integer),
91
+        Column('status', String(255)),
92
+        Column('result', String(255)),
93
+        mysql_engine='InnoDB',
94
+        mysql_charset='utf8'
95
+    )
96
+
97
+* Add jobs table::
98
+
99
+    jobs = Table(
100
+        'jobs', meta,
101
+        Column('created_at', DateTime(timezone=False)),
102
+        Column('updated_at', DateTime(timezone=False)),
103
+        Column('deleted_at', DateTime),
104
+        Column('deleted', Boolean),
105
+        Column('id', String(36), primary_key=True, nullable=False),
106
+        Column('project_id', String(36), nullable=False),
107
+        Column('user_id', String(36), nullable=False),
108
+        Column('scheduling', Text),
109
+        Column('client_id', String(255), nullable=False),
110
+        Column('session_id', String(36), default=''),
111
+        Column('session_tag', Integer, default=0),
112
+        Column('description', String(255)),
113
+        Column('job_actions', Text),
114
+        mysql_engine='InnoDB',
115
+        mysql_charset='utf8'
116
+    )
117
+
118
+* Add actions table::
119
+
120
+    actions = Table(
121
+        'actions', meta,
122
+        Column('created_at', DateTime(timezone=False)),
123
+        Column('updated_at', DateTime(timezone=False)),
124
+        Column('deleted_at', DateTime),
125
+        Column('deleted', Boolean),
126
+        Column('id', String(36), primary_key=True, nullable=False),
127
+        Column('action', String(255), nullable=False),
128
+        Column('project_id', String(36), nullable=False),
129
+        Column('user_id', String(36), nullable=False),
130
+        Column('mode', String(255)),
131
+        Column('src_file', String(255)),
132
+        Column('backup_name', String(255)),
133
+        Column('container', String(255)),
134
+        Column('timeout', Integer),
135
+        Column('priority', Integer),
136
+        Column('max_retries_interval', Integer, default=6),
137
+        Column('max_retries', Integer, default=5),
138
+        Column('mandatory', Boolean, default=False),
139
+        Column('log_file', String(255)),
140
+        Column('backup_metadata', Text),
141
+        mysql_engine='InnoDB',
142
+        mysql_charset='utf8'
143
+    )
144
+
145
+
146
+* Add backups table::
147
+
148
+    backups = Table(
149
+        'backups', meta,
150
+        Column('created_at', DateTime(timezone=False)),
151
+        Column('updated_at', DateTime(timezone=False)),
152
+        Column('deleted_at', DateTime),
153
+        Column('deleted', Boolean),
154
+        Column('id', String(36), primary_key=True, nullable=False),
155
+        Column('client_id', String(255), nullable=False),
156
+        Column('job_id', String(36), nullable=False),
157
+        Column('project_id', String(36), nullable=False),
158
+        Column('user_id', String(64), nullable=False),
159
+        Column('user_name', String(64)),
160
+        Column('backup_metadata', Text),
161
+        mysql_engine='InnoDB',
162
+        mysql_charset='utf8'
163
+    )
164
+
165
+
166
+REST API impact
167
+---------------
168
+None
169
+
170
+Security impact
171
+---------------
172
+None
173
+
174
+Notifications impact
175
+--------------------
176
+Some message log will be added.
177
+
178
+Other end user impact
179
+---------------------
180
+None
181
+
182
+Performance Impact
183
+------------------
184
+None
185
+
186
+Other deployer impact
187
+---------------------
188
+
189
+Developer impact
190
+----------------
191
+None
192
+
193
+Implementation
194
+==============
195
+Assignee(s)
196
+-----------
197
+
198
+Primary assignee:
199
+  gecong <ge.cong@zte.com.cn>
200
+  gengchc2 <geng.changcai2@zte.com.cn>
201
+
202
+Work Items
203
+----------
204
+
205
+* Implementing the db engine driver (mysql)
206
+
207
+* Implementing the mysql api
208
+
209
+* Implementing the mysql tables  creation and upgrade
210
+
211
+Dependencies
212
+============
213
+None
214
+
215
+Testing
216
+=======
217
+add unit test
218
+
219
+Documentation Impact
220
+====================
221
+Some instructions should be added .
222
+
223
+References
224
+==========
225
+None
226
+
227
+History
228
+=======
229
+None

Loading…
Cancel
Save