[GeoNode-users] Multi-Tenancy: how to start
Simone Dalmasso
simone.dalmasso at gmail.com
Fri Mar 10 07:24:54 PST 2017
Ciao Eugenio,
you are running collectstatic right)
Should work but ill test early next week and come back with the results.
ciao
2017-03-10 14:46 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
> Hi simone and all,
>
>
> unfortunately I have to open again this issue.
>
> I'm setting up a new geosite but I still have problems with static files
> (I'm still using 2.4).
>
> This is the map of the geosites:
>
> /geonode/geonode/ [is the original installation of geonode, it should be
> my master site]
>
> inside this installation, I mean:
>
> /geonode/geonode/contrib/geosites/gemex
>
> and
>
> /geonode/geonode/contrib/geosites/atlante
>
> I have the two geosites, where
>
> gemex seems to works fine (currently I don't know if I did everything
> correctly)
>
> atlante seems to works too (it seems to use css of the master site) but
> it hasn't its own static files.
>
>
> I wonder if my configuration files works fine,
>
> I set in /geonode/geonode/contrib/geosites/atlante/local_settings.py
> STATIC_ROOT='/dati/geonode/geonode/contrib/geosites/static/atlante'
>
> and
>
> I set in /geonode/geonode/contrib/geosites/gemex/local_settings.py
> STATIC_ROOT='/dati/geonode/geonode/contrib/geosites/static/gemex'
>
> and
>
> in /geonode/geonode/contrib/geosites/pre_setting.py I set SERVE_PATH =
> '/dati/geonode/geonode/contrib/geosites'
>
>
> then once I add a new geosite (atlante in my case) I have to run
>
>
> python manage.py --settings=geonode.contrib.geosites.atlante.settings
>
>
> this way should create an atlante folder in /dati/geonode/geonode/contrib/geosites/static/
> including css/ fonts/ img/ js/ and less/ folders,
>
> but in this case I have no any atlante folder nowhere.
>
>
> Am I correct? If no where I'm wrong?
>
>
> Thanks again
>
>
> E.
>
>
> ------------------------------
> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
> *Inviato:* venerdì 13 gennaio 2017 11.47
> *A:* Eugenio Trumpy
> *Cc:* geonode-users at lists.osgeo.org
> *Oggetto:* Re: Multi-Tenancy: how to start
>
> All the uploaded and static folder locations are actually up to you. The
> static folder inside is for the statics of the specific site which would be
> copied in the static_root by collectstatic.
>
> 2017-01-13 10:31 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>
>> Dear Simone and all,
>>
>>
>> I'm happy too to be very close to deploy finally the geosites contrib app.
>>
>>
>> I have two curiosities:
>>
>>
>> - the uploaded folder is only in the geosites folder. Have I set
>> somewhere a sub-folder for the uploaded file for each site (as for the
>> static file)?
>> - since the static folder is outside the single geosite, what is the
>> static folder within geosite folder?
>>
>> I solved the issue on the redirection from the user menu to geoserver, by
>> removing the URL in the <baseUrl>
>>
>> in geoserver/data/security/auth/geonodeAuthProvider/config.xml
>>
>> In that way I'm redirected as admin authenticated.
>>
>>
>> Best regards
>>
>>
>> Eugenio
>>
>>
>> ------------------------------
>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>> *Inviato:* venerdì 13 gennaio 2017 10.10
>>
>> *A:* Eugenio Trumpy
>> *Cc:* geonode-users at lists.osgeo.org
>> *Oggetto:* Re: Multi-Tenancy: how to start
>>
>> Glad that you fixed,
>>
>> the setup is good and I think that the ideal setup is actually subjective.
>>
>> For the error, seems is missing the geoserver authentication which should
>> already be in place since your master site is working. You can point the
>> geoserver base url to your gemex site though. Geoserver should be able to
>> ping the correct site anyway.
>>
>> 2017-01-11 15:13 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>>
>>> Dear Simone and all,
>>>
>>>
>>> eventually I was able to setup geonode/multi geosites.
>>>
>>> Now I see the master site I had in the beginning and a new site
>>> answering to a different URL.
>>>
>>>
>>> Just to fix a pair of concept I would like to know if I configured well
>>> the static/static_root/uploaded folders:
>>>
>>>
>>> - static folder for all geosites I have (for now only gemex) is in
>>> geosites folder
>>> - to distinguish the static files for each geosite (for now I have
>>> only gemex) I set the variable STATIC_ROOT='/dati/ge
>>> onode/geonode/contrib/geosites/static/gemex'
>>> - the SERVE_PATH is SERVE_PATH = '/dati/geonode/geonode/contrib/geosites'
>>> set in the geosites/pre_settings.py
>>> - the uploaded folder is only in the geosites folder. Have I set
>>> somewhere a subfolder for the uploaded file for each site (as for the
>>> static file)?
>>> - since the static folder is outside the singole geosite, what is
>>> the static folder within geosite folder?
>>>
>>> Afterwords I stared to test the new site. I logged as administrator of
>>> the master-site (the normal geonode I setup in the beginning) and I tried
>>> to upload a shp file,
>>> but I had this message:
>>>
>>> GeoNode encountered problems when creating layer reg2001_s_wgs84utm33.It
>>> cannot find the Layer that matches this Workspace.try renaming your files.
>>>
>>> Why I got this issue?
>>> Consequently when I click on geoserver link from the user menu I'm
>>> redirected to geoserver page as usual, but without authentication.
>>> Have I to add <baseurl> related to the created geosite?
>>>
>>> Thanks
>>>
>>> Eugenio
>>>
>>>
>>>
>>> ------------------------------
>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>> *Inviato:* lunedì 9 gennaio 2017 10.26
>>> *A:* Eugenio Trumpy
>>> *Cc:* geonode-users at lists.osgeo.org
>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>
>>> All files of the site_template folder.
>>> Like
>>> https://github.com/GeoNode/geonode/blob/master/geonode/contr
>>> ib/geosites/site_template/settings.py#L39
>>> https://github.com/GeoNode/geonode/blob/master/geonode/contr
>>> ib/geosites/site_template/wsgi.py#L39
>>>
>>> 2017-01-09 9:39 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>>>
>>>> Hi Simone,
>>>>
>>>>
>>>> you said that I should have adjust correctly the variables in the files
>>>> that start with "$".
>>>>
>>>> This is not clear to me.
>>>>
>>>> What file do you refer? and Which variables?
>>>>
>>>>
>>>> best
>>>>
>>>>
>>>> Eugenio
>>>>
>>>>
>>>> ------------------------------
>>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>>> *Inviato:* giovedì 5 gennaio 2017 07.41
>>>> *A:* Eugenio Trumpy
>>>> *Cc:* geonode-users at lists.osgeo.org
>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>
>>>> The $ should not be there, is an identifier for pieces of code that
>>>> would be changed by the addsite script. It is a normal python path.
>>>> And yes, the SERVE_PATH should be in one of the project's settings as
>>>> it is used to locate your static and media files "STATIC_ROOT =
>>>> os.path.join(SERVE_PATH, 'static')"
>>>>
>>>> 2017-01-03 17:13 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>>>>
>>>>> Hi Simone,
>>>>>
>>>>>
>>>>> I presume maybe I'm not so far from finalization of the configuration.
>>>>>
>>>>> I apologize if I'm not enough smart, but I don't understand which file
>>>>> do you mentioned, starting with "$". I suppose you intended the line 19 in
>>>>> the wsgi.py located in the geosite folder (i.e. gemex for me), am I correct?
>>>>>
>>>>> If yes I changed the line in:
>>>>>
>>>>> os.environ.setdefault("DJANGO_SETTINGS_MODULE",
>>>>> "$geosites.%s.settings" % curdir)
>>>>>
>>>>>
>>>>> since, as you know, I'm using a normal installation of geonode, so I
>>>>> have the geosites project forlder within:
>>>>>
>>>>> /geonode/geonode/contrib and my project folder name is the original
>>>>> geosites.
>>>>>
>>>>> Did I understand well?
>>>>>
>>>>>
>>>>> Regarding the static_root it is my intention to leave that folder in
>>>>> my site folder (/geonode/geonode/contrib/geosites/gemex/). In that
>>>>> case I should run your suggested command:
>>>>>
>>>>>
>>>>> python manage.py collectstatic --settings=geonode.contrib.geo
>>>>> sites.gemex.settings
>>>>>
>>>>>
>>>>> and in gemex.settings has to be inserted the variable SERVE_PATH, am I
>>>>> correct?
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> Eugenio
>>>>> ------------------------------
>>>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>>>> *Inviato:* martedì 3 gennaio 2017 08.35
>>>>> *A:* Eugenio Trumpy
>>>>> *Cc:* geonode-users at lists.osgeo.org
>>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>>
>>>>> Eugenio is all more or less right.
>>>>>
>>>>> The error you have is because, since you copied the site_template
>>>>> folder manually, you also have to correctly adjust the variables in the
>>>>> files that start with "$". In this case you have to put the correct
>>>>> project name in the wsgi.py-
>>>>>
>>>>>
>>>>> For the static files, they can stay anywhere, but is suggested to have
>>>>> them in the web server folders /var/www etc,as said. To copy them there,
>>>>> once you have set the STATIC_ROOT folder in the geosite settings yu can use
>>>>> the normal geonode manage.py file by passing it the geosites settings
>>>>> instead:
>>>>>
>>>>> python manage.py collectstatic --settings=geonode.contrib.geo
>>>>> sites.gemex.settings
>>>>>
>>>>> 2016-12-29 12:21 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>>>>>
>>>>>> Hi Simone and all,
>>>>>>
>>>>>>
>>>>>> unfortunately I hadn't solved my problem multi-tenancy configuration.
>>>>>>
>>>>>> My new questions are:
>>>>>>
>>>>>> - can I set-up multi-geosites from my running normal
>>>>>> installation? (I installed geonode following this guide [1]) or should I
>>>>>> install a geonode from scratch?
>>>>>> - to run multi-geosites do you suggest me to setup multi-geosite
>>>>>> from special version of geonode as for instance [2], if yes How to start?
>>>>>> - in my geonode normal installation manage.py and manage_all.py
>>>>>> are missing in the /geonode/geonode/contrib/geosites/
>>>>>> - the master site has to be within contrib/geosites/master-site,
>>>>>> which relationship is there between the normal geonode site and the
>>>>>> master-site? in case master-site has to inherit from normal one-site
>>>>>> config, how?
>>>>>> - just to be sure is this the right order of the setting files
>>>>>> read by geonode:
>>>>>> - /geonode/geonode/local_setting.py and /geonode/geonode/setting.py
>>>>>> (overridden by the first)
>>>>>> - /geonode/geonode/contrib/geosites/pre_setting.py
>>>>>> - /geonode/geonode/contrib/geosites/local_setting.py
>>>>>> and /geonode/geonode/contrib/geositessetting.py (overridden by
>>>>>> the first)
>>>>>> - /geonode/geonode/contrib/geosites/post_setting.py
>>>>>>
>>>>>>
>>>>>> - in my test performed in the last days I set the: SERVE_PATH=
>>>>>> "/dati/geonode/geonode/contrib/geosites/ in
>>>>>> /geonode/geonode/local_setting.py is that right? in apache error
>>>>>> log I have:
>>>>>>
>>>>>> [Thu Dec 29 11:46:21.129691 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] self.load_middleware()
>>>>>> [Thu Dec 29 11:46:21.129706 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] File "/usr/local/lib/python2.7/dist
>>>>>> -packages/django/core/handlers/base.py", line 44, in load_middleware
>>>>>> [Thu Dec 29 11:46:21.129728 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] for middleware_path in
>>>>>> settings.MIDDLEWARE_CLASSES:
>>>>>> [Thu Dec 29 11:46:21.129742 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] File "/usr/local/lib/python2.7/dist
>>>>>> -packages/django/conf/__init__.py", line 54, in __getattr__
>>>>>> [Thu Dec 29 11:46:21.129763 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] self._setup(name)
>>>>>> [Thu Dec 29 11:46:21.129776 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] File "/usr/local/lib/python2.7/dist
>>>>>> -packages/django/conf/__init__.py", line 49, in _setup
>>>>>> [Thu Dec 29 11:46:21.129797 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] self._wrapped = Settings(settings_module)
>>>>>> [Thu Dec 29 11:46:21.129810 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] File "/usr/local/lib/python2.7/dist
>>>>>> -packages/django/conf/__init__.py", line 132, in __init__
>>>>>> [Thu Dec 29 11:46:21.129831 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] % (self.SETTINGS_MODULE, e)
>>>>>> [Thu Dec 29 11:46:21.129851 2016] [:error] [pid 14216] [remote
>>>>>> 93.32.72.156:62917] ImportError: Could not import settings
>>>>>> '$PROJECT_NAME.gemex.settings' (Is it on sys.path? Is there an import error
>>>>>> in the settings file?): No module named $PROJECT_NAME.gemex.settings
>>>>>>
>>>>>> the error at last line it is seems to be related to something
>>>>>> missing....
>>>>>>
>>>>>> - last but not least I still have doubt on the positioning of
>>>>>> static_root folder for each geosites, I would maintain them within each
>>>>>> geosite folder but I don't know how to run collectstatic to populate that
>>>>>> folder.
>>>>>>
>>>>>> Thanks for any hint...
>>>>>>
>>>>>>
>>>>>> Eugenio
>>>>>>
>>>>>>
>>>>>>
>>>>>> [1] http://docs.geonode.org/en/latest/tutorials/install_and_admi
>>>>>> n/geonode_install/index.html
>>>>>>
>>>>>> [2]
>>>>>> <http://docs.geonode.org/en/latest/tutorials/install_and_admin/geonode_install/index.html>
>>>>>> https://github.com/terranodo/geosites-project
>>>>>> terranodo/geosites-project
>>>>>> <https://github.com/terranodo/geosites-project>
>>>>>> github.com
>>>>>> geosites-project - A skeleton project for creating a multi-tenancy
>>>>>> GeoNode using the GeoSites contrib app.
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------
>>>>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>>>>> *Inviato:* mercoledì 21 dicembre 2016 10.37
>>>>>> *A:* Eugenio Trumpy
>>>>>> *Cc:* geonode-users at lists.osgeo.org
>>>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>>>
>>>>>> ok:
>>>>>> - I this that that Alias is a mistake, the way is configured is that
>>>>>> any url /gemex will internally point to /dati but I don't think they are
>>>>>> actually urls. You can remove it
>>>>>>
>>>>>> - you can assign a new name to WSGIProcessGroup
>>>>>>
>>>>>> - it ok to keep the dir in the root base of geonode since your site
>>>>>> is inside
>>>>>>
>>>>>> - the geonode apt package creates the uploaded and static root under
>>>>>> var/www as far as I know. It is ok to reuse the same settings. If not I
>>>>>> suggest you to put them there as they are meant to be served by apache.
>>>>>>
>>>>>> - you can use the same config for the Daemon, just use the name you
>>>>>> gave to the WSGIProcessGroup instead of geonode
>>>>>>
>>>>>>
>>>>>>
>>>>>> This is a brief explanation but you can find more on the static url
>>>>>> and roots on the django docs and more on the wsgi config on the apache docs
>>>>>>
>>>>>> hope this helps.
>>>>>>
>>>>>>
>>>>>> 2016-12-20 9:36 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>>>>>>
>>>>>>> Hi Simone and all,
>>>>>>>
>>>>>>>
>>>>>>> thanks again for your inputs.
>>>>>>>
>>>>>>> However, I think I'm at a crucial position to finalize the
>>>>>>> configuration of the first new geosite (named gemex).
>>>>>>>
>>>>>>> Just to clarify all the step performed and to focus the stage where
>>>>>>> I'm now, I list here below what I did and what I miss:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 1. in setting.py I added under INSTALLED_APPS the line
>>>>>>> 'geonode.contrib.geosites'
>>>>>>> 2. I run python manage.py syncdb
>>>>>>> 3. I copy site-template (i.e. the folder inside
>>>>>>> contrib/geosites/) in the same position (i.e. contrib/geosites/) with a new
>>>>>>> name (e.g. gemex in my case)
>>>>>>> 4. I created a 4 level doman to be linked to the new site (i.e.
>>>>>>> gemex.igg.cnr.it in my case)
>>>>>>> 5. I added a new site from the admin panel available from a
>>>>>>> normal running installation
>>>>>>> 6. I create a new virtual host (for apache2) by copy the virtual
>>>>>>> host I had for the normal running installation. Here what is clear to me
>>>>>>> are the items:
>>>>>>> - ServerName = where I put the created 4 level domain
>>>>>>> - WSGIScriptAlias where I put the link to the wsgi.py
>>>>>>> available within the created newsite (i.e. path to
>>>>>>> contrib/geosites/gemex/wsgi.py)
>>>>>>> - ProxyPass and ProxyPassReverse linked to the local geoserver
>>>>>>>
>>>>>>> What is not yet clear:
>>>>>>> from your last email I understand that the new site can be where I
>>>>>>> prefer. I would say that for now I can leave it inside contrib/geosites, if
>>>>>>> I can of course.
>>>>>>> Then I have doubts to setup these lines:
>>>>>>>
>>>>>>> - In the normal config I have Alias /geonode
>>>>>>> /dati/geonode/geonode but I think I should change to link it to my new
>>>>>>> site, is it right?
>>>>>>> - In WSGIProcessGroup the normal config has geonode, for my new
>>>>>>> site do I need to change it?
>>>>>>> - Regarding the directive Directory I had <Directory
>>>>>>> "/dati/geonode/geonode/"> for the normal config, here should I insert the
>>>>>>> path to my new site?
>>>>>>> - Regarding /uploaded/ and /static/ Aliases, I understood from
>>>>>>> your email I can put those directory where I prefer. Now another trivial
>>>>>>> question: /uploaded/ and /static/ folder have to be different from those
>>>>>>> created for the normal installation? if no, then it is easy both configure
>>>>>>> the virtual host and run collectstatic. If yes, it is not clear how to run
>>>>>>> collectstatic for the new site. That's why the command python manage.py
>>>>>>> collectstatic works only within geonode folder and fill in the normal
>>>>>>> static_root folder. Could you clarify this point?
>>>>>>> - Last but not least the line WSGIDaemonProcess is not clear,
>>>>>>> because running: service apache reload I had an error: Name
>>>>>>> duplicates previous WSGI daemon definition (that's why apache find the
>>>>>>> virtualhost I have for the normal installation. The normal installation
>>>>>>> has: WSGIDaemonProcess geonode python-path=/dati/geonode/:/da
>>>>>>> ti/.venvs/geonode/lib/python2.7/site-packages user=eugenio
>>>>>>> threads=15 processes=2 How should sort out this line for the new site?
>>>>>>>
>>>>>>> I offer myself to prepare an how to for dummies to be included as
>>>>>>> documentation in git, if I will be able to configure geosites.
>>>>>>>
>>>>>>> Thanks for any clarification
>>>>>>>
>>>>>>> Eugenio
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------
>>>>>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>>>>>> *Inviato:* lunedì 19 dicembre 2016 18.33
>>>>>>>
>>>>>>> *A:* Eugenio Trumpy
>>>>>>> *Cc:* geonode-users at lists.osgeo.org
>>>>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>>>>
>>>>>>> I mean the whole gemex folder can be outside. For the static roots
>>>>>>> they can be anywhere and is not recommended to have them inside but rather
>>>>>>> in /var/www as they need to be served by the web server at some point.
>>>>>>>
>>>>>>> 2016-12-19 16:50 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>:
>>>>>>>
>>>>>>>> Ok, once I run syncdb I 'm able to register new site! first step!!!!
>>>>>>>>
>>>>>>>>
>>>>>>>> Coming back to the first issue, I'm not sure to have understood
>>>>>>>> well, do you mean the dir thumb, layers, static_root can stay ouside my
>>>>>>>> newsite directory?
>>>>>>>>
>>>>>>>> That means I cannot run collectstatic if those dirs are inside my
>>>>>>>> site dir?
>>>>>>>>
>>>>>>>> Actually in the docs I read I saw that the static folder is inside
>>>>>>>> the new sites.
>>>>>>>>
>>>>>>>>
>>>>>>>> This part is not so clear to me....
>>>>>>>>
>>>>>>>>
>>>>>>>> E.
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------
>>>>>>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>>>>>>> *Inviato:* lunedì 19 dicembre 2016 16.22
>>>>>>>>
>>>>>>>> *A:* Eugenio Trumpy
>>>>>>>> *Cc:* geonode-users at lists.osgeo.org
>>>>>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>>>>>
>>>>>>>> It is a good practice to not install the new sites folders into the
>>>>>>>> root of the code. They can live outside without problems.
>>>>>>>>
>>>>>>>> The second issue is that you did not run python manage.py syncdb or
>>>>>>>> migrate to install the tables that come with geosites.
>>>>>>>>
>>>>>>>> 2016-12-19 15:50 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com>
>>>>>>>> :
>>>>>>>>
>>>>>>>>> Sorry for these multiple emails,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I following your suggestion to create the site by hand I proceeded
>>>>>>>>> to register the new site by using the admin console as you suggested.
>>>>>>>>>
>>>>>>>>> On save action I had this error message:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> http://pastebin.com/SskX1QNB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> It seems geonode.contrib.geosites is not installed yet, right?
>>>>>>>>>
>>>>>>>>> E.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------
>>>>>>>>> *Da:* Eugenio Trumpy <frippe12573 at hotmail.com>
>>>>>>>>> *Inviato:* lunedì 19 dicembre 2016 15.37
>>>>>>>>> *A:* Simone Dalmasso
>>>>>>>>>
>>>>>>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Ok,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> this is my new virtualhost prepared for the new site named 'gemex':
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <VirtualHost *:80>
>>>>>>>>> ServerName http://gemex.igg.cnr.it
>>>>>>>>> ServerAdmin webmaster at localhost
>>>>>>>>> DocumentRoot /var/www/html
>>>>>>>>>
>>>>>>>>> Options -Indexes +FollowSymLinks
>>>>>>>>>
>>>>>>>>> Alias /gemex "/dati/geonode/geonode/contrib/geosites"
>>>>>>>>>
>>>>>>>>> WSGIDaemonProcess gemex python-path=/dati/geonode/geon
>>>>>>>>> ode/contrib/geosites:/dati/.venvs/geonode/lib/python2.7/site-packages
>>>>>>>>> user=eugenio threads=15 processes=2
>>>>>>>>>
>>>>>>>>> ErrorLog /var/log/apache2/error.log
>>>>>>>>> LogLevel warn
>>>>>>>>> CustomLog /var/log/apache2/access.log combined
>>>>>>>>>
>>>>>>>>> WSGIProcessGroup gemex
>>>>>>>>> WSGIPassAuthorization On
>>>>>>>>> WSGIScriptAlias / /dati/geonode/geonode/contrib/
>>>>>>>>> geosites/gemex/wsgi.py
>>>>>>>>>
>>>>>>>>> <Directory "/dati/geonode/geonode/contrib/geosites/gemex">
>>>>>>>>> Options Indexes FollowSymLinks
>>>>>>>>> Require all granted
>>>>>>>>> IndexOptions FancyIndexing
>>>>>>>>> </Directory>
>>>>>>>>>
>>>>>>>>> Alias /uploaded/ /dati/geonode/geonode/contrib/
>>>>>>>>> geosites/gemex/uploaded/
>>>>>>>>> Alias /static/ /dati/geonode/geonode/contrib/
>>>>>>>>> geosites/gemex/static_root/
>>>>>>>>>
>>>>>>>>> ProxyPreserveHost On
>>>>>>>>> ProxyPass /geoserver http://localhost:8080/geoserver
>>>>>>>>> ProxyPassReverse /geoserver http://localhost:8080/geoserver
>>>>>>>>>
>>>>>>>>> ProxyPass /geoserver2 http://localhost:8080/geoserver2
>>>>>>>>> ProxyPassReverse /geoserver2 http://localhost:8080/geoserver2
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> </VirtualHost>
>>>>>>>>>
>>>>>>>>> My concerns are:
>>>>>>>>>
>>>>>>>>> - WSGIDeamon line, is that correct?
>>>>>>>>> - the first Alias, is that correct too?
>>>>>>>>> - Eventually the Directory is right?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Moreover, I followed again this page for the http setup:
>>>>>>>>> http://docs.geonode.org/en/master/tutorials/install_and_admi
>>>>>>>>> n/geonode_install/setup_configure_httpd.html
>>>>>>>>>
>>>>>>>>> I think now should be rready for the collecstatic command, but I
>>>>>>>>> don't know how to run it in in the new static_root inside my site gemex.
>>>>>>>>>
>>>>>>>>> Any hints?
>>>>>>>>>
>>>>>>>>> E.
>>>>>>>>> Setup & Configure HTTPD — GeoNode 2.4 documentation
>>>>>>>>> <http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/setup_configure_httpd.html>
>>>>>>>>> docs.geonode.org
>>>>>>>>> Setup & Configure HTTPD¶ In this section we are going to setup
>>>>>>>>> Apache HTTP to serve GeoNode.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------
>>>>>>>>> *Da:* Simone Dalmasso <simone.dalmasso at gmail.com>
>>>>>>>>> *Inviato:* lunedì 19 dicembre 2016 15.03
>>>>>>>>> *A:* Eugenio Trumpy
>>>>>>>>> *Cc:* geonode-users at lists.osgeo.org
>>>>>>>>> *Oggetto:* Re: Multi-Tenancy: how to start
>>>>>>>>>
>>>>>>>>> Exactly, one virtualhost for each site.
>>>>>>>>>
>>>>>>>>> 2016-12-19 14:53 GMT+01:00 Eugenio Trumpy <frippe12573 at hotmail.com
>>>>>>>>> >:
>>>>>>>>>
>>>>>>>>>> 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>:
>>>>>>>>>>
>>>>>>>>>>> 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>
>>>>>>>>>>> *Inviato:* lunedì 19 dicembre 2016 11.04
>>>>>>>>>>> *A:* Eugenio Trumpy
>>>>>>>>>>> *Cc:* 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>:
>>>>>>>>>>>
>>>>>>>>>>>> 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>
>>>>>>>>>>>> *Inviato:* lunedì 19 dicembre 2016 09.04
>>>>>>>>>>>> *A:* Eugenio Trumpy
>>>>>>>>>>>> *Cc:* 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>:
>>>>>>>>>>>>
>>>>>>>>>>>>> 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>
>>>>>>>>>>>>> *Inviato:* venerdì 16 dicembre 2016 15.04
>>>>>>>>>>>>> *A:* 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/mu
>>>>>>>>>>>>> lti-tenancy.html
>>>>>>>>>>>>>
>>>>>>>>>>>>> [2] https://github.com/GeoNode/geonode/tree/master/geonode/c
>>>>>>>>>>>>> ontrib/geosites
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Simone
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Simone
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Simone
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Simone
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Simone
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Simone
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Simone
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Simone
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Simone
>>>>
>>>
>>>
>>>
>>> --
>>> Simone
>>>
>>
>>
>>
>> --
>> Simone
>>
>
>
>
> --
> Simone
>
--
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170310/7f1dc18f/attachment-0001.html>
More information about the geonode-users
mailing list