[openstack-dev] [mistral] How to call 3rd-party tools(such as Ansible) in Mistral
rakhmerov at mirantis.com
Fri Oct 16 19:25:06 UTC 2015
Hi, see my answers inline.
> On 16 Oct 2015, at 12:35, WANG, Ming Hao (Tony T) <tony.a.wang at alcatel-lucent.com> wrote:
> We have developed some Ansible playbooks for operation automation, and we are investigating if we can change the automation engine from Ansible to Mistral since Mistral has powerful workflow control.
> Could you please help to provide how to let Mistral call Ansible playbook or Ansible module?
I would recommend to write a custom action (not ad-hoc actions in DSL, they are pretty limited). You can just write a python class and make it available in Mistral workflow. It is pretty easy to do and described at . In Python you’ll have more control on how to call ansible properly. If you have any specific questions on that you can join our IRC channel #openstack-mistral and talk to us there.
> My understanding is to use ssh std_action to let Mistral access Ansible server to call Ansible playbook/modules since Mistral ad-hoc action must base on an existing system action.
Yes, you can use std.ssh action but I guess it won’t be too convenient because you’ll have to deal with shell commands directly. Yes, ad-hoc actions can help you do it in a more elegant manner but they are pretty limited and allow to create only wrappers. With Python custom actions (it can be a class hierarchy, for example) you can do much more. For instance, you can expose individual ansible actions and transform their params in a form that better fits workflow DSL.
Anyway, it’s just my preference. You may like this second option better.
> Another question is:
> If we install Mistral and Ansible on a same server, is it possible to simplify it?
Yes, like I described above.
 http://docs.openstack.org/developer/mistral/developer/creating_custom_action.html <http://docs.openstack.org/developer/mistral/developer/creating_custom_action.html>
@ Mirantis Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev