Differences between revisions 1 and 17 (spanning 16 versions)
Revision 1 as of 2016-03-08 20:39:30
Size: 1870
Editor: SimonHanna
Comment:
Revision 17 as of 2018-05-14 15:15:45
Size: 4425
Editor: terri
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from SimonHanna/InstallDevEnvironment
Line 2: Line 3:


{{{#!wiki warning
'''This guide is obsolete! See [[http://docs.mailman3.org/en/latest/devsetup.html]] to setup mailman3.'''

}}}
Line 7: Line 15:
There is postorius - Management Interface
And Hyperkitty - Mailman Archiver
There is Postorius - Management Interface
and HyperKitty - Mailman Archiver.
These also require Django Mailman3 - common Django for Postorius and HyperKitty. The core also requires the HyperKitty - Mailman plugin to communicate with HyperKitty.

{{{#!wiki caution
Note that this guide assumes you read the [[DEV/HowToContributeGit|git instructions]] and set up your Gitlab account properly.

If you want to contribute to Mailman, you should clone your own forks. You will have to change the urls shown below accordingly.
}}}
Line 12: Line 27:
mkdir -p ~/dev/mailman $ mkdir -p ~/dev/mailman
Line 17: Line 32:
cd ~/dev/mailman
virtualenv -p /usr/bin/python3 venv3
virtualenv -p /usr/bin/python2 venv2
$ cd ~/dev/mailman
$ virtualenv -p /usr/bin/python3 venv3
Line 23: Line 37:
{{{#!wiki note
Line 24: Line 39:
In the following, in order for `git clone git@gitlab.com:mailman/...` to work, you must have a gitlab.com account with your SSH public key uploaded as discussed in [[DEV/HowToContributeGit|git instructions]] mentioned in the above caution. Otherwise, use `git clone https://gitlab.com/mailman/...`
}}}
Line 26: Line 43:
Detailed instructions can be found at [[http://mailman.readthedocs.org/|readthedocs.org]].
Line 27: Line 46:
cd ~/dev/mailman
git clone git@gitlab.com:mailman/mailman.git
source venv3/bin/activate
cd mailman
mailman setup.py develop
deactivate
$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/mailman.git
$ source venv3/bin/activate
$ cd mailman
$ python setup.py develop
$ deactivate
Line 36: Line 55:
Detailed instructions can be found at [[http://mailmanclient.readthedocs.org/|readthedocs.org]].
Line 37: Line 58:
cd ~/dev/mailman
git clone git@gitlab.com:mailman/mailmanclient.git
source venv2/bin/activate
cd mailmanclient
python setup.py develop
deactivate
$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/mailmanclient.git
$ source venv3/bin/activate
$ cd mailmanclient
$ python setup.py develop
$ deactivate
}}}

== Django Mailman3 ==
Django libraries and templates used by Postorius and HyperKitty.

{{{
$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/django-mailman3.git
$ source venv3/bin/activate
$ cd django-mailman3
$ python setup.py develop
$ deactivate
Line 46: Line 79:
Detailed instructions can be found at [[http://postorius.readthedocs.org/|readthedocs.org]].
Line 47: Line 81:
Make sure to install mailmanclient first! Make sure to install mailmanclient and django-mailman3 first!
Line 49: Line 83:
cd ~/dev/mailman
git clone git@gitlab.com:mailman/postorius.git
source venv2/bin/activate
cd postorius
python setup.py develop
deactivate
$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/postorius.git
$ source venv3/bin/activate
$ cd postorius
$ python setup.py develop
$ deactivate
Line 58: Line 92:
Detailed instructions can be found at [[http://hyperkitty.readthedocs.org/|readthedocs.org]].
Line 59: Line 94:
Make sure to install mailmanclient first! Make sure to install mailmanclient and django-mailman3 first!
Line 61: Line 96:
cd ~/dev/mailman
git clone git@gitlab.com:mailman/hyperkitty.git
source venv2/bin/activate
cd hypkerkitty
python setup.py develop
deactivate
$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/hyperkitty.git
$ source venv3/bin/activate
$ cd hyperkitty
$ python setup.py develop
$ deactivate
}}}

== HyperKitty - Mailman plugin ==
{{{
$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/mailman-hyperkitty.git
$ source venv3/bin/activate
$ cd mailman-hyperkitty
$ python setup.py develop
$ deactivate
Line 70: Line 115:
Postorius and Hyperkitty both include example django projects which can be found in {{{ ./example_project/ }}}.
They can be used to run the projects using the builtin django development server.
The included settings are the recommended settings that should be used to deploy the projects.
For production systems, you should use a full fledged web server such as Apache, gunicorn, uwsgi, ...

Before you can run either of these projects, you need mailman running.
If you followed the above steps, you can start mailman by running -
Line 71: Line 124:
cd ~/dev/mailman
git clone git@gitlab.com:mailman/hyperkitty_standalone.git
git clone git@gitlab.com:mailman/postorius_standalone.git
$ cd ~/dev/mailman
$ source venv3/bin/activate
$ mailman start
Line 76: Line 129:
To run any of the django projects To run either of the django projects
Line 79: Line 132:
cd ~/dev/mailman
source venv2/bin/activate
cd postorius_standalone
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
$ cd ~/dev/mailman
$ source venv3/bin/activate
$ cd postorius/example_project
# After the first time, migrate is a no-op unless the Postorius DB schema changes.
$ python manage.py migrate
# You only need to createsuperuser once.
$ python manage.py createsuperuser
$ python manage.py runserver
Line 87: Line 142:
Hyperkitty is setup the same way as postorius. Hyperkitty is setup the same way as Postorius (but in hyperkitty/example_project).

How to setup your dev environment

This guide is obsolete! See http://docs.mailman3.org/en/latest/devsetup.html to setup mailman3.

First you need to decide which projects you want to develop. You will most likely always need mailman-core and mailmanclient.

After that you can choose if you want to stick to the core, or you want to also develop django projects. There is Postorius - Management Interface and HyperKitty - Mailman Archiver. These also require Django Mailman3 - common Django for Postorius and HyperKitty. The core also requires the HyperKitty - Mailman plugin to communicate with HyperKitty.

Note that this guide assumes you read the git instructions and set up your Gitlab account properly.

If you want to contribute to Mailman, you should clone your own forks. You will have to change the urls shown below accordingly.

This guide assumes that you are setting everything in the directory created below:

$ mkdir -p ~/dev/mailman

And that you have two virtualenvs:

$ cd ~/dev/mailman
$ virtualenv -p /usr/bin/python3 venv3

In the following, in order for git clone git@gitlab.com:mailman/... to work, you must have a gitlab.com account with your SSH public key uploaded as discussed in git instructions mentioned in the above caution. Otherwise, use git clone https://gitlab.com/mailman/...

Mailman Core

Detailed instructions can be found at readthedocs.org.

$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/mailman.git
$ source venv3/bin/activate
$ cd mailman
$ python setup.py develop
$ deactivate

Mailman Client

Detailed instructions can be found at readthedocs.org.

$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/mailmanclient.git
$ source venv3/bin/activate
$ cd mailmanclient
$ python setup.py develop
$ deactivate

Django Mailman3

Django libraries and templates used by Postorius and HyperKitty.

$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/django-mailman3.git
$ source venv3/bin/activate
$ cd django-mailman3
$ python setup.py develop
$ deactivate

Postorius

Detailed instructions can be found at readthedocs.org.

Make sure to install mailmanclient and django-mailman3 first!

$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/postorius.git
$ source venv3/bin/activate
$ cd postorius
$ python setup.py develop
$ deactivate

Hyperkitty

Detailed instructions can be found at readthedocs.org.

Make sure to install mailmanclient and django-mailman3 first!

$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/hyperkitty.git
$ source venv3/bin/activate
$ cd hyperkitty
$ python setup.py develop
$ deactivate

HyperKitty - Mailman plugin

$ cd ~/dev/mailman
$ git clone git@gitlab.com:mailman/mailman-hyperkitty.git
$ source venv3/bin/activate
$ cd mailman-hyperkitty
$ python setup.py develop
$ deactivate

Django projects

Postorius and Hyperkitty both include example django projects which can be found in  ./example_project/ . They can be used to run the projects using the builtin django development server. The included settings are the recommended settings that should be used to deploy the projects. For production systems, you should use a full fledged web server such as Apache, gunicorn, uwsgi, ...

Before you can run either of these projects, you need mailman running. If you followed the above steps, you can start mailman by running -

$ cd ~/dev/mailman
$ source venv3/bin/activate
$ mailman start 

To run either of the django projects

$ cd ~/dev/mailman
$ source venv3/bin/activate
$ cd postorius/example_project
# After the first time, migrate is a no-op unless the Postorius DB schema changes.
$ python manage.py migrate
# You only need to createsuperuser once.
$ python manage.py createsuperuser
$ python manage.py runserver

Hyperkitty is setup the same way as Postorius (but in hyperkitty/example_project).

MailmanWiki: DEV/SetupDevEnvironment (last edited 2018-05-14 15:15:45 by terri)