bossenti commented on code in PR #1955:
URL: https://github.com/apache/streampipes/pull/1955#discussion_r1357849317


##########
installer/compose/README.md:
##########
@@ -90,6 +91,18 @@ docker-compose -f docker-compose.full.yml down
 #docker-compose -f docker-compose.full.yml down
 ```
 
+We introduce quickstart deployment that comes with a set of predefined 
StreamPipes assets, to use the quickstart mode, just build the Docker image and 
start **quickstart** option:
+```bash
+docker-compose -f docker-compose.quickstart.yml build script-runner
+docker-compose -f docker-compose.quickstart.yml up -d
+# go to after all services are started http://localhost
+```
+Stopping the **quickstart** option:
+```bash
+docker-compose -f docker-compose.quickstart.yml down
+#docker-compose -f docker-compose.quickstart.yml down

Review Comment:
   This comment is actually a duplicate right?



##########
installer/compose/README.md:
##########
@@ -90,6 +91,18 @@ docker-compose -f docker-compose.full.yml down
 #docker-compose -f docker-compose.full.yml down
 ```
 
+We introduce quickstart deployment that comes with a set of predefined 
StreamPipes assets, to use the quickstart mode, just build the Docker image and 
start **quickstart** option:
+```bash
+docker-compose -f docker-compose.quickstart.yml build script-runner
+docker-compose -f docker-compose.quickstart.yml up -d
+# go to after all services are started http://localhost

Review Comment:
   ```suggestion
   # go to `http://localhost` after all services are started 
   ```



##########
installer/compose/quickstart/Dockerfile:
##########
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Use an official base image
+FROM ubuntu:latest
+
+# Install curl and jq
+RUN apt-get update \
+    && apt-get install -y curl jq
+
+
+RUN curl -L -o /usr/local/bin/wait-for-it.sh 
https://raw.githubusercontent.com/vishnubob/wait-for-it/81b1373f17855a4dc21156cfe1694c31d7d1792e/wait-for-it.sh
 \

Review Comment:
   Hm, I totally understand why you use this bash script here but I'm not 
really sure if we want to have a file download from an external source here.
   Are there any other options to achieve the same behavior?



##########
installer/compose/quickstart/upload.sh:
##########
@@ -0,0 +1,91 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ -z "$SP_INITIAL_ADMIN_EMAIL" ]; then
+  USERNAME="[email protected]"
+else
+  USERNAME="$SP_INITIAL_ADMIN_EMAIL"
+fi
+
+if [ -z "$SP_INITIAL_ADMIN_PASSWORD" ]; then
+  PASSWORD="admin"
+else
+  PASSWORD="$SP_INITIAL_ADMIN_PASSWORD"
+fi
+
+JSON_TOKEN_RESPONSE=$(curl -s -X POST 
"http://backend:8030/streampipes-backend/api/v2/auth/login"; \
+    -H "Content-Type: application/json" \
+    -d "{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}")
+
+TOKEN=$(echo "$JSON_TOKEN_RESPONSE" | jq -r '.accessToken')
+RESPONSE_TOKEN="Bearer $TOKEN"
+
+JSON_RESOURCE_ITEMS=$(curl -s -X GET 
"http://backend:8030/streampipes-backend/api/v2/rdfendpoints/items"; \
+    -H "Content-Type: application/json" \
+    -H "Authorization: $RESPONSE_TOKEN")
+
+ARRAY_LENGTH=$(echo $JSON_RESOURCE_ITEMS | jq '. | length')
+
+while [ $ARRAY_LENGTH -le 100 ]; do
+    echo "StreamPipes Extensions Service not ready, waiting for 3 seconds..."
+    sleep 3
+    JSON_RESOURCE_ITEMS=$(curl -s -X GET 
"http://backend:8030/streampipes-backend/api/v2/rdfendpoints/items"; \
+        -H "Content-Type: application/json" \
+        -H "Authorization: $RESPONSE_TOKEN")
+    ARRAY_LENGTH=$(echo $JSON_RESOURCE_ITEMS | jq '. | length')
+done
+
+ITEM_MAP_NAME_URI=$(echo $JSON_RESOURCE_ITEMS | jq -r 'map({(.name): .uri}) | 
add')
+
+ITEM_MAP_NAME_URI=$(echo $JSON_RESOURCE_ITEMS | jq -r 'map({(.name): .uri}) | 
add')
+
+for ZIP_FILE in /zip_folder/*.zip; do

Review Comment:
   Why do we have multiple ZIP files? Can't we combine them into a single one?
   
   If not, can we please use speaking names for them instead of the UUIDs?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to