Dear friends of Sentilo,
Below we explain how to proceed in order to update the
configuration of the Sentilo Catalog Web Application and how to solve this problem.
Basically it is necessary to include a valid API Key in the catalog application you are using.
There are different methods to get successfully configured your catalog application. Please, read carefully the entire following content to decide which of the proposed solutions is the most useful for each case.
A. Modification of the source code (must recompile source code and redeploy war file to Tomcat)
This is the recommended method, since the configuration file will
remain with the correct value each time we recompile the code for
some reason.
B. Edit the web application configuration file directly (it is not necessary to recompile the source code)
Note that this is the fastest and easiest method, but the least safe, since if we ever recompile the source code, we will lose the modified values.
----
Once the process is finished, and the tomcat8 service started, we can see the welcome screen again:
See below a sample of catalog-config.properties file content, look for the last line including your own Gmaps Api Key (you must paste your own one over the PASTE_HERE_YOUR_OWN_GMAPS_API_KEY
text replacing it):
#-------------------------------------------------------------------------------
# Sentilo
#
# Original version 1.4 Copyright (C) 2013 Institut Municipal d’Informàtica, Ajuntament de Barcelona.
# Modified by Opentrends adding support for multitenant deployments and SaaS. Modifications on version 1.5 Copyright (C) 2015 Opentrends Solucions i Sistemes, S.L.
#
#
# This program is licensed and may be used, modified and redistributed under the
# terms of the European Public License (EUPL), either version 1.1 or (at your
# option) any later version as soon as they are approved by the European
# Commission.
#
# Alternatively, you may redistribute and/or modify this program under the terms
# of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied.
#
# See the licenses for the specific language governing permissions, limitations
# and more details.
#
# You should have received a copy of the EUPL1.1 and the LGPLv3 licenses along
# with this program; if not, you may find them at:
#
# https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
# http://www.gnu.org/licenses/
# and
# https://www.gnu.org/licenses/lgpl.txt
#-------------------------------------------------------------------------------
##############################################################################################
# This file allows to configure the parameters needed to access to catalog backend (MondoDB)
# and other stuffs
##############################################################################################
catalog.app.id=sentilo-catalog
catalog.default.locale=en
# Timezone and pattern in which dates are printed in views and graphics
catalog.default.timezone=UTC
catalog.default.datePattern=dd/MM/yyyy HH:mm:ss
# Defaul observations number in charts
catalog.default.chart.numObs=10
# The limit of points to store for each route
route.max.size=20
#MongoDB config params
catalog.mongodb.host=127.0.0.1
catalog.mongodb.port=27017
catalog.mongodb.database=sentilo
catalog.mongodb.user=sentilo
catalog.mongodb.password=sentilo
#Authorized api client IP
catalog.api.client.ip=127.0.0.1
#Sentilo endpoint
rest.client.host=http://127.0.0.1:8081
#Token used to call the REST API: must be equal to the sentilo-catalog token
rest.client.identity.key=c956c302086a042dd0426b4e62652273e05a6ce74d0b77f8b5602e0811025066
# Google API key to use Google Maps
google.api.key=PASTE_HERE_YOUR_OWN_GMAPS_API_KEY
PASTE_HERE_YOUR_OWN_GMAPS_API_KEY will be some text like:
AIzaSyDbRzw1ragH1QuvxLrwaOKrLhYdIsmcd9s
We trust that with these two configuration methods you will be
able to make the Sentilo Catalog Web Application maps available
again and we hope that you have been very helpful.
Do not hesitate to make your questions or comments about it.
ps -aux | grep tomcat8
Below is the captured screen for solution B (in the procedure of using vi editor). The file seems to be empty.
Thanks,
Jeff