From dab2a68177b888ec409eb18cdbf8d5f4f577df0f Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Wed, 10 Jul 2024 13:19:43 +0200 Subject: [PATCH] Switching to user-context --- README.ja.md | 12 ++++++------ README.md | 12 ++++++------ docker-compose/common.yml | 2 +- import-data | 4 ++-- services | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.ja.md b/README.ja.md index feebe64..deb2cee 100644 --- a/README.ja.md +++ b/README.ja.md @@ -244,7 +244,7 @@ tutorial: - "DUMMY_DEVICES_PORT=3001" - "DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov" - "DUMMY_DEVICES_TRANSPORT=HTTP" - - "IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld" + - "IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld" ``` `tutorial` コンテナは、2つのポートでリッスンしています: @@ -264,7 +264,7 @@ tutorial: | DUMMY_DEVICES_PORT | `3001` | コマンドを受信するためにダミー IoT デバイスが使用するポート | | DUMMY_DEVICES_API_KEY | `4jggokgpepnvsb2uv4s40d59ov` | UltraLight インタラクションに使用されるランダムなセキュリティキー - デバイスと IoT Agent 間のインタラクションの完全性を保証するために使用します | | DUMMY_DEVICES_TRANSPORT | `HTTP` | ダミー IoT デバイスによって使用されるトランスポート・プロトコル | -| IOTA_JSON_LD_CONTEXT | `http://context/ngsi-context.jsonld` | デバイスのデータモデルの定義に使用される `@context` ファイルの場所 | +| IOTA_JSON_LD_CONTEXT | `http://context/user-context.jsonld` | デバイスのデータモデルの定義に使用される `@context` ファイルの場所 | このチュートリアルでは、YAML ファイルで説明されている他の `tutorial` コンテナの設定値は使用しません。 @@ -306,7 +306,7 @@ iot-agent: - IOTA_MONGO_DB=iotagentul - IOTA_HTTP_PORT=7896 - IOTA_PROVIDER_URL=http://iot-agent:4041 - - IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld + - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - IOTA_FALLBACK_TENANT=openiot - IOTA_MULTI_CORE=true ``` @@ -335,7 +335,7 @@ URLs やキーなどのデバイス情報を保持します。コンテナは2 | IOTA_MONGO_DB | `iotagentul` | mongoDB で使用されるデータベースの名前 | | IOTA_HTTP_PORT | `7896` | IoT Agent が HTTP 経由で IoT デバイスのトラフィックをリッスンするポート | | IOTA_PROVIDER_URL | `http://iot-agent:4041` | コマンドが登録されたときに Context Broker に渡された URL。Context Broker がデバイスにコマンドを発行したときにフォワーディング URL の場所として使用 | -| IOTA_JSON_LD_CONTEXT | `http://context/ngsi-context.jsonld` | デバイス・データモデルの定義に使用される `@context` ファイルの場所 | +| IOTA_JSON_LD_CONTEXT | `http://context/user-context.jsonld` | デバイス・データモデルの定義に使用される `@context` ファイルの場所 | | IOTA_FALLBACK_TENANT | `openiot` | 明示的なテナントが通信から受信されていない場合に使用するテナント | @@ -715,7 +715,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:te ```json { "@context": [ - "http://context/ngsi-context.jsonld", + "http://context/user-context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.7.jsonld" ], "id": "urn:ngsi-ld:Device:temperature001", @@ -769,7 +769,7 @@ curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=Device' \ [ { "@context": [ - "http://context/ngsi-context.jsonld", + "http://context/user-context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.7.jsonld" ], "id": "urn:ngsi-ld:Device:motion003", diff --git a/README.md b/README.md index 0dbdd9f..b9537a7 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,7 @@ tutorial: - "DUMMY_DEVICES_PORT=3001" - "DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov" - "DUMMY_DEVICES_TRANSPORT=HTTP" - - "IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld" + - "IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld" ``` The `tutorial` container is listening on two ports: @@ -266,7 +266,7 @@ The `tutorial` container is driven by environment variables as shown: | DUMMY_DEVICES_PORT | `3001` | Port used by the dummy IoT devices to receive commands | | DUMMY_DEVICES_API_KEY | `4jggokgpepnvsb2uv4s40d59ov` | Random security key used for UltraLight interactions - used to ensure the integrity of interactions between the devices and the IoT Agent | | DUMMY_DEVICES_TRANSPORT | `HTTP` | The transport protocol used by the dummy IoT devices | -| IOTA_JSON_LD_CONTEXT | `http://context/ngsi-context.jsonld` | The location of the `@context` file used to define the device data models | +| IOTA_JSON_LD_CONTEXT | `http://context/user-context.jsonld` | The location of the `@context` file used to define the device data models | The other `tutorial` container configuration values described in the YAML file are not used in this tutorial. @@ -305,7 +305,7 @@ iot-agent: - IOTA_MONGO_DB=iotagentul - IOTA_HTTP_PORT=7896 - IOTA_PROVIDER_URL=http://iot-agent:4041 - - IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld + - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - IOTA_FALLBACK_TENANT=openiot - IOTA_MULTI_CORE=true ``` @@ -334,7 +334,7 @@ The `iot-agent` container is driven by environment variables as shown: | IOTA_MONGO_DB | `iotagentul` | The name of the database used in mongoDB | | IOTA_HTTP_PORT | `7896` | The port where the IoT Agent listens for IoT device traffic over HTTP | | IOTA_PROVIDER_URL | `http://iot-agent:4041` | URL passed to the Context Broker when commands are registered, used as a forwarding URL location when the Context Broker issues a command to a device | -| IOTA_JSON_LD_CONTEXT | `http://context/ngsi-context.jsonld` | The location of the `@context` file used to define the device data models | +| IOTA_JSON_LD_CONTEXT | `http://context/user-context.jsonld` | The location of the `@context` file used to define the device data models | | IOTA_FALLBACK_TENANT | `openiot` | The tenant to use if no explicit tenant has been received from communications | # Prerequisites @@ -701,7 +701,7 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:te ```json { "@context": [ - "http://context/ngsi-context.jsonld", + "http://context/user-context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.7.jsonld" ], "id": "urn:ngsi-ld:Device:temperature001", @@ -755,7 +755,7 @@ curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=Device' \ [ { "@context": [ - "http://context/ngsi-context.jsonld", + "http://context/user-context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.7.jsonld" ], "id": "urn:ngsi-ld:Device:motion003", diff --git a/docker-compose/common.yml b/docker-compose/common.yml index 1ba26aa..d7928ea 100644 --- a/docker-compose/common.yml +++ b/docker-compose/common.yml @@ -112,7 +112,7 @@ services: - TWITTER_CONSUMER_KEY= - TWITTER_CONSUMER_SECRET= - MONGO_URL=mongodb://mongo-db:27017 - - IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld + - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - MOVE_TRACTOR=-1 diff --git a/import-data b/import-data index b599ddd..02e9aa5 100755 --- a/import-data +++ b/import-data @@ -153,7 +153,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper echo -e "Registering Farmer and Devices as data sources.\n" curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/csourceRegistrations/' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \ -H 'Content-Type: application/json' \ -d '{ "type": "ContextSourceRegistration", @@ -175,7 +175,7 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/csourceReg curl -s -o /dev/null -X POST 'http://farmer/ngsi-ld/v1/csourceRegistrations/' \ --H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \ +-H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \ -H 'Content-Type: application/json' \ -d '{ "type": "ContextSourceRegistration", diff --git a/services b/services index 6d013ce..0dc8fd1 100755 --- a/services +++ b/services @@ -20,7 +20,7 @@ SCORPIO="http://scorpio:9090/scorpio/" ORION="http://orion:1026/version" STELLIO="http://localhost:8080/actuator/health" IOT_AGENT="http://iot-agent:4041/version" -CONTEXT="http://context/ngsi-context.jsonld" +CONTEXT="http://context/user-context.jsonld" CORE_CONTEXT="https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" dockerCmd="docker compose"