Use these steps if you need to upgrade an existing ESGF installation that is running Python2 CoG. A key assumption is that CoG is already set up with the PostgreSQL database and settings file.
yum install httpd-devel sqlite-devel
cd /usr/local/cog/cog_install
git fetch #
Git checkout python_3
source /usr/local/conda/etc/profile.d/conda.sh
conda create -y -n cog_py3 'python>=3.7,<3.9' pip
conda activate cog_py3
pip install 'mod_wsgi' 'git+https://github.com/edx-unsupported/django-openid-auth' -r requirements.txt
python setup.py --quiet install
cd /etc
cog-wsgi-8889/apachectl stop
mv cog-wsgi-8889 cog-wsgi-8889-old
cd /usr/local/cog/cog_install
mod_wsgi-express setup-server apache/wsgi.py \
--server-root /etc/cog-wsgi-8889 \
--user apache --group apache \
--host localhost --port 8889 \
--url-alias /static /usr/local/cog/cog_install/static/
chown -R apache:apache /usr/local/cog