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 16, 2025
1 parent cda38b0 commit 911cf68
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ORION_VERSION=4.0.0

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

# Scorpio variables
SCORPIO_PORT=9090
Expand Down
8 changes: 4 additions & 4 deletions NGSI-v2 Linked Data.postman_collection.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ Because of `Prefer: ngsi-ld=1.6` had been set in the registration, the retrieved
"postalCode": "10439"
}
},
"category": {"type": "Property", "value": "supermarket"},
"category": {"type": "VocabProperty", "vocab": "supermarket"},
"location": {
"type": "GeoProperty",
"value": {
Expand Down Expand Up @@ -705,4 +705,4 @@ The response is returned in JSON format with short form attribute names in Germa

## License

[MIT](LICENSE) © 2024 FIWARE Foundation e.V.
[MIT](LICENSE) © 2024-2025 FIWARE Foundation e.V.
42 changes: 31 additions & 11 deletions docker-compose/stellio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ services:
hostname: stellio
labels:
org.fiware: 'tutorial'
image: stellio/stellio-api-gateway:${STELLIO_DOCKER_TAG}
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}
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 @@ -48,6 +48,18 @@ services:
- APPLICATION_TENANTS_1_NAME=openiot
- APPLICATION_TENANTS_1_ISSUER=https://sso.stellio.io/auth/realms/openiot
- APPLICATION_TENANTS_1_DBSCHEMA=openiot
- APPLICATION_TENANTS_2_NAME=farmer
- APPLICATION_TENANTS_2_ISSUER=https://sso.stellio.io/auth/realms/farmer
- APPLICATION_TENANTS_2_DBSCHEMA=farmer
- APPLICATION_TENANTS_3_NAME=vet
- APPLICATION_TENANTS_3_ISSUER=https://sso.stellio.io/auth/realms/vet
- APPLICATION_TENANTS_3_DBSCHEMA=vet
- APPLICATION_TENANTS_4_NAME=contractor
- APPLICATION_TENANTS_4_ISSUER=https://sso.stellio.io/auth/realms/contractor
- APPLICATION_TENANTS_4_DBSCHEMA=contractor
- APPLICATION_TENANTS_5_NAME=weather
- APPLICATION_TENANTS_5_ISSUER=https://sso.stellio.io/auth/realms/weather
- APPLICATION_TENANTS_5_DBSCHEMA=weather
- APPLICATION_PAGINATION_LIMIT-DEFAULT=30
- APPLICATION_PAGINATION_LIMIT-MAX=1000
ports:
Expand All @@ -65,7 +77,7 @@ services:
container_name: stellio-subscription-service
labels:
org.fiware: 'tutorial'
image: stellio/stellio-subscription-service:${STELLIO_DOCKER_TAG}
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 @@ -79,6 +91,18 @@ services:
- APPLICATION_TENANTS_1_NAME=openiot
- APPLICATION_TENANTS_1_ISSUER=https://sso.stellio.io/auth/realms/openiot
- APPLICATION_TENANTS_1_DBSCHEMA=openiot
- APPLICATION_TENANTS_2_NAME=farmer
- APPLICATION_TENANTS_2_ISSUER=https://sso.stellio.io/auth/realms/farmer
- APPLICATION_TENANTS_2_DBSCHEMA=farmer
- APPLICATION_TENANTS_3_NAME=vet
- APPLICATION_TENANTS_3_ISSUER=https://sso.stellio.io/auth/realms/vet
- APPLICATION_TENANTS_3_DBSCHEMA=vet
- APPLICATION_TENANTS_4_NAME=contractor
- APPLICATION_TENANTS_4_ISSUER=https://sso.stellio.io/auth/realms/contractor
- APPLICATION_TENANTS_4_DBSCHEMA=contractor
- APPLICATION_TENANTS_5_NAME=weather
- APPLICATION_TENANTS_5_ISSUER=https://sso.stellio.io/auth/realms/weather
- APPLICATION_TENANTS_5_DBSCHEMA=weather
- APPLICATION_PAGINATION_LIMIT-DEFAULT=30
- APPLICATION_PAGINATION_LIMIT-MAX=1000
ports:
Expand All @@ -95,7 +119,7 @@ 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
Expand All @@ -114,17 +138,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 @@ -145,8 +166,7 @@ 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 All @@ -37,7 +37,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 All @@ -53,7 +53,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 @@ -69,7 +69,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
10 changes: 5 additions & 5 deletions import-ngsi-v2
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ curl -o /dev/null -X POST \
"entities": [
{
"id":"urn:ngsi-ld:Store:001","type":"Store",
"category": {"type": "VocabularyProperty", "value": "supermarket"},
"category": {"type": "Property", "value": "supermarket"},
"address":{"type":"PostalAddress","value":{"streetAddress":"Bornholmer Straße 65","addressRegion":"Berlin","addressLocality":"Prenzlauer Berg","postalCode":"10439"}},
"location":{"type":"geo:json","value":{"type":"Point","coordinates":[13.3986,52.5547]}},
"name":{"type":"Text","value":"Bösebrücke Einkauf"},
"owner": {
"type":"Relationship", "value":"urn:ngsi-ld:Person:001",
"metadata": {
"objectType": {
"type":"VocabularyProperty", "value": "Person"
"type":"Property", "value": "Person"
}
}
}
},
{
"id":"urn:ngsi-ld:Store:002","type":"Store",
"category": {"type": "VocabularyProperty", "value": "supermarket"},
"category": {"type": "Property", "value": "supermarket"},
"address":{"type":"PostalAddress","value":{"streetAddress":"Friedrichstraße 44","addressRegion":"Berlin","addressLocality":"Kreuzberg","postalCode":"10969"}},
"location":{"type":"geo:json","value":{"type":"Point","coordinates":[13.3903,52.5075]}},
"name":{"type":"Text","value":"Checkpoint Markt"}},
{
"id":"urn:ngsi-ld:Store:003","type":"Store",
"category": {"type": "VocabularyProperty", "value": "supermarket"},
"category": {"type": "Property", "value": "supermarket"},
"address":{"type":"PostalAddress","value":{"streetAddress":"Mühlenstrasse 10","addressRegion":"Berlin","addressLocality":"Friedrichshain","postalCode":"10243"}},
"location":{"type":"geo:json","value":{"type":"Point","coordinates":[13.4447,52.5031]}},
"name":{"type":"Text","value":"East Side Galleria"}
},
{
"id":"urn:ngsi-ld:Store:004","type":"Store",
"category": {"type": "VocabularyProperty", "value": "supermarket"},
"category": {"type": "Property", "value": "supermarket"},
"address":{"type":"PostalAddress","value":{"streetAddress":"Panoramastraße 1A","addressRegion":"Berlin","addressLocality":"Mitte","postalCode":"10178"}},
"location":{"type":"geo:json","value":{"type":"Point","coordinates":[13.4094,52.5208]}},
"name":{"type":"Text","value":"Tower Trödelmarkt"}
Expand Down
2 changes: 1 addition & 1 deletion services
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ case "${command}" in
export $(cat .env | grep "#" -v)
stoppingContainers
waitForCoreContext
echo -e "Starting containers: \033[1;34mStellio (NGSI-LD)\033[0m, \033[1;34mOrion (NGSI-v2)\033[0m, \033[1;34mLepus\033[0m, \033[1mTutorial\033[0m, \033[1mKafka\033[0m, \033[1mZookeeper\033[0m, \033[1mNeo4j\033[0m, \033[1mPostgreSQL/TimescaleDB\033[0m, and a linked data \033[1mContext\033[0m."
echo -e "Starting containers: \033[1;34mStellio (NGSI-LD)\033[0m, \033[1;34mOrion (NGSI-v2)\033[0m, \033[1;34mLepus\033[0m, \033[1mTutorial\033[0m, \033[1mKafka\033[0m \033[1mPostgreSQL/TimescaleDB\033[0m, and a linked data \033[1mContext\033[0m."
echo -e "- \033[1;34mStellio\033[0m is the NGSI-LD context broker"
echo -e "- \033[1;34mOrion\033[0m is an NGSI-v2 context source"
echo -e "- Data models \033[1m@context\033[0m (Smart Supermarket) is supplied externally"
Expand Down

0 comments on commit 911cf68

Please sign in to comment.