Open albertinisg opened 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.
What are those images? Why configurations are loaded using images?
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:
cygnus:
Our custom image allow a simple configuration to be generated from a template via environment variables, but to use a more complex configuration it requieres the user to provide that configuration file to the container (i.e. via a volume). The official image requires a volume to mount the configuration files.
pep-wilma:
Our custom image generates the configuration from a template via environment variables. The official image requires the user to provide the configuration file via a volume (or use the default configuration).
idm:
Our custom image modifies the default configuration via environment variables. The official image uses the default configuration.
other images:
The other images that we use don't need further configuration changes from the defaults used or can be tweaked via command line parameters (e.g orion).
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:
Assumes that the application is being deployed at
http://tourguide
.IDM_HOSTNAME
andTOURGUIDE_HOSTNAME
Ater making the HOST at IDM provision at IDM configurable, we will need to modify the environment variables
IDM_HOSTNAME
andTOURGUIDE_HOSTNAME
matching the requirements.