Skip to content

Instantly share code, notes, and snippets.

@LincolnBryant
Last active July 7, 2021 21:18
Show Gist options
  • Save LincolnBryant/c845165c9e4baddae05c2f2120dec406 to your computer and use it in GitHub Desktop.
Save LincolnBryant/c845165c9e4baddae05c2f2120dec406 to your computer and use it in GitHub Desktop.

Portal is running under a uwsgi process behind nginx.

For the python3 transition:

Stop uwsgi, stop nginx

systemctl stop nginx
systemctl stop uwsgi

Install python3 + development headers

yum install python3 python3-devel -y

Move old venv out of the way and create a new one with Python 3.6

cd /etc/slate
mv venv venv-2.6
python3 -m venv venv 
cd slate-website-python
pip install --upgrade pip
pip install -r requirements.txt

Install the new UWSGI plugin for Python 3.6

yum install uwsgi-plugin-python36 -y

Configure UWSGI to use the new plugin (in patch(1) format)

--- slate.ini-2.6       2021-07-07 21:13:43.879417485 +0000
+++ slate.ini   2021-07-07 21:02:09.846930629 +0000
@@ -2,7 +2,7 @@
 socket = :3031
 master = true
 processes = 32
-plugins = python
+plugins = python36
 venv = /etc/slate/venv
 user = centos
 chdir = /etc/slate/slate-website-python

Restart uwsgi and nginx

systemctl start uwsgi
systemctl start nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment