mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-27 09:55:58 +03:00
[GH-ISSUE #657] A safe/quick upgrade procedure since 1.2? #613
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#613
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @piwats on GitHub (Dec 14, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/657
Hi there,
as 1.2-rc2 was released today (or yesterday ?) I just wanted to upgrade to it.
I see that the pip install --upgrade method won't work, as I ran into the django-versionfiled error again (tha means I have to redeploy completely).
So my question is, does modoboa currently has an upgrade path which does not require a redeployment of the whole installation?
If not, would it be possible to create one, at least some kind of a method which retakes configuration settings from the settings.py and enables them in the freshly deployed folder of modoboa?
This is because I don't think, that the upgrade by completely redeploying the whole setup is a good way to go, at least not when updates coming out frequently - this requires also many things which have to be done manually...
-Paul
@piwats commented on GitHub (Dec 14, 2014):
I now did the upgrade via the redeployment:
would it be possible to add to the
command also an optional option like --subdir (--nginx_subdir/uwsgi_subdir/ext_web_server_subdir) string which would lead to a correct setting of
LOGIN_URL = '/string/accounts/login/'
STATIC_URL = '/string/sitestatic/'
MEDIA_URL = '/string/media/'
this would make any further changes to the settings.py when redeploying/upgrading obsolete.
That would be nice :)
-Paul
@controlcde commented on GitHub (Dec 15, 2014):
For me it works if I done in virtualenv:
pip install --allow-external django-versionfield modoboa==1.2.0-rc2but the redeployment went wrongVery strange: If i look in the Modoboa web interface I could see under Information "Modoboa 1.2.0-rc2 is currently in use." - which version now I have?
And: Is it necessary to delete the installation and recreate the /srv/mailadmin folder with modoboa-admin.py?
@piwats commented on GitHub (Dec 15, 2014):
yes the old deployment has to be deleted in order to upgrade - else you get into the error that the folder already exists
@controlcde commented on GitHub (Dec 15, 2014):
so I have to change the settings.py and wsgi.py after each upgrade to setup up the things that I needed? That´s not very comfortable ;(.
@piwats commented on GitHub (Dec 15, 2014):
wsgi.py?
@controlcde commented on GitHub (Dec 15, 2014):
For working in my setup with virtualenv I have to add the following lines:
else it won´t running.
I´ve to say: I don´t use an unusual installation - it´s a Debian Wheezy with apache2.
@tonioo commented on GitHub (Dec 15, 2014):
Unfortunately, there is no easy way to upgrade a modoboa instance... Doing it manually by reading the documentation requires some work and I don't always have the time for it. From my point of view, forcing people to redeploy avoids stupid mistakes... And the procedure is even more easier for the ones running an automation tool like ansible/chef/puppet/whatever.
About customization, I could add a new option to indicate an extra python file to include at the end of the generated settings.py file... I'll think about it.
About the apache configuration, you're not supposed to modify the wsgi.py file. You should use the daemon mode instead. (see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/modwsgi/#using-mod-wsgi-daemon-mode)
@controlcde commented on GitHub (Dec 15, 2014):
@tonioo I´ve done the apache2 configuration like described in documentation (or: I think so)
my VirtualEnv path is
/srv/venv/modoboa, the modoboa installation path is/srv/mailadmin.The apache2 configuration is
And if I don´t set up the
wsgi.pylike I do I get the following error:@tonioo commented on GitHub (Dec 15, 2014):
The first element in the python-path list shoud be /srv/mailadmin.
@controlcde commented on GitHub (Dec 15, 2014):
Thanks, now it works. The different paths are irritating for me :) sometimes I have to use /srv/mailadmin - sometimes it is needed to set up /srv/mailadmin/mailadmin (I´ve read many howtos to get modoboa running so maybe a few of them are not 100% correct). It´s a little bit confusing.
After I install modoboa the first time I don´t understood the nested folder with the same name like the site dir - that´s the confusing part of it.
@tonioo commented on GitHub (Dec 15, 2014):
This layout is imposed by Django. There is a difference between the top directory which contains your instance and all related files (CSS/JS/whatever) and the sub directory which is a python module. In your case, you don't see any difference because the name does not contain strange characters. The name of the subdirectory must respect the rules applied to python modules.
About the different pathes, only 2 are important :
Do you understand better now ?
@controlcde commented on GitHub (Dec 16, 2014):
Thanks @tonioo for clarification.