[GeoNode-users] Multi-Tenancy: how to start
Eugenio Trumpy
frippe12573 at hotmail.com
Mon Dec 19 05:53:32 PST 2016
Ok,
I will proceed this way.
Then I have to create a new virtualhost pointing to the wsgi.py within the new site dir, right?
In the same virtual host have I to set new aliases for uploaded dir and static_root as I did for the normal installation?
E.
________________________________
Da: Simone Dalmasso <simone.dalmasso at gmail.com>
Inviato: lunedì 19 dicembre 2016 14.21
A: Eugenio Trumpy
Cc: geonode-users at lists.osgeo.org
Oggetto: Re: Multi-Tenancy: how to start
I suggest you to go manually and create a site folder copying the site_template, rename and add the Site object into the database.
geosites has not been revised for a while and geonode improved. It works but the shortcut command addsite may be broken.
2016-12-19 11:32 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com<mailto:frippe12573 at hotmail.com>>:
Hi Simone,
I did what you suggested, actually now I have the addsite command, but as you announced I have also this error:
AttributeError: 'Settings' object has no attribute 'SITE_ROOT'
then I added SITE_ROOT in local_setting.py inserting the path "geonode/contrib/geosites"
afterwords I had this error:
AttributeError: 'Settings' object has no attribute 'SERVE_PATH'
so that I added SERVE_PATH in local_setting.py inserting the path "geonode/contrib/geosites/static"
but I'm not sure I did the right thing, since now I have this error:
OSError: [Errno 17] File exists: '/dati/geonode/geonode/contrib/site2'
Where I'm wrong?
Thanks
Eugenio
________________________________
Da: Simone Dalmasso <simone.dalmasso at gmail.com<mailto:simone.dalmasso at gmail.com>>
Inviato: lunedì 19 dicembre 2016 11.04
A: Eugenio Trumpy
Cc: geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Oggetto: Re: Multi-Tenancy: how to start
you have to add it in INSTALLED_APPS, currently it is only listed in the contrib apps.
2016-12-19 9:20 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com<mailto:frippe12573 at hotmail.com>>:
Hi Simone,
and thank you for your answer.
Sorry for my trivial question:
in my setting.py I have already geonode.contrib.geosites
in GEONODE_CONTRIB_APPS, see below:
GEONODE_CONTRIB_APPS = (
# GeoNode Contrib Apps
'geonode.contrib.dynamic',
'geonode.contrib.exif',
'geonode.contrib.favorite',
'geonode.contrib.geogig',
'geonode.contrib.geosites',
'geonode.contrib.nlp',
'geonode.contrib.slack'
)
in INSTALLED_APPS I have:
INSTALLED_APPS = (
# Boostrap admin theme
# 'django_admin_bootstrapped.bootstrap3',
# 'django_admin_bootstrapped',
# Apps bundled with Django
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.messages',
'django.contrib.humanize',
'django.contrib.gis',
# Third party apps
# Utility
'pagination',
'taggit',
'friendlytagloader',
'geoexplorer',
'leaflet',
'django_extensions',
# 'haystack',
....and others...
Should I insert geonode.contrib.geosites somewhere in local_setting? or it's already ok as it? or copy geonode.contrib.geosites in settings.py under INSTALLED_APPS?
Sorry again for this banal question...
E.
________________________________
Da: Simone Dalmasso <simone.dalmasso at gmail.com<mailto:simone.dalmasso at gmail.com>>
Inviato: lunedì 19 dicembre 2016 09.04
A: Eugenio Trumpy
Cc: geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Oggetto: Re: Multi-Tenancy: how to start
Ciao Eugenio,
sorry for being so late in the response.
You have to add 'geonode.contrib.geosites' to your INSTALLED_APPS in order to get the command.
In case you get errors in running that command, you can always 'make' a geosite by yourself by copying the folder 'site_template' and changing it's name and internal parameters and then register the new Site in the admin panel. You can follow the utils.py add_site function and replicate the needed steps (some of them are only for production).
Take also some time to see how the pre and post settings work.
Hope this helps
2016-12-19 8:55 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com<mailto:frippe12573 at hotmail.com>>:
Hi everyone,
regarding the multi-tenancy setting up and in particular the installation of new site since the command:
python manage.py addsite sitename sitedomain
return me:
Unknown command: 'addsite'
Type 'manage.py help' for usage.
Do you know way? Have I 'activate' in some way the multi-tenancy before? or it is ready to use?
If it is ready to use, why 'addsite' is an unknown command?
I launched the command from the main geonode directory, am I right?
As I wrote in the previous email in my installation I have only manage.py file in
/geonode directory.
I'm testing on on ubuntu 14.04 and geonode is at version 2.4.dev20151029170512.
I installed geonode as custom installation (not by apt-get).
Thanks
Eugenio
________________________________
Da: Eugenio Trumpy <frippe12573 at hotmail.com<mailto:frippe12573 at hotmail.com>>
Inviato: venerdì 16 dicembre 2016 15.04
A: geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Oggetto: Multi-Tenancy: how to start
Hi all,
as pointed in the email object I want to try the geonode multi-tenancy capabilities.
I started of course from the documentation [1] and [2], but a need some hints to start.
I have already a running geonode instance. Do you think I should start from
a clean geonode installation or I can arrange the running one?
Is there somewhere a set of commands to setup the geosite 1, geosite 2, ...
I was looking into geosites folder, as suggested in [2], but I don't see neither manage.py nor manage_all.py files.
I tried python manage.py addsite geosite1 geosite1domain
but I got Unknown command: 'addsite'
Am I missing something?
After that: How can I sort out the already stored layers?
Thank you very much for hints and for the patience of this stupid questions,
Eugenio
[1] https://geonode.readthedocs.io/en/2.0/tutorials/admin/multi-tenancy.html
[2] https://github.com/GeoNode/geonode/tree/master/geonode/contrib/geosites
--
Simone
--
Simone
--
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20161219/6b63fd21/attachment.html>
More information about the geonode-users
mailing list