Skip to content

madgik/Docker-Exareme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exareme with Docker

Docker Installation

Install Docker (on linux) or Docker-toolbox (on Windows/Mac)

Linux only: Use docker without sudo

Exareme Installation

  1. Open a terminal (Docker Quickstart Terminal on Windows/Mac or standard terminal on Linux).
  2. Download zip and unzip or “git clone” from Exareme docker repository
git clone https://github.com/madgik/Docker-Exareme.git
  1. Linux only:
$ sudo service docker start
  1. Navigate to the Exareme Docker Directory:
$ cd <path to Docker-Exareme>
  1. Windows only:
$ dos2unix bootstrap.sh
  1. Build Exareme image (this may take a few minutes the first time):
$ docker build -t exareme .

Run Exareme container

  1. If you are planning to use Exareme with the Stream Server
  2. Run the Stream Server Container
  3. 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")
  1. To run Exareme only:
$ docker run -i -t --rm -p 9090:9090  --name exareme exareme
  1. Leave this console open while you are working and then stop the container.
  2. Find your docker machine IP
  3. On Linux is: localhost
  4. 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)**.

Run Stream Queries on Exareme

To run stream queries on Exareme:

  1. Run Stream Server container.
  2. Run Exareme container (and link with Stream Server container).

Register a Stream Query

  1. Select your favorite REST client. The following screenshots are from Andvanced REST client addon from chrome.
  2. Open your REST client (ARC in your chrome Apps if you installed Andvanced REST client).
  3. 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.

Alt text

###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

Alt text

Exit Exareme container

To gracefully stop your docker container:

  1. Select your Stream Server docker console.
  2. Press Ctrl+C.
  3. 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages