Skip to content

Commit

Permalink
Update Stellio.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jan 13, 2025
1 parent 881144e commit 5c16724
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EXPOSED_PORT=1026

# Orion LD variables
ORION_LD_PORT=1026
ORION_LD_VERSION=1.7.1
ORION_LD_VERSION=1.8.0

# Scorpio variables
SCORPIO_PORT=9090
Expand Down
12 changes: 6 additions & 6 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,23 @@ curl -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \
"id": "urn:ngsi-ld:TemperatureSensor:001",
"type": "TemperatureSensor",
"description" : {"type": "Property", "value": "Temperature Gauge 1"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "temperature"},
"temperature": {"type": "Property", "value": 20, "unitCode": "CEL"}
},
{
"id": "urn:ngsi-ld:TemperatureSensor:002",
"type": "TemperatureSensor",
"description" : {"type": "Property", "value": "Temperature Gauge 2"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "temperature"},
"temperature": {"type": "Property", "value": 21, "unitCode": "CEL"}
},
{
"id": "urn:ngsi-ld:TemperatureSensor:003",
"type": "TemperatureSensor",
"description" : {"type": "Property", "value": "Temperature Gauge 3"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "temperature"},
"temperature": {"type": "Property", "value": 27, "unitCode": "CEL"}
}
Expand All @@ -266,23 +266,23 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \
"id": "urn:ngsi-ld:FillingLevelSensor:001",
"type": "FillingLevelSensor",
"description" : {"type": "Property", "value": "Filling Level Sensor 1"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "fillingLevel"},
"fillingLevel": {"type": "Property", "value": 1, "unitCode": "C62"}
},
{
"id": "urn:ngsi-ld:FillingLevelSensor:002",
"type": "FillingLevelSensor",
"description" : {"type": "Property", "value": "Filling Level Sensor 2"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "fillingLevel"},
"fillingLevel": {"type": "Property", "value": 0.9, "unitCode": "C62"}
},
{
"id": "urn:ngsi-ld:FillingLevelSensor:003",
"type": "FillingLevelSensor",
"description" : {"type": "Property", "value": "Filling Gauge 3"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "fillingLevel"},
"fillingLevel": {"type": "Property", "value": 0.8, "unitCode": "C62"}
}
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,23 +231,23 @@ curl -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \
"id": "urn:ngsi-ld:TemperatureSensor:001",
"type": "TemperatureSensor",
"description" : {"type": "Property", "value": "Temperature Gauge 1"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "temperature"},
"temperature": {"type": "Property", "value": 20, "unitCode": "CEL"}
},
{
"id": "urn:ngsi-ld:TemperatureSensor:002",
"type": "TemperatureSensor",
"description" : {"type": "Property", "value": "Temperature Gauge 2"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "temperature"},
"temperature": {"type": "Property", "value": 21, "unitCode": "CEL"}
},
{
"id": "urn:ngsi-ld:TemperatureSensor:003",
"type": "TemperatureSensor",
"description" : {"type": "Property", "value": "Temperature Gauge 3"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "temperature"},
"temperature": {"type": "Property", "value": 27, "unitCode": "CEL"}
}
Expand All @@ -267,23 +267,23 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/upsert' \
"id": "urn:ngsi-ld:FillingLevelSensor:001",
"type": "FillingLevelSensor",
"description" : {"type": "Property", "value": "Filling Level Sensor 1"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "fillingLevel"},
"fillingLevel": {"type": "Property", "value": 1, "unitCode": "C62"}
},
{
"id": "urn:ngsi-ld:FillingLevelSensor:002",
"type": "FillingLevelSensor",
"description" : {"type": "Property", "value": "Filling Level Sensor 2"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "fillingLevel"},
"fillingLevel": {"type": "Property", "value": 0.9, "unitCode": "C62"}
},
{
"id": "urn:ngsi-ld:FillingLevelSensor:003",
"type": "FillingLevelSensor",
"description" : {"type": "Property", "value": "Filling Gauge 3"},
"category": {"type": "Property", "value": "sensor"},
"category": {"type": "VocabProperty", "vocab": "sensor"},
"controlledProperty" : {"type": "Property", "value": "fillingLevel"},
"fillingLevel": {"type": "Property", "value": 0.8, "unitCode": "C62"}
}
Expand Down
29 changes: 16 additions & 13 deletions docker-compose/stellio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ services:
hostname: stellio
labels:
org.fiware: 'tutorial'
image: stellio/stellio-api-gateway:${STELLIO_DOCKER_TAG}
platform: linux/amd64
image: quay.io/fiware/stellio-api-gateway:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=docker
ports:
- ${EXPOSED_PORT:-1026}:${STELLIO_PORT:-9090}
- "${EXPOSED_PORT}:${STELLIO_PORT}"
networks:
- default

search-service:
container_name: stellio-search-service
labels:
org.fiware: 'tutorial'
image: stellio/stellio-search-service:${STELLIO_DOCKER_TAG}
platform: linux/amd64
image: quay.io/fiware/stellio-search-service:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/stellio_search
Expand All @@ -34,6 +34,8 @@ services:
- APPLICATION_PAGINATION_LIMIT-MAX=1000
ports:
- 8083:8083
networks:
- default
restart: always
depends_on:
postgres:
Expand All @@ -45,8 +47,7 @@ services:
container_name: stellio-subscription-service
labels:
org.fiware: 'tutorial'
image: stellio/stellio-subscription-service:${STELLIO_DOCKER_TAG}
platform: linux/amd64
image: quay.io/fiware/stellio-subscription-service:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/stellio_subscription
Expand All @@ -64,6 +65,8 @@ services:
- APPLICATION_PAGINATION_LIMIT-MAX=1000
ports:
- 8085:8084
networks:
- default
restart: always
depends_on:
postgres:
Expand All @@ -74,10 +77,12 @@ services:
kafka:
labels:
org.fiware: 'tutorial'
image: confluentinc/cp-kafka:7.3.1
image: confluentinc/cp-kafka:7.6.0
container_name: kafka
ports:
- 29092:29092
networks:
- default
restart: always
environment:
KAFKA_BROKER_ID: 1
Expand All @@ -91,17 +96,14 @@ services:
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
volumes:
- ./stellio/kafka/update_run.sh:/tmp/update_run.sh
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
CLUSTER_ID: NjExODZhMWVjMzllMTFlZm


# Databases
postgres:
labels:
org.fiware: 'tutorial'
image: stellio/stellio-timescale-postgis:${STELLIO_TIMESCALE_POSTGIS}

hostname: postgres
container_name: db-postgres
environment:
Expand All @@ -112,6 +114,8 @@ services:
- ACCEPT_TIMESCALE_TUNING=TRUE
ports:
- 5432:5432
networks:
- default
volumes:
- postgres-db:/var/lib/postgresql
healthcheck:
Expand All @@ -120,7 +124,6 @@ services:
timeout: 5s
retries: 20
start_period: 10s

# Tutorial acts as a series of dummy IoT Sensors over HTTP and connects to the Stellio Broker
tutorial:
environment:
Expand Down
11 changes: 0 additions & 11 deletions docker-compose/stellio/kafka/update_run.sh

This file was deleted.

8 changes: 4 additions & 4 deletions import-data
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
{
"id": "urn:ngsi-ld:Building:farm001",
"type": "Building",
"category": {"type": "Property", "value": ["farm"]},
"category": {"type": "VocabProperty", "vocab": ["farm"]},
"address": {
"type": "Property",
"value": { "streetAddress": "Großer Stern 1", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10557"},
Expand Down Expand Up @@ -49,7 +49,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
{
"id": "urn:ngsi-ld:Building:barn002",
"type": "Building",
"category": {"type": "Property", "value": ["barn"]},
"category": {"type": "VocabProperty", "vocab": ["barn"]},
"address": {
"type": "Property",
"value": { "streetAddress": "Straße des 17. Juni", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10557"},
Expand Down Expand Up @@ -77,7 +77,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
{
"id": "urn:ngsi-ld:Building:tower003",
"type": "Building",
"category": {"type": "Property", "value": ["water_tower"]},
"category": {"type": "VocabProperty", "vocab": ["water_tower"]},
"address": {
"type": "Property",
"value": { "streetAddress": "John-Foster-Dulles-Allee", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10557"},
Expand All @@ -93,7 +93,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
{
"id": "urn:ngsi-ld:Building:farm002",
"type": "Building",
"category": {"type": "Property", "value": ["farm"]},
"category": {"type": "VocabProperty", "vocab": ["farm"]},
"address": {
"type": "Property",
"value": { "streetAddress": "Hardenbergplatz 8", "addressRegion": "Berlin", "addressLocality": "Tiergarten", "postalCode": "10787"},
Expand Down

0 comments on commit 5c16724

Please sign in to comment.