Commit 6a4c5108 by marwan

Merge branch 'ext_flowstack_jupyter' of…

Merge branch 'ext_flowstack_jupyter' of https://dev.nexpie.com/template/flowengine-docker into ext_flowstack_jupyter
parents baa1e312 b87f375c
...@@ -28,7 +28,20 @@ do ...@@ -28,7 +28,20 @@ do
done <<< "$(echo "$orgInfo" | awk 'NR > 1')" done <<< "$(echo "$orgInfo" | awk 'NR > 1')"
LengthOrgID=${#OrgID} LengthOrgID=${#OrgID}
done done
echo "OrgID: ${OrgID[@]}" echo "OrgID: ${OrgID[@]}"
bucketInfo=$(influx bucket list --token $INFLUX_TOKEN --org $ORG_NAME --host $URI)
bucketInfo=$(echo "$bucketInfo" | sed -e 's/^[ \t]*//')
while read -r line; do
echo $line
name=$(echo "$line" | awk '{print $2}' )
echo $name
if [ "$BUCKET_NAME" == "$name" ]; then
echo this scripte is used.
exit 0
fi
done <<< "$(echo "$bucketInfo" | awk 'NR > 1')"
curl --request POST ${URI}/api/v2/buckets -H "Authorization: Token ${INFLUX_TOKEN}" -H "Accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"${BUCKET_NAME}\", \"description\": \"A bucket holding air sensor data\", \"orgID\": \"${OrgID[@]}\", \"retentionRules\": [ { \"type\": \"expire\", \"everySeconds\": 15552000 } ] }" #2592000 curl --request POST ${URI}/api/v2/buckets -H "Authorization: Token ${INFLUX_TOKEN}" -H "Accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"${BUCKET_NAME}\", \"description\": \"A bucket holding air sensor data\", \"orgID\": \"${OrgID[@]}\", \"retentionRules\": [ { \"type\": \"expire\", \"everySeconds\": 15552000 } ] }" #2592000
output=$(influx bucket list --token $INFLUX_TOKEN --org $ORG_NAME --host $URI) output=$(influx bucket list --token $INFLUX_TOKEN --org $ORG_NAME --host $URI)
......
...@@ -53,12 +53,12 @@ services: ...@@ -53,12 +53,12 @@ services:
# ports: # ports:
# - '33011:3000' # - '33011:3000'
environment: environment:
- GF_DATABASE_TYPE= postgres - GF_DATABASE_TYPE=postgres
- GF_DATABASE_HOST= pg_grafana:5432 - GF_DATABASE_HOST=pg_grafana:5432
- GF_DATABASE_NAME= nexiiot_grafana_db - GF_DATABASE_NAME=nexiiot_grafana_db
- GF_DATABASE_USER= nexiiot_grafana_user - GF_DATABASE_USER=nexiiot_grafana_user
- GF_DATABASE_PASSWORD= ${ENV_POSTGRES_PASSWORD} - GF_DATABASE_PASSWORD=${ENV_POSTGRES_PASSWORD}
- GF_DATABASE_SSL_MODE= disable - GF_DATABASE_SSL_MODE=disable
- GF_SECURITY_ADMIN_PASSWORD=${NEXIIOT_GF_SECURITY_ADMIN_PASSWORD} - GF_SECURITY_ADMIN_PASSWORD=${NEXIIOT_GF_SECURITY_ADMIN_PASSWORD}
- GF_SESSION_COOKIE_NAME=${NEXIIOT_GF_SESSION_COOKIE_NAME} - GF_SESSION_COOKIE_NAME=${NEXIIOT_GF_SESSION_COOKIE_NAME}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment