-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
To get started make sure your system has as a minimum Java JDK 6 or newer installed. Java JDK 7 is recommended. Furthermore, Redis is used for persistence. You can either use an existing instance of Redis or the Spring XD provided Redis instance.
Spring XD can be run in two different modes. There’s a single-node runtime option for testing and development, and there’s a distributed runtime which supports distribution of processing tasks across multiple nodes. The distributed runtime also requires a Redis installation.
Download spring-xd-1.0-M1.zip (TODO)
Unzip the distribution. This will yield the installation directory spring-xd. All the commands below are executed from this directory, so change into it before proceeding
$ cd spring-xdThe single node option is the easiest to get started with. It runs everything you need in a single process. To start it, you just need to run the following command
xd/bin>$ ./xd-singlenodeYou should then be able to start using Spring XD.
The distributed runtime uses Redis so we’ll cover look at installing that and running that first.
If you already have a running instance of Redis it can be used for Spring XD. By default Spring XD will try to use a Redis instance running on localhost using port 6379.
If you don’t have a pre-existing installation of Redis, you can use the Spring XD provided instance (For Linux and Mac). Inside the Spring XD installation directory (spring-xd) do:
$ cd redis/bin $ ./install-redis
This will compile the Redis source tar and add the Redis executables under redis/bin:
-
redis-check-dump
-
redis-sentinel
-
redis-benchmark
-
redis-cli
-
redis-server
You are now ready to start Redis by executing
$ ./redis-server
|
Tip
|
For further information on installing Redis in general, please checkout the Redis Quick Start guide. If you are using Mac OS, you can also install Redis via Homebrew |
Presently, Spring XD does not ship Windows binaries for Redis (See XD-151). However, Microsoft is actively working on supporting Redis on Windows. You can download Windows Redis binaries from:
If you try to run Spring XD and Redis is NOT running, you will see the following exception:
11:26:37,830 ERROR main launcher.RedisContainerLauncher:85 - Unable to connect to Redis on localhost:6379; nested exception is com.lambdaworks.redis.RedisException: Unable to connect Redis does not seem to be running. Did you install and start Redis? Please see the Getting Started section of the guide for instructions.
$ redis-serverYou should see something like this:
[35142] 01 May 14:36:28.939 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[35142] 01 May 14:36:28.940 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.6.12 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 35142
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[35142] 01 May 14:36:28.941 # Server started, Redis version 2.6.12
[35142] 01 May 14:36:28.941 * The server is now ready to accept connections on port 6379Spring XD consists of two servers
-
XDAdmin - controls deployment of modules into containers
-
XDContainer - executes modules
The simplest deployment option is to launch an XD Container with an embedded XDAdmin from the <xd-install-dir>/xd/bin directory
xd/bin>$ ./xd-admin --embeddedContainerYou can start the xd-container and xd-admin servers individually
xd/bin>$ ./xd-admin
xd/bin>$ ./xd-containerThere is an additional configuration option to specify the location of the Spring XD install.
xd/bin>$ ./xd-container --xdHomeDir <xd-install-directory>Pass in the --help option to see additional configuration properties.
Home | About | Project | Getting Started | Technical Docs