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

The installer assumes python2, python3 only server doens't work #78

Open
solbu opened this issue Mar 1, 2022 · 4 comments
Open

The installer assumes python2, python3 only server doens't work #78

solbu opened this issue Mar 1, 2022 · 4 comments

Comments

@solbu
Copy link

solbu commented Mar 1, 2022

Hi.
We are trying to upgrade norways mapit instance in a Debian 11 server.
The problem we encounter is that Debian 11 no longer supports Python2, but all packages that the mapit installer (as initiated by install-site.sh) wants to install is hardcoded to assume python2. Several of the packages no longer exist on Debian, such as python-flup, which needs to be installed using «pip3 install flup-py3».

Is it really not possible to install this on a python3 only server?

@dracos
Copy link
Member

dracos commented Mar 1, 2022

Sorry, the install script has not been updated in some time and yes, is still written for python2 (and looks like it has other issues, e.g. assuming any PostGIS version that isn't 2 must be less than 2!). I'm afraid I'm not sure when we might have the time to look at updating the install script.

It's definitely possible to install MapIt on a python3 only server, and MapIt is python 2/3 agnostic. MapIt is a Django project, so you may be better off picking whichever Django deployment suits you best: https://docs.djangoproject.com/en/3.2/howto/deployment/ - for my last personal Django project on bullseye I used Apache and libapache2-mod-wsgi-py3 which is working well.

Apart from the Django project serving, MapIt needs access to a PostGIS database, and a few Debian packages as listed in conf/packages.generic. You would need to create a conf/general.yml file from the example file in the same directory, and conf/post_deploy_actions.bash should then set up a virtual environment, update the database and collect the static files together.

Hope that's helpful, sorry again that we haven't been able to keep the install script up to date.

@solbu
Copy link
Author

solbu commented Mar 1, 2022

Is there some documentation on how to install this thing without using the install script?

@solbu
Copy link
Author

solbu commented Mar 1, 2022

We have the conf file, as we already have a running server which is serving the norwegian FixMyStreet instance – our problem is that it is still running on Debian 7 and we have been given an ultimatum by our hosting provider (a univercity) to upgrade it or shut it down, and I have been given the task to try and upgrade it – which I am attempting to do on a cloned virtual machine.

My main problem is that there is no documentation that I can find on how to install or upgrade the thing without using the damned, old installer. ;-)

@dracos
Copy link
Member

dracos commented Mar 1, 2022

The only documentation I think we have is http://code.mapit.mysociety.org/install/ - you want the "Installation standalone with the example project" section, not the "Installation as a Django app" section. However, this basically outlines the same things I said above - from what you say, you already have a PostGIS database and a config file, so setting up a web server that can serve a Django project sounds like the only main step you need to do. We include example Apache and nginx configuration in conf, or the Django docs I link to above include various examples as well.

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

No branches or pull requests

2 participants