Coder Social home page Coder Social logo

fiware / tutorials.step-by-step Goto Github PK

View Code? Open in Web Editor NEW
69.0 16.0 71.0 2.49 MB

Tutorials for the complete 𝑭𝑰𝑾𝑨𝑹𝑬 ecosystem for developers wishing to learn how to use NGSI-v2 and NGSI-LD and design context-based Smart Systems π’‘π’π’˜π’†π’“π’†π’…-π’ƒπ’š-𝑭𝑰𝑾𝑨𝑹𝑬.

Home Page: https://fiware.github.io/tutorials.Step-by-Step/

License: MIT License

fiware tutorial contextual-data ngsi ngsi-v2 ngsi-ld

tutorials.step-by-step's People

Contributors

a6wu avatar actions-user avatar apozohue10 avatar aspleenic avatar fisuda avatar flopezag avatar jason-fox avatar mnxonline avatar mohamedsadiq102 avatar pacs27 avatar qrayner avatar rafael-z avatar rihabfekii avatar w4bo avatar waarrk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tutorials.step-by-step's Issues

Identity Management tutorial - Keyrock user creation fails

When creating a user with the following postman collecion payload in Keyrock:

{
  "user": {
    "username": "admin2",
    "email": "[email protected]",
    "password": "test",
    **"admin": true**
  }
}

the response received with status 201 Created is:

{
    "user": {
        "id": "f074c4d0-5b72-4155-9d12-34d92e6960b2",
        "image": "default",
        "gravatar": false,
        "enabled": true,
        "starters_tour_ended": false,
        "eidas_id": null,
        "username": "admin2",
        "email": "[email protected]",
        "salt": "2498261557aed56a",
        **"admin": true**,
        "date_password": "2020-09-22T11:49:36.932Z"
    }
}

but it is not stored in database as an sql query shows a 0 on that column:

| id                                   | username | description | website | image   | gravatar | email           | password                                 | date_password       | enabled | admin | extra | scope | starters_tour_ended | eidas_id | salt             |
+--------------------------------------+----------+-------------+---------+---------+----------+-----------------+------------------------------------------+---------------------+---------+-------+-------+-------+---------------------+----------+------------------+
| f074c4d0-5b72-4155-9d12-34d92e6960b2 | admin2   | NULL        | NULL    | default |        0 | [email protected] | 496e9b2dc2983e7496b541aea626e437cf4184d2 | 2020-09-22 11:49:36 |       1 |     0 | NULL  | NULL  |                   0 | NULL     | 2498261557aed56a |
+--------------------------------------+----------+-------------+---------+---------+----------+-----------------+------------------------------------------+---------------------+---------+-------+-------+-------+---------------------+----------+------------------+

Update QuantumLeap part

QuantumLeap part seems very outdated. I am creating this issue as a reminder mostly. I'll try to update it asap.

Identity Management tutorial - Keyrock user update fails

When updating a user with the following postman collection payload:

{
	"user": {
	    "username": "alice",
	    "email": "[email protected]",
	    "enabled": true,
	    "gravatar": false,
	    "date_password": "2018-07-26T15:25:14.000Z",
	    "description": "Alice works for FIWARE",
	    "website": "http://www.fiware.org"
	}
}

The response given is correct and the log show the following:

Tue, 22 Sep 2020 11:59:10 GMT idm:api-authenticate  --> validate_token
Executing (default): SELECT `AuthToken`.`access_token`, `AuthToken`.`expires`, `AuthToken`.`valid`, `AuthToken`.`user_id`, `AuthToken`.`pep_proxy_id`, `User`.`id` AS `User.id`, `User`.`username` AS `User.username`, `User`.`email` AS `User.email`, `User`.`date_password` AS `User.date_password`, `User`.`enabled` AS `User.enabled`, `User`.`admin` AS `User.admin`, `PepProxy`.`id` AS `PepProxy.id` FROM `auth_token` AS `AuthToken` LEFT OUTER JOIN `user` AS `User` ON `AuthToken`.`user_id` = `User`.`id` LEFT OUTER JOIN `pep_proxy` AS `PepProxy` ON `AuthToken`.`pep_proxy_id` = `PepProxy`.`id` WHERE `AuthToken`.`access_token` = 'f8ce4ca3-a512-4c50-9f86-aebaa6a694fb';
Tue, 22 Sep 2020 11:59:10 GMT idm:api-users --> load_user
Executing (default): SELECT `id`, `username`, `email`, `enabled`, `admin`, `image`, `gravatar`, `date_password`, `description`, `website` FROM `user` AS `User` WHERE `User`.`id` = '9b038c24-035d-43bf-9e03-b3af5d70f226';
Tue, 22 Sep 2020 11:59:10 GMT idm:api-users --> update
Executing (default): SELECT `id`, `username`, `description`, `website`, `image`, `gravatar`, `email`, `salt`, `password`, `date_password`, `enabled`, `admin`, `starters_tour_ended`, `eidas_id`, `extra`, `scope` FROM `user` AS `User` WHERE `User`.`email` = '[email protected]';
Executing (default): SELECT `id`, `username`, `description`, `website`, `image`, `gravatar`, `email`, `salt`, `password`, `date_password`, `enabled`, `admin`, `starters_tour_ended`, `eidas_id`, `extra`, `scope` FROM `user` AS `User` WHERE `User`.`email` = '[email protected]';
Executing (default): UPDATE `user` SET `username`='alice',`email`='[email protected]',`description`='Alice works for FIWARE',`website`='http://www.fiware.org' WHERE `id` = '9b038c24-035d-43bf-9e03-b3af5d70f226'
PATCH /v1/users/9b038c24-035d-43bf-9e03-b3af5d70f226 200 14.613 ms - 137

Submitting the same query, it raises an exception which is not handled and postman keeps waiting for response until Error: socket hang up is shown.
This is the log:

Tue, 22 Sep 2020 11:59:12 GMT idm:api-authenticate  --> validate_token
Executing (default): SELECT `AuthToken`.`access_token`, `AuthToken`.`expires`, `AuthToken`.`valid`, `AuthToken`.`user_id`, `AuthToken`.`pep_proxy_id`, `User`.`id` AS `User.id`, `User`.`username` AS `User.username`, `User`.`email` AS `User.email`, `User`.`date_password` AS `User.date_password`, `User`.`enabled` AS `User.enabled`, `User`.`admin` AS `User.admin`, `PepProxy`.`id` AS `PepProxy.id` FROM `auth_token` AS `AuthToken` LEFT OUTER JOIN `user` AS `User` ON `AuthToken`.`user_id` = `User`.`id` LEFT OUTER JOIN `pep_proxy` AS `PepProxy` ON `AuthToken`.`pep_proxy_id` = `PepProxy`.`id` WHERE `AuthToken`.`access_token` = 'f8ce4ca3-a512-4c50-9f86-aebaa6a694fb';
Tue, 22 Sep 2020 11:59:12 GMT idm:api-users --> load_user
Executing (default): SELECT `id`, `username`, `email`, `enabled`, `admin`, `image`, `gravatar`, `date_password`, `description`, `website` FROM `user` AS `User` WHERE `User`.`id` = '9b038c24-035d-43bf-9e03-b3af5d70f226';
Tue, 22 Sep 2020 11:59:12 GMT idm:api-users --> update
Executing (default): SELECT `id`, `username`, `description`, `website`, `image`, `gravatar`, `email`, `salt`, `password`, `date_password`, `enabled`, `admin`, `starters_tour_ended`, `eidas_id`, `extra`, `scope` FROM `user` AS `User` WHERE `User`.`email` = '[email protected]';
Executing (default): 
Tue, 22 Sep 2020 11:59:12 GMT idm:api-users Error: SequelizeDatabaseError: Query was empty
(node:267) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at /opt/fiware-idm/controllers/api/users.js:330:25
(node:267) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 11)
PATCH /v1/users/9b038c24-035d-43bf-9e03-b3af5d70f226 - - ms - -

Update Postman for Context Providers tutorial

I'm using the Postman Collections from the Step-by-step Context Providers tutorial and I noticed that published collection is old. The most obvious problem is that the published Postman collection still uses NGSI v1 queries.

You'll find the updated collection here: https://github.com/FIWARE/tutorials.Context-Providers/blob/master/FIWARE%20Context%20Providers.postman_collection.json

The non-updated postman collection referred in the docs: https://app.getpostman.com/run-collection/7c9bed4bd2ce5213a80b

This is a "cross issue" already posted here: FIWARE/tutorials.Context-Providers#16

Context provider NGSI v2 endpoint not returning data

Hi,

I'm following the Step-by-Step tutorial and trying out OpenWeatherMap API. I'm testing using docker. (I slightly changed the docker-compose.yml in the tutorial, but the architecture is the same)
However, I found for context-provide, the endpoint in the example "/random/weatherConditions" works fine. I tried other endpoints listed in the menu , such as "random/temperature", "/weather/number/cairo%2ceg/temp", and "/weather/weatherConditions", they all returned
{"error":"NotFound","description":"The entity does not have such an attribute"} in my curl client.

If I checked the logs of orion and context provider. I can see that for "/weather/weatherConditions", there's an issue with OpenWeatherMap API
fiware-tutorial | POST /weather/weatherConditions/op/query 400 883.080 ms - 1319 orion_1 | INFO@16:20:36 httpRequestSend.cpp[619]: Notification Successfully Sent to http://host.docker.internal:3000/weather/weatherConditions/op/query orion_1 | WARN@16:20:36 httpRequestSend.cpp[632]: Notification response NOT OK, http code: 400

However, for "random/temperature" or "/weather/number/cairo%2ceg/temp", the logs show that the query operarion goes well. However the response in my curl client is still {"error":"NotFound","description":"The entity does not have such an attribute"}...The logs are below

orion_1 | INFO@16:20:35 logMsg.h[1844]: Starting transaction to http://host.docker.internal:3000/random/temperature/op/query orion_1 | INFO@16:20:35 httpRequestSend.cpp[599]: Sending message 55 to HTTP server: sending message of 310 bytes to HTTP server fiware-tutorial | POST /random/temperature/op/query 200 0.899 ms - 34 orion_1 | INFO@16:20:35 httpRequestSend.cpp[619]: Notification Successfully Sent to http://host.docker.internal:3000/random/temperature/op/query orion_1 | INFO@16:20:35 httpRequestSend.cpp[628]: Notification response OK, http code: 200

Since I only change part of the provider url... so I don't know if it's an issue with the context provider or with my settings.
Thanks so much for helping in advance!!!!

Using names instead of ips

Hi,
I noticed some parts of the tutorial work with assumption on ips, specifically 127.18.x.x

In my case, ./service start would fail with the message ERROR: Pool overlaps with other one on this address space. The problem was that the subnet ip was overlapping with the one docker gave to the docker_gwbridge. This might happen to people that previously tested docker swarm.

For the records, I had to disable the docker swarm mode of my host (I was not using it) with docker swarm leave --force and then docker network prune to get the docker_gwbridge network deleted.

So, given that the tutorial seems to be using the same network, wouldn't it be a bit safer for example to use service names instead?

inconsistent docker-compose files

Hello,

thanks for the brilliant tutorials. It seems as if the docker-compose files have inconsistencies within the names of services and hostname from one section to the other (e.g. mongodb and mongo-db). It would be great if the tutorial would also allaborate the influence of containernames and hostnames on the configuration of context-providers because from my experience this can be confusing.

To the best of my knowledge "container_name" and "expose" are no longer allowed. Also extra healthchecks are not allowed when using docker stack.

Thanks,

Thomas

Harmonize and sync Postman collections

First of all, @jason-fox thanks a mill for your fantastic job at maintaining the FIWARE Tutorials repos.

I have found that there are three different versions for the Postman collection of each tutorial:

  • The .postman_collection.json file in the GitHub repo
  • The one included in the Postman FIWARE Foundation eV Public Workspace
  • The one pointed by the Run in Postman button in the README.md file of the tutorial

They are not always the same and sometimes they contain different kind of errors. It would be very helpful to keep them in sync.

Also, whenever someone fixes an error, how do you prefer to get notified via a pull request: in GitHub or Postman?

can not install kurento-client

Thank you for the tutorial.
I have a problem in installing kurento-client
Screen Shot 2019-05-26 at 1 24 38 AM

After search for a while that some old dependencies depend on an old version of node meanwhile i use node v12, the solution that i've found is to downgrade to an older version, which it's not a practical solution for me.
Do you know which packages to add them in resolution instead?

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.