Re: CF Auto-scaling with an external application

Daniel Mikusa

On Fri, Apr 8, 2016 at 2:12 PM, Giovanni Napoli <gio.napoli2(a)>

@Daniel Mikusa

Thank you for your support. I have few more questions and hope that you
can help me.
If i'll use the library you linked, i'd like to have some suggestions
about the task i have to solve:

- is there a way to collect in some way the data i need in a struct that i
could use for send "the scale command"? I mean, would be great to have a
struct in wich i could have fields like "AppName", "CpuUse", "MemoryUse",
etc. so i cloud just check the App.CpuUse field, for istance, and send a
"cf scale" command to CF to solve resource problems.

- i found this client library for CF, do you think could help my work? I'm asking you cause i'll
prefer to use Java, by the way. Is you know, is there a way to have ".jar"
library of this repo so i could use as simple as i can? Also i found this
and a "cloudfoundry-client-lib.jar" online but i don't kwon if could be
good for my problem.
There's two parts to this problem:

1.) You need to get metrics from the platform. I don't think (although
this could have changed, since it's being rewritten at the moment) that
cf-java-client supports this. I know it will allow you to stream logs, but
I'm not sure if you can get metrics as well. If Ben Hale see's this,
perhaps he can comment and confirm.

2.) Once you get metrics, you'd have to manage them and when appropriate
initiate a request to scale the app. You can definitely use the
cf-java-client for this. You can also use it to query information if for
example you have an app guid and need the app name.

Hope that helps!



Join to automatically receive all group messages.