summaryrefslogtreecommitdiff
path: root/doc/source/contributor
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2021-04-13 12:40:37 +0200
committerDmitry Tantsur <dtantsur@protonmail.com>2021-04-30 14:38:16 +0200
commite85a36fe36db166e3f37212aa8261ac72e34e66a (patch)
treeaef8f8f2ee3fda88fb7fd0a63c0557ee0a7b049c /doc/source/contributor
parent9afa9b86d1c5fd11bd34a321708237d26ebeedfc (diff)
downloadironic-e85a36fe36db166e3f37212aa8261ac72e34e66a.tar.gz
Deploy interface that fully relies on custom deploy steps
This change adds a new deploy-interface custom-agent that is essentially the direct deploy without the write_image step and without bootloader handling. It's targeted at deployments that need to write the image differently, while keeping all other aspects the same. The existing AgentDeploy becomes a subclass of the new CustomAgentDeploy class, serving as a convenient base class for downstream deploy interfaces that use IPA. Change-Id: Ie126ce677c79f102e382305650bddb7f09834483 Story: #2008719 Task: #42059
Diffstat (limited to 'doc/source/contributor')
-rw-r--r--doc/source/contributor/deploy-steps.rst26
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/source/contributor/deploy-steps.rst b/doc/source/contributor/deploy-steps.rst
index 21022b2b1..ae79e56f1 100644
--- a/doc/source/contributor/deploy-steps.rst
+++ b/doc/source/contributor/deploy-steps.rst
@@ -8,8 +8,9 @@ deploy step in the ``AgentDeploy`` class.
.. code-block:: python
- class AgentDeploy(AgentDeployMixin, base.DeployInterface):
- ...
+ from ironic.drivers.modules import agent
+
+ class AgentDeploy(agent.AgentDeploy):
@base.deploy_step(priority=200, argsinfo={
'test_arg': {
@@ -22,6 +23,27 @@ deploy step in the ``AgentDeploy`` class.
def do_nothing(self, task, **kwargs):
return None
+If you want to completely replace the deployment procedure, but still have the
+agent up and running, inherit ``CustomAgentDeploy``:
+
+.. code-block:: python
+
+ from ironic.drivers.modules import agent
+
+ class AgentDeploy(agent.CustomAgentDeploy):
+
+ def validate(self, task):
+ super().validate(task)
+ # ... custom validation
+
+ @base.deploy_step(priority=80)
+ def my_write_image(self, task, **kwargs):
+ pass # ... custom image writing
+
+ @base.deploy_step(priority=70)
+ def my_configure_bootloader(self, task, **kwargs):
+ pass # ... custom bootloader configuration
+
After deployment of the baremetal node, check the updated deploy steps::
baremetal node show $node_ident -f json -c driver_internal_info