[GeoNode-users] Geonode Upgrade

Dejan Samardzic dejan.samardzic at cedis.me
Sun Oct 20 23:07:01 PDT 2019


Hi to all,
after few week of researching and struggling we have finally manage to upgrade GN from version 2.10rc4 to version 2.10.1.
Here is procedure:

1) On the old GN 2.10rc4 tar and backup all volumes (_data folders in the path /var/lib/docker/volumes/)
2) With pgadmin (my vrsion is 4.15) backup geonode and geonode_data databases with default Dump_options
3) shutdown old GN 2.10rc4
4) Install fresh GN 2.10.1 master branch from strech (with the same IP/hostname as old GN 2.10rc4):
http://docs.geonode.org/en/2.8.1/tutorials/install_and_admin/running_docker/setup_docker.html
5) docker-compose stop
docker start db4geonode
6) restore all backuped volumes (see 1.) to the same path: /var/lib/docker/volumes/ and same rights and ownerships
7) drop, create, create extensions and grants to databases: geonode and geonode_data
sudo docker exec -it db4geonode bash
psql -U postgres
DROP DATABASE geonode;
DROP DATABASE geonode_data;
CREATE DATABASE geonode;
CREATE DATABASE geonode_data;
exit
$ psql -U postgres -d geonode -c "CREATE EXTENSION postgis;"
$ psql -U postgres -d geonode -c "CREATE EXTENSION postgis_topology;"
$ psql -U postgres -d geonode_data -c "CREATE EXTENSION postgis;"
$ psql -U postgres -d geonode_data -c "CREATE EXTENSION postgis_topology;"
with pgadmin give Grants: geonode -> Properties -> Security ... postgres: CTc; PUBLIC: Tc; geonode: CTc
with pgadmin give Grants: geonode_data -> Properties -> Security ... postgres: CTc; PUBLIC: Tc; geonode_data: CTc
8) restore databases geonode and geonode_data
with pgadmin go on database geonode -> Restore, choose backup file you created in 2., leave Restore_options default -> Restore
with pgadmin go on database geonode_data -> Restore, choose backup file you created in 2., leave Restore_options default -> Restore
9) $ docker-compose restart
10) use this updatelayers command (inside django container):
source $HOME/.override_env; echo DATABASE_URL=$DATABASE_URL; echo GEODATABASE_URL=$GEODATABASE_URL; echo SITEURL=$SITEURL; echo ALLOWED_HOSTS=$ALLOWED_HOSTS; echo GEOSERVER_PUBLIC_LOCATION=$GEOSERVER_PUBLIC_LOCATION; django-admin updatelayers -w geonode
11) Enjoy :)

regards,
Dejan.










On 10.10.2019 3:28 PM, Dejan Samardzic wrote:
Dear Geonode communittee,
I'm trying (for days) to upgrade Geonode stack (Ubuntu 18.04, docker, Geonode version 2.10rc4).
I have try:

1) To upgrade from version 2.10rc4 to version 2.10.1
A have done the following:
docker-compose stop
sudo su
cd /home/geo/geonode
git fetch --all
git reset --hard origin/2.10.x   # to override local custom changes
exit
docker-compose stop
docker-compose -f docker-compose.yml -f docker-compose.override.razvojgis.cedis.me.yml up --build -d
After that I don't see celery4geonode,  rabbitmq4geonode, elasticsearch4geonode containers anymore, is it normal?
As db4geonode can't bring up (error: DETAIL: The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.6)
I have backup/restore database by instruction:
https://peter.grman.at/upgrade-postgres-9-container-to-10/
Now all containers are UP.
But I can't log into geonode because Session expire as soon as I login:
https://github.com/GeoNode/geonode-project/issues/78
I have try (from within django container): paver sync
but receive an error:
django.db.utils.IntegrityError: Problem installing fixture '/usr/src/app/geonode/people/fixtures/sample_admin.json': Could not load people.Profile(pk=1000): UNIQUE constraint failed: people_profile.username

2) To upgrade from version 2.10rc4 to 2.10rc5
A have done the following:
docker-compose stop
sudo su
cd /home/geo/geonode
git fetch --all
git reset --hard 2.10rc5   # to override local custom changes
exit
docker-compose stop
docker-compose -f docker-compose.yml -f docker-compose.override.razvojgis.cedis.me.yml up --build -d
I receive an error:
Step 2/9 : MAINTAINER GeoNode development team
ERROR: Service 'django' failed to build: cannot mount volume over existing file, file exists /var/lib/docker/overlay2/7908c8f1440db6419532cd644388373a82bd645c540bdafc68e95c255836ad6e/merged/run/docker.sock

How to upgrade my Geonode stack ?

regards,
Dejan.
--



 Dejan Samardžić        Rukovodilac Sektora za ICT / IT Manager

[cid:part3.A5444E7A.D2DD4321 at cedis.me]
CEDIS d.o.o.
Ivana Milutinovića 12, 81000 Podgorica
gsm:    +382 67 220 971
tel:    +382 20 408 453
email:  dejan.samardzic at cedis.me<mailto:dejan.samardzic at cedis.me>
web:    www.cedis.me<http://www.cedis.me>



--



 Dejan Samardžić        Rukovodilac Sektora za ICT / IT Manager

[cid:part3.A5444E7A.D2DD4321 at cedis.me]
CEDIS d.o.o.
Ivana Milutinovića 12, 81000 Podgorica
gsm:    +382 67 220 971
tel:    +382 20 408 453
email:  dejan.samardzic at cedis.me<mailto:dejan.samardzic at cedis.me>
web:    www.cedis.me<http://www.cedis.me>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20191021/9c03ff1f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1641 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20191021/9c03ff1f/attachment.jpg>


More information about the geonode-users mailing list