The following pieces of configuration must be provided. These are Spring Boot @ConfigurationProperties so you can set them as environment variables or by any other means that Spring Boot supports. Here is a listing in environment variable format as that is an easy way to get started configuring Boot applications in Cloud Foundry.
# Default values cited after the equal sign. # Example values, typical for Pivotal Web Services, cited as a comment # url of the CF API (used when using cf login -a for example), e.g. https://api.run.pivotal.io # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_URL) spring.cloud.deployer.cloudfoundry.url= # name of the organization that owns the space above, e.g. youruser-org # (For Setting Env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_ORG) spring.cloud.deployer.cloudfoundry.org= # name of the space into which modules will be deployed, e.g. development # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SPACE) spring.cloud.deployer.cloudfoundry.space= # the root domain to use when mapping routes, e.g. cfapps.io # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_DOMAIN) spring.cloud.deployer.cloudfoundry.domain= # username and password of the user to use to create apps # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_USERNAME and SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_PASSWORD) spring.cloud.deployer.cloudfoundry.username= spring.cloud.deployer.cloudfoundry.password= # Whether to allow self-signed certificates during SSL validation # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SKIP_SSL_VALIDATION) spring.cloud.deployer.cloudfoundry.skipSslValidation=false # Comma separated set of service instance names to bind to every stream app deployed. # Amongst other things, this should include a service that will be used # for Spring Cloud Stream binding, e.g. rabbit # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_STREAM_SERVICES) spring.cloud.deployer.cloudfoundry.stream.services= # Comma separated set of service instance names to bind to every task app deployed. # Amongst other things, this should include an RDBMS service that will be used # for Spring Cloud Task execution reporting, e.g. my_mysql # (for setting env var use SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_TASK_SERVICES) spring.cloud.deployer.cloudfoundry.task.services=
Note that you can set the following properties spring.cloud.deployer.cloudfoundry.services
,
spring.cloud.deployer.cloudfoundry.memory
, and spring.cloud.deployer.cloudfoundry.disk
as part of an individual
deployment request prefixed by the app.<name of application>
. For example
>stream create --name ticktock --definition "time | log" >stream deploy --name ticktock --properties "app.time.spring.cloud.deployer.cloudfoundry.memory=2048"
will deploy the time source with 2048MB of memory, while the log sink will use the default 1024MB.
If using Spring Cloud Config Server as a Cloud Foundry service, the easiest way to externalize the above configuration
and consume it from the Data Flow server is to use the spring-cloud-services-starter-config-client
dependency.
As this support is specific to Pivotal Cloud Foundry, it is not included by default. But building a Data Flow server
that embeds it is as simple as adding a dependency similar to
<dependency> <groupId>io.pivotal.spring.cloud</groupId> <artifactId>spring-cloud-services-starter-config-client</artifactId> <version>1.1.0.RELEASE</version> <scope>runtime</scope> </dependency>
to your own version of the Data Flow server, and building it yourself. Then follow the documentation for Config Server for Pivotal Cloud Foundry. For more details, please refer to Spring Cloud Services client-dependencies documentation.