Sign inSign up

fiware/tutorials.tourguide-app

By fiware

•Updated about 9 years ago

FIWARE Tour Guide App sample application

Image
2

500K+

fiware/tutorials.tourguide-app repository overview

⁠FIWARE Tour Guide Application - Docker image

FIWARE Tour Guide Application⁠ is the sample application used in the FIWARE Tour Guide⁠ to show real code working with the Generic Enablers integrated.

This image is intended to work together with Orion⁠.

⁠Image contents

  • ubuntu:14.04 baseimage available here⁠
  • Node.js
  • REST interface for working with Orion

⁠Usage

We strongly suggest you to use docker-compose⁠. With docker compose you can define multiple containers in a single file, and link them easily.

So for this purpose, we have already a simple file that launches:

  • A MongoDB image with pre-loaded data
  • Orion Context Broker as a service
  • IDM Keyrock
  • PEP Proxy
  • Authzforce
  • IDAS
  • Cygnus
  • TourGuide app

The file docker-compose.yml can be downloaded from here⁠.

Once you get it, you just have to pull the images:

docker-compose pull

And then start the containers:

docker-compose up -d

Note that even though the docker-compose up -d does also pull the images, we suggest to do it separately to avoid synchronization issues.

Also, there are several environment variables that you can configure in the docker-compose.yml⁠:

  • ORION_HOSTNAME. Hostname of the Orion application protected by a proxy. By default the value is pepwilma
  • ORION_NO_PROXY_HOSTNAME. Hostname of the Orion application without proxy. By default the value is orion
  • ORION_PORT. Port of the Orion application. By default the value is 1026
  • ORION_PEP_ENABLED. Activate the PEP Proxy. By default the value is true
  • IDAS_PORT. Port of the IDAS application. By default the value is 8080
  • SENSORS_GENERATION_ENABLED. Enables sensors generation for each restaurant. By default the value is false.
  • ORION_SUBSCRIPTIONS_ENABLED. Activates the Orion sensors subscription, updating the Restaurant information. By default the value is false. Note: SENSORS_GENERATION_ENABLED must be set to true, otherwise there won't be sensors and no data will be generated.
  • SENSORS_FORCED_UPDATE_ENABLED. Updates the values of the sensors. By default the value is false. Note: SENSORS_GENERATION_ENABLED must be set to true, otherwise there won't be sensors and no data will be generated.

And all the services will be up. The client will be reachable at:

http://tourguide

End to end testing can be done using the REST interface⁠. An example application is the restaurant data feeder⁠.

Note: to access the containers from the host (i.e http://tourguide/⁠) you may need to modify your hosts file to add entries for the containers. To help with this task, you can use the get-docker-hosts⁠ script to add or update the containers info to your hosts file.

⁠What if I don't want to use docker-compose?

No problem, the only thing is that you will have to deploy an Orion container yourself and configure its IP as Orion name inside the TourGuide container.

⁠Logs and other commands

By default, TourGuide show the logs from apache via docker logs <container-id> command.

If you need to run another command in the same container, you can use the docker exec command.

⁠IdM Users, Organizations, Apps, Roles and Permissions

This IdM image is intended to work with Fiware TourGuide-App⁠. Due to this, we've generated Users, Organizations, Apps, Roles and Permissions adapted to it in this uncoupled file⁠.

Note the following provision is intended just for testing purposes. To add/remove information to this image, you can always use the Identity API⁠

⁠Users
⁠Organizations (or projects if using the Identity API⁠)
Organization nameDescriptionUsers
Franchise1Franchise1[email protected]⁠ (owner)
Franchise2Franchise2[email protected]⁠ (owner)
Franchise3Franchise3[email protected]⁠ (owner)
Franchise4Franchise4[email protected]⁠ (owner)
⁠Apps
Application nameDescriptionURLRedirect URI
FIWARE TourGuideFiware TourGuide Test Applicationhttp://tourguide⁠http://tourguide/login⁠
⁠Roles
Role nameGranted to user
Provider[email protected]⁠
End userAll
Franchise Manager[email protected]⁠ (Franchise1)
Franchise Manager[email protected]⁠ (Franchise2)
Franchise Manager[email protected]⁠ (Franchise3)
Franchise Manager[email protected]⁠ (Franchise4)
Global Manager[email protected]⁠
⁠Permissions

We've added several permissions for Orion Operations. You can check all of them by accessing the IdM or here⁠

⁠User feedback

⁠Documentation

All the information regarding the image generation is hosted publicly on Github⁠.

⁠Issues

If you find any issue with this image, feel free to contact us via Github issue tracking system⁠.

Tag summary

Content type

Image

Digest

Size

160.6 MB

Last updated

about 9 years ago

docker pull fiware/tutorials.tourguide-app