-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstrabonsystemadapter.docker
182 lines (121 loc) · 4.88 KB
/
strabonsystemadapter.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
############################
# Dockerfile for RK-suite #
# RK-team #
# Madgik #
# DI @ UoA #
# #
# java7 #
# maven 3.0.5 #
# git 1.9.1 #
# tomcat 8.0.23 #
# postgres 9.4 #
# postgis 2.3 #
# #
# Sextant #
# Strabon #
# Ontop-spatial #
# GeoTriples #
# madIS #
############################
FROM ubuntu:14.04
MAINTAINER Giorgos Argyriou <[email protected]>
ENV PORT 8080
ENV TOMCAT_MAJOR_VERSION 8
ENV TOMCAT_MINOR_VERSION 8.0.23
# INSTALL PREREQUISITIES
RUN apt-get update \
&& apt-get install -y \
wget \
# default-jdk \
python-apsw \
curl \
git \
mercurial \
maven \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# get java 8
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y install software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update
RUN (echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections) && \
apt-get install -y oracle-java8-installer oracle-java8-set-default
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $JAVA_HOME/bin:$PATH
# DOWNLOAD AND INSTALL postgres AND postgis
RUN touch /etc/apt/sources.list.d/pgdg.list \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update \
&& apt-get install -y \
postgresql-9.4 \
postgresql-server-dev-9.4 \
postgresql-9.4-postgis-2.3 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ADD initdb.sh enable_remote.sh /usr/local/bin/
RUN chmod -v +x /usr/local/bin/initdb.sh
RUN chown -v postgres:postgres /usr/local/bin/initdb.sh
RUN chmod -v +x /usr/local/bin/enable_remote.sh
USER postgres
## start postgres, add postgis, create template for strabon and stop postgres
RUN initdb.sh
USER root
# INSTALL TOMCAT
RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR_VERSION}/v${TOMCAT_MINOR_VERSION}/bin/apache-tomcat-${TOMCAT_MINOR_VERSION}.tar.gz \
&& wget -qO- https://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR_VERSION}/v${TOMCAT_MINOR_VERSION}/bin/apache-tomcat-${TOMCAT_MINOR_VERSION}.tar.gz.md5 | md5sum -c - \
&& tar zxf apache-tomcat-*.tar.gz \
&& rm apache-tomcat-*.tar.gz \
&& mv apache-tomcat* tomcat
# DOWNLOAD geotriples
RUN wget http://geotriples.di.uoa.gr/downloads/geotriples-1.1.6-bin.zip \
&& unzip geotriples-1.1.6-bin.zip \
&& rm -rf /geotriples-1.1.6-bin.zip
# DOWNLOAD madIS
RUN git clone https://github.com/madgik/madis.git
# DOWNLOAD AND BUILD strabon
RUN hg clone http://hg.strabon.di.uoa.gr/Strabon/ \
&& cd Strabon \
&& mvn clean package
RUN cp /Strabon/endpoint/target/strabon-endpoint-3.3.2-SNAPSHOT.war /tomcat/webapps/Strabon.war
RUN mkdir /SpatialBenchmark
#RUN mkdir /SpatialBenchmark/runtime
#RUN mkdir /SpatialBenchmark/runtime/target
#RUN cp -r /Strabon/runtime/target/* /SpatialBenchmark/runtime/target/
RUN cp -r /Strabon/runtime/target/* /SpatialBenchmark/
#\
# && rm -rf /Strabon
# DOWNLOAD AND BUILD ontop-spatial
RUN git clone https://github.com/ConstantB/Ontop-spatial-example.git \
&& cp /Ontop-spatial-example/ontop-spatial-precompiled/webapp/QuestSesame/openrdf-* /tomcat/webapps \
&& rm -rf /Ontop-spatial-example
# DOWNLOAD AND BUILD sextant
RUN hg clone http://hg.strabon.di.uoa.gr/Sextant-New -r OL3 \
&& cd Sextant-New/JerseyServer \
&& mvn clean package
RUN cp /Sextant-New/JerseyServer/target/*.war /tomcat/webapps/Sextant_v2.0.war \
&& rm -Rf /Sextant-New
# FINAL CONFIGURATIONS
RUN mkdir /inout
ADD rocket.sh /usr/local/bin/
RUN chmod -v +x /usr/local/bin/rocket.sh
EXPOSE $PORT
#CMD enable_remote.sh && su - postgres -c "/usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/#postgresql/9.4/main/postgresql.conf"
# benchmark
#FROM java
ADD target/SpatialBenchmark-1.0-SNAPSHOT.jar /SpatialBenchmark/SpatialBenchmark.jar
ADD run.sh /SpatialBenchmark/
RUN chmod -v +x /SpatialBenchmark/run.sh
#RUN cp /Strabon/runtime/target/* /SpatialBenchmark/runtime/target/
WORKDIR /SpatialBenchmark
##COPY strabon/* /SpatialBenchmark/strabon/
##COPY configs/topologicalConfigs/* /SpatialBenchmark/configs/topologicalConfigs/
COPY datasets/SourceDatasets/ /SpatialBenchmark/datasets/SourceDatasets/
COPY datasets/TargetDatasets/ /SpatialBenchmark/datasets/TargetDatasets/
COPY strabon/store.sh /SpatialBenchmark/
COPY strabon/query.sh /SpatialBenchmark/
COPY strabon/mappings.nt /SpatialBenchmark/
##CMD java -cp SpatialBenchmark.jar org.hobbit.core.run.ComponentStarter #org.hobbit.spatialbenchmark.platformConnection.systems.StrabonSystemAdapter
CMD /SpatialBenchmark/run.sh