spring-cloud-stream: Stream deployments fail on spring-cloud-dataflow-server-cf -
in our use-case need create , deploy message stream application our private cloud foundry environment. stream application meant listen on rabbitmq queue , trigger task, defined in stream.
to achieve same, using cloud-dataflow-server-cloudfoundry
running locally on mac.
below set of commands used achieve it:-
- set maven remote repo
export maven_remote_repositories_repo1_url=https://ftl.abc.com/nexus
setup cloud foundry destination -
export spring_cloud_deployer_cloudfoundry_url=https://api.paas.abc-intl.com/ export spring_cloud_deployer_cloudfoundry_org=paas-apps export spring_cloud_deployer_cloudfoundry_space=dev export spring_cloud_deployer_cloudfoundry_domain=paas.abc-intl.com export spring_cloud_deployer_cloudfoundry_username=abc@xyz.com export spring_cloud_deployer_cloudfoundry_password=password export spring_cloud_deployer_cloudfoundry_skip_ssl_validation=true export spring_cloud_deployer_cloudfoundry_stream_services=rabbitmq_server export spring_cloud_deployer_cloudfoundry_stream_buildpack=java_buildpack_offline export spring_cloud_deployer_cloudfoundry_stream_memory=512 export spring_cloud_deployer_cloudfoundry_task_memory=512 export spring_cloud_deployer_cloudfoundry_url=https://api.paas.abc-intl.com/ export spring_cloud_deployer_cloudfoundry_org=paas-apps export spring_cloud_deployer_cloudfoundry_space=dev export spring_cloud_deployer_cloudfoundry_domain=paas.abc-intl.com export spring_cloud_deployer_cloudfoundry_username=abc@xyz.com export spring_cloud_deployer_cloudfoundry_password=password export spring_cloud_deployer_cloudfoundry_skip_ssl_validation=true export spring_cloud_deployer_cloudfoundry_stream_services=rabbitmq_server export spring_cloud_deployer_cloudfoundry_stream_buildpack=java_buildpack_offline export spring_cloud_deployer_cloudfoundry_stream_memory=512 export spring_cloud_deployer_cloudfoundry_task_memory=512
start dataflow server -
build dataflow server cf spring cloud properties as:
- spring.name=dataflow
- spring.cloud.config.uri=http://localhost:8888
- spring.cloud.dataflow.features.tasksenabled=true
- spring.cloud.dataflow.features.streamsenabled=true
- spring.cloud.deployer.cloudfoundry.task.tasktimeout=360
start df server cf locally -
java -djavax.net.ssl.truststore=/users/apache-maven-3.3.9/conf/keystore.jks -djavax.net.ssl.truststorepassword=password -jar spring-cloud-dataflow-server-cloudfoundry-1.1.0.build-snapshot.jar
- start df shell
- import starter apps -
stream-applications-rabbit-maven
- register apps -
app register --name task-processor --type processor --uri maven://org.springframework.cloud.stream.app:tasklaunchrequest-transform-processor-rabbit:jar:1.1.0.build-snapshot
app register --name task-launcher-local --type sink --uri maven://org.springframework.cloud.stream.app:task-launcher-local-sink-rabbit:jar:1.0.4.release
- create & deploy stream -
stream create mymessagestream --definition "rabbit --rabbit.queues=cloud-stream-source --rabbit.requeue=true --spring.rabbitmq.host=host.abc.com --spring.rabbitmq.port=5672 --spring.cloud.stream.bindings.output.contenttype='text/plain' | task-processor --uri=maven://com.example:thumbnail-generator:0.0.1-snapshot | task-launcher-local" --deploy
however deployment fails timeoutexception no clear reason either in dataflow server logs or applications' logs.
the created application in cloud foundry space showing stopped on cf console.
this left me clueless , i've got couple of questions on understand possible root cause:
- in case of successful stream deployment, shall status of applications deployed cf stream? these show started or stopped?
- the name of deployed applications has couple of random words embedded in e.g. dataflow-nonvaluable-overapprehension-mymessagestream-rabbit. in understanding name given dataflow server instance , inserted make reference. there way customise name? enable me know name of applications in advance , hen run tail on logs.
any thoughts/help appreciated.
in case of successful stream deployment, shall status of applications deployed cf stream? these show started or stopped?
the stream list
command display status. if stream deployment successful, status should deployed
.
the name of deployed applications has couple of random words embedded in e.g. dataflow-nonvaluable-overapprehension-mymessagestream-rabbit. in understanding name given dataflow server instance , inserted make reference. there way customise name? enable me know name of applications in advance , hen run tail on logs.
you can override random name generation in app name disabling property doing: export spring_cloud_deployer_cloudfoundry_stream_enable_random_app_name_prefix=false
you can control app name using deployer property sets specific prefix
:
export spring_cloud_deployer_cloudfoundry_stream_app_name_prefix=myprefix
you can try increasing deployer properties spring_cloud_deployer_cloudfoundry_stream_staging_timeout
, spring_cloud_deployer_cloudfoundry_stream_startup_timeout
see if app requires more time stage/startup.
Comments
Post a Comment