Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 3638f74

Browse files
committed
Merge branch 'develop'
2 parents 881f397 + 70d08e4 commit 3638f74

File tree

97 files changed

+10434
-2225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+10434
-2225
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ idas/iotagent-ul/config.js
44
.python-version
55
.ipynb_checkpoints/
66
docs/*/env
7+
.DS_Store
8+
.pytest_cache/
9+
__pycache__/

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "idas/iotagent-ul"]
2-
path = idas/iotagent-ul
3-
url = https://github.com/tech-sketch/iotagent-ul.git

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Change Log
2+
3+
## [Unreleased]
4+
5+
## [0.2.0]
6+
### Changed
7+
* testd on Azure AKS(1.11.2) and minikube(1.10.0)
8+
* employed "RabbitMQ" as MQTT Broker and Message Queue instead of "VerneMQ".
9+
* "etcd" and "fiware-mqtt-msgfilter" were no longer needed.
10+
11+
### Added
12+
* employed "Prometheus & Grafana" as monitoring of Kubernetes.
13+
* employed "Elasticsearch & fluentd & Kibana" as logging of Kubernetes.
14+
* added "[mqtt-kube-operator](https://github.com/tech-sketch/mqtt-kube-operator)" in order to enable remote deployment of ROS programs.
15+
16+
### Removed
17+
* discontinued to use "VerneMQ"
18+
* discontinued to use "etcd"
19+
* discontinued to use "fiware-mqtt-msgfilter"
20+
21+
## [0.1.1]
22+
### Changed
23+
* testd on Azure AKS(1.10.3) and minikube(1.10.0)
24+
25+
### Added
26+
* employed "jupyter notebook" as operable documents.
27+
* employed "turtlebot3 (simulator and real robot)" as ROS robot.
28+
29+
### Removed
30+
* discontinued to use "turtlesim" and "gopigo".
31+
32+
## [0.1.0]
33+
### Added
34+
* deployed FIWARE (orion, iotagent-ul, cygnus) on Kubernetes.
35+
* tested on Azure AKS(1.9.6) and minikube(1.9.4).
36+
* employed "Ambassador" as API Gateway.
37+
* employed "VerneMQ" as MQTT Broker.
38+
* in order to ignore duplicated messages, "etcd" and "[fiware-mqtt-msgfilter](https://github.com/tech-sketch/fiware-mqtt-msgfilter)" were used.
39+
* employed "turtlesim" and "gopigo" as ROS robot.

README.md

Lines changed: 78 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# container-centric fiware demonstaration
1+
# RoboticBase-core
22

3-
This repository construct a container-centric [FIWARE](http://www.fiware.org/) demonstration on [Kubernetes](https://kubernetes.io/).
3+
This repository is a core components of "RoboticBase".
44

5-
![conrainer-centric-fiware-demonstration.png](/docs/images/container-centric-fiware-demonstration.png)
5+
## Description
6+
"RoboticBase" is a robot management platform based on [FIWARE](http://www.fiware.org/) which enables you to manage and operate many kinds of robots and IoT devices as interactions of contexts.
7+
8+
"RoboticBase" allows robots to collaborate with IoT devices, Open Data, human beings and so on. You can connect a robot to "RoboticBase" using the open APIs of the robot, and operate the robot through those APIs. In turn, "RoboticBase" has an ability to manage ROS. If you connect a ROS robot to "RoboticBase", you can operate the robot directly without restrictions.
9+
For example, you can deploy a ROS program to the robot and access the raw data of the robot through "RoboticBase".
10+
11+
![roboticbase-core-architecture.png](/docs/images/roboticbase-core-architecture.png)
612

713
|component|summary|
814
|:--|:--|
@@ -13,16 +19,23 @@ This repository construct a container-centric [FIWARE](http://www.fiware.org/) d
1319
|[FIWARE orion](https://catalogue-server.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker)|Publish/Subscribe Context Broker|
1420
|[FIWARE cygnus](https://catalogue-server.fiware.org/enablers/cygnus)|Data collection and Persistence Agent|
1521
|[FIWARE iotagent-ul](https://catalogue-server.fiware.org/enablers/backend-device-management-idas)|Backend Device Management Agent|
16-
|fiware-mqtt-msgfilter|MQTT message duplication checker working with FIWARE iotagent-ul and etcd|
17-
|[etcd](https://coreos.com/etcd/docs/latest/)|Distributed Key-Value Store in order to manege distributed lock|
18-
|[VerneMQ](https://vernemq.com/)|Distributed MQTT Broker|
22+
|[RabbitMQ](https://www.rabbitmq.com/)|Distributed Message Queue|
1923
|[MongoDB](https://www.mongodb.com/)|Document-oriented NoSQL Database|
24+
|[Prometheus](https://prometheus.io/)|Monitoring and Alerting toolkit|
25+
|[Grafana](https://grafana.com/)|Analytics and Alerting platform for time series metrics|
26+
|[Elasticsearch](https://www.elastic.co/products/elasticsearch)|Distributed search and analytics engine|
27+
|[fluentd](https://www.fluentd.org/)|Data collector for unified logging layer|
28+
|[Kibana](https://www.elastic.co/products/kibana)|Visualize the Elasticsearch data|
29+
30+
|gamepad|summary|
31+
|:--|:--|
32+
|[gamepad](https://github.com/tech-sketch/fiware-gamepad-controller)|Gamepad Controller connecting FIWARE|
2033

21-
|device|summary|
34+
|turtlebot3|summary|
2235
|:--|:--|
23-
|fiware-gamepad-controller|Gamepad Controller|
24-
|fiware-ros-turtlesim|ROS package to act as a bridge FIWARE orion and ROS demo node (turtlesim)|
25-
|fiware-ros-gopigo|ROS package to act as a bridge FIWARE orion and gopigo|
36+
|[deployer](https://github.com/tech-sketch/mqtt-kube-operator)|MQTT client to deploy (or delete) a resource to its own Kubernetes|
37+
|[bridge](https://github.com/tech-sketch/fiware_ros_turtlebot3_bridge)|ROS package to act as a bridge FIWARE orion and ROS|
38+
|[operator](https://github.com/tech-sketch/fiware_ros_turtlebot3_operator)|ROS package to control turtlebot3 (simulator and physical robot)|
2639

2740
## Requirements
2841

@@ -31,25 +44,28 @@ This repository construct a container-centric [FIWARE](http://www.fiware.org/) d
3144
||version|
3245
|:--|:--|
3346
|OS|macOS Sierra 10.12.6|
34-
|azure cli|2.0.42|
35-
|kubectl|1.10.2|
36-
|helm|2.9.1|
47+
|azure cli|2.0.45|
48+
|kubectl|1.11.2|
49+
|helm|2.10.0|
3750
|envsubst|0.19.8.1|
3851

39-
* minikube host PC
52+
* minikube
53+
* when you use monitoring & logging, you have to give **4 cpu & 8192 MB memories** to minikube.
4054

4155
||version|
4256
|:--|:--|
4357
|OS|macOS Sierra 10.12.6|
4458
|VirtualBox|5.2.12 r122591|
45-
|minikube|0.28.1|
59+
|minikube|0.28.2|
60+
|kubernetes|1.10.0|
4661

47-
* Kubernetes
62+
* Azure AKS
63+
* when you use monitoring & logging, you have to use the vm series which supports `Premium Storage` such as `Dsv3-series`.
4864

4965
||version|
5066
|:--|:--|
51-
|Azure AKS|1.10.3|
52-
|minikube|1.10.0|
67+
|region|japaneast|
68+
|kubernetes|1.11.2|
5369

5470
## getting started
5571

@@ -73,12 +89,16 @@ This repository construct a container-centric [FIWARE](http://www.fiware.org/) d
7389
$ cp azure_aks/env.template azure_aks/env
7490
$ vi env
7591
```
76-
1. prepare Microsoft Azure AKS step by step using [/docs/azure_aks/1_prepare_aks.ipynb](/docs/azure_aks/1_prepare_aks.ipynb).
77-
1. start pods on Kubernetes step by step using [/docs/azure_aks/2_start_pods.ipynb](/docs/azure_aks/2_start_pods.ipynb).
78-
1. register iot device & robot to fiware step by step using [/docs/azure_aks/3_register_device.ipynb](/docs/azure_aks/3_register_device.ipynb).
79-
1. register business logic to fiware step by step using [/docs/azure_aks/4_register_business_logic.ipynb](/docs/azure_aks/4_register_business_logic.ipynb).
80-
1. operate turtlebot3 step by step using [/docs/azure_aks/5_operate_turtlebot3.ipynb](/docs/azure_aks/5_operate_turtlebot3.ipynb).
81-
1. visualize the data of turtlebot3 step by step using [/docs/azure_aks/6_visualize_data.ipynb](/docs/azure_aks/6_visualize_data.ipynb).
92+
1. prepare Microsoft Azure AKS -- [/docs/azure_aks/01_prepare_aks.ipynb](/docs/azure_aks/01_prepare_aks.ipynb).
93+
1. start pods on Azure AKS -- [/docs/azure_aks/02_start_pods.ipynb](/docs/azure_aks/02_start_pods.ipynb).
94+
1. register iot device & robot to FIWARE -- [/docs/azure_aks/03_register_device.ipynb](/docs/azure_aks/03_register_device.ipynb).
95+
1. register business logic to FIWARE -- [/docs/azure_aks/04_register_business_logic.ipynb](/docs/azure_aks/04_register_business_logic.ipynb).
96+
1. start monitoring and logging on Azure AKS -- [/doss/azure_aks/05_start_monitoring_and_logging.ipynb](/docs/azure_aks/05_start_monitoring_and_logging.ipynb).
97+
1. prepare minikube in turtlebot3, and start `mqtt-kube-operator` in order to enable remote deployment -- [/docs/azure_aks/06_prepare_remote_deploy.ipynb](/docs/azure_aks/06_prepare_remote_deploy.ipynb).
98+
1. deploy programs to turtlebot3 through FIWARE -- [/docs/azure_aks/07_deploy_containers_to_turtlebot3.ipynb](/docs/azure_aks/07_deploy_containers_to_turtlebot3.ipynb).
99+
1. operate turtlebot3 step by step using [/docs/azure_aks/08_operate_turtlebot3.ipynb](/docs/azure_aks/08_operate_turtlebot3.ipynb).
100+
1. visualize the data of turtlebot3 step by step using [/docs/azure_aks/09_visualize_data.ipynb](/docs/azure_aks/09_visualize_data.ipynb).
101+
1. delete programs from turtlebot3 through FIWARE -- [/docs/azure_aks/10_delete_containers_from_turtlebot3.ipynb](/docs/azure_aks/10_delete_containers_from_turtlebot3.ipynb).
82102

83103
### minikube
84104

@@ -88,53 +108,58 @@ This repository construct a container-centric [FIWARE](http://www.fiware.org/) d
88108
$ cp minikube/env.template minikube/env
89109
$ vi env
90110
```
91-
1. prepare minikube step by step using [/docs/minikube/1_prepare_minikube.ipynb](/docs/minikube/1_prepare_minikube.ipynb).
92-
1. start pods on Kubernetes step by step using [/docs/minikube/2_start_pods.ipynb](/docs/minikube/2_start_pods.ipynb).
93-
1. register iot device & robot to fiware step by step using [/docs/minikube/3_register_device.ipynb](/docs/minikube/3_register_device.ipynb).
94-
1. register business logic to fiware step by step using [/docs/minikube/4_register_business_logic.ipynb](/docs/minikube/4_register_business_logic.ipynb).
95-
1. operate turtlebot3 step by step using [/docs/minikube/5_operate_turtlebot3.ipynb](/docs/minikube/5_operate_turtlebot3.ipynb).
96-
1. visualize the data of turtlebot3 step by step using [/docs/minikube/6_visualize_data.ipynb](/docs/minikube/6_visualize_data.ipynb).
97-
98-
## Related Repositories
99-
### customized FIWARE components
100-
* [tech-sketch/iotagent-ul](https://github.com/tech-sketch/iotagent-ul)
101-
* original: [telefonicaid/iotagent-ul](https://github.com/telefonicaid/iotagent-ul)
102-
* What's the problem?
103-
* Let's say that you want a iotagent-ul SERVICE which has multiple iotagent-ul PODs on your Kubernetes.
104-
* When you put a message to iotagent-ul by using HTTP, there is no problem because iotagent-ul SERVICE routes a HTTP message to only one POD.
105-
* But when you put a message to iotagent-ul by using MQTT, unfortunatly a MQTT message is processed as many times as the number of iotagent-ul PODs. Because the each iotagent-ul PODs subscribes for the same topic of MQTT Broker, so a MQTT message published that topic is proccessed by each PODs individually.
106-
* How to treat this
107-
* When a MQTT message is received, the customized iotagent-ul calls a REST API endpoint before processing the MQTT message.
108-
* If the REST API returns `200 OK`, the customized iotagent-ul continues processing the MQTT message as ordinally.
109-
* But if the REST API returns `409 Conflict`, the customized iotagent-ul stops processing.
110-
* To do so, the cluster of iotagent-ul PODs processes only once for a MQTT message.
111-
112-
### FIWARE support components
113-
* [tech-sketch/fiware-ambassador-auth](https://github.com/tech-sketch/fiware-ambassador-auth)
114-
* A REST API component working with [Ambassador](https://www.getambassador.io/) on Kubernetes in order to authorize and authanticate the client.
115-
* Bearar Authenticaton and Basic Authentication are supported.
116-
* [tech-sketch/fiware-mqtt-msgfilter](https://github.com/tech-sketch/fiware-mqtt-msgfilter)
117-
* A REST API component working with [tech-sketch/iotagent-ul](https://github.com/tech-sketch/iotagent-ul) and [etcd](https://coreos.com/etcd/docs/latest/) in order to check the message duplication.
111+
1. prepare minikube -- [/docs/minikube/01_prepare_minikube.ipynb](/docs/minikube/01_prepare_minikube.ipynb).
112+
1. start pods on minikube -- [/docs/minikube/02_start_pods.ipynb](/docs/minikube/02_start_pods.ipynb).
113+
1. register iot device & robot to fiware -- [/docs/minikube/03_register_device.ipynb](/docs/minikube/03_register_device.ipynb).
114+
1. register business logic to FIWARE -- [/docs/minikube/04_register_business_logic.ipynb](/docs/minikube/04_register_business_logic.ipynb).
115+
1. start monitoring and logging on minikube -- [/doss/minikube/05_start_monitoring_and_logging.ipynb](/docs/minikube/05_start_monitoring_and_logging.ipynb).
116+
1. prepare minikube in turtlebot3, and start `mqtt-kube-operator` in order to enable remote deployment -- [/docs/minikube/06_prepare_remote_deploy.ipynb](/docs/minikube/06_prepare_remote_deploy.ipynb).
117+
1. deploy programs to turtlebot3 through FIWARE -- [/docs/minikube/07_deploy_containers_to_turtlebot3.ipynb](/docs/minikube/07_deploy_containers_to_turtlebot3.ipynb).
118+
1. operate turtlebot3 step by step using [/docs/minikube/08_operate_turtlebot3.ipynb](/docs/minikube/08_operate_turtlebot3.ipynb).
119+
1. visualize the data of turtlebot3 step by step using [/docs/minikube/09_visualize_data.ipynb](/docs/minikube/09_visualize_data.ipynb).
120+
1. delete programs from turtlebot3 through FIWARE -- [/docs/minikube/10_delete_containers_from_turtlebot3.ipynb](/docs/minikube/10_delete_containers_from_turtlebot3.ipynb).
121+
122+
123+
## Related Repositories (Cloud)
124+
### FIWARE components
125+
* [telefonicaid/fiware-orion](https://github.com/telefonicaid/fiware-orion)
126+
* Orion is a FIWARE's reference implementation of the Publish/Subscribe Context Broker.
127+
* [telefonicaid/iotagent-ul](https://github.com/telefonicaid/iotagent-ul)
128+
* IotAgent-UL is a bridge that can be used to communicate devices using the Ultralight 2.0 protocol and Orion.
129+
* Ultralight 2.0 is a lightweight text based protocol aimed to constrained devices and communications where the bandwidth and device memory may be limited resources.
130+
* [telefonicaid/fiware-cygnus](https://github.com/telefonicaid/fiware-cygnus)
131+
* Cygnus is a connector in charge of persisting certain sources of data in certain configured third-party storages, creating a historical view of such data.
132+
* In this demonstration, historical data are stored to mongodb.
118133
119134
### Business Logic components
120135
* [tech-sketch/fiware-cmd-proxy](https://github.com/tech-sketch/fiware-cmd-proxy)
121136
* A web application working with [FIWARE orion context broker](https://github.com/telefonicaid/fiware-orion) in order to receive a command from gamepad or web controler and to send a command to ROS robot.
122137
* [tech-ksetch/fiware-robot-visualization](https://github.com/tech-sketch/fiware-robot-visualization)
123138
* A web application working with [FIWARE cygnus](https://github.com/telefonicaid/fiware-cygnus) in order to visualize the locus of ROS robot.
124139
140+
### Support components
141+
* [tech-sketch/fiware-ambassador-auth](https://github.com/tech-sketch/fiware-ambassador-auth)
142+
* A REST API component working with [Ambassador](https://www.getambassador.io/) on Kubernetes in order to authorize and authanticate the client.
143+
* Bearar Authenticaton and Basic Authentication are supported.
144+
145+
## Related Repositories (Device & Robot)
125146
### gamepad controller
126147
* [tech-sketch/fiware-gamepad-controller](https://github.com/tech-sketch/fiware-gamepad-controller)
127-
* A python3.6 application in order to receive gamepad events and to send a command corresponding the event to MQTT broker.
148+
* A python3.6 application in order to receive gamepad events and to send a command corresponding the event to FIWARE.
128149
129150
### ROS package
130151
* [tech-sketch/fiware_ros_turtlebot3_bridge](https://github.com/tech-sketch/fiware_ros_turtlebot3_bridge)
131-
* A [ROS](http://wiki.ros.org/) pakage witten by python2 in order to act as a bridge between MQTT broker and ROS nodes.
152+
* A [ROS](http://wiki.ros.org/) pakage witten by python2 in order to act as a bridge between FIWARE and ROS nodes.
132153
* When a MQTT message is received from a MQTT topic, this package create ROS message and publish a ROS message to a ROS topic.
133154
* At the opposite, when a ROS message is received from a ROS topic, this package publish a MQTT message to a MQTT topic.
134155
* [tech-sketch/fiware_ros_turtlebot3_operator](https://github.com/tech-sketch/fiware_ros_turtlebot3_operator)
135156
* A [ROS](http://wiki.ros.org/) pakage witten by python2 in order to control "turtlebot3" and receive its odometries.
136157
* You can use this package with either actual robot or simulator.
137158
159+
### Support components
160+
* [tech-sketch/mqtt-kube-operator](https://github.com/tech-sketch/mqtt-kube-operator)
161+
* A MQTT client to deploy (or delete) a resource to its own Kubernetes.
162+
138163
## License
139164
140165
[Apache License 2.0](/LICENSE)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: ambassador
5+
creationTimestamp: null
6+
labels:
7+
service: ambassador
8+
annotations:
9+
getambassador.io/config: |
10+
---
11+
apiVersion: ambassador/v0
12+
kind: Module
13+
name: tls
14+
config:
15+
server:
16+
enabled: True
17+
redirect_cleartext_from: 80
18+
spec:
19+
type: LoadBalancer
20+
ports:
21+
- name: ambassador-tls
22+
port: 443
23+
targetPort: 443
24+
- name: ambassador
25+
port: 80
26+
targetPort: 80
27+
selector:
28+
service: ambassador

ambassador/ambassador-azure.yaml

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)