Skip to content

Commit b80f4cd

Browse files
committed
Update Scorpio
1 parent 7c57bc8 commit b80f4cd

4 files changed

Lines changed: 39 additions & 101 deletions

File tree

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ ORION_LD_VERSION=1.4.0
88

99
# Scorpio variables
1010
SCORPIO_PORT=9090
11-
SCORPIO_VERSION=4.1.10
11+
SCORPIO_VERSION=4.1.11
1212

1313
# Stellio variables
14-
STELLIO_DOCKER_TAG=2.5.2
14+
STELLIO_DOCKER_TAG=2.10.1
1515
STELLIO_PORT=8080
1616

1717
# MongoDB variables
Lines changed: 9 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,21 @@
1616
#
1717
# see: https://github.com/FIWARE/helm-charts/
1818
#
19-
version: "3.8"
19+
version: '3.9'
2020
services:
21-
zookeeper:
22-
labels:
23-
org.fiware: 'tutorial'
24-
image: zookeeper
25-
hostname: zookeeper
26-
container_name: zookeeper
27-
networks:
28-
- default
29-
ports:
30-
- "2181"
31-
logging:
32-
driver: none
33-
kafka:
21+
# Scorpio is the context broker
22+
scorpio:
3423
labels:
3524
org.fiware: 'tutorial'
36-
image: bitnami/kafka
37-
hostname: kafka
38-
container_name: kafka
25+
image: quay.io/fiware/scorpio:java-${SCORPIO_VERSION}
26+
hostname: scorpio
27+
container_name: fiware-scorpio
3928
networks:
4029
- default
4130
ports:
42-
- "9092"
43-
environment:
44-
KAFKA_ADVERTISED_HOST_NAME: kafka
45-
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
46-
KAFKA_ADVERTISED_PORT: 9092
47-
KAFKA_LOG_RETENTION_MS: 10000
48-
KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 5000
49-
ALLOW_PLAINTEXT_LISTENER: "yes"
50-
volumes:
51-
- /var/run/docker.sock:/var/run/docker.sock
31+
- "${EXPOSED_PORT}:${SCORPIO_PORT}"
5232
depends_on:
53-
- zookeeper
54-
logging:
55-
driver: none
33+
- postgres
5634
postgres:
5735
labels:
5836
org.fiware: 'tutorial'
@@ -69,28 +47,10 @@ services:
6947
POSTGRES_DB: ngb
7048
logging:
7149
driver: none
72-
scorpio:
73-
labels:
74-
org.fiware: 'tutorial'
75-
image: scorpiobroker/all-in-one-runner:java-kafka-${SCORPIO_VERSION}
76-
hostname: scorpio
77-
container_name: fiware-scorpio
78-
networks:
79-
- default
80-
ports:
81-
- "${SCORPIO_PORT}:9090"
82-
depends_on:
83-
- postgres
84-
- kafka
8550

86-
# Tutorial acts as a series of dummy IoT Sensors over HTTP and connects to the Scorpio Broker
8751
tutorial:
8852
environment:
89-
- IOTA_DEFAULT_RESOURCE=/iot/d
90-
- DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT} # Port used by the dummy IOT devices to receive commands
91-
- DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
92-
- DUMMY_DEVICES_PAYLOAD=ULTRALIGHT
93-
- CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT}/ngsi-ld/v1 # URL of the context broker to update context
53+
- "CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT}/ngsi-ld/v1" # URL of the context broker to update context
9454

9555
networks:
9656
default:

import-data

Lines changed: 24 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,14 @@ curl -s -o /dev/null -X POST \
2929
"location": {"type": "GeoProperty", "value": {"type": "Point", "coordinates": [13.3986, 52.5547]}
3030
},
3131
"name": {"type": "Property", "value": "Bösebrücke Einkauf"},
32-
"furniture":[
33-
{
34-
"type": "Relationship",
35-
"datasetId": "urn:ngsi-ld:Relationship:1",
36-
"object": "urn:ngsi-ld:Shelf:unit001"
37-
},
38-
{
39-
"type": "Relationship",
40-
"datasetId": "urn:ngsi-ld:Relationship:2",
41-
"object": "urn:ngsi-ld:Shelf:unit002"
42-
},
43-
{
44-
"type": "Relationship",
45-
"datasetId": "urn:ngsi-ld:Relationship:3",
46-
"object": "urn:ngsi-ld:Shelf:unit003"
47-
}
48-
],
32+
"furniture": {
33+
"type": "Relationship",
34+
"object": [
35+
"urn:ngsi-ld:Shelf:unit001",
36+
"urn:ngsi-ld:Shelf:unit002",
37+
"urn:ngsi-ld:Shelf:unit003"
38+
]
39+
},
4940
"@context": "'"${TUTORIAL_DATA_MODELS_CONTEXT}"'"
5041
}'
5142

@@ -67,18 +58,14 @@ curl -s -o /dev/null -X POST \
6758
"location": {"type": "GeoProperty", "value": {"type": "Point", "coordinates": [13.3903,52.5075]}
6859
},
6960
"name": {"type": "Property", "value": "Checkpoint Markt"},
70-
"furniture":[
71-
{
72-
"type": "Relationship",
73-
"datasetId": "urn:ngsi-ld:Relationship:1",
74-
"object": "urn:ngsi-ld:Shelf:unit004"
75-
},
76-
{
77-
"type": "Relationship",
78-
"datasetId": "urn:ngsi-ld:Relationship:2",
79-
"object": "urn:ngsi-ld:Shelf:unit005"
80-
}
81-
],
61+
"furniture": {
62+
"type": "Relationship",
63+
"object": [
64+
"urn:ngsi-ld:Shelf:unit001",
65+
"urn:ngsi-ld:Shelf:unit002",
66+
"urn:ngsi-ld:Shelf:unit003"
67+
]
68+
},
8269
"@context": "'"${TUTORIAL_DATA_MODELS_CONTEXT}"'"
8370
}'
8471

@@ -97,23 +84,14 @@ curl -s -o /dev/null -X POST \
9784
"location": {"type": "GeoProperty", "value": {"type": "Point", "coordinates": [13.4447,52.5031]}
9885
},
9986
"name": {"type": "Property", "value": "East Side Galleria"},
100-
"furniture":[
101-
{
102-
"type": "Relationship",
103-
"datasetId": "urn:ngsi-ld:Relationship:1",
104-
"object": "urn:ngsi-ld:Shelf:unit006"
105-
},
106-
{
107-
"type": "Relationship",
108-
"datasetId": "urn:ngsi-ld:Relationship:2",
109-
"object": "urn:ngsi-ld:Shelf:unit007"
110-
},
111-
{
112-
"type": "Relationship",
113-
"datasetId": "urn:ngsi-ld:Relationship:3",
114-
"object": "urn:ngsi-ld:Shelf:unit008"
115-
}
116-
],
87+
"furniture": {
88+
"type": "Relationship",
89+
"object": [
90+
"urn:ngsi-ld:Shelf:unit006",
91+
"urn:ngsi-ld:Shelf:unit007",
92+
"urn:ngsi-ld:Shelf:unit008"
93+
]
94+
}
11795
"@context": "'"${TUTORIAL_DATA_MODELS_CONTEXT}"'"
11896
}'
11997

services

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ waitForScorpio () {
5858
while [ "${response}" -eq 000 ]
5959
do
6060
echo -e "Context Broker HTTP state: ${response} (waiting for 404)"
61-
pause 60
61+
pause 6
6262
getHeartbeat "${SCORPIO}"
6363
done
6464
}
@@ -114,7 +114,7 @@ waitForMongo () {
114114
loadData () {
115115
echo ""
116116
waitForUserContext
117-
docker run --rm -v $(pwd)/import-data:/import-data \
117+
docker run -v $(pwd)/import-data:/import-data \
118118
--network fiware_default \
119119
-e CONTEXT_BROKER=${CONTEXT_BROKER} \
120120
-e TUTORIAL_DATA_MODELS_CONTEXT=${CONTEXT} \
@@ -190,7 +190,7 @@ case "${command}" in
190190
echo -e "- \033[1;34mScorpio\033[0m is the context broker"
191191
echo -e "- Data models \033[1m@context\033[0m (Smart Supermarket) is supplied externally"
192192
echo ""
193-
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio-aaio.yml up -d --remove-orphans --renew-anon-volumes
193+
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml up -d --remove-orphans --renew-anon-volumes
194194
waitForMongo
195195
waitForScorpio
196196
export CONTEXT_BROKER=scorpio:9090
@@ -221,7 +221,7 @@ case "${command}" in
221221
export $(cat .env | grep "#" -v)
222222
echo "Pulling Docker images"
223223
docker pull -q quay.io/curl/curl
224-
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio-aaio.yml -f docker-compose/orion-ld.yml -f docker-compose/stellio.yml pull
224+
${dockerCmd} -f docker-compose/common.yml -f docker-compose/scorpio.yml -f docker-compose/orion-ld.yml -f docker-compose/stellio.yml pull
225225
;;
226226
*)
227227
echo "Command not Found."

0 commit comments

Comments
 (0)