Skip to content

Commit 554c784

Browse files
lalithsureshryzhyk
authored andcommitted
Preload DBSP container with demo projects
Signed-off-by: Lalith Suresh <lsuresh@vmware.com>
1 parent f62a4d3 commit 554c784

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ target
44
**/pipeline_data
55
**/ldbc-graphalytics-data
66
**/fraud_data
7-
demo

demo/create_demo_projects.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44
ROOT="${THIS_DIR}/../"
55
SERVER_DIR="${ROOT}/crates/pipeline_manager/"
66

7+
78
set -e
89

910
# We want non-matching wildcards to return an empty list
@@ -29,13 +30,3 @@ do
2930
printf "OK(config_id=$config_id)\n"
3031
done
3132
done
32-
33-
for project_dir in "${project_prefix}"*
34-
do
35-
project_name=${project_dir#$project_prefix}
36-
37-
if test -f "${project_dir}/prepare.sh"; then
38-
echo " Running custom project setup script"
39-
"${project_dir}"/prepare.sh
40-
fi
41-
done

demo/demo.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ ${ROOT}/scripts/start_manager.sh ${THIS_DIR}/pipeline_data
1616
${ROOT}/scripts/start_prometheus.sh ${THIS_DIR}/pipeline_data
1717

1818
${THIS_DIR}/create_demo_projects.sh
19+
${THIS_DIR}/prepare_demo_data.sh

demo/prepare_demo_data.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4+
5+
set -e
6+
7+
# We want non-matching wildcards to return an empty list
8+
# instead of a non-expanded wildcard.
9+
shopt -s nullglob
10+
11+
project_prefix=${THIS_DIR}/project_
12+
13+
for project_dir in "${project_prefix}"*
14+
do
15+
project_name=${project_dir#$project_prefix}
16+
17+
if test -f "${project_dir}/prepare.sh"; then
18+
echo " Running custom project setup script"
19+
"${project_dir}"/prepare.sh
20+
fi
21+
done

deploy/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,8 @@ RUN cp /database-stream-processor/deploy/prometheus_datasource.yaml /etc/grafana
5656

5757
ENV PATH="$PATH:/root/.cargo/bin"
5858

59+
RUN /root/.cargo/bin/dbsp_pipeline_manager --bind-address=0.0.0.0 --working-directory=/working-dir --sql-compiler-home=/database-stream-processor/sql-to-dbsp-compiler --dbsp-override-path=/database-stream-processor --unix-daemon \
60+
&& /database-stream-processor/demo/create_demo_projects.sh
61+
5962
CMD /database-stream-processor/scripts/start_prometheus.sh /working-dir && \
6063
/root/.cargo/bin/dbsp_pipeline_manager --bind-address=0.0.0.0 --working-directory=/working-dir --sql-compiler-home=/database-stream-processor/sql-to-dbsp-compiler --dbsp-override-path=/database-stream-processor

0 commit comments

Comments
 (0)