Download the Spring Cloud Data Flow Server and Shell apps:
wget http://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-dataflow-server-local/1.0.0.RC1/spring-cloud-dataflow-server-local-1.0.0.RC1.jar wget http://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-dataflow-shell/1.0.0.RC1/spring-cloud-dataflow-shell-1.0.0.RC1.jar
Launch the Data Flow Server
Since the Data Flow Server is a Spring Boot application, you can run it just by using java -jar
.
$ java -jar spring-cloud-dataflow-server-local-1.0.0.RC1.jar
Running with Custom Maven Settings and/or Behind a Proxy If you want to override specific maven configuration properties (remote repositories, etc.) and/or run the Data Flow Server behind a proxy, you need to specify those properties as command line arguments when starting the Data Flow Server. For example:
$ java -jar spring-cloud-dataflow-server-local-1.0.0.RC1.jar --maven.localRepository=mylocal --maven.remoteRepositories=repo1,repo2 --maven.offline=true --maven.proxy.protocol=https --maven.proxy.host=host1 --maven.proxy.port=8090 --maven.proxy.non_proxy_hosts='host2|host3' --maven.proxy.auth.username=user1 --maven.proxy.auth.password=passwd
By default, the protocol is set to http
. You can omit the auth properties if the proxy doesn’t need a username and password.
By default, the maven localRepository
is set to ${user.home}/.m2/repository/
,
and repo.spring.io/libs-snapshot
will be the only remote repository.
You can also use environment variables to specify the maven/proxy properties:
export MAVEN_LOCAL_REPOSITORY=mylocalMavenRepo export MAVEN_REMOTE_REPOSITORIES=repo1,repo2 export MAVEN_OFFLINE=true export MAVEN_PROXY_PROTOCOL=https export MAVEN_PROXY_HOST=host1 export MAVEN_PROXY_PORT=8090 export MAVEN_PROXY_NON_PROXY_HOSTS='host2|host3' export MAVEN_PROXY_AUTH_USERNAME=user1 export MAVEN_PROXY_AUTH_PASSWORD=passwd
Launch the shell:
$ java -jar spring-cloud-dataflow-shell-1.0.0.RC1.jar
If the Data Flow Server and shell are not running on the same host, point the shell to the Data Flow server:
server-unknown:>dataflow config server http://dataflow-server.cfapps.io Successfully targeted http://dataflow-server.cfapps.io dataflow:>
By default, the application registry will be empty. If you would like to register all out-of-the-box stream applications built with the Kafka binder in bulk, you can with the following command. For more details, review how to register applications.
$ dataflow:>app import --uri http://bit.ly/stream-applications-kafka-maven
You can now use the shell commands to list available applications (source/processors/sink) and create streams. For example:
dataflow:> stream create --name httptest --definition "http --server.port=9000 | log" --deploy
Note | |
---|---|
You will need to wait a little while until the apps are actually deployed successfully
before posting data. Look in the log file of the Data Flow server for the location of the log
files for the |
Now post some data
dataflow:> http post --target http://localhost:9000 --data "hello world"
Look to see if hello world
ended up in log files for the log
application.