Netflix RSS Demo Application
Cloned from github fork.
Introduction
- The software is subdivided into three different server units:
- Middletier: organizes the rss - data
- Edge: Frontend, hosts the website
- Eureka: a REST service, developed by Netflix
- The RSSFeedReader is used to demonstrate the inspectIT Tool analysing distributed systems
- In order to have a compact environment, the software has to be ported to Docker
Each unit runs in a separate Docker -container
- The connection between the different components is managed by Docker Link:
- The containers Edge and Middletier are linked with the Tomcat - Eureka Server
- The container Edge is linked with Container Middletier
- Each container image can be builded by an individual Dockerfile.
- In the meantime the containers can be started by the following commands:
- docker run -p 8080:8080 --name tomcat --privileged=true tomcat
docker run -P -p 9191:9191 --link tomcat:tomcat --name middletier --hostname middletier  middletier
docker run -P -p 9090:9090 --link tomcat:tomcat --link middletier:middletier edge
Architecture (with Agents):
Â
The containers are connection via docker -link. Edge and Middletier include a Java Agent, which sends the relevant data to the CMR server. The CMR server aggregates the data and provides the data for the Rich Client.
In the docker-compose script, the host directory including the inspectit-agent.cfg and the other config files is mounted on the container. You do not have to rebuild the project, once you have changed the agent's configuration.
In the the header of the config file, the CMR host must be set as "cmr".
Latest Dockerfiles (with agents):
Â
Â
Docker Compose:
The application can be started by a docker- compose script. (Installation Guide for docker compose)
Â
After the installation of docker compose, the connection between containers and the internet failed.
Restarting the docker daemon helped to solve the problem
Â
Â
Â
Â
Application with Java Agents | Application without Java Agents |
---|---|
Installation Guide:
- Unzip the archive
- change into the folder netflixRSSReader*Agents/
To build all files run the command:
sudo docker-compose build
Building the eureka service may take a whileÂ
- Under netflixRSSReader*Agents/netflixRSS-edge/config-agent/ and under netflixRSSReader*Agents/netflixRSS-middletier/config-agent/ the config files can be edited.
After configuring the agents, run the following command:
sudo docker-compose up
Now the application starts and the different containers connect themselves.
 After a while the RSSReader can be used
URL for access: http://your-ip:9090/jsp/rss.jsp
URL for eureka:http://your-ip:8080/eureka
- For monitoring the software, please use this clients: LinuxClient / Windows
- Open the rich-client, choose the button "new repository" and enter your IP and port
(For detailed inspectIT documentation, visit the InspectIT homepage) - Afterwards you can choose the desired agent
and analyse your measurement:
Â
- It is recommended to use min. 4 GB RAM, the consumption of resources is very high
- Please use the latest version of docker-compose. Otherwise it could be, that the keyword "container_name" in the docker-compose file is unknown
Â
Docker Swarm:
The application also works with Docker Swarm:
With docker-machine, you can create several swarm-nodes and a swarm-master managing each node:
Each node is a own virtualbox machine instance.
Â
For communication between the different nodes, it is necessary to generate a unique token:
docker run --rm swarm create
Â
A node can be created by following command:
docker-machine create -d virtualbox --swarm --swarm-discovery token://YOUR_TOKEN SWARM_NODE_NAME
Â
For further documentation please visit:
https://docs.docker.com/swarm/install-w-machine/
Â
Now, you can easily start you docker-compose script and swarm. Swarm will choose the optimal node for the containers.
Â
Â
Â
TODO:
- Application runs in three different containers DONE
- Â Application can be started by Docker Compose DONE
- Each container can be monitored by InspectIT DONE
Â