Update install documentation
This commit is contained in:
parent
73b70bf35f
commit
9e3b7ba133
1 changed files with 13 additions and 50 deletions
|
@ -1,59 +1,22 @@
|
|||
Installation
|
||||
============
|
||||
.. index:: installation
|
||||
|
||||
You have several options in setting up your working environment. We recommend
|
||||
using virtualenv to separate the dependencies of your project from your
|
||||
system's python environment. If on Linux or Mac OS X, you can also use
|
||||
virtualenvwrapper to help manage multiple virtualenvs across different
|
||||
projects.
|
||||
=======
|
||||
Install
|
||||
=======
|
||||
|
||||
Virtualenv Only
|
||||
---------------
|
||||
Working Environment
|
||||
===================
|
||||
|
||||
First, make sure you are using virtualenv (http://www.virtualenv.org). Once
|
||||
that's installed, create your virtualenv::
|
||||
To get a running work environment use `pipenv`_.
|
||||
|
||||
$ virtualenv --distribute gnuviechadmin
|
||||
.. _pipenv: https://pipenv.kennethreitz.org/en/latest/
|
||||
|
||||
You will also need to ensure that the virtualenv has the project directory
|
||||
added to the path. Adding the project directory will allow `django-admin.py` to
|
||||
be able to change settings using the `--settings` flag.
|
||||
To get started install `pip` and `pipenv` and use `pipenv install --dev`:
|
||||
|
||||
Virtualenv with virtualenvwrapper
|
||||
------------------------------------
|
||||
.. code-block:: sh
|
||||
|
||||
In Linux and Mac OSX, you can install virtualenvwrapper
|
||||
(http://virtualenvwrapper.readthedocs.org/en/latest/), which will take care of
|
||||
managing your virtual environments and adding the project path to the
|
||||
`site-directory` for you::
|
||||
$ apt install python3-pip
|
||||
$ python3 -m pip install --user -U pipenv
|
||||
$ pipenv install --dev
|
||||
|
||||
$ mkdir gnuviechadmin
|
||||
$ mkvirtualenv -a gnuviechadmin gnuviechadmin-dev
|
||||
$ cd gnuviechadmin && add2virtualenv `pwd`
|
||||
|
||||
Installation of Dependencies
|
||||
=============================
|
||||
|
||||
Depending on where you are installing dependencies:
|
||||
|
||||
In development::
|
||||
|
||||
$ pip install -r requirements/local.txt
|
||||
|
||||
For production::
|
||||
|
||||
$ pip install -r requirements.txt
|
||||
|
||||
PowerDNS setup
|
||||
==============
|
||||
|
||||
The models in :py:mod:`domains.models` are meant to be used together with a
|
||||
PowerDNS setup with the generic PostgreSQL backend
|
||||
(https://doc.powerdns.com/md/authoritative/backend-generic-mypgsql/). The
|
||||
database schema differs a bit from the original schema to fit the Django model
|
||||
conventions. To make PowerDNS work you have to redefine the SQL statements by
|
||||
copying the following content to
|
||||
:file:`/etc/powerdns/pdns.d/pdns.local.gva_queries.conf`.
|
||||
|
||||
.. literalinclude:: pdns.local.gva_queries.conf
|
||||
:language: properties
|
||||
|
|
Loading…
Reference in a new issue