readme points to the wiki instead of duplicating documentation (#22090)

This commit is contained in:
Elias Showk 2018-02-23 15:09:50 +01:00
parent fbacb773bb
commit 02930066af
1 changed files with 2 additions and 116 deletions

View File

@ -1,121 +1,7 @@
Development configuration for publik
====================================
Ansible playbook that install and setup a multitenant publik instance using sources.
An bunch of Ansible playbooks that install and setup a multitenant publik instance using sources.
A complete version of this document is maintained here :
A complete version of the documentation is maintained here:
https://dev.entrouvert.org/projects/publik-devinst/wiki/Installation_d'un_environnement_de_développement_local
Setup
=====
Install dependencies
++++++++++++++++++++
.. code-block:: bash
pip install --user -r requirements.txt
source ~/.profile
System requirements
+++++++++++++++++++
* postgresql server (version 9.x is adviced) must be installed
* the system's user running the install.yml playbook must be a sudoer
* configure postgresql in order to have this configuration:
* the system user is used to run ansible and must to be able to connect to thepostgresql server without authentication and must be authorized to create databases
* postgresql must have a postgres user authorized to connect and create a db.
* please edit /etc/postgresql/[INSTALLED VERSION]/main/pg_hba.conf and add these lines (if not present):
First line allows postgres user to have all privileges on locahost
Second line allows to have the system's user mapped to postgresql username and its own database with the same name
.. code-block:: configuration
local all postgres trust
local all all peer
Configure local DNS
-------------------
To set your DNS to handle all the domains registered in the
certificate {{ssl_certificate}} and in the Nginx configuration for publik :
* edit /etc/hosts and ensure the a line with some localhost IP has all the sub-domains required
.. code-block:: bash
127.0.42.1 dev-hobo.local.publik agents-combo.local.publik public-combo.local.publik demarches-wcs.local.publik connexion-authentic.local.publik
* You can also configure dnsmasq to catch *.local.publik
Description
===========
The configuration file ('inventory' in ansible language) is inventory.yml, change it to suite your needs.
Important configuration variables :
* 'user' : must be the name of the system user used to run the playbook (DRY I know, but tell ansible about it)
* the 'ssl_certificate' used must be valid for the patterns delared in 'apps.host_pattern' and app.nginx_host_pattern
* 'apps.host_pattern' is used in the app server settings
* 'apps.nginx_host_pattern' is used in the nginx settings
The playbook will first :
* install some system packages (see roles/base)
* create a virtualenv ('venv' variable)
Then for each 'app' registered in the 'apps' section of the configuration file, the following events will occur:
* git clone of the repository in 'src_dir' dir and install from sources
* create one configuration file for the sever app and one for its hobo agent (in 'venv_conf' directory)
* create app-manage, app-server and app-agent scripts in 'venv_bin' directory
* create app-server and app-agent supervisord configuration
* create /etc/app/secret, /var/lib/app and /var/log/app
* create a nginx configuration for server-app
* create a database and its schema
Usage
=====
Install publik
--------------
Remember, you need to be sudoer.
.. code-block:: bash
ansible-playbook -i inventory.yml -K -e user=$(whoami) install.yml
Install publik and skip theme compilation
-----------------------------------------
.. code-block:: bash
ansible-playbook -i inventory.yml -K -e user=$(whoami) -e compile_theme=false install.yml
Send publik to the cemetery
---------------------------
.. code-block:: bash
ansible-playbook -i inventory.yml -K clean.yml
Configure tenants
------------------
.. code-block:: bash
ansible-playbook -i inventory.yml -e user=$(whoami) deploy-tenants.yml
Delete all tenants
------------------
.. code-block:: bash
ansible-playbook -i inventory.yml -e user=$(whoami) delete-tenants.yml