Channing Jackson
Channing Jackson

Reputation: 163

Externalizing Spring Cloud Data Flow Config - Spring Cloud Config Server

Still trying to tackle this task. I have the following stuff:

The SCCS instance is properly connected to my BitBucket repository, and it shoes it is online. I'm trying to push the spring-cloud-dataflow-server-cloudfoundry-1.0.0.M4.jar with the following manifest:

applications
- name: scdf-dev
  memory: 1024M
  disk_quota: 1024M
  no-route: false 
  no-hostname: false
  health-check-type: 'port' 
  buildpack: custom_java_buildpack_offline
env: 
  SPRING_PROFILES_ACTIVE: abc
  ENCRYPT_KEY: encryptKey
services: 
  - scdf-rabbitmq
  - scdf-mysql
  - scdf-sccs 

In my BitBucket repo, I have the following properties file holding environment variables: scdf-dev-abc.properties

Here is what the contents of that properties file look like:

spring.cloud.deployer.cloudfoundry.url=https://api.abc.xyz.com
spring.cloud.deployer.cloudfoundry.org=myorg
spring.cloud.deployer.cloudfoundry.space=myspace
spring.cloud.deployer.cloudfoundry.domain=abc.xyz.com
spring.cloud.deployer.cloudfoundry.services=scdf-rabbitmq,scdf-sccs
spring.cloud.deployer.cloudfoundry.username=clouduser
spring.cloud.deployer.cloudfoundry.password=clouduserpwd
spring.cloud.deployer.cloudfoundry.skipSslValidation=true
spring.cloud.deployer.cloudfoundry.buildpack=custom_java_buildpack_offline
spring.cloud.deployer.cloudfoundry.enableRandomAppNamePrefix=false
spring.cloud.deployer.cloudfoundry.appNamePrefix=abc
spring.cloud.deployer.cloudfoundry.memory=768
maven.remote.repositories.snapshots.url=https://mavenrepo.xyz.com/nexus/content/repositories/snapshots/
maven.remote.repositories.releases.url=https://mavenrepo.xyz.com/nexus/content/repositories/releases/

When I push the application with the manifest and the SCCS binding specified, it is not getting the properties specified in the properties file, and I'm having difficulty trouble-shooting the issue. Is there something missing in my configuration or the way I've provided the application name and the spring profile?

What else should I be looking for in terms of figuring out why the config isn't being read by the Spring Cloud Config Server? For example, if the Spring Cloud Data Flow application is running as some process or user that doesn't have access to the BitBucket repository, would that matter?

Upvotes: 2

Views: 1492

Answers (1)

Sabby Anandan
Sabby Anandan

Reputation: 5651

Integrating with config-server running on Pivotal Cloud Foundry requires an extra dependency in the classpath - see client-dependencies section in the docs.

Given this extra dependency is specific to Pivotal Cloud Foundry service, we cannot add it in the OSS variant of SCDF's Cloud Foundry server. This would be automated when we provision SCDF using the BOSH release in future. In the meantime, if you've to use the config-server on PCF, you'd have to add the dependency manually - please review reference guide for more details.

Upvotes: 4

Related Questions