Skip to content

Commit

Permalink
Switching to user-context
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jul 10, 2024
1 parent 49fa92b commit dab2a68
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -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つのポートでリッスンしています:
Expand All @@ -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` コンテナの設定値は使用しません。

Expand Down Expand Up @@ -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
```
Expand Down Expand Up @@ -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` | 明示的なテナントが通信から受信されていない場合に使用するテナント |

<a name="prerequisites">
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.

Expand Down Expand Up @@ -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
```
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ services:
- TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>
- TWITTER_CONSUMER_SECRET=<ADD_YOUR_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


Expand Down
4 changes: 2 additions & 2 deletions import-data
Original file line number Diff line number Diff line change
Expand Up @@ -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: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \
-H 'Content-Type: application/json' \
-d '{
"type": "ContextSourceRegistration",
Expand All @@ -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: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \
-H 'Content-Type: application/json' \
-d '{
"type": "ContextSourceRegistration",
Expand Down
2 changes: 1 addition & 1 deletion services
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit dab2a68

Please sign in to comment.