Skip to content

Commit

Permalink
Merge pull request #1 from GeoNode/master
Browse files Browse the repository at this point in the history
merge geonode 2.8
  • Loading branch information
ahmednoureldeen authored Jan 28, 2018
2 parents e8b2a38 + 253f5be commit b8b674b
Show file tree
Hide file tree
Showing 60 changed files with 3,525 additions and 783 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
image: rabbitmq

django:
image: geonode/django
image: geonode/geonode:geonode
links:
- postgres
- elasticsearch
Expand All @@ -21,7 +21,7 @@ services:
- ./scripts/docker/env/production/django.env

celery:
image: geonode/django
image: geonode/geonode:geonode
links:
- rabbitmq
- postgres
Expand All @@ -31,7 +31,7 @@ services:
- ./scripts/docker/env/production/django.env

consumers:
image: geonode/django
image: geonode/geonode:geonode
links:
- rabbitmq
- postgres
Expand Down
21 changes: 21 additions & 0 deletions docs/tutorials/admin/geoserver_geonode_security/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,14 @@ Setup of the GeoNode REST Role Service

Once everything has been setup and it is working, choose the ``Administrator role`` and ``Group administrator role`` as ``ROLE_ADMIN``

Allow GeoFence to validate rules with ``ROLES``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. warning:: The following instruction are different accordingly to the GeoServer version you are currently using.

GeoServer 2.9.x and 2.10.x
--------------------------

#. Access the ``Security`` > ``Settings`` section

.. figure:: img/oauth011.png
Expand All @@ -537,6 +545,19 @@ Setup of the GeoNode REST Role Service

.. figure:: img/oauth012.png

GeoServer 2.12.x and above
--------------------------

With the latest updates to GeoFence Plugin, the latter no more recognizes the Role Service from the default settings but from the ``geofence-server.properties`` file.

That said, it is important that the ``Security`` > ``Settings`` role service will be set to **default**, in order to allow GeoServer following the standard authorization chain.

On the other side, you will need to be sure that the ``geofence-server.properties`` file under the ``$GEOSERVER_DATA_DIR/geofence`` folder, contains the two following additional properties: ::

gwc.context.suffix=gwc
org.geoserver.rest.DefaultUserGroupServiceName=geonode REST role service


Setup of the GeoServer OAuth2 Authentication Filter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
189 changes: 5 additions & 184 deletions docs/tutorials/install_and_admin/geonode_install/all_together.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,192 +4,17 @@
Finish installation
===================

In previous sections you've setup all the applications we need to run GeoNode.

In this section we are going to `glue` all the pieces together and finalize GeoNode
setup.

GeoNode Configuration
=====================

Now that all applications have been configured we are going to instruct GeoNode on
how to connect to `PostgreSQL` and `GeoServer`. Also we are going to instruct GeoNode
on who is allowed to connect to it.

First navigate to geonode configuration folder::

cd /home/geonode/geonode/geonode/

Copy the `local_settings.py` sample file called `local_settings.py.geoserver.sample`::

sudo cp local_settings.py.geoserver.sample local_settings.py

Then edit the configuration file::

sudo gedit local_settings.py

Add the `ALLOWED_HOSTS` and `PROXY_ALLOWED_HOSTS` variables at the top with the
following values::

ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '::1']
PROXY_ALLOWED_HOSTS = ("127.0.0.1", 'localhost', '::1')

Add the `POSTGIS_VERSION` variable matching your PostGIS version::

POSTGIS_VERSION = (2, 2, 1)

This will instruct GeoNode to listen on connections from your local machine.

Change the value of the `SITEURL` to your server's host name::

SITEURL = "http://<host>/"

Now configure database access:
Uncomment the `ENGINE`: `django.contrib.gis.db.backends.postgis` line
and comment the one with empty `ENGINE` variable. Also set the `NAME` variable to
`geonode_data`::

DATABASES = {
'default': {
...
},
'datastore' : {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
#'ENGINE': '', # Empty ENGINE name disables,
'NAME': 'geonode_data',
...
}

Then configure GeoServer location:
Change the value of the `LOCATION` and `PUBLIC_LOCATION` variables as follows,
also set the `DATASTORE` variable to `datastore`::

OGC_SERVER = {
'default' : {
...
'LOCATION' : 'http://localhost/geoserver/',
'PUBLIC_LOCATION' : 'http://localhost/geoserver/',
...
'DATASTORE': 'datastore',
}

The resulting configuration file should look like this::

import os

PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))

SITEURL = "http://<host>/"

ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '::1']
PROXY_ALLOWED_HOSTS = ("127.0.0.1", 'localhost', '::1')
POSTGIS_VERSION = (2, 2, 1)

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'geonode',
'USER': 'geonode',
'PASSWORD': 'geonode',
},
# vector datastore for uploads
'datastore' : {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
#'ENGINE': '', # Empty ENGINE name disables
'NAME': 'geonode_data',
'USER' : 'geonode',
'PASSWORD' : 'geonode',
'HOST' : 'localhost',
'PORT' : '5432',
}
}

# OGC (WMS/WFS/WCS) Server Settings
OGC_SERVER = {
'default' : {
'BACKEND' : 'geonode.geoserver',
'LOCATION' : 'http://localhost/geoserver/',
'PUBLIC_LOCATION' : 'http://localhost/geoserver/',
'USER' : 'admin',
'PASSWORD' : 'geoserver',
'MAPFISH_PRINT_ENABLED' : True,
'PRINT_NG_ENABLED' : True,
'GEONODE_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 name of database in DATABASES dictionary to enable
'DATASTORE': 'datastore', #'datastore',
}
}

CATALOGUE = {
'default': {
# The underlying CSW implementation
# default is pycsw in local mode (tied directly to GeoNode Django DB)
'ENGINE': 'geonode.catalogue.backends.pycsw_local',
# pycsw in non-local mode
# 'ENGINE': 'geonode.catalogue.backends.pycsw_http',
# GeoNetwork opensource
# 'ENGINE': 'geonode.catalogue.backends.geonetwork',
# deegree and others
# 'ENGINE': 'geonode.catalogue.backends.generic',

# The FULLY QUALIFIED base url to the CSW instance for this GeoNode
'URL': '%scatalogue/csw' % SITEURL,
# 'URL': 'http://localhost:8080/geonetwork/srv/en/csw',
# 'URL': 'http://localhost:8080/deegree-csw-demo-3.0.4/services',

# login credentials (for GeoNetwork)
'USER': 'admin',
'PASSWORD': 'admin',
}
}

# Default preview library
#LAYER_PREVIEW_LIBRARY = 'geoext'

Initialize the Database
=======================

We' ve already setup GeoNode databases and user permissions for PostgreSQL. And
instruct GeoNode on how to access the database. Now let's get the database ready
running the following::

cd /home/geonode/geonode
python manage.py migrate
python manage.py loaddata geonode/base/fixtures/initial_data.json

If you get an error message it is likely that database access is not set properly.
Check you pg_hba.conf file and GeoNode `local_settings.py` file. Remember to restart
PostgreSQL to make any changes to pg_hba.conf effective.

Test that you are able to connect to the database as follows::

psql -U geonode geonode

and::

psql -U geonode geonode_data

Create GeoNode Superuser
========================

Now create the admin user for GeoNode running the following::

python manage.py createsuperuser

You will be prompted for the username, email address and password for the user
In previous sections you' ve setup all the applications we need to run GeoNode.

Test the installation
=====================

We are ready to restart GeoNode (Apache) and test the installation.
Restart Apache::
Restart Apache

sudo service apache2 restart
.. code-block:: bash

$ sudo service apache2 restart

Open the browser and navigate to http://localhost/

Expand All @@ -213,10 +38,6 @@ Now open the main menu and click on `GeoServer`
You will be redirected to GeoServer user interface. You will automatically be
logged in as administrator in GeoServer.

.. note::
If you connect to GeoNode as administrator for the first time , you will need to connect to
GeoServer manually (The default credentials are: user:admin, password:geoserver).

.. image:: img/geoserver_admin.png
:width: 600px
:alt: GeoServer Admin
Loading

0 comments on commit b8b674b

Please sign in to comment.