6. Deploying Spring Cloud Data Flow
Prev | Part II. Spring Cloud Data Flow Overview | Next

## 6. Deploying Spring Cloud Data Flow

## 6.1 Deploying 'local'

1. 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.M3/spring-cloud-dataflow-server-local-1.0.0.M3.jar

       wget http://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-dataflow-shell/1.0.0.M3/spring-cloud-dataflow-shell-1.0.0.M3.jar

2. Launch the Data Flow Server

   1. 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.M3.jar

   2. 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.M3.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

3. Launch the shell:

       $ java -jar spring-cloud-dataflow-shell-1.0.0.M3.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:>

4. 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 `http` and `log` applications. Tail the log file for each application to verify the application has started.

   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.

Prev | Up | Next
5. System Requirements | Home | Part III. Streams