Public Repository

Last pushed: 2 years ago
Short Description
Spring XD single node container configured for RabbitMQ, Hadoop, Mongo, and security enabled.
Full Description

Spring XD Single Mode

This image runs a Spring XD container in 'singlemode' and configures it with the following config

  • RabbitMQ transport with config using $RABBITMQ_IP with default port and default credentials.
  • Hadoop 2.6.0 distribution with config using $HDFS_IP and port 9000 for the name node and username root.
  • Security. User: xdadmin. Password: devadmin. Roles: ROLE_ADMIN, ROLE_CREATE, ROLE_VIEW
  • Container group name: ingestion
  • Configuration of the MongoDB sink. host: $MONGO_IP. databaseName: ingestion

HADOOP_DISTRO and HADOOP_USER_NAME properties can both be overridden to supply different property values. All other environment variables described above should be configured appropriately and injected into the container to connect RabbitMQ and Hadoop to the Spring XD container.

Start the single node

To start the container with the standard default, i.e. not those defined above, run the following command:

docker run -d --name singlenode -h singlenode -p 9393:9393 pbarriscale/xd-singlenode /opt/spring-xd/xd/bin/xd-singlenode
Start the XD shell

To start an XD shell run the following command:

docker run --rm -it pbarriscale/xd-singlenode /opt/spring-xd/shell/bin/xd-shell

Connect to the admin server with the following command from the XD shell

server-unknown:>admin config server http://singlenode:9393
Create a simple stream
xd:>stream create --name ticktock --definition "time | log" --deploy
View logs on XD container
docker logs -f singlenode
...
2015-08-30T08:50:35+0000 1.2.1.RELEASE INFO DeploymentSupervisor-0 zk.ZKStreamDeploymentHandler - Deployment status for stream 'ticktock': DeploymentStatus{state=deployed}
2015-08-30T08:50:36+0000 1.2.1.RELEASE INFO task-scheduler-1 sink.test - 2015-08-30 08:50:36
2015-08-30T08:50:37+0000 1.2.1.RELEASE INFO task-scheduler-2 sink.test - 2015-08-30 08:50:37
2015-08-30T08:50:38+0000 1.2.1.RELEASE INFO task-scheduler-1 sink.test - 2015-08-30 08:50:38
2015-08-30T08:50:39+0000 1.2.1.RELEASE INFO task-scheduler-3 sink.test - 2015-08-30 08:50:39
2015-08-30T08:50:40+0000 1.2.1.RELEASE INFO task-scheduler-2 sink.test - 2015-08-30 08:50:40
2015-08-30T08:50:41+0000 1.2.1.RELEASE INFO task-scheduler-4 sink.test - 2015-08-30 08:50:41
Destroy the stream and exit

xd:>stream destroy ticktock
xd:>exit

Exiting the XD shell also destroys the XD shell Docker container.

Destroy the XD container

Finally, destroy the XD container with docker rm -f singlenode.

Docker Pull Command
Owner
pbarriscale