summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-05 19:10:56 +0000
committerGerrit Code Review <review@openstack.org>2018-10-05 19:10:56 +0000
commit5ad631e9de9d24ec4535bbec721da19d0a9174d6 (patch)
treedabc66ba194b10c08d5561b942490565f32e9132
parent1d0cdd288a7a9b3f0d61ff1ea1a6437eafa05b7f (diff)
parentbc98c24ecec0fb1cedbeb974dc1fc17f40a32fb6 (diff)
Merge "Add Redfish OOB driver to Drydock"
-rw-r--r--specs/approved/drydock_add_redfish_as_oob_driver.rst224
1 files changed, 224 insertions, 0 deletions
diff --git a/specs/approved/drydock_add_redfish_as_oob_driver.rst b/specs/approved/drydock_add_redfish_as_oob_driver.rst
new file mode 100644
index 0000000..aa548b6
--- /dev/null
+++ b/specs/approved/drydock_add_redfish_as_oob_driver.rst
@@ -0,0 +1,224 @@
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==============================================
8Introduce Redfish based OOB Driver for Drydock
9==============================================
10
11Proposal to support new OOB type Redfish as OOB driver for Drydock. Redfish
12is new standard for Platform management driven by DMTF.
13
14Links
15=====
16
17https://storyboard.openstack.org/#!/story/2003007
18
19Problem description
20===================
21
22In the current implementation, Drydock supports the following OOB types
23
24#. IPMI via pyhgmi driver to manage baremetal servers
25#. Libvirt driver to manage Virtual machines
26#. Manual driver
27
28Phygmi is python implementation for IPMI functionality. Currently phygmi
29supports few commands related to power on/off, boot, events and Lenovo OEM
30functions. Introducing a new IPMI command in pyghmi is complex and requires
31to know the low level details of the functionality like Network Function,
32Command and the data bits to be sent.
33
34DMTF's have proposed a new Standard Platform management API Redfish using a
35data model representation inside of hypermedia RESTful interface. Vendors like
36Dell, HP supports Redfish and Rest API are exposed to perform any actions.
37Being a REST and model based standard makes it easy for external tools like
38Drydock to communicate with the Redfish server.
39
40Impacted components
41===================
42
43The following Airship components would be impacted by this solution:
44
45#. Drydock - new OOB driver Redfish
46
47Proposed change
48===============
49
50Proposal is to add new OOB driver that supports all Drydock Orchestrator
51actions and configure the node as per the action. The communication between
52the driver and node will be REST based on Redfish resources exposed by the
53node. There shall be no changes in the way driver creates tasks using
54Orchestrator, exception handling and the concurrent execution of tasks.
55
56Redfish driver
57--------------
58Adding a new OOB driver requires to extend the base driver
59``drydock_provisioner.drivers.driver.OobDriver``.
60
61OOB type will be named as::
62
63 oob_types_supported = ['redfish']
64
65All the existing Orchestrator OOB actions need to be supported. New Action
66classes will be created for each of the OOB action and uses Redfish client
67to configure the node.::
68
69 action_class_map = {
70 hd_fields.OrchestratorAction.ValidateOobServices: ValidateOobServices,
71 hd_fields.OrchestratorAction.ConfigNodePxe: ConfigNodePxe,
72 hd_fields.OrchestratorAction.SetNodeBoot: SetNodeBoot,
73 hd_fields.OrchestratorAction.PowerOffNode: PowerOffNode,
74 hd_fields.OrchestratorAction.PowerOnNode: PowerOnNode,
75 hd_fields.OrchestratorAction.PowerCycleNode: PowerCycleNode,
76 hd_fields.OrchestratorAction.InterrogateOob: InterrogateOob,
77 }
78
79Implement Action classes
80------------------------
81
82Action class have to extend the base action
83``drydock_provisioner.orchestrator.actions.orchestrator.BaseAction``.
84The actions are executed as threads and so each action class have to
85implement the start method.
86
87Below is the table that mentions the OOB action and the corresponding
88Redfish commands. Details of each redfish command in terms of Redfish API
89is specified in the next section.
90
91.. table:: Drydock Actions and redfish commands
92
93 ====================== =========================
94 Action Redfish Commands
95 ====================== =========================
96 ValidateOobServices Not implemented
97 ConfigNodePxe Not implemented
98 SetNodeBoot set_bootdev, get_bootdev
99 PowerOffNode set_power, get_power
100 PowerOnNode set_power, get_power
101 PowerCycleNode set_power, get_power
102 InterrogateOob get_power
103 ====================== =========================
104
105No configuration is required for the actions ValidateOobServices, ConfigNodePxe.
106
107Redfish client
108--------------
109
110Above mentioned commands (set_bootdev, get_bootdev, set_power, get_power)
111will be implemented by new class RedfishObject. This class is responsible
112for converting the commands to corresponding REST API and call the
113opensource python implementations of redfish clients.
114python-redfish-library provided by DMTF is chosen as Redfish client.
115
116In addition, there will be Redfish API extensions related to OEM which will
117be specific to vendor. Based on the need, the RedfishObject have to handle them
118and provide a clean interface to OOB actions.
119
120The redfish REST API calls for the commands::
121
122 Command: get_bootdev
123 Request: GET https://<OOB IP>/redfish/v1/Systems/<System_name>/
124 Response: dict["Boot"]["BootSourceOverrideTarget"]
125
126 Command: set_bootdev
127 Request: PATCH https://<OOB IP>/redfish/v1/Systems/<System_name>/
128 {"Boot": {
129 "BootSourceOverrideEnabled": "Once",
130 "BootSourceOverrideTarget": "Pxe",
131 }}
132
133 Command: get_power
134 Request: GET https://<OOB IP>/redfish/v1/Systems/<System_name>/
135 Response: dict["PowerState"]
136
137 Command: set_power
138 Request: POST https://<OOB IP>/redfish/v1/Systems/<System_name>/Actions/ComputerSystem.Reset
139 {
140 "ResetType": powerstate
141 }
142 Allowed powerstate values are "On", "ForceOff", "PushPowerButton", "GracefulRestart"
143
144Configuration changes
145---------------------
146
147OOB driver that will be triggered by Drydock orchestrator is determined by
148
149- availability of driver class in configuration parameter oob_driver
150 under [plugins] section in drydock.conf
151- OOB type specified in HostProfile in Site manifests
152
153To use the Redfish driver as OOB, the OOB type in Host profile need to be
154set as ``redfish`` and a new entry to be added for oob_driver in drydock.conf
155``drydock_provisioner.drivers.oob.redfish_driver.RedfishDriver``
156
157Sample Host profile with OOB type redfish::
158
159 ---
160 schema: drydock/HostProfile/v1
161 metadata:
162 schema: metadata/Document/v1
163 name: global
164 storagePolicy: cleartext
165 labels:
166 hosttype: global_hostprofile
167 layeringDefinition:
168 abstract: true
169 layer: global
170 data:
171 oob:
172 type: 'redfish'
173 network: 'oob'
174 account: 'tier4'
175 credential: 'cred'
176
177Security impact
178---------------
179
180None
181
182Performance impact
183------------------
184
185None
186
187Implementation
188==============
189
190Work Items
191----------
192
193- Add redfish driver to drydock configuration parameter ``oob_driver``
194
195- Add base Redfish driver derived from oob_driver.OobDriver with
196 oob_types_supported `redfish`
197
198- Add RedfishObject class that uses python redfish library to talk with
199 the node.
200
201- Add OOB action classes specified in Proposed change
202
203- Add related tests - unit test cases
204
205Assignee(s)
206-----------
207
208Primary assignee:
209 Hemanth Nakkina
210
211Other contributors:
212 PradeepKumar KS
213 Gurpreet Singh
214
215Dependencies
216============
217
218None
219
220References
221==========
222
223.. _Redfish_standard: https://www.dmtf.org/standards/redfish
224.. _Redfish_python_library: https://github.com/DMTF/python-redfish-library