Setting up fminames noreplicate Database for SmartMet Tutorial (Docker) - skaija/susan-testing GitHub Wiki
Tutorial
This tutorial explains how to setup the fminames-noreplicate database when using Docker. It is a location database to be used with the docker version of the SmartMet Server. Location is fetched from the geonames.org.
Prereqs
Docker is installed and the SmartMet Server container is up and running on some Linux server where you have access to already.
Getting Docker version of the fminames-noreplicate database
- Go to the place where public Docker contents are to verify what is available:
https://hub.docker.com/
- Search for fmidev and you will get a page like below. Select fmidev/fminames-noreplicate.
- Create a new docker image using the existing image of fmidev/fminames-noreplicate
$ docker pull fmidev/fminames-noreplicate
- Verify the fmidev/fminames-noreplicate image is there
$ docker images
- Start the fmidev/fminames-noreplicate locally by running the docker run command.
$ docker run --net host -p 5432:5432 -d fmidev/fminames-noreplicate
This will do the following:
- Creates a writeable container layer over the specified image (fmidev/fminames-noreplicate) and starts the container
- Connects the container to a network (--net)
- Binds port 5432 of the container to port 5432 on the host machine.
- Makes the container to run in the background (-d)
- Check that the container is up and running
$ docker ps –a
- Check that the container got added to the bridge network
$ docker network inspect bridge
- Test your setup by the command below for example. It should fetch the temperature forecasted for the city of Helsinki.
http://hostname:8080/timeseries?format=debug&place=Helsinki¶m=name,time,temperature
Note! Replace hostname with your host machine name, by localhost or by host-ip. This depends on the machine that you are using (Cloud server/Native Linux/Mac or Windows).
Configuration
Review tutorial "Geonames Engine Configuration Tutorial (Docker)” to see how to configure the related configuration file geonames.conf.