Skip to content

Commit faef3ed

Browse files
committed
Merge branch 'master' into porting-docker
2 parents 4ead9e7 + 5e9454d commit faef3ed

34 files changed

+920
-170
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pip-log.txt
77
MANIFEST
88
dist
99
.idea/
10+
.vscode/
1011
# supporting stuff pulled in by paver script
1112
geonode/development.db
1213
/geoserver/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ notifications:
8888
- "irc.freenode.org#geonode"
8989
use_notice: true
9090
email:
91-
- geonode-dev@boundlessgeo.com
91+
- alessio.fabiani@gmail.com
9292
- ingenieroariel@gmail.com
9393
- simone.dalmasso@gmail.com
9494
slack: geonode-sprint:oQylJRkU9feZ8JruGi6czWwe

docs/tutorials/admin/monitoring/index.txt

Lines changed: 98 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,107 @@ Base concepts and objects
4242
Installation
4343
~~~~~~~~~~~~
4444

45-
* enable ``MONITORING_ENABLED`` flag
46-
* ensure that following code is in your settings:
45+
.. warning:: This plugin requires a Potgresql DB backend enabled
46+
47+
* ensure ``UTC`` Timezone to your DB
48+
49+
.. code:: python
50+
51+
psql -c 'set timezone=UTC;'
52+
53+
* enable ``MONITORING_ENABLED`` flag and ensure that following code is in your settings:
54+
55+
.. code:: python
56+
57+
CORS_ORIGIN_ALLOW_ALL = True
58+
59+
MONITORING_ENABLED = True
60+
# add following lines to your local settings to enable monitoring
61+
if MONITORING_ENABLED:
62+
INSTALLED_APPS += ('geonode.contrib.monitoring',)
63+
MIDDLEWARE_CLASSES += ('geonode.contrib.monitoring.middleware.MonitoringMiddleware',)
64+
MONITORING_CONFIG = None
65+
MONITORING_HOST_NAME = 'localhost'
66+
MONITORING_SERVICE_NAME = 'local-geonode'
67+
MONITORING_HOST_NAME = SITE_HOST_NAME
68+
69+
INSTALLED_APPS += ('geonode.contrib.ows_api',)
70+
71+
GEOIP_PATH = os.path.join(os.path.dirname(__file__), '..', 'GeoLiteCity.dat')
72+
73+
* run ``DJANGO_SETTINGS_MODULE=<project_name>.settings python manage.py migrate monitoring`` to apply db schema changes and insert initial data
74+
* run ``DJANGO_SETTINGS_MODULE=<project_name>.settings python manage.py updategeoip`` to fetch MaxMind's GeoIP database file. It will be written to path specified by `GEOIP_PATH` setting.
75+
* run ``DJANGO_SETTINGS_MODULE=<project_name>.settings python manage.py collect_metrics -n -t xml -f --since='<yyyy-mm-dd HH:mm:ss>'`` to create first metrics.
76+
77+
.. warning::
78+
79+
Replace ``<yyyy-mm-dd HH:mm:ss>`` with a real date time to start with.
80+
81+
* update ``Sites`` from admin; make sure it contains a correct host name
82+
* do not forget to enable notifications and configure them from user profile
83+
84+
Enable the collect_metrics ``cron``
85+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86+
87+
.. warning:: Here below you will find instructions for a Ubuntu 16.04 based machine, but the procedure is similar for other OSs. The basic concept is that you must allow the system to run the command ``DJANGO_SETTINGS_MODULE=<project_name>.settings python manage.py collect_metrics -n -t xml`` (**without -f and since**) every minute.
88+
89+
cront job
90+
^^^^^^^^^
91+
92+
.. code:: python
93+
94+
sudo crontab -e
95+
96+
.. code:: python
97+
98+
# Add the following line at the bottom; this will run the supervisor command every minute
99+
* * * * * supervisorctl start geonode-monitoring
100+
101+
supervisor
102+
^^^^^^^^^^
103+
104+
.. code:: python
105+
106+
sudo apt install supervisor
107+
sudo service supervisor restart
108+
sudo update-rc.d supervisor enable
47109

48110
.. code:: python
49111

50-
MONITORING_ENABLED = True
51-
# add following lines to your local settings to enable monitoring
52-
if MONITORING_ENABLED:
53-
INSTALLED_APPS += ('geonode.contrib.monitoring',)
54-
MIDDLEWARE_CLASSES += ('geonode.contrib.monitoring.middleware.MonitoringMiddleware',)
55-
MONITORING_SERVICE_NAME = 'local-system-geonode' # or other name for your main geonode instance Service
56-
NOTIFICATION_ENABLED = True
57-
58-
* run ``manage.py migrate monitoring`` to apply db schema changes and insert initial data
59-
* run ``manage.py updategeoip`` to fetch MaxMind's GeoIP database file. It will be written to path specified by `GEOIP_PATH` setting.
60-
* add ``manage.py collect_metrics`` call to crontab.
112+
sudo vim /etc/supervisor/conf.d/geonode-monitoring.conf
113+
114+
.. code:: python
115+
116+
[program:geonode-monitoring]
117+
command=<path_to_virtualenv>/geonode/bin/python -W ignore <path_to_your_project>/geonode/manage.py collect_metrics -n -t xml
118+
directory = <path_to_your_project>
119+
environment=DJANGO_SETTINGS_MODULE="<your_project>.settings"
120+
user=<your_user>
121+
numproc=1
122+
stdout_logfile=/var/log/geonode-celery.log
123+
stderr_logfile=/var/log/geonode-celery.log
124+
autostart = true
125+
autorestart = true
126+
startsecs = 10
127+
stopwaitsecs = 600
128+
priority = 998
129+
130+
.. code:: python
131+
132+
sudo service supervisor restart
133+
sudo supervisorctl start geonode-monitoring
134+
sudo supervisorctl status geonode-monitoring
135+
136+
.. code:: python
137+
138+
sudo vim /etc/hosts
139+
140+
.. code:: python
141+
142+
127.0.0.1 localhost
143+
<public_ip> <your_host.your_domain> <your_host>
144+
145+
# The following lines are desirable for IPv6 capable hosts
61146

62147
Configuration
63148
~~~~~~~~~~~~~

docs/tutorials/install_and_admin/index.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ At the end of this section you will be able to setup from scratch the whole GeoN
2828
quick_install
2929
linux_admin_intro/index
3030
running_ansible
31+
running_docker/index
3132
vm_setup_virtualbox
3233
vm_running_vagrant
3334
geonode_install/index
@@ -41,6 +42,9 @@ At the end of this section you will be able to setup from scratch the whole GeoN
4142
:ref:`linux_admin_intro`
4243
This section describes how to setup a Virtual Machine running Ubuntu.
4344

45+
:ref:`running_docker`
46+
This section describes how to setup GeoNode on Docker
47+
4448
:ref:`geonode_install`
4549
This section will guide the user through the steps necessary to install GeoNode on Ubuntu.
4650

@@ -51,6 +55,7 @@ At the end of this section you will be able to setup from scratch the whole GeoN
5155

5256
:ref:`win_binary_installer`
5357
Install GeoNode on Windows through the binary installer.
58+
5459
:ref:`network_configuration_issues`
5560
This section will guide the user through the steps necessary to understand and possibly solve any of the most common configuration issues on communication between Django and GeoServer.
5661

Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)