You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2015/12/14 15:53:49 UTC
marmotta git commit: MARMOTTA-621: added initial (not functional yet)
docker image for ostrich
Repository: marmotta
Updated Branches:
refs/heads/develop abb1f00ed -> 900a70cfd
MARMOTTA-621: added initial (not functional yet) docker image for ostrich
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/900a70cf
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/900a70cf
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/900a70cf
Branch: refs/heads/develop
Commit: 900a70cfd33ceafb1513e8ecd41df9bd25fb42b9
Parents: abb1f00
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Dec 14 15:52:09 2015 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Dec 14 15:52:09 2015 +0100
----------------------------------------------------------------------
libraries/ostrich/backend/.dockerignore | 1 +
libraries/ostrich/backend/Dockerfile | 70 ++++++++++++++++++++++++++++
libraries/ostrich/backend/README.md | 16 ++++++-
3 files changed, 85 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/900a70cf/libraries/ostrich/backend/.dockerignore
----------------------------------------------------------------------
diff --git a/libraries/ostrich/backend/.dockerignore b/libraries/ostrich/backend/.dockerignore
new file mode 100644
index 0000000..378eac2
--- /dev/null
+++ b/libraries/ostrich/backend/.dockerignore
@@ -0,0 +1 @@
+build
http://git-wip-us.apache.org/repos/asf/marmotta/blob/900a70cf/libraries/ostrich/backend/Dockerfile
----------------------------------------------------------------------
diff --git a/libraries/ostrich/backend/Dockerfile b/libraries/ostrich/backend/Dockerfile
new file mode 100644
index 0000000..12195be
--- /dev/null
+++ b/libraries/ostrich/backend/Dockerfile
@@ -0,0 +1,70 @@
+# Dockerfile for Apache Marmotta Ostrich Triplestore
+
+FROM debian:jessie
+MAINTAINER Sergio Fernández <wi...@apache.org>
+
+ADD . /src
+WORKDIR /src
+
+# configuration
+ENV DEBIAN_FRONTEND noninteractive
+ENV DB_PATH /data/ostrich
+ENV DB_PORT 10000
+
+# base environment
+RUN apt-get update -qq \
+ && apt-get install -qq -y \
+ locales \
+ apt-utils \
+ git \
+ && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
+ENV LANG en_US.utf8
+
+RUN apt-get update -qq \
+ && apt-get install -y \
+ build-essential \
+ autoconf \
+ libtool \
+ cmake \
+ clang \
+ libc++-dev \
+ python-all-dev \
+ python-virtualenv \
+ && apt-get install -y \
+ libraptor2-dev \
+ librasqal3-dev \
+ libgoogle-glog-dev \
+ libgflags-dev \
+ libleveldb-dev \
+ zlib1g-dev \
+ libgflags-dev \
+ libgtest-dev \
+ libboost-all-dev \
+ libtcmalloc-minimal4
+
+RUN git clone https://github.com/wikier/grpc.git \
+ && cd grpc \
+ && git submodule update --init --recursive \
+ && make \
+ && make install \
+ && cd ..
+
+# build
+RUN mkdir build \
+ && cd build \
+ && cmake .. \
+ && make \
+ && cd ..
+
+# clean
+RUN apt-get -y clean -qq \
+ && apt-get -y autoclean -qq \
+ && apt-get -y autoremove -qq \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN mkdir -p ${DB_PATH}
+
+EXPOSE 10000
+
+CMD ["/src/build/service/marmotta_persistence", "-db", "${DB_PATH}", "-port" "${DB_PORT}"]
+
http://git-wip-us.apache.org/repos/asf/marmotta/blob/900a70cf/libraries/ostrich/backend/README.md
----------------------------------------------------------------------
diff --git a/libraries/ostrich/backend/README.md b/libraries/ostrich/backend/README.md
index 047a968..c17a4be 100644
--- a/libraries/ostrich/backend/README.md
+++ b/libraries/ostrich/backend/README.md
@@ -1,4 +1,4 @@
-# Apache Marmotta LevelDB/C++ Backend
+# Apache Marmotta Ostrich Backend
This repository implements an experimental high-performance backend for Apache Marmotta
using LevelDB as storage and gRPC as communication channel between the Java frontend
@@ -24,7 +24,7 @@ Debian:
apt-get install libraptor2-dev librasqal3-dev libgoogle-glog-dev libgflags-dev libleveldb-dev
-The backend uses the new Proto 3 format and the gRPC SDK. These need to be installed separately,
+The backend uses the new Proto 3 format and the gRPC SDK. These need to be installed separately;
please follow the instructions at [https://github.com/grpc/grpc](https://github.com/grpc/grpc/blob/master/INSTALL).
@@ -51,6 +51,18 @@ Start the backend from the cmake build directory as follows:
The binary accepts many different options. Please see `--help` for details.
+## Running Docker
+
+The C++ backend can be ran in the provided Docker image. Just build it:
+
+ docker build -t apachemarmotta/ostrich .
+
+Then you can run Ostrich as a container:
+
+ docker run -t -d -p 8080:8080 -p 10000:10000 apachemarmotta/ostrich
+
+connecting normally to `localhost:10000`.
+
## Running Sharding
The repository contains an experimental implementation of a sharding server that proxies and