[GeoNode-users] Fwd: GeoNode at 2.8.0 Ubuntu Installation Final Settings
Julierme Pinheiro
juliermeopensourcedeveloper at gmail.com
Tue Sep 4 07:02:33 PDT 2018
---------- Forwarded message ---------
From: Julierme Pinheiro <juliermeopensourcedeveloper at gmail.com>
Date: Tue, Sep 4, 2018 at 11:01 AM
Subject: GeoNode at 2.8.0 Ubuntu Installation Final Settings
To: Toni Schönbuchner <toni.schoenbuchner at csgis.de>
Dear all,
I have spent some weeks trying to figure out an issue related to GeoNode
configuration. I almost through the whole installation of GeoNode
following the guide available in [1]. However, after tweaking through
settings.py and local_settings.py, I could not get it solved, and I wonder
if someone has faced something similar and could give me a hint. Here we go:
1 - Issues regarding GeoNode at 2.8.0 in a Ubuntu at 16.04LTS VM
1.1 - Blank/pink Tiles
If I keep the settings.py config bellow, I can upload data to GeoNode site.
But I will get blank tiles for the layers. And the reason I get them it is
because the tiles make reference to localhost.
GEOSERVER_LOCATION = os.getenv(
'GEOSERVER_LOCATION', '{}/geoserver/'.format(SITEURL)
# 'GEOSERVER_LOCATION', 'http://172.21.14.45/geoserver/'
)
GEOSERVER_PUBLIC_LOCATION = os.getenv(
'GEOSERVER_PUBLIC_LOCATION', '{}/geoserver/'.format(SITEURL)
# 'GEOSERVER_PUBLIC_LOCATION', 'http://172.21.14.45/geoserver/'
)
OGC_SERVER_DEFAULT_USER = os.getenv(
'GEOSERVER_ADMIN_USER', 'admin'
)
OGC_SERVER_DEFAULT_PASSWORD = os.getenv(
'GEOSERVER_ADMIN_PASSWORD', 'geoserver'
)
## OGC (WMS/WFS/WCS) Server Settings
OGC_SERVER = {
'default': {
'BACKEND': 'geonode.geoserver',
'LOCATION': GEOSERVER_LOCATION,
'LOGIN_ENDPOINT': 'j_spring_oauth2_geonode_login',
'LOGOUT_ENDPOINT': 'j_spring_oauth2_geonode_logout',
'PUBLIC_LOCATION': GEOSERVER_PUBLIC_LOCATION,
'USER': OGC_SERVER_DEFAULT_USER,
'PASSWORD': OGC_SERVER_DEFAULT_PASSWORD,
'MAPFISH_PRINT_ENABLED': True,
'PRINT_NG_ENABLED': True,
'GEONODE_SECURITY_ENABLED': True,
'GEOFENCE_SECURITY_ENABLED': True,
'GEOGIG_ENABLED': False,
'WMST_ENABLED': False,
'BACKEND_WRITE_ENABLED': True,
'WPS_ENABLED': False,
'LOG_FILE': '%s/geoserver/data/logs/geoserver.log' %
os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),
# Set to dictionary identifier of database containing spatial data
in
# DATABASES dictionary to enable
'DATASTORE': 'datastore',
'PG_GEOGIG': False,
'TIMEOUT': 30 # number of seconds to allow for HTTP requests
}
}
If I make a copy of this config above to local_settings.py, the blank/pink
tiles are gone and everything works, except, I won't be able to upload any
data again. And the reason the blank/pink tiles are gone is because GeoNode
retrieves the SITEURL: http://172.21.14.45. But there is an issue here
keeping GeoServer Location, GeoServer Public Location and OGC_SERVER config
in both settings.py and local_settings.py, I won't get to upload data
anymore. If I try to upload data, the response is: NAME
Note: 172.21.14.45 is in ALLOWED and PROXY Hosts
1.2 - Regarding egarding wsgi.py
I see that it is ok to use local_settings.py in the wsgi.py file, but I
wonder why my GeoNode won't start up when I change from:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings")
to:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.local_settings")
Note: This is just a question, not an issue.
[1]
http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/
Any hint on that will be very appreciated
Kind regards
Julierme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180904/783fa2ca/attachment.html>
More information about the geonode-users
mailing list