manifest files and the Java client
Correct me if I am wrong, but as far as I can tell, the cloud foundry Java API does not directly support the creation of an application based on the the manifest file as defined in:
My reading of the code is that the implementation of the create application function in the Java client boils down to the createApplication method of the class CloudControllerClientImpl:
public void createApplication(
String appName, Staging staging, Integer disk, Integer memory,
List<String> uris, List<String> serviceNames)
But the uris parameters does not appear in the manifest specification.
How should I define the uris parameter in terms of the fields in the manifest? Is there sample code somewhere that would clue me into how to do this?
Scott Frederick <scottyfred@...>
You are correct, the Java client does not support creating an application
based on the data in manifest.yml.
With the cf CLI and manifest.yml, you specify the host(s) (i.e. subdomain)
and domain(s) separately, and these are combined into one ore more routes.
So with a host of "myapp" and a domain of "apps.mycf.org", the full route
would be "myapp.apps.mycf.org". With the Java client, each route (host +
domain) is provided in absolute form in the "List<String> uris" parameter
of the "createApplication()" method. To match the CLI example, you would
specify one "uri" String with the value "myapp.apps.mycf.org". The domain
part of the uri must be a valid domain in your CF deployment (you can see
the list with "cf domains").
The best sample code for the Java client is the Maven and Gradle plugins
there are in the same GitHub repository.
The Maven plugin is here:
The code in the Maven plugin that creates an application, uploads the bits,
and waits for the app to start is here:
On Fri, Jun 19, 2015 at 12:05 PM, Bolour, Azad (GE Global Research,
consultant) <Azad.Bolour(a)ge.com> wrote: