Trace: github kallithea

Kallithea

$ sudo apt-get install gcc
$ sudo useradd kallithea
$ sudo mkdir /opt/kallithea
$ sudo chown kallithea.kallithea /opt/kallithea/
$ sudo su - kallithea
$ mkdir /opt/kallithea/var
$ virtualenv --python=/usr/bin/python2.7 /opt/kallithea/
$ source /opt/kallithea/bin/activate
$ pip install --upgrade pip "setuptools<34"
$ pip install kallithea
$ cd /opt/kallithea
$ paster make-config Kallithea my.ini
$ paster setup-db my.ini --user=$USERNAME --password="$PASSWORD" --host="$IPADDRESS" [email protected] --repos=/home/semaphore

Configure the repository path to /opt/kallithea/var in the wizard, configure a admin username with password.

Configure HTTPS proxy editing my.ini, adding or uncommenting:

filter-with = proxy-prefix
[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /kallithea

Start Kallithea:

$ paster serve my.ini

Add file to /etc/apache2/sites-available/kallithea.conf:

<Location /kallithea >
  ProxyPass http://127.0.0.1:5000/kallithea
  ProxyPassReverse http://127.0.0.1:5000/kallithea
  SetEnvIf X-Url-Scheme https HTTPS=1
</Location>

Enable site and restart:

$ sudo a2ensite kallithea
$ sudo systemctl restart apache2

Systemd

[Unit]
Description=Kallithea Virtualenv service
After=network.target

[Service]
User=kallithea
Group=kallithea
Environment=VIRTUAL_ENV=/opt/kallithea
Environment=PATH=$VIRTUAL_ENV/bin:$PATH
ExecStart=/bin/bash -c "cd /opt/kallithea; $VIRTUAL_ENV/bin/paster serve my.ini"
Restart=always

[Install]
WantedBy=multi-user.target

IPA LDAP integration

If you are using RHEL (sorry I have mixed environments):

$ sudo yum install openldap-devel
$ source /opt/kallithea/bin/activate
$ pip install python-ldap
$ pip install psycopg2

References

kallithea.txt · Last modified: 2018/01/30 10:03
Public Domain Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain