-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (47 loc) · 2.79 KB
/
Makefile
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
VIRT_CONT_NAME=gk_virtuoso
## build the image based on docker file and latest repository
build: build-simulator-tgz build-dashboards-tgz
cd docker && make build tag
dist-clean:
-rm -f docker/*.tgz
-rm -rf docker/data
./sbt clean
####################
build-simulator-tgz:
./sbt "project simulator" universal:packageZipTarball
mv simulator/target/universal/simulator*.tgz docker/simulator.tgz
mkdir -p docker/data
cp -r data/conf docker/data/
build-dashboards-tgz:
./sbt "project dashboard" universal:packageZipTarball
mv dashboard/target/universal/dashboard*.tgz docker/dashboard.tgz
mkdir -p docker/data
cp -r data/conf docker/data/
start-simulator:
./sbt "project simulator" compile "run 9000" | tee simulator-`date "+%Y%m%d-%H%M%S"`.log
start-dashboard:
./sbt "project dashboard" compile "run 9001" | tee dashboard-`date "+%Y%m%d-%H%M%S"`.log
run-scd-bash:
docker run -it --rm --link ${VIRT_CONT_NAME}:virtuoso -p 9000:9000 -e JAVA_OPTS="-Xmx1g -Xms1g -Xss1g" eccenca-scd:develop bash
run-virtuoso:
cd virtuoso-data && \
docker run -d -p 80:80 -p 1111:1111 -v `pwd`:/data --name ${VIRT_CONT_NAME} docker-registry.eccenca.com/openlink-virtuoso-7:v7.2.1-4
rm-virtuoso:
-docker rm -f ${VIRT_CONT_NAME}
-rm -f virtuoso-data/*.lck virtuoso-data/*.log
clean-virtuoso-data:
-rm virtuoso-data/*.log virtuoso-data/*.trx virtuoso-data/*.pxa virtuoso-data/*.db
clean-runtime-graphs:
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"sparql DROP SILENT GRAPH <http://www.xybermotive.com/geoknow/>;\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"sparql DROP SILENT GRAPH <http://www.xybermotive.com/configuration/>;\""
virtuoso-load-status:
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"select * from DB.DBA.load_list;\""
virtuoso-load-data:
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"delete from DB.DBA.load_list ;\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"ld_dir('/data/import', 'gadm2.fixed.virtuoso.sorted.nt.gz', 'http://linkedgeodata.org/gadm2/');\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"ld_dir('/data/import', 'ncdc-ghcnd-obs.ttl.gz', 'http://www.xybermotive.com/GeoKnowWeather#');\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"ld_dir('/data/import', 'ncdc-stations.ttl.gz', 'http://www.xybermotive.com/GeoKnowWeather#');\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"ld_dir('/data/import', 'news_geoknow_20150910_1016.nt.gz', 'http://www.xybermotive.com/news/');\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"rdf_loader_run();\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"wait_for_children;\""
docker exec -it ${VIRT_CONT_NAME} /bin/sh -c "/usr/bin/isql exec=\"checkpoint;\""