1 GeoNode Update
Luis Guzman edited this page 2020-04-23 15:40:54 -05:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Using the source installer we can keep updating tracking the latest commits from the branch we are using.

Git

You can choose to manage the lastest updates as it serves better to your usage, fetch and merge, cherry-pick or by a plain and simple pull.

For simplicity purpose we'll go with git pull.

Geonode Repository

The standard Geonode repository for this installer is,

/opt/geonode

Collect static

The staticfiles app collects static files from each of your applications (and any other places you specify) into a single location that can easily be served in production.

Let's say someone updates a less file and created a new build of our styles you might need to run collectstatic

Migrations

Migrations are Djangos way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema, if some of the latest changes some model has changed then migration is necessary.

Update steps

Login and move to the repository directory and activate the venv,

su geonode

cd /opt/geonode/
workon geonode

Here you can use your preferred git strategy, for simplicity we'll fallback to git pull,

git pull

We'll run django updates all the time in order to avoid missing out some change that could impact one or the other on the latest commits,

python manage.py collectstatic --no-input

python manage.py makemigrations
python manage.py migrate

Restart uWSGI service

sudo service uwsgi restart