Change-Id: I4e23b0d2b7d9e5fc92aa20d9a3f0d5a899664cf0
2.4 KiB
TripleO and Mistral
TripleO is in the process of developing Mistral workflows and actions to expose TripleO business logic. This allows RESTful API access to TripleO functions.
A high-level view of the overall workflow can be found in the TripleO Overcloud Deployment Library Spec.
Undercloud Setup
To install the undercloud follow the TripleO developer documentation.
Code Location
The relevant code is organized as below. Note that Mistral actions are exposed through setup.cfg.
|
+ setup.cfg
|
+ tripleo_common/
|
+ actions/
|
+ workbooks/
Using Actions
Mistral actions can be run through the CLI:
echo '{"container": "<container-name>"}' > input.json
openstack action execution run tripleo.plan.create_container input.json
For REST API usage please reference the full Mistral documentation.
Using Workflows
The undercloud install will automatically load the TripleO Mistral workbooks. To manually load these workbooks during development, run the following:
openstack workbook create workbooks/plan_management.yaml
Workflow execution is asynchronous. The output of an execution is an ID that can be used to get the status and output of that workflow execution.
echo '{"container": "<container-name>"}' > input.json
openstack workflow execution create tripleo.plan_management.v1.create_default_deployment_plan input.json
openstack workflow execution show <execution ID>
openstack workflow execution show output <execution ID>
For REST API usage please reference the full Mistral documentation.
By default a workflow execution expires after 48 hours. This can be configured in /etc/mistral/mistral.conf.
[execution_expiration_policy]
evaluation_interval=120
older_than=2880
After modifying these values you will need to restart the mistral-engine service.