Search code examples
javaspringspring-cloud-streamspring-cloud-configspring-cloud-dataflow

How to Register Applications in Spring Cloud DataFlow?


I'm starting with Spring Cloud DataFlow, I've run an instance through Docker Compose and successfully created Streams with samples apps.

I've written a Source and a Sink app on my own and I'm not able to register them into the SCDF dashboard.

enter image description here

I've tried both the maven:// and the file:/// addresses, but since the dashboard runs inside a Docker container, I guess the problem is that it can't access to local .m2 repository nor to the local file system where the jars are located.

How should I proceed? Should I map the file system through Docker Compose or what?


Solution

  • Here is the complete and official answer from the dataflow documentation: Accessing the Host File System

    Note that the you need to mount exactly the same volume to both dataflow-server:

    dataflow-server:
      # ...
      volumes:
         - /home/MY_USER_NAME/.m2:/home/cnb/.m2
    

    and the skipper-server:

    skipper-server:
      # ...
      volumes:
         - /home/MY_USER_NAME/.m2:/home/cnb/.m2
    

    Note: Starting with DataFlow 2.8.0+ and Skipper 2.7.1+ the in-container mount paths had changed from /root/.m2 to /home/cnb/.m2/ instead.