Salt cloud and salt-api

93 views
Skip to first unread message

Mark van der Walle

unread,
Sep 29, 2014, 5:03:00 AM9/29/14
to salt-...@googlegroups.com
I am running into problems with using the salt cloud and salt api. Due to the time it takes of rolling out a VM I am using the local_async client since that allows for asynchronous requests. However the problem I am running into is how to pass along the parameters.

I always require a tgt parameter as far as I can see. However that makes no sense since I am creating a new server.

Furthermore I am unsure how to give the arguments for cloud.profile. Do I use args? kwargs? I constantly get errors stating that I ive 0 parameters.

I am building a simple API client in NodeJS and using JSON as both input and output. Does anyone have a simple example on how to do this?

Joseph Hall

unread,
Sep 29, 2014, 10:10:42 AM9/29/14
to salt-...@googlegroups.com
It sounds like you're using the cloud execution module, but need the
runner. Either way, kwargs are recommended.

http://docs.saltstack.com/en/latest/topics/cloud/salt.html#runner-module

It looks like that page could use some more examples, but in the
meantime I can show you this:

https://github.com/saltstack-formulas/ec2-autoscale-reactor

I'm sure some people on the list are getting sick of me linking to
that every few weeks, but it really does have some good examples in
it. It uses salt-api directly via webhooks, and makes use of both the
runner and the wheel functionality in salt-api.
> --
> You received this message because you are subscribed to the Google Groups
> "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to salt-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
"In order to create, you have to have the willingness, the desire to
be challenged, to be learning." -- Ferran Adria (speaking at Harvard,
2011)

Mark van der Walle

unread,
Sep 29, 2014, 10:17:08 AM9/29/14
to salt-...@googlegroups.com
The problem with the runner is that when using it to deploy a VM using salt-cloud it takes a while. That is why I am trying to do so with an asynchronous approach. There is no async runner afaik?

Joseph Hall

unread,
Sep 29, 2014, 10:20:10 AM9/29/14
to salt-...@googlegroups.com
There is not at this point. The execution module is a better bet for
that right now.

Mark van der Walle

unread,
Sep 29, 2014, 10:24:23 AM9/29/14
to salt-...@googlegroups.com
Thank you for the information. It is too bad that this is not better documented as for us using the salt-api is the best approach for us in using salt. I will have to think on what way to solve this.

Seth House

unread,
Oct 9, 2014, 7:32:03 PM10/9/14
to salt-...@googlegroups.com, Mark van der Walle
Quick note that async runner execution has been added for the upcoming
2014.7 release.

http://docs.saltstack.com/en/latest/ref/clients/index.html#salt.runner.RunnerClient.cmd_async
Reply all
Reply to author
Forward
0 new messages