Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

277 specify version of fiware stack for tutorials #285

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

# The IoTAgent Library provides an expression language for measurement transformation,
that can be used to adapt the # information coming from the South Bound APIs to the
information reported to the Context Broker. This is really useful # when you need to
information reported to the Context Broker. This is really useful when you need to
adapt measure.

# There are available two different expression languages jexl and legacy. The
recommended language to use is jexl, # which is newer and most powerful.
recommended language to use is jexl, which is newer and most powerful.

# The input sections are marked with 'TODO'

Expand Down Expand Up @@ -116,6 +116,8 @@

client.disconnect()

time.sleep(2)

# Printing context entities of OCB
for context_entity in cb_client.get_entity_list(entity_types=["WasteContainer"]):
print(context_entity.model_dump_json(indent=4))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

# The IoTAgent Library provides an expression language for measurement transformation,
that can be used to adapt the # information coming from the South Bound APIs to the
information reported to the Context Broker. This is really useful # when you need to
information reported to the Context Broker. This is really useful when you need to
adapt measure.

# There are available two different expression languages jexl and legacy. The
recommended language to use is jexl, # which is newer and most powerful.
recommended language to use is jexl, which is newer and most powerful.

# The input sections are marked with 'TODO'

Expand Down Expand Up @@ -130,6 +130,8 @@

client.disconnect()

time.sleep(2)

# Printing context entities of OCB
for context_entity in cb_client.get_entity_list(entity_types=["WasteContainer"]):
print(context_entity.model_dump_json(indent=4))
Expand Down
96 changes: 96 additions & 0 deletions tutorials/ngsi_v2/fiware_env/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

volumes:
mongodb: ~
crate-db: ~

services:
iot-agent:
image: fiware/iotagent-json:1.26.0
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongodb
- mosquitto
expose:
- "4041"
ports:
- "4041:4041"
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongodb"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-json"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
- "IOTA_MQTT_HOST=mosquitto"
- "IOTA_MQTT_PORT=1883"
- "IOTA_DEFAULT_RESOURCE="
sbanoeon marked this conversation as resolved.
Show resolved Hide resolved
- "IOTA_DEFAULT_TRANSPORT=MQTT"
- "IOTA_LOG_LEVEL=DEBUG"
- "IOTA_TIMESTAMP=true"
- "IOTA_CB_NGSI_VERSION=v2"
- "IOTA_AUTOCAST=true"

mongodb:
image: mongo:4.4
hostname: mongodb
container_name: db-mongo
ports:
- "27017:27017"
volumes:
- mongodb:/data

orion:
image: fiware/orion:3.7.0
hostname: orion
container_name: fiware-orion
depends_on:
- mongodb
expose:
- "1026"
ports:
- "1026:1026"
command:
-dbhost mongodb
-logLevel DEBUG
-logForHumans

mosquitto:
image: eclipse-mosquitto:2.0.18
hostname: mosquitto
container_name: mosquitto
expose:
- "1883"
- "9001"
sbanoeon marked this conversation as resolved.
Show resolved Hide resolved
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf

crate-db:
image: crate:5.4.4
container_name: cratedb
hostname: crate-db
ports:
- '4200:4200'
- '4300:4300'
command:
crate -Cauth.host_based.enabled=false -Ccluster.name=democluster -Chttp.cors.enabled=true
-Chttp.cors.allow-origin="*"
environment:
- CRATE_HEAP_SIZE=2g

quantumleap:
image: orchestracities/quantumleap:0.8.3
container_name: quantumleap
hostname: quantumleap
ports:
- '8668:8668'
depends_on:
- crate-db
environment:
- CRATE_HOST=crate-db
- LOGLEVEL=DEBUG
5 changes: 5 additions & 0 deletions tutorials/ngsi_v2/fiware_env/mosquitto.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

per_listener_settings false
listener 1883
log_type all
allow_anonymous true