<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi to all,<br>
after few week of researching and struggling we have finally manage to upgrade GN from version 2.10rc4 to version 2.10.1.<br>
Here is procedure:<br>
<br>
1) On the old GN 2.10rc4 tar and backup all volumes (_data folders in the path /var/lib/docker/volumes/)<br>
2) With pgadmin (my vrsion is 4.15) backup geonode and geonode_data databases with default Dump_options<br>
3) shutdown old GN 2.10rc4<br>
4) Install fresh GN 2.10.1 master branch from strech (with the same IP/hostname as old GN 2.10rc4):<br>
<a class="moz-txt-link-freetext" href="http://docs.geonode.org/en/2.8.1/tutorials/install_and_admin/running_docker/setup_docker.html">http://docs.geonode.org/en/2.8.1/tutorials/install_and_admin/running_docker/setup_docker.html</a><br>
5) docker-compose stop<br>
docker start db4geonode<br>
6) restore all backuped volumes (see 1.) to the same path: /var/lib/docker/volumes/ and same rights and ownerships<br>
7) drop, create, create extensions and grants to databases: geonode and geonode_data<br>
sudo docker exec -it db4geonode bash<br>
psql -U postgres<br>
DROP DATABASE geonode;<br>
DROP DATABASE geonode_data;<br>
CREATE DATABASE geonode; <br>
CREATE DATABASE geonode_data;<br>
exit<br>
$ psql -U postgres -d geonode -c "CREATE EXTENSION postgis;"<br>
$ psql -U postgres -d geonode -c "CREATE EXTENSION postgis_topology;"<br>
$ psql -U postgres -d geonode_data -c "CREATE EXTENSION postgis;"<br>
$ psql -U postgres -d geonode_data -c "CREATE EXTENSION postgis_topology;"<br>
with pgadmin give Grants: geonode -> Properties -> Security ... postgres: CTc; PUBLIC: Tc; geonode: CTc
<br>
with pgadmin give Grants: geonode_data -> Properties -> Security ... postgres: CTc; PUBLIC: Tc; geonode_data: CTc
<br>
8) restore databases geonode and geonode_data<br>
with pgadmin go on database geonode -> Restore, choose backup file you created in 2., leave Restore_options default -> Restore<br>
with pgadmin go on database geonode_data -> Restore, choose backup file you created in 2., leave Restore_options default -> Restore<br>
9) $ docker-compose restart<br>
10) use this updatelayers command (inside django container):<br>
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<br>
11) Enjoy :)<br>
<br>
regards,<br>
Dejan.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 10.10.2019 3:28 PM, Dejan Samardzic wrote:<br>
</div>
<blockquote type="cite" cite="mid:ef2df286-4147-0374-6aeb-795e67b327ee@cedis.me">
Dear Geonode communittee,<br>
I'm trying (for days) to upgrade Geonode stack (Ubuntu 18.04, docker, Geonode version 2.10rc4).<br>
I have try:<br>
<br>
1) <b>To upgrade from version 2.10rc4 to version 2.10.1</b><br>
A have done the following:<br>
docker-compose stop<br>
sudo su<br>
cd /home/geo/geonode<br>
git fetch --all<br>
git reset --hard origin/2.10.x # to override local custom changes <br>
exit<br>
docker-compose stop<br>
docker-compose -f docker-compose.yml -f docker-compose.override.razvojgis.cedis.me.yml up --build -d<br>
After that I don't see celery4geonode, rabbitmq4geonode, elasticsearch4geonode containers anymore, is it normal?<br>
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)<br>
I have backup/restore database by instruction:<br>
<a class="moz-txt-link-freetext" href="https://peter.grman.at/upgrade-postgres-9-container-to-10/" moz-do-not-send="true">https://peter.grman.at/upgrade-postgres-9-container-to-10/</a><br>
Now all containers are UP. <br>
But I can't log into geonode because Session expire as soon as I login:<br>
<a href="https://github.com/GeoNode/geonode-project/issues/78" moz-do-not-send="true">https://github.com/GeoNode/geonode-project/issues/78</a><br>
I have try (from within django container): paver sync<br>
but receive an error:<br>
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<br>
<br>
2) <b>To upgrade from version 2.10rc4 to 2.10rc5</b><br>
A have done the following:<br>
docker-compose stop<br>
sudo su<br>
cd /home/geo/geonode<br>
git fetch --all<br>
git reset --hard 2.10rc5 # to override local custom changes <br>
exit<br>
docker-compose stop<br>
docker-compose -f docker-compose.yml -f docker-compose.override.razvojgis.cedis.me.yml up --build -d<br>
I receive an error:<br>
Step 2/9 : MAINTAINER GeoNode development team<br>
ERROR: Service 'django' failed to build: cannot mount volume over existing file, file exists /var/lib/docker/overlay2/7908c8f1440db6419532cd644388373a82bd645c540bdafc68e95c255836ad6e/merged/run/docker.sock<br>
<br>
How to upgrade my Geonode stack ?<br>
<br>
regards,<br>
Dejan.<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Language" content="en-us">
<title></title>
<style>
</style>
<p> </p>
<p></p>
<table style="border-collapse: collapse" width="490" cellspacing="0" cellpadding="0" bordercolor="#111111" border="0">
<tbody>
<tr>
<td style="border-bottom-style: solid;
border-bottom-width: 1" width="630" align="center">
<b><font size="2" face="Verdana"> Dejan Samardžić</font></b></td>
<td style="border-bottom-style: solid;
border-bottom-width: 1" width="954" align="left">
<font size="2" face="Verdana"><span>Rukovodilac Sektora za ICT / IT Manager</span></font></td>
</tr>
<tr>
<td valign="top" align="center"><br>
<img src="cid:part3.A5444E7A.D2DD4321@cedis.me" class=""> </td>
<td style="border-top-style: solid; border-top-width: 1" width="254" valign="top">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td colspan="2" style="font-size:8.0pt;font-family:Verdana">CEDIS d.o.o. </td>
</tr>
<tr>
<td colspan="2" style="font-size: 8.0pt;
font-family: Verdana">
Ivana Milutinovića 12, 81000 Podgorica </td>
</tr>
<tr>
<td width="40"><span style="font-size:8.0pt;font-family:Verdana">gsm:</span></td>
<td width="205"><span style="font-size:8.0pt;font-family:Verdana">+382 67 220 971</span></td>
</tr>
<tr>
<td width="40"><span style="font-size:8.0pt;font-family:Verdana">tel:</span></td>
<td width="205"><span style="font-size:8.0pt;font-family:Verdana">+382 20 408 453</span></td>
</tr>
<tr>
<td><span style="font-size:8.0pt;font-family:Verdana">email:</span></td>
<td><span style="font-size:8.0pt;font-family:Verdana"><a href="mailto:dejan.samardzic@cedis.me" moz-do-not-send="true">dejan.samardzic@cedis.me</a></span></td>
</tr>
<tr>
<td><span style="font-size:8.0pt;font-family:Verdana">web:</span></td>
<td><span style="font-size:8.0pt;font-family:Verdana"><a href="http://www.cedis.me" moz-do-not-send="true">www.cedis.me</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> </p>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Language" content="en-us">
<title></title>
<style>
</style>
<p> </p>
<p></p>
<table style="border-collapse: collapse" width="490" cellspacing="0" cellpadding="0" bordercolor="#111111" border="0">
<tbody>
<tr>
<td style="border-bottom-style: solid; border-bottom-width:
1" width="630" align="center">
<b><font size="2" face="Verdana"> Dejan Samardžić</font></b></td>
<td style="border-bottom-style: solid; border-bottom-width:
1" width="954" align="left">
<font size="2" face="Verdana"><span>Rukovodilac Sektora za ICT / IT Manager</span></font></td>
</tr>
<tr>
<td valign="top" align="center"><br>
<img src="cid:part3.A5444E7A.D2DD4321@cedis.me"> </td>
<td style="border-top-style: solid; border-top-width: 1" width="254" valign="top">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td colspan="2" style="font-size:8.0pt;font-family:Verdana">CEDIS d.o.o. </td>
</tr>
<tr>
<td colspan="2" style="font-size: 8.0pt;
font-family: Verdana">
Ivana Milutinovića 12, 81000 Podgorica </td>
</tr>
<tr>
<td width="40"><span style="font-size:8.0pt;font-family:Verdana">gsm:</span></td>
<td width="205"><span style="font-size:8.0pt;font-family:Verdana">+382 67 220 971</span></td>
</tr>
<tr>
<td width="40"><span style="font-size:8.0pt;font-family:Verdana">tel:</span></td>
<td width="205"><span style="font-size:8.0pt;font-family:Verdana">+382 20 408 453</span></td>
</tr>
<tr>
<td><span style="font-size:8.0pt;font-family:Verdana">email:</span></td>
<td><span style="font-size:8.0pt;font-family:Verdana"><a href="mailto:dejan.samardzic@cedis.me">dejan.samardzic@cedis.me</a></span></td>
</tr>
<tr>
<td><span style="font-size:8.0pt;font-family:Verdana">web:</span></td>
<td><span style="font-size:8.0pt;font-family:Verdana"><a href="http://www.cedis.me">www.cedis.me</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> </p>
</div>
</body>
</html>