Skip to content

Commit 3f4eed8

Browse files
author
Pedro Crespo
committed
Merge remote-tracking branch 'upstream/master'
2 parents cf7b3f4 + 3c611dc commit 3f4eed8

File tree

5 files changed

+72
-9
lines changed

5 files changed

+72
-9
lines changed

services/dy-3dvis/simcoreparaviewweb/Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,18 @@ LABEL simcore.service.bootsettings='[{"name": "entry_point", "type": "string", "
5252
# copy start script
5353
ARG PORT
5454
ENV SERVER_PORT=$PORT
55-
5655
COPY scripts/boot.sh scripts/boot.sh
5756
RUN chmod +x scripts/boot.sh
57+
# copy apache config changer script
5858
COPY config/apache.conf config/apache.conf
5959
COPY scripts/apachePatch.sh scripts/apachePatch.sh
6060
RUN chmod +x scripts/apachePatch.sh
6161
RUN mkdir /home/root/trigger && \
6262
chmod 777 /home/root/trigger
63+
# copy paraview launcher modifier script
64+
COPY scripts/visualizer_launcher_patch.sh scripts/visualizer_launcher_patch.sh
65+
RUN chmod +x scripts/visualizer_launcher_patch.sh
66+
COPY config/visualizer_config.json config/visualizer_config.json
6367
#------------------------------------------
6468
FROM common as development
6569
ENV CREATE_DUMMY_TABLE 1

services/dy-3dvis/simcoreparaviewweb/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It brings the paraview visualizer application as an example of how easy one can
1010
2. execute `make build-devel`, this will build the service as "development" code together with a local minio S3 storage and a postgres DB
1111
3. execute `make up-devel`, this will run the service locally
1212
4. open a terminal (preferably bash)
13-
5. execute `curl -i -X POST localhost:8777/setport -d "port=8777"` in the terminal (this will start the paraviewweb visualizer app)
13+
5. Not necessary in dev mode anymore: execute `curl -i -X POST localhost:8777/setport -d "port=8777"` in the terminal (this will start the paraviewweb visualizer app)
1414
6. execute `curl -i -X POST localhost:8777/retrieve` in the terminal (this will make the simcore paraviewweb download the data from the local S3 storage)
1515
7. open browser at [localhost:8777/visualizer](localhost:8777/visualizer)
1616

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"sources": [],
3+
4+
"filters": [
5+
{ "name": "Slice" }
6+
],
7+
8+
"readers": [
9+
{ "name": "LegacyVTKReader", "extensions": [ "vtk" ], "method": "FileNames" },
10+
{ "name": "Xdmf3ReaderS", "extensions": [ "xmf", "xdmf" ] }
11+
],
12+
13+
"sources_all": [
14+
{ "name": "AnnotateTime", "label": "Annotate Time" },
15+
{ "name": "Cone" },
16+
{ "name": "Sphere" },
17+
{ "name": "Text" },
18+
{ "name": "Wavelet" }
19+
],
20+
21+
"filters_all": [
22+
{ "name": "Calculator" },
23+
{ "name": "CellDatatoPointData", "label": "Cell Data To Point Data" },
24+
{ "name": "Clip" },
25+
{ "name": "Contour" },
26+
{ "name": "D3" },
27+
{ "name": "ExtractCTHParts", "label": "Extract CTH Parts" },
28+
{ "name": "ProcessIdScalars", "label": "Process ID Scalars" },
29+
{ "name": "Reflect" },
30+
{ "name": "Slice" },
31+
{ "name": "StreamTracer", "label": "Stream Tracer" },
32+
{ "name": "Threshold" },
33+
{ "name": "Transform" },
34+
{ "name": "Tube" },
35+
{ "name": "Ribbon" },
36+
{ "name": "WarpByScalar", "label": "Warp By Scalar" },
37+
{ "name": "WarpByVector", "label": "Warp By Vector" },
38+
{ "name": "ExtractBlock", "label": "Extract Blocks" }
39+
],
40+
41+
"readers_all": [
42+
{ "name": "LegacyVTKReader", "extensions": [ "vtk" ], "method": "FileNames" },
43+
{ "name": "Xdmf3ReaderS", "extensions": [ "xmf", "xdmf" ] }
44+
]
45+
}

services/dy-3dvis/simcoreparaviewweb/scripts/boot.sh

+18-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
echo "current directory is ${PWD}"
33

4+
5+
46
if [[ -v CREATE_DUMMY_TABLE ]];
57
then
68
# in dev mode, data located in mounted volume /test-data are uploaded to the S3 server
@@ -11,9 +13,9 @@ then
1113
# the fake SIMCORE_NODE_UUID is exported to be available to the service
1214
export SIMCORE_NODE_UUID="$result";
1315
# TODO: host name shall be defined dynamically instead of stupidely hard-coded
14-
host_name="localhost"
16+
host_name="localhost"
1517
else
16-
host_name="osparc01.speag.com"
18+
host_name="osparc01.speag.com"
1719
fi
1820

1921
echo "modifying apache configuration..."
@@ -22,12 +24,21 @@ echo "modifying apache configuration..."
2224
echo "restarting the apache service..."
2325
service apache2 restart
2426

27+
# echo "modifying wslink launcher configuration"
28+
. scripts/visualizer_launcher_patch.sh
29+
30+
if [[ -v CREATE_DUMMY_TABLE ]];
31+
then
32+
# in dev mode we know already what the port is
33+
server_port=${SERVER_PORT}
34+
else
35+
# the service waits until the calling client transfers the service externally published port
36+
# this is currently necessary due to some unknown reason with regard to how paraviewweb
37+
# visualizer is started (see below)
38+
echo "Waiting for server port to be defined"
39+
server_port="$(python3 src/getport.py)";
40+
fi
2541

26-
# the service waits until the calling client transfers the service externally published port
27-
# this is currently necessary due to some unknown reason with regard to how paraviewweb
28-
# visualizer is started (see below)
29-
echo "Waiting for server port to be defined"
30-
server_port="$(python3 src/getport.py)";
3142

3243
# to start the paraviewweb visualizer it needs as parameter something to do with the way
3344
# its websockets are setup "ws://HOSTNAME:PORT" hostname and port must be the hostname and port
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
sed -i -e '/"--authKey", "${secret}",/a "--proxies", "/home/root/config/visualizer_config.json",' /opt/wslink-launcher/launcher-template.json

0 commit comments

Comments
 (0)