Skip to content

Commit d9dc19a

Browse files
committed
Updating Scorpio and Stellio
1 parent 68ed279 commit d9dc19a

6 files changed

Lines changed: 54 additions & 33 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ORION_LD_VERSION=0.8.2
77

88
# Scorpio variables
99
SCORPIO_PORT=9090
10-
SCORPIO_VERSION=1.1.0
10+
SCORPIO_VERSION=2.1.13
1111

1212
# Stellio variables
1313
STELLIO_DOCKER_TAG=v1.7.2

docker-compose/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# see: https://github.com/FIWARE/helm-charts/
1818
#
19-
version: "3.8"
19+
version: '3.9'
2020
services:
2121
# Databases
2222
mongo-db:

docker-compose/orion-ld.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# see: https://github.com/FIWARE/helm-charts/
1818
#
19-
version: "3.8"
19+
version: '3.9'
2020
services:
2121
# Orion is the context broker
2222
orion:

docker-compose/scorpio-aaio.yml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,24 @@
1616
#
1717
# see: https://github.com/FIWARE/helm-charts/
1818
#
19-
version: "3.8"
20-
19+
version: '3.9'
2120
services:
2221
zookeeper:
22+
labels:
23+
org.fiware: 'tutorial'
2324
image: zookeeper
2425
hostname: zookeeper
2526
container_name: zookeeper
2627
networks:
2728
- default
2829
ports:
2930
- "2181"
31+
logging:
32+
driver: none
3033
kafka:
31-
image: wurstmeister/kafka
34+
labels:
35+
org.fiware: 'tutorial'
36+
image: bitnami/kafka
3237
hostname: kafka
3338
container_name: kafka
3439
networks:
@@ -39,13 +44,19 @@ services:
3944
KAFKA_ADVERTISED_HOST_NAME: kafka
4045
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
4146
KAFKA_ADVERTISED_PORT: 9092
47+
KAFKA_LOG_RETENTION_MS: 10000
48+
KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 5000
49+
ALLOW_PLAINTEXT_LISTENER: "yes"
4250
volumes:
4351
- /var/run/docker.sock:/var/run/docker.sock
4452
depends_on:
4553
- zookeeper
46-
54+
logging:
55+
driver: none
4756
postgres:
48-
image: mdillon/postgis
57+
labels:
58+
org.fiware: 'tutorial'
59+
image: postgis/postgis
4960
hostname: postgres
5061
container_name: db-postgres
5162
networks:
@@ -56,34 +67,33 @@ services:
5667
POSTGRES_USER: ngb
5768
POSTGRES_PASSWORD: ngb
5869
POSTGRES_DB: ngb
59-
70+
logging:
71+
driver: none
6072
scorpio:
61-
image: scorpiobroker/scorpio:scorpio-aaio_${SCORPIO_VERSION}
73+
labels:
74+
org.fiware: 'tutorial'
75+
image: scorpiobroker/scorpio:scorpio-aaio-no-eureka_${SCORPIO_VERSION}
6276
hostname: scorpio
6377
container_name: fiware-scorpio
6478
networks:
6579
- default
6680
ports:
6781
- "${SCORPIO_PORT}:9090"
6882
depends_on:
69-
- kafka
7083
- postgres
71-
#healthcheck:
72-
# test: curl --fail -s http://scorpio:${SCORPIO_PORT}/scorpio/v1/info/ || exit 1
73-
deploy:
74-
resources:
75-
limits:
76-
cpus: '0.8'
77-
memory: 640M
78-
reservations:
79-
cpus: '0.6'
80-
memory: 480M
84+
- kafka
8185

82-
# Tutorial connects to the Scorpio Broker
86+
# Tutorial acts as a series of dummy IoT Sensors over HTTP and connects to the Scorpio Broker
8387
tutorial:
8488
environment:
8589
- IOTA_DEFAULT_RESOURCE=/iot/d
8690
- DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT} # Port used by the dummy IOT devices to receive commands
8791
- DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
8892
- DUMMY_DEVICES_PAYLOAD=ULTRALIGHT
8993
- CONTEXT_BROKER=http://scorpio:${SCORPIO_PORT}/ngsi-ld/v1 # URL of the context broker to update context
94+
95+
96+
networks:
97+
default:
98+
labels:
99+
org.fiware: 'tutorial'

docker-compose/stellio.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
version: "3.8"
1+
# WARNING: Do not deploy this tutorial configuration directly to a production environment
2+
#
3+
# The tutorial docker-compose files have not been written for production deployment and will not
4+
# scale. A proper architecture has been sacrificed to keep the narrative focused on the learning
5+
# goals, they are just used to deploy everything onto a single Docker machine. All FIWARE components
6+
# are running at full debug and extra ports have been exposed to allow for direct calls to services.
7+
# They also contain various obvious security flaws - passwords in plain text, no load balancing,
8+
# no use of HTTPS and so on.
9+
#
10+
# This is all to avoid the need of multiple machines, generating certificates, encrypting secrets
11+
# and so on, purely so that a single docker-compose file can be read as an example to build on,
12+
# not use directly.
13+
#
14+
# When deploying to a production environment, please refer to the Helm Repository
15+
# for FIWARE Components in order to scale up to a proper architecture:
16+
#
17+
# see: https://github.com/FIWARE/helm-charts/
18+
#
19+
version: '3.9'
220
services:
321
api-gateway:
422
container_name: stellio-api-gateway
@@ -156,7 +174,7 @@ services:
156174
- DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT} # Port used by the dummy IOT devices to receive commands
157175
- DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
158176
- DUMMY_DEVICES_PAYLOAD=ULTRALIGHT
159-
- CONTEXT_BROKER=http://api-gateway:${STELLIO_PORT}/ngsi-ld/v1 # URL of the context broker to update context
177+
- CONTEXT_BROKER=http://stellio:${STELLIO_PORT}/ngsi-ld/v1 # URL of the context broker to update context
160178

161179
volumes:
162180
neo4j-db: ~

services

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
set -e
99

10-
SCORPIO="http://scorpio:9090/scorpio/v1/info/"
10+
SCORPIO="http://scorpio:9090/"
1111
ORION="http://orion:1026/version"
1212
STELLIO="http://localhost:8080/actuator/health"
1313
CONTEXT="https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld"
@@ -56,14 +56,7 @@ waitForScorpio () {
5656
getHeartbeat "${SCORPIO}"
5757
while [ "${response}" -eq 000 ]
5858
do
59-
echo -e "Context Broker HTTP state: ${response} (waiting for 500)"
60-
pause 60
61-
getHeartbeat "${SCORPIO}"
62-
done
63-
echo -e "\n⏳ Waiting for all \033[1;34mScorpio\033[0m services to be fully available\n"
64-
while [ "$response" -eq 500 ]
65-
do
66-
echo -e "Context Broker HTTP state: ${response} (waiting for 200)"
59+
echo -e "Context Broker HTTP state: ${response} (waiting for 404)"
6760
pause 60
6861
getHeartbeat "${SCORPIO}"
6962
done

0 commit comments

Comments
 (0)