Install Docker (on linux) or Docker-toolbox (on Windows/Mac)
Linux only: Use docker without sudo
- Open a terminal (Docker Quickstart Terminal on Windows/Mac or standard terminal on Linux).
- Download zip and unzip or “git clone” from this repository
git clone https://github.com/vnikolopoulos/Docker-Exareme.git
- Linux only:
$ sudo service docker start
- Navigate to the Exareme Docker Directory:
$ cd <path to Docker-Exareme>
- Windows only:
$ dos2unix bootstrap.sh
- Build Exareme image (this may take a few minutes the first time):
$ docker build -t exareme .
- If you are planning to use Exareme with the Stream Server
- Run the Stream Server Container
- Run Exareme container (and link to streamserver):
$ docker run -i -t --rm -p 9090:9090 --link streamserver --name exareme exareme
![Alt text](/screenshots/run_exareme.png?raw=true "Run Exareme container and link to Stream Server")
- To run Exareme only:
$ docker run -i -t --rm -p 9090:9090 --name exareme exareme
- Leave this console open while you are working and then stop the container.
- Find your docker machine IP
- On Linux is: localhost
- On Windows/Mac open a new Docker Quickstart Terminal and run:
```
$ docker-machine ip
```
It will return your docker-machine ip **(from now on use this instead of localhost if you are on Windows or Mac)**.
To run stream queries on Exareme:
- Run Stream Server container.
- Run Exareme container (and link with Stream Server container).
- Select your favorite REST client. The following screenshots are from Andvanced REST client addon from chrome.
- Open your REST client (ARC in your chrome Apps if you installed Andvanced REST client).
- To query the Stream Server, as shown below, via Exareme you may register the following query:
select * from (file dialect:json 'http://streamserver:8989/measurements');
via a post request at: http://docker-machine-ip:9090/streamqueryregister/stream1 with paramter key: register_query and value the query. "stream1" is the name of the query you are registering.
###Get Query Results Get the results of the last 10 seconds by making a GET request at:
http://**docker-machine-ip**:9090/streamqueryresult/stream1?last=10
To gracefully stop your docker container:
- Select your Stream Server docker console.
- Press Ctrl+C.
- Close the console.
##Troubleshoot
-
If you are getting an error like:
docker: Error response from daemon: Conflict. The name "/exareme" is already in use by container b13022c72864ad6e7651c1681764ec6ed1554f247e11a1070675b952041fbc78. You have to remove (or rename)
Run:
docker stop exareme
or
docker kill exareme