Skip to content
Dan Kerchner edited this page Aug 31, 2020 · 5 revisions

Welcome to the libcal_pp_integration wiki!

Deployment

The following instructions have been tested for deployment on Ubuntu 20.04.

Package installations

sudo apt update
sudo apt upgrade
sudo apt install python3 python3-pip supervisor
sudo pip3 install virtualenv

App setup

Create lcpp user

The lcpp user will own the app. Create it using:

sudo adduser --disabled-password lcpp

Clone github repository

cd /opt
sudo git clone https://github.com/gwu-libraries/libcal_pp_integration.git
sudo chown -R lcpp:lcpp libcal_pp_integration

Note that until we make this GitHub repository public, you will need to enter your personal github credentials. This could become a problem if a different individual later needs to pull an update from the repo.

cd libcal_pp_integration
virtualenv ENV
pip install -r requirements.txt

Supervisor setup

Create the supervisor configuration file for the application.

cd /etc/supervisor/conf.d
sudo vi lcpp.conf

The contents of lcpp.conf should be similar to:

[program:lcpp]
user=lcpp
command=/opt/libcal_pp_integration/ENV/bin/python /opt/libcal_pp_integration/app.py --debug

Make sure supervisor reads the new configuration file:

sudo supervisorctl update lcpp

Starting and stopping the lcpp process with supervisor

sudo supervisorctl [start/stop/restart] lcpp

And where are the logs?

Supervisor should take the error log output from the application and write it to a file located in /var/log/supervisor/.

We can improve this configuration if we desire.

Clone this wiki locally