Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #2401: GNIP: GeoNode Backup and Restore #2651

Merged
merged 2 commits into from
Sep 29, 2016

Conversation

afabiani
Copy link
Member

@afabiani afabiani commented Sep 9, 2016

GeoNode Backup and Restore Management Commands

@@ -0,0 +1,200 @@
#########################################################################
#
# Copyright (C) 2016 OpenPlans
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets change these to OSGeo now

@ingenieroariel
Copy link
Member

Thanks @afabiani for this!.

My suggestion is to have one person try it at least from 2.4 final to another fresh 2.4 final and from 2.4 final to 2.5 latest and share with us a screen capture of how it works before merging it. @waybarrios could you help with that?

@waybarrios
Copy link
Contributor

@ingenieroariel I can help you with that! If I have troubles or comments, I'll let you know as soon as possible

@afabiani
Copy link
Member Author

If you need we setup a public test machine at 188.165.62.190

If you need access please contact me privately.

Best Regards,
Alessio Fabiani.

GeoServer Professional Services from the experts!

Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.


On Mon, Sep 12, 2016 at 4:54 PM, Way Barrios [email protected]
wrote:

@ingenieroariel https://github.com/ingenieroariel I can help you with
that! If I have troubles or comments, I'll let you know as soon as possible


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2651 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABOARdlZ4cyQY8j4SjHawCzt9qia7ddNks5qpWe8gaJpZM4J46QL
.

@waybarrios
Copy link
Contributor

@afabiani Of course! Thank you

@afabiani
Copy link
Member Author

Hi Way, please ask for access at 188.165.62.190 to Alessandro Parma <
[email protected]>

You will receive both ssh access and geonode credentials.

About the backup and restore commands, for now it is possible to execute
them only through the managemend command via shell:

  1. Login into the machine
  2. Go to -> cd /home/geonode/geonode/

Backup command:

python manage.py backup --backup-dir=/tmp/

at the end of the backup a new archive will be created automatically. The
command line will tell you which is the full path of the archive

Restore command:

*sudo *python manage.py restore --backup-file=/tmp/2016-09-14_032126.zip

WARNING:
When performing those commands

  1. The backend (DB or whatever) is accessible and you have rights
  2. The GeoServer is up and running and reachable from this machine

WARNING: The restore will overwrite ALL GeoNode data and GeoServer
configuration.

Best Regards,
Alessio Fabiani.

GeoServer Professional Services from the experts!

Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.


On Wed, Sep 14, 2016 at 3:58 AM, Way Barrios [email protected]
wrote:

@afabiani https://github.com/afabiani Of course! Thank you


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2651 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABOARaljL7OGG1Tp36ufn6A294wUm-1Wks5qp1TKgaJpZM4J46QL
.

@afabiani
Copy link
Member Author

A small add to this.

On a new setup the step 0 is to take a look at this very easy and straight
forward configuration file

geonode/base/management/commands/settings.ini

full path on the test machine

/home/geonode/geonode/geonode/base/management/commands/settings.ini

Best Regards,
Alessio Fabiani.

GeoServer Professional Services from the experts!

Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.


On Wed, Sep 14, 2016 at 10:24 AM, Alessio Fabiani <
[email protected]> wrote:

Hi Way, please ask for access at 188.165.62.190 to Alessandro Parma <
[email protected]>

You will receive both ssh access and geonode credentials.

About the backup and restore commands, for now it is possible to execute
them only through the managemend command via shell:

  1. Login into the machine
  2. Go to -> cd /home/geonode/geonode/

Backup command:

python manage.py backup --backup-dir=/tmp/

at the end of the backup a new archive will be created automatically. The
command line will tell you which is the full path of the archive

Restore command:

*sudo *python manage.py restore --backup-file=/tmp/2016-09-14_032126.zip

WARNING:
When performing those commands

  1. The backend (DB or whatever) is accessible and you have rights
  2. The GeoServer is up and running and reachable from this machine

WARNING: The restore will overwrite ALL GeoNode data and GeoServer
configuration.

Best Regards,
Alessio Fabiani.

GeoServer Professional Services from the experts!

Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.


On Wed, Sep 14, 2016 at 3:58 AM, Way Barrios [email protected]
wrote:

@afabiani https://github.com/afabiani Of course! Thank you


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2651 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABOARaljL7OGG1Tp36ufn6A294wUm-1Wks5qp1TKgaJpZM4J46QL
.

@waybarrios
Copy link
Contributor

@ingenieroariel Until now, I tried to backup a geonode with layers using as reference geo-solutions server.

Backup process:
test1

When I did the backup, a zip file was created which contains json files with layers, maps, docs, and accounts info. It also has static folder, template folder and geoserver data. You can see the following screenshot:
test3

After that, it merged all data to new fresh geonode!.

@jj0hns0n
Copy link
Member

jj0hns0n commented Sep 14, 2016 via email

@waybarrios
Copy link
Contributor

@jj0hns0n I will do!

What I can show now, it is the restore process by screen capture. It restored San Andres and Providence Layer (same layer that I used before). I also loaded previous information.

resto1

@afabiani afabiani force-pushed the backup_restore_pr branch 2 times, most recently from 844c14e to 8eb165f Compare September 15, 2016 14:47
@afabiani
Copy link
Member Author

Just added a basic Admin Gui for the backups

image

image

@afabiani
Copy link
Member Author

image

Copy link
Member

@jj0hns0n jj0hns0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some specific comments, but am +1 to merge as is and these can be addressed later.

@afabiani afabiani force-pushed the backup_restore_pr branch 4 times, most recently from 73e8ab5 to de4c062 Compare September 19, 2016 13:55
@afabiani
Copy link
Member Author

Added Documentation to Admin docs for Backup & Restore.

GeoServer full documentation is also available here

http://docs.geoserver.org/latest/en/user/community/backuprestore/index.html

 - GeoServer Vectorial/Raster Data Full Backup&Restore

 - Backup & Restore Admin Page

 Bakup&Restore Admin Gui migrations

 - Document headers

 - Backup&Restore PR logging and minor fixes

 - fix migration issue

 - Backup & Restore Documentation

 - Minot update Backup & Restore docs
@jj0hns0n
Copy link
Member

I'd like to request that all the core devs review this PR and use GitHub's
new pull request reviews feature to weigh in.

@ingenieroariel @caooti @simod @garnertb @ppasq @tomkralidis @BerryDaniel
@sarasafavi etc

On Mon, Sep 19, 2016 at 6:58 AM, Alessio Fabiani [email protected]
wrote:

Added Documentation to Admin docs for Backup & Restore.

GeoServer full documentation is also available here

http://docs.geoserver.org/latest/en/user/community/
backuprestore/index.html


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2651 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAe43vrTkqn7dLN6pQspZ5nkNuC3MG58ks5qrpT0gaJpZM4J46QL
.

target_folder = os.path.join(backup_dir, dir_time_suffix)
if not os.path.exists(target_folder):
os.makedirs(target_folder)
os.chmod(target_folder, 0777)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

777 is always a bad idea

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll change it. Thanks for suggesting.

@@ -64,7 +64,7 @@ class ContactRole(models.Model):
"""
ContactRole is an intermediate model to bind Profiles as Contacts to Resources and apply roles.
"""
resource = models.ForeignKey('ResourceBase')
resource = models.ForeignKey('ResourceBase', blank=True, null=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change here to avoid errors during restore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeps. Currently GeoNode has a hierarchical model and there is no way to allow it recognize that a Layer is "also" a resourcebase by using fixtures. Unfortunately this is a core issue of DJango and I honestly did not found any solution except relaxing the model.

@@ -804,7 +822,7 @@ class Link(models.Model):
* OGC:WFS: for WFS service links
* OGC:WCS: for WCS service links
"""
resource = models.ForeignKey(ResourceBase)
resource = models.ForeignKey(ResourceBase, blank=True, null=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

It is worth notice that this change does not impact GeoNode at all.

@afabiani
Copy link
Member Author

Hi all, @jj0hns0n how about the review? Can we move forward with this?

@jj0hns0n jj0hns0n merged commit f5f89ba into GeoNode:master Sep 29, 2016
milafrerichs added a commit to milafrerichs/geonode that referenced this pull request Nov 14, 2016
*  - Restoring missing parts of the docs
*  - update ext pakages versions

* Lock in version of gsconfig

Lock in the version until issue GeoNode#2544 is resolved

* gsconfig now utilizes an attribution dictionary and bumped to newest version

*  - update geonode exts version in order to fix pavement sync db

* README: fix syntax error

Heading "Docker Usage" was not rendered correctly.

* ol3-preview

* keep geoext as default

* Missing quotation mark

* Add support for EPSG:4326

* bump user-messages

* don't assume 'geoserver' in style url management

* tiles_url should be a XYZ source

* set_metadata returns four variables, which was causing an error of too many values to unpack

* 'name' no longer a ContentType field in Django 1.8+

* Added handling of postgres backed geogig stores

* fix layer style dropdown values

* Default to public schema if not defined

* added exception handler for when multiple legends are returned

* just update the tiles link url if needed, this will respect any changes to the url made by other apps like contrib.mp

* register models for actstream 0.5+ / Django 1.8+

* re enable publish as layer group

* adjusted text and html metadata links in the templates for documents and layers

* Changes in manual installation docs (GeoNode#2561)

minor changes in docs

* fix layer group endpoint

* fix for port changes: can't concatenate str & int

* check if layerfile_set exists

* Refactor to align with updated PG Geogig plugin: calls the plugin only to create the geogig repo, and calls gsconfig to create the datastore

* fix client/server handling for multi-file upload/import by storing the upload id in the session

* use .get explicitly instead of .all().filter(...)[0]

* use elif with mutually exclusive comparisons

* Invalidate layer in GeoWebCache after style_update PUT/POST

* send content-type:text/xml header

* use str.join() properly

* fix status code check

* update url for cache refresh

* prevent auto redirect when additional information is required.

* bump gsconfig to 1.0.6

*  - Paver setup_geoserver using the new 2.9.x

*  - remove layer_is FK constraints from layer_styles migrations

* Added documentation for configuring an AWS S3 Bucket with GeoNode

*  - test travis script with Java 8 (GeoNode#2584)

- test travis script with Java 8

 - test travis script with Java 8

* Adding instructions to add windows dependencies

* Adding gdal environment variables

* Update README

* Update README

* Update README

* Revert " - remove layer_is FK constraints from layer_styles migrations"

This reverts commit ea2b292.

* fix broken og:image link in meta tag in head

* fix exception during renders of admin forms using autocomplete_light

* change LayerStyles related name to snake_case

* Create new CONTRIBUTING file

Using CLAHub and OSGeo CLA

* restructure get_context_resourcetype for clarity

* add profiles & groups autocomplete config

* Groups have titles, not names

* Docker for development (GeoNode#2593)

* Refactor to align with updated PG Geogig plugin: calls the plugin only to create the geogig repo, and calls gsconfig to create the datastore

* prevent auto redirect when additional information is required.

* bump gsconfig to 1.0.6

*  - Paver setup_geoserver using the new 2.9.x

*  - remove layer_is FK constraints from layer_styles migrations

* Added documentation for configuring an AWS S3 Bucket with GeoNode

* fix broken og:image link in meta tag in head

* Revert " - remove layer_is FK constraints from layer_styles migrations"

This reverts commit ea2b292.

*  - test travis script with Java 8 (GeoNode#2584)

- test travis script with Java 8

 - test travis script with Java 8

* No specific versions in setup.py, only minimum

* Bump version to start 2.5 cycle

* Use published image for development

* Added docker-compose and docker-compose.override

* Pinned requirements

* Pull image in deployment, build image in development

* Makefile for tasks

* Added pull target

* Avoid autocompletelight 3

* Switch to 'latest' geonode/docker

* Requirements from travis

* Downgrade requirements

* Use requirements file

* Don't use project_name

* Use specific docker images

* s/genode/geonode

* Use geoserver latest

* Use latest tag for nginx

* Fix migration problems

* Use run instead of exec

* Fix requirements.txt

* Revert "Fix migration problems"

This reverts commit aa33ce6.

* Fix httplib version

* Fix tests

* Call docker-django from latest

* Use geonode/django in celery too (GeoNode#2594)

* make test works in docker (GeoNode#2595)

* Add context-specific search to /groups page

Templates that were originally built for ResourceBase-type content are
being overridden here for group objects (e.g., _group_search_content.html)

* groups do not have date or popular_count fields

* let custom search_content template work for both profiles & groups

* Custom sort filters depending on data type

* Add context-specific search (filtering by username) within /people

* if searching from /people context, use username instead of title

* url fix in README

* add name to AUTHORS

* geonode-user-accounts 1.0.13 (GeoNode#2603)

* Fix for issue 2599. The issue was that apache was allowing directory browsing. Added the options directive to remove it from the current list of options enforced for that directory.

* Use environment variables in settings.py (GeoNode#2596)

* Missing migrations (GeoNode#2604)

* geonode-user-accounts 1.0.13

* Missing migrations

* pep8 for migrations

* pep8

* Updated readme for docker (GeoNode#2607)

* Using docker images from hub

*  - (issue GeoNode#2070) Layer name cannot be a style name already on Geoserver

*  - (issue GeoNode#2075) Add lxml back into paver win_install_deps

* adding missing trans for GeoNode#1769

* sycing tsf

* use layer instance to revoke layer permissions, fixes GeoNode#2531 (GeoNode#2614)

use layer instance instead of resourcebase to revoke permission, fixes GeoNode#2531

* include data files in downstream installations should fix GeoNode#2452 (GeoNode#2615)

include data files in downstream installations should fix GeoNode#2452

* - Modify some settings and code to make geonode able to use QGIS Server as backend.
- Add some views, templates and resources to make geonode able to use QGIS Server as backend.
- Add sample setting to use QGIS Server backend.

* should fix GeoNode#2464 (GeoNode#2616)

bump haystack versions to support django 1.8

* Fixed migrations, settings.py, and pavement for development

* pavement: moved migrate_apps to yaml

* fix GeoNode#1718

* make debug default to true

* sycing for GeoNode#1769, after GeoNode#2612 merge

* fix upload issue, check if the js property exists first

* hierarchical tags support

* fix indentation

* add freeboard to requirements.txt

* bump taggit

* Don't pin versions in setup.py use >= or <=

Pinning should be done in requirements.txt

Reasoning is explained in https://packaging.python.org/requirements/

* Pin versions in requirements.txt

* Set to 2.5 final version for release

* update keywords integration test

* fix filename

* we dont use submodules anymore

* Updated instruction for configure ssl on geonode: with version 2.4 some path are changed (GeoNode#2571)

and is not necessary the step regarding python and java configuration because ssl is managed by apache mod_wsgi

* 2.5.0 is out, move master branch to 2.5.1-dev

* Delete fig.yml

* Do not flake8 migrations

* python-properties is now usually pre-installed in Ubuntu

And GeoNode works well with Ubuntu 14.04

* Fix typos in installation dev docs

* Fix GeoGig stats/logs URL for Layer info page. (GeoNode#2633)

The repoURL was using the GeoServer DataStore connection_parameters
value to contstruct the GeoGig repository URL, which looks like:

   http://<server>/geoserver/geogig/geoserver://<repo name>

The statistics and logs URL for GeoGig needs to use a repo URL like
this:

   http://<server>/geoserver/geogig/repos/<repo name>

* Do not pin versions on setup.py

* Upgrade django mptt

* Use a pattern for adding package data, fixes missing fixtures on packages

* Set development version for 2.5.3

* Add volume data container to geoserver

* Exclude remote services layers from map download feature.

* Make download links open in new tab (GeoNode#2642)

* Fix race condition during Raster upload/import

  - Removing a duplicate block of code for PENDING raster imports
  - Don't re-send the Import request if it's already been sent

* Add variables for building base_url

* local_settings.py should be called only once

* Provide defaults for optional ogc_server_settings (GeoNode#2647)

* Provide defaults for optional ogc_server_settings 

MAPFISH_PRINT_ENABLED, PRINT_NG_ENABLED, GEONODE_SECURITY_ENABLED, GEOGIG_ENABLED

* fixup

* Move master to 2.5.4

* Minor text fix for profile update

* fix QGIS path log when using qgis server backend (GeoNode#2648)

* Bugfix for updating style through UI

* Clear comment modal after adding comment

* Issue GeoNode#2401: GNIP: GeoNode Backup and Restore (GeoNode#2651)

* GeoNode Backup and Restore Management Commands

 - GeoServer Vectorial/Raster Data Full Backup&Restore

 - Backup & Restore Admin Page

 Bakup&Restore Admin Gui migrations

 - Document headers

 - Backup&Restore PR logging and minor fixes

 - fix migration issue

 - Backup & Restore Documentation

 - Minot update Backup & Restore docs

* Update backup.py

* Respond correctly when user removes the last related file for a layer upload (GeoNode#2660)

* bump guardian and manage the anonymous pk internally

* use names instead of slugs for keywords

* ini file was not an allowed file type for MANIFEST.in. This was causing the settings.ini file to not be included in the package.

* Fix small bug where {{ repoUrl }} was being used as geogig email due to incorrect input type in HTML

* Fixing missing and broken links to actions on the user's activity page

* Updating pycsw to the latest released version 2.0.2

* bump pycsw

* Update conf.py

* Update setup.py

* Update conf.py

* Update conf.py

* Update requirements.txt

* Update conf.py

*  - Fix the docs

* Updating Choose Files button to allow user to reupload the same file again without having to use Clear (GeoNode#2681)

* Use new UserActivity view (GeoNode#2680)

* truncate upload names over length to allow upload (GeoNode#2671)

One approach to the problem described in
GeoNode#2646

This patch uses the Django field definition to get the length, so this can be
controlled from that one place and won't get out of sync.

* remove mutable default values for kwargs (GeoNode#2668)

This subtle misunderstanding of Python tends to cause confusing bugs.

Suppose you have a definition statement like 'def function(keys=[]): ...'
This def statement is evaluated once, at import time, to create a function
object. It is at this time that '[]' is evaluated, and it is that ONE
list object which is retained as the default value for 'keys'.
Python doesn't store the expression and re-evaluate it every time the
default is needed, it evaluates it once at import time and the resulting
value is passed for every call where that arg is not given.

To explain this with code, the effect is something like this:

    default_keys = []
    def function(keys=default_keys):
        ...

When function() is called with a value for keys, no problem will be seen.
Even when it is called with no value for keys, and we default to that list,
you might not see a problem. The problem that tends to happen unpredictably
is that the mutable default value is mutated. Those changes are persistent
and globally visible to any call of the function which uses the default.

Then the default value is non-empty. Or information leaks across calls
that shouldn't be leaking. Or the same dict keeps growing forever.

To avoid this, we can use a sentinel value such as None, and then check
for that value in the body of the function. It is a cheap safeguard against
situations that can be very annoying.

* first of many docs fixes (GeoNode#2684)

* Fix the Resources section on profile detail page to work when no data exists in the category yet

* Incubation documentation fixes (GeoNode#2687)

* Fixed dead link [ci skip]

* Fixed some doc links [ci skip]

* Fixed License header in some po files

* Fixed packaging files copyright

* Added OSGeo copyright and CC-SA in documentation

* Fixed bug breaking Group Activity view

* Updated changelog for version 2.5.4

* Updating release info and some improvements to pavement for Xenial releases

* Fixing travis build

* previous adjustments to the setup.py and MANIFEST.ini were not allowing certain filetypes to be packaged, loading.gif was the most noticeable.

* Updated changelog for version 2.5.5

* Update release version

* Make resourcebase info panel template extendable

* Fixing syntax error: celery_app (GeoNode#2697)

* Sync auto generate avatar sizes with avatar sizes used in templates (GeoNode#2693)

*  2696 Part 1 - GNIP - Better management of View and Download permissions.

 2696 Part 1 - GNIP - Better management of View and Download permissions.

 - Fix flake8 formatting issues

* Updated AUTHORS list

* Update views.py

- Fix minor typo with brackets

* Update AUTHORS

* Enable update layers management command to accept the permissions dictionary. (GeoNode#2691)

* Insert missing sudo to chmod commands

This fixes "[Errno 13] Permission denied: '/home/geonode/geonode/geonode/uploaded/layers/" encountered by user when trying to upload layer files.

* Clean up extra ':'s (from ::: to ::)

* Language cleanup, deleted duplicate section

* Minor cleanup

* Process inbox messages using AJAX

* - removed import on INSTALLED_SCHEMES since its usage was removed on this commit  (aff43c0).
- limiting the version of celery to less then the 4.0 release, due to django-celery not having a release in over a year which would include the updates in master to support the new version of celery.  If you currently install Geonode it will install celery 4.0, but when attempting to use any django commands an ImportError occurs due to no module named timeutils.

* Split geoserver.helpers.set_attributes() (GeoNode#2699)

* Add conditional to geosites so signals are connected only if it is in INSTALLED_APPS.

* Added test for geonode.utils.set_attributes().

* Split helpers.set_attributes() into 2 functions.

* Renamed set_attributes() to set_attributes_from_geoserver().

* Moved really_set_attributes(), to geonode.utils and renamed to set_attributes().

* Removed unnecessary variable 'Attribute' from utils.

* Added check for layer/field pairs not in attribute_stats.

* flake8 formatting fixes.

* require celery version to be at least 3.1.18

When using `pip install -r requirements.txt` I was finding that my Celery
worker was not booting properly.

```
...
File "/env/lib/python2.7/site-packages/django/core/management/base.py", line 534, in check
    self.stderr.write(msg, lambda x: x)
TypeError: function takes exactly 1 argument (2 given)
```

This is an incompatibility between Celery 3.1.17 and Django 1.8.
celery/celery#2536

Fix: upgrade to Celery 3.1.18, which supports Django 1.8.
http://docs.celeryproject.org/en/latest/history/changelog-3.1.html#version-3-1-18

* The standalone TEMPLATE_* settings were deprecated in Django 1.8 (GeoNode#2711)

-  The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS, TEMPLATE_DEBUG. https://docs.djangoproject.com/en/1.8/topics/templates/#support-for-template-engines
- historic pep8 fixes

* Set SITEURL to server's host name
milafrerichs added a commit to milafrerichs/geonode that referenced this pull request Nov 17, 2016
* Adds support for s3 storage and forces layer uploads to use the FileSystemStorage

* Fix issue GeoNode#2526

* Added LDAP install and configure steps in Admin workshop

* Add a name to AUTHORS

* Fill empty value for DATASTORE variable in docs

* Added an autocomplete template and additions to enable search by catalogue

* Created template and edited files to enable .txt and .html formats export for metadata

* Fixes admin interface for layers

AttributeError: 'NoneType' object has no attribute 'name'

jazzband/django-polymorphic#201

* dj_database_url formats the port as an integer, whereas gsconfig is wanting a string for creating the feature store.

* addition to previous patch: format port as str

* bump some packages version

*  - Restoring missing parts of the docs

*  - update ext pakages versions

* Lock in version of gsconfig

Lock in the version until issue GeoNode#2544 is resolved

* gsconfig now utilizes an attribution dictionary and bumped to newest version

*  - update geonode exts version in order to fix pavement sync db

* README: fix syntax error

Heading "Docker Usage" was not rendered correctly.

* ol3-preview

* keep geoext as default

* Missing quotation mark

* Add support for EPSG:4326

* bump user-messages

* don't assume 'geoserver' in style url management

* tiles_url should be a XYZ source

* set_metadata returns four variables, which was causing an error of too many values to unpack

* 'name' no longer a ContentType field in Django 1.8+

* Added handling of postgres backed geogig stores

* fix layer style dropdown values

* Default to public schema if not defined

* added exception handler for when multiple legends are returned

* just update the tiles link url if needed, this will respect any changes to the url made by other apps like contrib.mp

* register models for actstream 0.5+ / Django 1.8+

* re enable publish as layer group

* adjusted text and html metadata links in the templates for documents and layers

* Changes in manual installation docs (GeoNode#2561)

minor changes in docs

* fix layer group endpoint

* fix for port changes: can't concatenate str & int

* check if layerfile_set exists

* Refactor to align with updated PG Geogig plugin: calls the plugin only to create the geogig repo, and calls gsconfig to create the datastore

* fix client/server handling for multi-file upload/import by storing the upload id in the session

* use .get explicitly instead of .all().filter(...)[0]

* use elif with mutually exclusive comparisons

* Invalidate layer in GeoWebCache after style_update PUT/POST

* send content-type:text/xml header

* use str.join() properly

* fix status code check

* update url for cache refresh

* prevent auto redirect when additional information is required.

* bump gsconfig to 1.0.6

*  - Paver setup_geoserver using the new 2.9.x

*  - remove layer_is FK constraints from layer_styles migrations

* Added documentation for configuring an AWS S3 Bucket with GeoNode

*  - test travis script with Java 8 (GeoNode#2584)

- test travis script with Java 8

 - test travis script with Java 8

* Adding instructions to add windows dependencies

* Adding gdal environment variables

* Update README

* Update README

* Update README

* Revert " - remove layer_is FK constraints from layer_styles migrations"

This reverts commit ea2b292.

* fix broken og:image link in meta tag in head

* fix exception during renders of admin forms using autocomplete_light

* change LayerStyles related name to snake_case

* Create new CONTRIBUTING file

Using CLAHub and OSGeo CLA

* restructure get_context_resourcetype for clarity

* add profiles & groups autocomplete config

* Groups have titles, not names

* Docker for development (GeoNode#2593)

* Refactor to align with updated PG Geogig plugin: calls the plugin only to create the geogig repo, and calls gsconfig to create the datastore

* prevent auto redirect when additional information is required.

* bump gsconfig to 1.0.6

*  - Paver setup_geoserver using the new 2.9.x

*  - remove layer_is FK constraints from layer_styles migrations

* Added documentation for configuring an AWS S3 Bucket with GeoNode

* fix broken og:image link in meta tag in head

* Revert " - remove layer_is FK constraints from layer_styles migrations"

This reverts commit ea2b292.

*  - test travis script with Java 8 (GeoNode#2584)

- test travis script with Java 8

 - test travis script with Java 8

* No specific versions in setup.py, only minimum

* Bump version to start 2.5 cycle

* Use published image for development

* Added docker-compose and docker-compose.override

* Pinned requirements

* Pull image in deployment, build image in development

* Makefile for tasks

* Added pull target

* Avoid autocompletelight 3

* Switch to 'latest' geonode/docker

* Requirements from travis

* Downgrade requirements

* Use requirements file

* Don't use project_name

* Use specific docker images

* s/genode/geonode

* Use geoserver latest

* Use latest tag for nginx

* Fix migration problems

* Use run instead of exec

* Fix requirements.txt

* Revert "Fix migration problems"

This reverts commit aa33ce6.

* Fix httplib version

* Fix tests

* Call docker-django from latest

* Use geonode/django in celery too (GeoNode#2594)

* make test works in docker (GeoNode#2595)

* Add context-specific search to /groups page

Templates that were originally built for ResourceBase-type content are
being overridden here for group objects (e.g., _group_search_content.html)

* groups do not have date or popular_count fields

* let custom search_content template work for both profiles & groups

* Custom sort filters depending on data type

* Add context-specific search (filtering by username) within /people

* if searching from /people context, use username instead of title

* url fix in README

* add name to AUTHORS

* geonode-user-accounts 1.0.13 (GeoNode#2603)

* Fix for issue 2599. The issue was that apache was allowing directory browsing. Added the options directive to remove it from the current list of options enforced for that directory.

* Use environment variables in settings.py (GeoNode#2596)

* Missing migrations (GeoNode#2604)

* geonode-user-accounts 1.0.13

* Missing migrations

* pep8 for migrations

* pep8

* Updated readme for docker (GeoNode#2607)

* Using docker images from hub

*  - (issue GeoNode#2070) Layer name cannot be a style name already on Geoserver

*  - (issue GeoNode#2075) Add lxml back into paver win_install_deps

* adding missing trans for GeoNode#1769

* sycing tsf

* use layer instance to revoke layer permissions, fixes GeoNode#2531 (GeoNode#2614)

use layer instance instead of resourcebase to revoke permission, fixes GeoNode#2531

* include data files in downstream installations should fix GeoNode#2452 (GeoNode#2615)

include data files in downstream installations should fix GeoNode#2452

* - Modify some settings and code to make geonode able to use QGIS Server as backend.
- Add some views, templates and resources to make geonode able to use QGIS Server as backend.
- Add sample setting to use QGIS Server backend.

* should fix GeoNode#2464 (GeoNode#2616)

bump haystack versions to support django 1.8

* Fixed migrations, settings.py, and pavement for development

* pavement: moved migrate_apps to yaml

* fix GeoNode#1718

* make debug default to true

* sycing for GeoNode#1769, after GeoNode#2612 merge

* fix upload issue, check if the js property exists first

* hierarchical tags support

* fix indentation

* add freeboard to requirements.txt

* bump taggit

* Don't pin versions in setup.py use >= or <=

Pinning should be done in requirements.txt

Reasoning is explained in https://packaging.python.org/requirements/

* Pin versions in requirements.txt

* Set to 2.5 final version for release

* update keywords integration test

* fix filename

* we dont use submodules anymore

* Updated instruction for configure ssl on geonode: with version 2.4 some path are changed (GeoNode#2571)

and is not necessary the step regarding python and java configuration because ssl is managed by apache mod_wsgi

* 2.5.0 is out, move master branch to 2.5.1-dev

* Delete fig.yml

* Do not flake8 migrations

* python-properties is now usually pre-installed in Ubuntu

And GeoNode works well with Ubuntu 14.04

* Fix typos in installation dev docs

* Fix GeoGig stats/logs URL for Layer info page. (GeoNode#2633)

The repoURL was using the GeoServer DataStore connection_parameters
value to contstruct the GeoGig repository URL, which looks like:

   http://<server>/geoserver/geogig/geoserver://<repo name>

The statistics and logs URL for GeoGig needs to use a repo URL like
this:

   http://<server>/geoserver/geogig/repos/<repo name>

* Do not pin versions on setup.py

* Upgrade django mptt

* Use a pattern for adding package data, fixes missing fixtures on packages

* Set development version for 2.5.3

* Add volume data container to geoserver

* Exclude remote services layers from map download feature.

* Make download links open in new tab (GeoNode#2642)

* Fix race condition during Raster upload/import

  - Removing a duplicate block of code for PENDING raster imports
  - Don't re-send the Import request if it's already been sent

* Add variables for building base_url

* local_settings.py should be called only once

* Provide defaults for optional ogc_server_settings (GeoNode#2647)

* Provide defaults for optional ogc_server_settings 

MAPFISH_PRINT_ENABLED, PRINT_NG_ENABLED, GEONODE_SECURITY_ENABLED, GEOGIG_ENABLED

* fixup

* Move master to 2.5.4

* Minor text fix for profile update

* fix QGIS path log when using qgis server backend (GeoNode#2648)

* Bugfix for updating style through UI

* Clear comment modal after adding comment

* Issue GeoNode#2401: GNIP: GeoNode Backup and Restore (GeoNode#2651)

* GeoNode Backup and Restore Management Commands

 - GeoServer Vectorial/Raster Data Full Backup&Restore

 - Backup & Restore Admin Page

 Bakup&Restore Admin Gui migrations

 - Document headers

 - Backup&Restore PR logging and minor fixes

 - fix migration issue

 - Backup & Restore Documentation

 - Minot update Backup & Restore docs

* Update backup.py

* Respond correctly when user removes the last related file for a layer upload (GeoNode#2660)

* bump guardian and manage the anonymous pk internally

* use names instead of slugs for keywords

* ini file was not an allowed file type for MANIFEST.in. This was causing the settings.ini file to not be included in the package.

* Fix small bug where {{ repoUrl }} was being used as geogig email due to incorrect input type in HTML

* Fixing missing and broken links to actions on the user's activity page

* Updating pycsw to the latest released version 2.0.2

* bump pycsw

* Update conf.py

* Update setup.py

* Update conf.py

* Update conf.py

* Update requirements.txt

* Update conf.py

*  - Fix the docs

* Updating Choose Files button to allow user to reupload the same file again without having to use Clear (GeoNode#2681)

* Use new UserActivity view (GeoNode#2680)

* truncate upload names over length to allow upload (GeoNode#2671)

One approach to the problem described in
GeoNode#2646

This patch uses the Django field definition to get the length, so this can be
controlled from that one place and won't get out of sync.

* remove mutable default values for kwargs (GeoNode#2668)

This subtle misunderstanding of Python tends to cause confusing bugs.

Suppose you have a definition statement like 'def function(keys=[]): ...'
This def statement is evaluated once, at import time, to create a function
object. It is at this time that '[]' is evaluated, and it is that ONE
list object which is retained as the default value for 'keys'.
Python doesn't store the expression and re-evaluate it every time the
default is needed, it evaluates it once at import time and the resulting
value is passed for every call where that arg is not given.

To explain this with code, the effect is something like this:

    default_keys = []
    def function(keys=default_keys):
        ...

When function() is called with a value for keys, no problem will be seen.
Even when it is called with no value for keys, and we default to that list,
you might not see a problem. The problem that tends to happen unpredictably
is that the mutable default value is mutated. Those changes are persistent
and globally visible to any call of the function which uses the default.

Then the default value is non-empty. Or information leaks across calls
that shouldn't be leaking. Or the same dict keeps growing forever.

To avoid this, we can use a sentinel value such as None, and then check
for that value in the body of the function. It is a cheap safeguard against
situations that can be very annoying.

* first of many docs fixes (GeoNode#2684)

* Fix the Resources section on profile detail page to work when no data exists in the category yet

* Incubation documentation fixes (GeoNode#2687)

* Fixed dead link [ci skip]

* Fixed some doc links [ci skip]

* Fixed License header in some po files

* Fixed packaging files copyright

* Added OSGeo copyright and CC-SA in documentation

* Fixed bug breaking Group Activity view

* Updated changelog for version 2.5.4

* Updating release info and some improvements to pavement for Xenial releases

* Fixing travis build

* previous adjustments to the setup.py and MANIFEST.ini were not allowing certain filetypes to be packaged, loading.gif was the most noticeable.

* Updated changelog for version 2.5.5

* Update release version

* Make resourcebase info panel template extendable

* Fixing syntax error: celery_app (GeoNode#2697)

* Sync auto generate avatar sizes with avatar sizes used in templates (GeoNode#2693)

*  2696 Part 1 - GNIP - Better management of View and Download permissions.

 2696 Part 1 - GNIP - Better management of View and Download permissions.

 - Fix flake8 formatting issues

* Updated AUTHORS list

* Update views.py

- Fix minor typo with brackets

* Add ol3-react based viewer as default map viewer

Add a new template for editing/showing new maps and change just the
viewer to use the new ol3-react based viewer
add all kinds of assets/deps for the ol3-react based viewer
ol3-cesium is a little tedious but is needed for 3d globe
@afabiani afabiani deleted the backup_restore_pr branch November 28, 2017 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants