The syntax of the README files is broken. Fix the syntax and change the file suffix from md to rst. Change-Id: I07461e6f931c610464092488f5a72a7516a2c064
1.6 KiB
"join" control example (based on v2 API/DSL)
Workflow create_vm_with_volume
demonstrates usage of
join
workflow control to synchronize multiple workflow
routes. Specifically, it creates a virtual machine and Cinder volume in
parallel, waits till their completion using join
and
attaches the volume to the newly created virtual machine.
Note: Unlike some other examples this example doesn't use workbook
concept. File create_vm_with_volume.yaml
contains a
workflow definition in the first place so in order to load the workflow
"mistral workflow-create" CLI command must be used (not "mistral
workbook-create").
To run the example:
Load workflow
create_vm_with_volume.yaml
:mistral workflow-create create_vm_with_volume.yaml
Create
input.json
file containing workflow input parameters as follows:{ "server_name": "mistral_test_vm", "image_id": "aaacd887-5afa-4cb7-a33d-1ef0b72d21c4", "flavor_id": "2", "ssh_username": "ubuntu", "ssh_password": "my_pass", "volume_name": "mistral_test_volume" }
Start workflow:
mistral execution-create create_vm_with_volume input.json
Using execution id from the previous step wait for completion (workflow
SUCCESS
state):mistral execution-get <execution_id>
Make sure that a virtual machine and a volume have been created. It can be done by opening Horizon UI or using Nova client (python-novaclient).