[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Advertising all DB gears to web gear

On Sep 10, 2013, at 7:28 AM, Mateus Caruccio <mateus caruccio getupcloud com> wrote:

Hi everyone.

I've found this thread regarding distributed applications:

There is already a way to register env vars on a web cart when my db cart scales up?

Not easily.  Connection hooks run once - their output can't be sent directly to the web gears.  However, you can do this:

create two carts - your db, and a web framework plugin (lets you be placed with the web framework gears).  Have a subscribe in the plugin that the db publishes

We'd like to fix it so carts can expose their variables back to the web gears after a subscribe hook is fired, or come up with a way to centrally distribute an app env var from any gear.

You might be able to set an app env var during setup of the gear (someone else can chime in if I'm wrong) - that doesn't isolate you very well from race conditions or give you everything you need to know (hooks not yet run) so I don't think that's a full solution.

BTW, what is that ~/.auth/ dir used for? Is it related to broker auth key
​ mentioned in the thread above?​ If not, how can I call the REST API from within gears?

Its the broker auth key, it has limited rights (can only scale and read the app), but you can pass that to the rest API as a header.  You can create an auth token for your domain or app and set that as an app env var - that token can have full scoping rights.

I'm running OpenShift Origin release 2.


Mateus Caruccio
Master of Puppets
+55 (51) 8298.0026
gtalk: mateus caruccio getupcloud com
twitter: @MateusCaruccio

This message and any attachment are solely for the intended
recipient and may contain confidential or privileged information
and it can not be forwarded or shared without permission.
Thank you!
dev mailing list
dev lists openshift redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]