Created
May 22, 2019 07:37
-
-
Save solatis/e5ceb111333d0c30191d86b9268ebbfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update -y && apt-get install python-pip cmake wget -y | |
RUN mkdir qdb-api && cd qdb-api && wget https://s3-eu-west-1.amazonaws.com/download.quasardb.net/quasardb/3.3/3.3.0/api/c/qdb-api_3.3.0-1.deb && dpkg -i qdb-api_3.3.0-1.deb && apt install -y -f | |
RUN pip install quasardb && pip install psutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update -y && apt-get install wget -y | |
RUN wget https://s3-eu-west-1.amazonaws.com/download.quasardb.net/quasardb/3.3/3.3.0/server/qdb-server_3.3.0-1.deb && dpkg -i qdb-server_3.3.0-1.deb && apt install -f -y | |
RUN wget https://s3-eu-west-1.amazonaws.com/download.quasardb.net/quasardb/3.3/3.3.0/api/c/qdb-api_3.3.0-1.deb && dpkg -i qdb-api_3.3.0-1.deb && apt install -f -y | |
RUN wget https://s3-eu-west-1.amazonaws.com/download.quasardb.net/quasardb/3.3/3.3.0/rest/qdb-rest_3.3.0-1.deb && dpkg -i qdb-rest_3.3.0-1.deb && apt install -f -y | |
RUN wget https://s3-eu-west-1.amazonaws.com/download.quasardb.net/quasardb/3.3/3.3.0/utils/qdb-utils_3.3.0-1.deb && dpkg -i qdb-utils_3.3.0-1.deb && apt install -f -y | |
ENTRYPOINT /usr/bin/qdbd -a eth0:2836 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t server -f Dockerfile.server . | |
docker build -t client -f Dockerfile.client . | |
docker run -d -ti --name server server | |
docker run -ti --name server server | |
docker run -ti --name client --link server:server client | |
root@c32f4121491e:/# python | |
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) | |
[GCC 7.3.0] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import quasardb | |
>>> print(quasardb.version()) | |
3.3.0 | |
>>> c = quasardb.Cluster(uri="qdb://server:2836") | |
>>> ts = c.ts("test") | |
>>> ts.create([quasardb.ColumnInfo(quasardb.ColumnType.Double, "close"), quasardb.ColumnInfo(quasardb.ColumnType.Int64, "volume"), quasardb.ColumnInfo(quasardb.ColumnType.Timestamp, "value_date")]) | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment