Date
1 - 1 of 1
manifest files and the Java client
Azad Bolour
Thanks for clarifying this, Scott. There are still a few properties in the manifest file that I am not sure about: no-hostname, random-route, no-route.
On first reading I don’t see these in the maven plugin. But clearly the maven plugin was what I was looking for. Thanks again. Azad ------------- Azad, 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: https://github.com/cloudfoundry/cf-java-client/tree/master/cloudfoundry-maven-plugin . The code in the Maven plugin that creates an application, uploads the bits, and waits for the app to start is here: https://github.com/cloudfoundry/cf-java-client/blob/master/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractPush.java Scott From: <Bolour>, GE Global Research <Azad>, GE <Azad.Bolour(a)ge.com<mailto:Azad.Bolour(a)ge.com>> Date: Friday, June 19, 2015 at 10:05 AM To: "cf-dev(a)lists.cloudfoundry.org<mailto:cf-dev(a)lists.cloudfoundry.org>" <cf-dev(a)lists.cloudfoundry.org<mailto:cf-dev(a)lists.cloudfoundry.org>> Cc: "Vydra, David (GE Global Research)" <david.vydra(a)ge.com<mailto:david.vydra(a)ge.com>> Subject: manifest files and the Java client Hi, 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: http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html 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? Many thanks. Azad |
|