Size: 4180
Comment: Correct path in instructions
|
Size: 4374
Comment: Update instructions to initialize the database
|
Deletions are marked like this. | Additions are marked like this. |
Line 45: | Line 45: |
1. Set up everything else (it's a long slog but isn't that bad!). | 1. Set up everything else (it's a long slog but isn't that bad!). You will be prompted to enter details for a superuser account. Please enter an email address otherwise the database won't be setup correctly and you will run into errors later. |
Line 54: | Line 54: |
python manage.py syncdb --migrate | python manage.py migrate python manage.py createsuperuser |
Line 63: | Line 64: |
python manage.py runserver & cd .. |
python manage.py runserver |
Line 69: | Line 69: |
Okay, now you're got postorius up and running, but you'll need to do some other config to get HyperKitty going. Just follow the guide here: https://hyperkitty.readthedocs.org/en/latest/development.html. Since we also have Postorius running, you'll have to add "8002" the last ``runserver`` command, because you need an available port: | Okay, now you're got postorius up and running, but you'll need to do some other config to get HyperKitty going. Just follow the guide here: https://hyperkitty.readthedocs.org/en/latest/development.html. Since we also have Postorius running, you'll have to add "8002" to the last ``runserver`` command, because you need an available port: |
Line 108: | Line 108: |
(updated on 07 march 2015) | (updated on 29 feb 2016) |
Setting Up Hyperkitty for Development
This is cobbled together from http://wiki.list.org/display/DEV/A+5+minute+guide+to+get+the+Mailman+web+UI+running and https://hyperkitty.readthedocs.org/en/latest/development.html and testing things out!!
Get mailman 3 and postorius working
Here's the basic setup steps to get mailman and postorius working:
- Make a directory to store everything. I set up /home/duffy/Repositories.
- Make sure you have some necessary packages. I use Fedora 21 so I'll refer to Fedora stuff. You may need to adjust package names for your distro, and this list may not be exhaustive:
sudo yum install python-setuptools python-devel python-virtualenv python3-devel git gcc nodejs-less postfix
On Debian and Ubuntu, this may be something like: sudo apt-get install python-setuptools python-dev python-virtualenv python3-dev git gcc node-less nodejs postfix
Note: If you get errors like lessc: command not found or FilterError while compiling bootstrap-custom.css it means either you don't have less-css compiler installed or its version is <1.5 (which is the minimum required for hyperkitty). Run the command below:
sudo npm install -g less .
- Get all of the source code you need.
cd ~/Repositories git clone git@gitlab.com:mailman/mailman.git git clone git@gitlab.com:mailman/mailmanclient.git git clone git@gitlab.com:mailman/postorius.git git clone git@gitlab.com:mailman/postorius_standalone.git git clone git@gitlab.com:mailman/hyperkitty.git git clone git@gitlab.com:mailman/hyperkitty_standalone.git git clone git@gitlab.com:mailman/mailman-hyperkitty.git
Make your virtual environments. Mailman needs Python 3.4+ but Postorius and HyperKitty still run on 2.7. The command names are different because Python 3 has the ability to create virtual environments built-in.
pyvenv-3.4 venv-3.4 virtualenv venv-2.7 source venv-2.7/bin/activate
- Set up mailman using the python executable from the 3.4 virtualenv. You should get a positive message at the end of this saying that mailman is essentially running.
cd mailman ../venv-3.4/bin/python setup.py install ../venv-3.4/bin/mailman start cd ..
- Set up everything else (it's a long slog but isn't that bad!). You will be prompted to enter details for a superuser account. Please enter an email address otherwise the database won't be setup correctly and you will run into errors later.
cd mailmanclient python setup.py develop cd .. cd postorius python setup.py develop cd .. cd postorius_standalone python manage.py migrate python manage.py createsuperuser cd .. cd hyperkitty python setup.py develop cd ..
- Start up the postorius web ui for mailman:
cd postorius_standalone python manage.py runserver
Get HyperKitty going
Okay, now you're got postorius up and running, but you'll need to do some other config to get HyperKitty going. Just follow the guide here: https://hyperkitty.readthedocs.org/en/latest/development.html. Since we also have Postorius running, you'll have to add "8002" to the last runserver command, because you need an available port:
django-admin.py runserver 8002 --pythonpath /home/duffy/Repositories/hyperkitty_standalone --settings settings &
Now you should be able to view the mailman management UI (postorius) at http://localhost:8000 and you should be able to view hyperkitty at http://localhost:8002.
Link Mailman to HyperKitty
If you want to tell Mailman to send the incoming emails to HyperKitty for archiving, you must install and setup the mailman-hyperkitty plugin.
cd mailman-hyperkitty ../venv-3.4/bin/python setup.py install cd ../mailman cat > mailman-hyperkitty.cfg << EOF [general] base_url: http://localhost:8002/ api_key: SecretArchiverAPIKey EOF cat >> mailman.cfg << EOF [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: mailman-hyperkitty.cfg EOF
And now restart Mailman using the new mailman.cfg configuration file:
../venv-3.4/bin/mailman stop ../venv-3.4/bin/mailman -C mailman.cfg start
(mizmo wrote this on 26 Sept 2013. If it doesn't work, she either goofed something or this is out-of-date.) (updated on 29 feb 2016)