README.md 4.48 KB
Newer Older
1 2 3 4 5 6 7
# Goals
This is a PoC showing how to use FIWARE components for building an IoT platoform / Secured communication platform
This is inspired from [FIWARE tutorial](https://github.com/Fiware/tutorials.PEP-Proxy/blob/master/README.md)


# OVERALL ARCHITECTURE

8
```
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+----------------------+                +-------------------+
|                      |                |                   |
|  Cloud Core Platform +----------------+ WMS - Watering    |
|                      |                | weekly scheduler  |
+----------+-----------+                |                   |
           |                            +-------------------+
           |
           |
           |
+----------+-----------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

25 26 27
```


28 29 30

# WMS subscribes:

31
```
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
+----------------------+                +-------------------+
|                      |                |                   |
|  Cloud Core Platform +<---------------+ WMS - Watering    |
|                      |  SUBSCRIBE     | weekly scheduler  |
+----------------------+  /FlowerBed/soilMoistureVwc        |
                                        +-------------------+


+----------------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

47 48
```

49 50 51 52


# IoT data update, forwarding data to subscribers

53
```
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
+----------------------+                +-------------------+
|                      |                |                   |
|  Cloud Core Platform +--------------->+ WMS - Watering    |
|                      |   POST         | weekly scheduler  |
+-----+----------------+  /FlowerBed/soilMoistureVwc        |
      ^                                 +-------------------+
UPDATE|
/FlowerBed/soilMoistureVwc
      |
+-----+----------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

70
```
71

72 73 74
# TODO how do we handle non-standard FIWARE formats?
# A proposal from UDGA/MI:

75
```
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
+----------------------+                +-------------------+
|                      |                |                   |
|  Cloud Core Platform +--------------->+ WMS + Watering    |
|                      |   POST         + weekly scheduler  |
+----------------------+  /FlowerBed/soilMoistureVwc        |
      ^                                 +-------------------+
      | UPDATE
      |  /FlowerBed/soilMoistureVwc
      |
+----------------------+
|                      |          +------------------+
| interoperability     +<---------+                  |
| layer                |          |  Carouge format  |
|  e.g. nginx          +---------->  exchange        |
+-----^----------------+          +------------------+
      |
      | UPDATE+
      | carougeFormat/FlowerBed/soilMoistureVwc
      |
      |
+----------------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

103
```
104 105

# Requirements
106
- `docker` & `docker-compose`
107 108 109 110 111
- get source code repo

# Demo steps

## Put platform up
112 113 114 115 116

```bash
cd naiades-platform-poc
docker-compose up -d
```
117 118 119 120 121 122 123 124

## Put platform down

```bash
cd naiades-platform-poc
docker-compose down
```

125 126 127
## Check services' status

```bash
128
docker-compose ps
129 130 131 132 133 134 135 136 137 138 139 140

       Name                     Command                       State                              Ports
-------------------------------------------------------------------------------------------------------------------------
db-mongo             docker-entrypoint.sh --bin ...   Up                      0.0.0.0:27017->27017/tcp
db-mysql             docker-entrypoint.sh mysqld      Up                      3306/tcp, 33060/tcp, 0.0.0.0:3307->3307/tcp
fiware-keyrock       /opt/fiware-idm/docker-ent ...   Up (health: starting)   3000/tcp, 0.0.0.0:3005->3005/tcp
fiware-orion         /usr/bin/contextBroker -fg ...   Up (health: starting)   0.0.0.0:1026->1026/tcp
fiware-orion-proxy   /opt/fiware-pep-proxy/dock ...   Up (health: starting)   0.0.0.0:1027->1027/tcp
mock-wms-consumer    /opt/mockserver/run_mockse ...   Up                      1080/tcp, 0.0.0.0:1080->8080/tcp
mongo-express        tini -- /docker-entrypoint ...   Up                      0.0.0.0:8081->3307/tcp, 8081/tcp

```
141

142
## Run demo using shell scripts in `scripts` folder
143

144
Please see `getting started` documentation at this [link](https://gitlab.distantaccess.com/naiades/naiades-platform-poc/-/wikis/API-client-examples-(curl-and-python-scripts))
145 146