This is a collection of tutorials for the FIWARE ecosystem designed for NGSI-LD developers. Each tutorial consists of a series of exercises to demonstrate the correct use of individual FIWARE components and shows the flow of context data within a simple Smart Solution either by connecting to a series of dummy IoT devices or manipulating the context directly or programmatically.
📚 NGSI-LD Documentation |
Postman Collections |
|
developer.fiware.org |
---|
The tutorials defines a series of data-models to be used within the @context
. More information about the classes and
attributes used can be found in the following:
To download the full set of tutorials, simply clone this repository:
git clone https://github.com/FIWARE/tutorials.NGSI-LD.git
cd tutorials.NGSI-LD/
git submodule update --init --recursive
The OpenAPI Specification (commonly known as Swagger) is an API description format for REST APIs. A Swaggger spec allows you to describe an entire API (such as NGSI-LD itself) however in this tutorial we shall be concentrating on using Swagger to define data models.
API specifications can be written in YAML or JSON. The format is easy to learn and readable to both humans and machines.
The complete OpenAPI Specification can be found on GitHub:
OpenAPI 3.0 Specification. This is
important since we will need a well defined structure to be able to generate @context
files.
Each tutorial runs all components using Docker. Docker is a container technology which allows to different components isolated into their respective environments.
- To install Docker on Windows follow the instructions here
- To install Docker on Mac follow the instructions here
- To install Docker on Linux follow the instructions here
Docker Compose is a tool for defining and running multi-container Docker applications. A series of *.yaml
files
are used configure the required services for the application. This means all container services can be brought up in a
single command. Docker Compose is installed by default as part of Docker for Windows and Docker for Mac, however Linux
users will need to follow the instructions found here
You can check your current Docker and Docker Compose versions using the following commands:
docker-compose -v
docker version
Please ensure that you are using Docker version 20.10 or higher and Docker Compose 1.29 or higher and upgrade if necessary.
Although not officially supported, older versions of docker without an integrated docker-compose can be run by adding
legacy
to all bash script commands:
./services start legacy
The tutorials which use HTTP requests supply a collection for use with the Postman utility. Postman is a testing framework for REST APIs. The tool can be downloaded from www.getpostman.com. All the FIWARE Postman collections can downloaded directly from the Postman API network
We will start up our services using a simple Bash script. Windows users should download cygwin to provide a command-line functionality similar to a Linux distribution on Windows.
101. Understanding @context
102.
Working with @context
103.
CRUD Operations
104.
Entity Relationships
106.
Subscriptions
107.
Temporal Operations
201. Introduction to IoT Sensors
202.
Provisioning the Ultralight IoT Agent
203.
Provisioning the JSON IoT Agent
304.
Querying Time Series Data (QuantumLeap)
305. Big Data Analysis (Flink)
306. Big Data Analysis (Spark)
507. Cloud-Edge Computing
Most tutorials supply a services
script to start the containers:
cd <tutorial-name>
git checkout NGSI-LD
./services start
Each tutorial submodule contains one or more docker-compose.yml
files, along with a Postman collection containing the
necessary HTTP requests: import the collection into Postman and follow the instructions.
Each submodule contains full instructions in README which details the appropriate bash commands (cUrl and Docker Compose) to run.
Full instructions can be found within the documentation
MIT © 2020-2021 FIWARE Foundation e.V.