User Tools

Site Tools


projects:hackhub

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
projects:hackhub [2020/04/19 13:06] hibbyprojects:hackhub [2020/07/07 20:48] – external edit 127.0.0.1
Line 1: Line 1:
 ====== Hackhub ====== ====== Hackhub ======
  
-Hackhub is our member database.+Hackhub is our member database and lives on [[projects:finzean|Finzean]].
  
-Hackhub lives at [[https://github.com/hackerdeen/hackhub|Github]].+It is very closely integrated with [[projects:57_north_id|57North ID]] and both need to be running.
  
 +Hackhub code is hosted at [[https://github.com/hackerdeen/hackhub|Github]].
  
 ===== Hibby's work in progress attempt to set up hackhub on a server===== ===== Hibby's work in progress attempt to set up hackhub on a server=====
Line 16: Line 17:
     * Flask     * Flask
   * Apache2   * Apache2
 +    * libapache2-mod-wsgi
   * sqlite3   * sqlite3
   * slapd   * slapd
Line 25: Line 27:
  
   - Install Debian Stable   - Install Debian Stable
-  - ''apt install python-flask sqlite3 slapd ldap-utils ldapscripts git apache2'' +  - ''apt install python-flask sqlite3 slapd ldap-utils ldapscripts git apache2 libapache2-mod-wsgi python-virtualenv python-ldap'' 
-  - ''git clone https://github.com/hackerdeen/hackhub'' +  - Import LDAP 
-  - ''git clone https://github.com/hackerdeen/57n-id'' +  - Migrate hackhub DB - ''/home/hackhub/hackhub.db'' 
 +  - ''adduser hackhub'' - ensure hackhub has no password, has a ''/home/hackhub'' and a shell of /bin/sh 
 +  - ''pip2 install python-cas monthdelta'' 
 +  - ''su -l hackhub'' 
 +    - ''git clone https://github.com/hackerdeen/hackhub'' 
 +    Configure ''hackhub/local_settings.py''  
 +    - ''cd && virtualenv .hackhub'' 
 +  - Configure [[projects:57_north_id|ID]] 
  
 +
 +
 +===== LDAP =====
 ==== Exporting LDAP ==== ==== Exporting LDAP ====
  
Line 58: Line 70:
 Start slapd: Start slapd:
   - ''systemctl start slapd''    - ''systemctl start slapd'' 
 +
 +====== Apache ======
 +===== Modules =====
 +  - ''a2enmod rewrite''
 +  - ''a2enmod wsgi''
 +
 +===== Hackhub site file =====
 +==== Cleartext ====
 +<code>
 +<VirtualHost *:80>
 +        ServerName hub.57north.org.uk
 +        ServerAdmin ctte-private@57north.co
 +        RewriteEngine on
 +        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]
 +</VirtualHost>
 +
 +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
 +</code>
 +==== SSL ====
 +<code>
 +<IfModule mod_ssl.c>
 +WSGIPythonPath /home/hackhub/hackhub
 +<VirtualHost *:443>
 +        ServerName hub.57north.org.uk
 +        ServerAdmin ctte-private@57north.co
 +        SSLCertificateFile /etc/letsencrypt/live/hub.57north.org.uk/fullchain.pem
 +        SSLCertificateKeyFile /etc/letsencrypt/live/hub.57north.org.uk/privkey.pem
 +        Include /etc/letsencrypt/options-ssl-apache.conf
 +
 +        WSGIDaemonProcess hackhub user=hackhub group=hackhub threads=2
 +        WSGIScriptAlias / /home/hackhub/hackhub/hackhub.wsgi
 +        DocumentRoot /home/hackhub/hackhub
 +
 +        RewriteEngine On
 +        RewriteRule ^/$ https://57north.org.uk [L,R=301]
 +
 +        <Directory /home/hackhub/hackhub>
 +                WSGIProcessGroup hackhub
 +                WSGIApplicationGroup %{GLOBAL}
 +                Require all granted
 +        </Directory>
 +</VirtualHost>
 +
 +
 +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
 +</IfModule>
 +</code>
  
 {{tag>project active software ormiret finzean infrastructure ID}} {{tag>project active software ormiret finzean infrastructure ID}}
projects/hackhub.txt · Last modified: 2022/09/07 13:29 by hibby