FIWARE / tutorials.TourGuide-App

:mortar_board: FIWARE Tour Guide Application.
https://fiwaretourguide.readthedocs.io/
MIT License
17 stars 19 forks source link

Deploy TourGuide app in a Docker Swarm cluster #51

Open albertinisg opened 8 years ago

albertinisg commented 8 years ago

In a conversation with @KennethNagin, we've found an issue trying to deploy TourGuide in a cluster. After exposing to the host the following services at the following ports:

The application fails when redirecting the 'Log in' to IDM. The issue is caused for several reasons:

    tourguide_app = keystone.oauth2.consumers.create(
        name='TourGuide',
        redirect_uris=['http://tourguide/login'],
        description='Fiware TourGuide Application',
        scopes=['all_info'],
        client_type='confidential',
        grant_type='authorization_code',
        url='http://tourguide',
        img='/static/dashboard/img/logos/small/app.png')

Assumes that the application is being deployed at http://tourguide.

Ater making the HOST at IDM provision at IDM configurable, we will need to modify the environment variables IDM_HOSTNAME and TOURGUIDE_HOSTNAME matching the requirements.

albertinisg commented 8 years ago

Apart from that, we will have to discuss about how to go through the images that loads their configurations with volumes. This approach breaks the development of the TourGuide in a Docker Swarm cluster.

jmcanterafonseca commented 8 years ago

What are those images? Why configurations are loaded using images?

dmabtrg commented 8 years ago

The problem is not the images themselves, but the volumes mapped from the host used by those images, as they won't work when using Docker Swarm / Machine. Some images (e.g. cygnus or the official pep-wilma image) allow or require you to provide a configuration file to configure the application and that, right now, is done via a volume from the host. For this to work with Docker Swarm / Machine, we need to find an alternative solution:

The problem @KennethNagin faced was that the cygnus image loaded the configuration from a host volume. To solve this, he made two approaches:

From the current images, this are the ones that (may) have this problem: