Renat,

Thanks for your valuable comments. ☺
The “custom action” needs to re-install Mistral.
If the Mistral service is part of 3rd party OpenStack, it may be unacceptable 
to let every user create his own customer action. What do you think?

Thanks,
Tony


From: Renat Akhmerov [mailto:rakhme...@mirantis.com]
Sent: Saturday, October 17, 2015 3:25 AM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [mistral] How to call 3rd-party tools(such as 
Ansible) in Mistral

Hi, see my answers inline.

On 16 Oct 2015, at 12:35, WANG, Ming Hao (Tony T) 
<tony.a.w...@alcatel-lucent.com<mailto:tony.a.w...@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 [1]. 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.

[1] 
http://docs.openstack.org/developer/mistral/developer/creating_custom_action.html


Renat Akhmerov
@ Mirantis Inc.

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to