[Mayan EDMS: 50] to virtualenv or not?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 50] to virtualenv or not?

Gour
Hello!

The Mayan Docs says that "Mayan EDMS should be deployed like any other
Django_ project and preferably using virtualenv." and considering that
for now it would be the only Django application which I may run
(preferably) with Cherokee webserver + uwsgi, I wonder do you still
recommend using virtualenv or it is not really necessary?


Sincerely,
Gour

--
But a person free from all attachment and aversion and able
to control his senses through regulative principles of
freedom can obtain the complete mercy of the Lord.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 52] to virtualenv or not?

Roberto Rosario
Hi,
It is not necessary, it's just a strong recommendation mainly to reduce
dependency conflicts by isolation from the main Python system install.
If not using a virtualenv, pip would install Mayan's dependencies
globally coming in conflict with the distribution's prepackaged Python
libraries messing other Django projects or Python programs, or another
later Python/Django project dependencies coming into conflict causing
Mayan to stop working for no apparent reason.  One way to provide a
simple non virtualenv install would be to provide Ubuntu/RPM packaged
versions of Mayan EDMS.  I tried this once but the process still eludes
me.  If someone wants to give it a try this would be a most welcome
addition :)

On a side note, been reading about Cherokee and have to admit it has
caught my attention.

On 01/25/2012 07:23 AM, Gour wrote:

> Hello!
>
> The Mayan Docs says that "Mayan EDMS should be deployed like any other
> Django_ project and preferably using virtualenv." and considering that
> for now it would be the only Django application which I may run
> (preferably) with Cherokee webserver + uwsgi, I wonder do you still
> recommend using virtualenv or it is not really necessary?
>
>
> Sincerely,
> Gour
>


signature.asc (566 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 52] Re: to virtualenv or not?

rosarior
Administrator
In reply to this post by Gour
Hi,

Not necessary, just a strong recommendation to avoid package conflicts with the main Python system install.  If not using virtualenv, pip would install Mayan's dependencies system wide overwriting the distribution packages, or other projects/Python programs installing their dependencies and causing Mayan to stop working for no apparent reason.  One way to prove non virtualenv install without conflicts would be to provide a deb/rpm packaged version of Mayan EDMS.  I gave this a try once, but the process still eludes me (saw this the other day https://github.com/jordansissel/fpm, might try again soon)

On a side note, been reading about Cherokee, have to admit it has gained may attention.
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 53] to virtualenv or not?

Roberto Rosario
In reply to this post by Roberto Rosario
Sorry for the double posting, thought the one posted on gname had failed.

On Wed, Jan 25, 2012 at 9:02 AM, Roberto Rosario <[hidden email]> wrote:
Hi,
It is not necessary, it's just a strong recommendation mainly to reduce
dependency conflicts by isolation from the main Python system install.
If not using a virtualenv, pip would install Mayan's dependencies
globally coming in conflict with the distribution's prepackaged Python
libraries messing other Django projects or Python programs, or another
later Python/Django project dependencies coming into conflict causing
Mayan to stop working for no apparent reason.  One way to provide a
simple non virtualenv install would be to provide Ubuntu/RPM packaged
versions of Mayan EDMS.  I tried this once but the process still eludes
me.  If someone wants to give it a try this would be a most welcome
addition :)

On a side note, been reading about Cherokee and have to admit it has
caught my attention.

On 01/25/2012 07:23 AM, Gour wrote:
> Hello!
>
> The Mayan Docs says that "Mayan EDMS should be deployed like any other
> Django_ project and preferably using virtualenv." and considering that
> for now it would be the only Django application which I may run
> (preferably) with Cherokee webserver + uwsgi, I wonder do you still
> recommend using virtualenv or it is not really necessary?
>
>
> Sincerely,
> Gour
>



Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 54] to virtualenv or not?

Gour
In reply to this post by Roberto Rosario
On Wed, 25 Jan 2012 09:02:19 -0400
Roberto Rosario
<[hidden email]> wrote:

> It is not necessary, it's just a strong recommendation mainly to
> reduce dependency conflicts by isolation from the main Python system
> install. If not using a virtualenv, pip would install Mayan's
> dependencies globally coming in conflict with the distribution's
> prepackaged Python libraries messing other Django projects or Python
> programs, or another later Python/Django project dependencies coming
> into conflict causing Mayan to stop working for no apparent reason.

Yeah, that's a good reason to keep virtualenv setup.

> On a side note, been reading about Cherokee and have to admit it has
> caught my attention.

I managed to make Mayan work under Cherokee via uWSGI (using
../wsgi/dispatcher.wsgi script), but still figthing to get static media
displayed. :-(

It looks as whenever I play with Django, serving static media is always
issue for me. :-)


Sincerely,
Gour


--
One who is not disturbed in mind even amidst the threefold
miseries or elated when there is happiness, and who is free
from attachment, fear and anger, is called a sage of steady mind.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 55] to virtualenv or not?

rosarior
Administrator
Installed Cherokee and the first thing that blew my mind was the admin interface, incredible!
I'm still trying to learn the paradims of Cherokee, for example trying to get you to specify a Document Root for everything, even when it doesn't apply.  Managed to get static content running, but not uwsgi.  On the Mayan vServer add a new behavior of type 'Directory' and set 'Web Directory' to '/mayan-static/', on  the 'Handler' tab, set the 'Handler' to 'Static Content' and set the 'Document Root' to the static folder created when you run ./manager collectstatic, that's all I've managed to get running.  The uwsgi (set to /) only returns error 500 all the time but no error entries in the log file.

On Wed, Jan 25, 2012 at 2:49 PM, Gour <[hidden email]> wrote:
On Wed, 25 Jan 2012 09:02:19 -0400
Roberto Rosario
<[hidden email]> wrote:

> It is not necessary, it's just a strong recommendation mainly to
> reduce dependency conflicts by isolation from the main Python system
> install. If not using a virtualenv, pip would install Mayan's
> dependencies globally coming in conflict with the distribution's
> prepackaged Python libraries messing other Django projects or Python
> programs, or another later Python/Django project dependencies coming
> into conflict causing Mayan to stop working for no apparent reason.

Yeah, that's a good reason to keep virtualenv setup.

> On a side note, been reading about Cherokee and have to admit it has
> caught my attention.

I managed to make Mayan work under Cherokee via uWSGI (using
../wsgi/dispatcher.wsgi script), but still figthing to get static media
displayed. :-(

It looks as whenever I play with Django, serving static media is always
issue for me. :-)


Sincerely,
Gour


--
One who is not disturbed in mind even amidst the threefold
miseries or elated when there is happiness, and who is free
from attachment, fear and anger, is called a sage of steady mind.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 56] Cherokee setup (was to virtualenv or not?)

Gour
On Wed, 25 Jan 2012 16:23:56 -0400
Roberto Rosario Gonzalez
<[hidden email]>
wrote:

> Installed Cherokee and the first thing that blew my mind was the admin
> interface, incredible!

:-)

> I'm still trying to learn the paradims of Cherokee, for example
> trying to get you to specify a Document Root for everything, even
> when it doesn't apply.  i

> Managed to get static content running, but
> not uwsgi.  

Interesting...

> On the Mayan vServer add a new behavior of type
> 'Directory' and set 'Web Directory' to '/mayan-static/', i

I did that.

> on  the 'Handler' tab, set the 'Handler' to 'Static Content'

That's what I did as well...

> and set the 'Document Root' to the static folder created when you run ./manager
> collectstatic, that's all I've managed to get running.  

That was missing in my case...tried it, but still nothing.

> The uwsgi (set to /) only returns error 500 all the time but no error
> entries in the log file

Here is my 'uwsgi' line from the Sources:

/srv/http/mayan/bin/uwsgi -s 127.0.0.1:41340 --pythonpath /srv/http/mayan --virtualenv /srv/http/mayan  \
-M -p 2 -z 360 -L -l 128 /srv/http/mayan/mayan/wsgi/dispatch.wsgi


Maybe we should combine to get it running. ;)


Sincerely,
Gour


--
Those persons who execute their duties according to My injunctions
and who follow this teaching faithfully, without envy, become free
from the bondage of fruitive actions.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Mayan under uWSGI & Cherokee (was Re: [Mayan EDMS: 103] to virtualenv or not)

Gour
In reply to this post by rosarior
On Wed, 25 Jan 2012 16:23:56 -0400
Roberto Rosario Gonzalez
<[hidden email]>
wrote:

> The uwsgi (set to /) only returns error 500 all the time but no error
> entries in the log file.

Although I do not have time atm to proceed further with my Mayan setup,
I'm just curious if you managed to get uWSGI workign with Cherokee?


Sincerely,
Gour


--
The senses are so strong and impetuous, O Arjuna,
that they forcibly carry away the mind even of a man
of discrimination who is endeavoring to control them.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mayan under uWSGI & Cherokee (was Re: [Mayan EDMS: 106] to virtualenv or not)

rosarior
Administrator
No, I haven't had the chance to work on this, but it is something that interests me so at some point I will try again and document the process.  From what the performance increase appears to be, it may well become the recommended setup for Mayan EDMS in the future.