mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
propose reorganisation of installation doc
This commit is contained in:
parent
0be232e202
commit
54f4814953
@ -12,7 +12,7 @@
|
||||
Free Documentation License".
|
||||
|
||||
Instructions about installation
|
||||
################################
|
||||
###############################
|
||||
|
||||
You will learn here :
|
||||
|
||||
@ -20,7 +20,9 @@ You will learn here :
|
||||
:maxdepth: 2
|
||||
|
||||
How to install the software <installation.rst>
|
||||
Add new bundles to your installation <install_new_bundles.rst>
|
||||
Add bundles to your installation <install_additional_bundles.rst>
|
||||
Install a PosgresSql server <install_postgres_server.rst>
|
||||
Install production webserver <install_production_webserver.rst>
|
||||
|
||||
|
||||
.. todo::
|
||||
|
60
source/installation/install_additional_bundles.rst
Normal file
60
source/installation/install_additional_bundles.rst
Normal file
@ -0,0 +1,60 @@
|
||||
.. Copyright (C) 2014 Champs Libres Cooperative SCRLFS
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
.. _install-additional-bundles:
|
||||
|
||||
Install additional bundles
|
||||
##########################
|
||||
|
||||
There are four available bundles.
|
||||
|
||||
- Main bundle
|
||||
- Custom Fields bundle
|
||||
- Person bundle
|
||||
- Report bundle
|
||||
|
||||
In Chill you are free to do what is most suitable for your activity.
|
||||
By the way, the `Main bundle` is highly **required** as it provides the access control model (users, groups, and all concepts). So it should be installed.
|
||||
The other bundles are optional, and if you decide to use them their installation will follow the same mechanism as the Main.
|
||||
|
||||
So let's go into details on how to install the Main bundle.
|
||||
|
||||
The Installation of the Chill project has already prepared everything to make this easy.
|
||||
Open your terminal and run the followings:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd path/to/your/directory
|
||||
|
||||
# Go to the placeholder directory of the desired bundle (in this case `main`).
|
||||
|
||||
cd vendor/chill-project/main
|
||||
|
||||
# Install the bundle with composer:
|
||||
|
||||
composer install
|
||||
|
||||
As composer ends its task, it will notify you that `Some migration files have been imported.
|
||||
You should run `php app/console doctrine:migrations:status` and/or `php app/console doctrine:migrations:migrate` to apply them to your DB.`
|
||||
|
||||
So just do it:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd path/to/your/directory
|
||||
|
||||
php app/console doctrine:migrations:status
|
||||
php app/console doctrine:migrations:migrate
|
||||
|
||||
To be sure that install of the bundle has been done correctly, we will launch the unit tests related to it.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd vendor/chill-project/main
|
||||
phpunit
|
||||
|
26
source/installation/install_postgres_server.rst
Normal file
26
source/installation/install_postgres_server.rst
Normal file
@ -0,0 +1,26 @@
|
||||
.. Copyright (C) 2014 Champs Libres Cooperative SCRLFS
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
.. _install-postgres-server:
|
||||
|
||||
Install PostgresSql server
|
||||
##########################
|
||||
|
||||
.. todo::
|
||||
|
||||
the section "Install PostresSql database" must be written. Help appreciated :-)
|
||||
|
||||
.. note::
|
||||
|
||||
To avoid installation and configuration of a postgresql server, you may use `our docker image <https://registry.hub.docker.com/u/chill/database/>`_ to start and configure a database as decribed in the basic installation chapter.
|
||||
This solution can be used also in a production environment.
|
||||
|
||||
.. note::
|
||||
|
||||
Installing unaccent extension on ther server is possible with the package `postgresql-contrib-9.x` (replace 9.x with your server version). The extension may be enabled with running `CREATE EXTENSION unaccent;` in the database, with a superuser account.
|
||||
|
@ -6,11 +6,12 @@
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
.. _install-new-bundles:
|
||||
.. _install-production-webserver:
|
||||
|
||||
Install new bundles to your installation
|
||||
########################################
|
||||
Install production webserver
|
||||
############################
|
||||
|
||||
.. todo::
|
||||
|
||||
the section "install new bundles" must be written. Help appreciated :-)
|
||||
the section "Install production webserver" must be written. Help appreciated :-)
|
||||
|
@ -15,64 +15,61 @@ Installation
|
||||
Basic installation
|
||||
``````````````````
|
||||
|
||||
|
||||
|
||||
Chill is written in PHP and use the `symfony framework`_. We take advantages of all the framework's feature, and installation should be as simple as installing symfony.
|
||||
|
||||
We are going to describe a basic installation on Unix systems (Unix, Mac OS). Windows installation has not been tested.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Server requirements
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* a postgresql database, with the `*unaccent* extension`_ enabled. The minimum version is postgresql 9.4. Alternatively, you can use `the docker image provided <https://registry.hub.docker.com/u/chill/database/>`_ (see notes above)
|
||||
* php 5.5
|
||||
* If you run Chill in production mode, you should also install a web server (apache, ngnix, ...). We may use php built-in server for testing and development.
|
||||
|
||||
Within this documentation, we are going to describe installation on Unix systems (Unix, Mac OS). Windows installation has not been tested.
|
||||
|
||||
You won't need any web server for setting up an instance for a demonstration or development.
|
||||
|
||||
.. note::
|
||||
|
||||
Installing unaccent extension on ther server is possible with the package `postgresql-contrib-9.x` (replace 9.x with your server version). The extension may be enabled with running `CREATE EXTENSION unaccent;` in the database, with a superuser account.
|
||||
|
||||
.. note::
|
||||
|
||||
To avoid installation and configuration of a postgresql server, you may use `our docker image <https://registry.hub.docker.com/u/chill/database/>`_ to start and configure a database.
|
||||
|
||||
After `docker installation <http://docs.docker.com/>`_, run :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo docker run -P --name=chill_db chill/database
|
||||
|
||||
This will download the chill/database image and start a new docker instance with the name `chill_db` and export the postgresql port `5432` on another random local port.
|
||||
|
||||
In a new terminal, run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo docker port chill_db 5432
|
||||
|
||||
This command will show on which port the docker container is listening, on your localhost. During the part :ref:`create-your-project` this is the value to be used to fill the field 'database_port'.
|
||||
|
||||
Client requirements
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Chill is accessible through a web browser. Currently, we focus our support on `Firefox`_, because firefox is open source, cross-platform, and very well active. The software should work with other browser (Chromium, Opera, ...) but some functionalities might break.
|
||||
|
||||
Server requirements
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* a postgresql database, with the `*unaccent* extension`_ enabled. The minimum version is postgresql 9.4. You can use `the docker image provided <https://registry.hub.docker.com/u/chill/database/>`_. Using the docker image is also a solution for production site. Alternatively you can install a PosgresSql server see :ref:`install-postgres-server`.
|
||||
* PHP 5.5.
|
||||
* If you run Chill in production mode, you should also install a web server (apache, ngnix, ...) see :ref:`install-production-webserver`. For this basic installation meant for testing and/or development, we will make it simplier using the php built-in server.
|
||||
|
||||
|
||||
Let's start by installing and configuring the docker database.
|
||||
You will find all details concerning the installation of docker on their official site looking for your OS into the menu `Install/Docker Engine <http://docs.docker.com/>`_.
|
||||
|
||||
Once docker is installed, run :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo docker run -P --name=chill_db chill/database
|
||||
|
||||
This will download the chill/database image and start a new docker instance with the name `chill_db` and export the postgresql port `5432` on another random local port.
|
||||
|
||||
.. _docker-database-port:
|
||||
|
||||
The docker database port
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Open a new terminal and run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo docker port chill_db 5432
|
||||
|
||||
This command will show on which port the docker container is listening, on your localhost. During the part :ref:`create-your-project` this is the value to be used to fill the field 'database_port' as explained hereafter.
|
||||
|
||||
Preparation
|
||||
-----------
|
||||
|
||||
You will need those informations :
|
||||
To create your project, you will need the following information :
|
||||
|
||||
* The information to access to your database: host, port, database name, and your credentials (username and password) ;
|
||||
* a random string, which will be use to improve entropy in security. Choose anything you want (random character, your father's birthplace, ...).
|
||||
* how to access to your database: host, port, database name, and your credentials (username and password) ;
|
||||
* a random string, which will be used to improve entropy in security. Choose anything you want (random character, your father's birthplace, ...).
|
||||
|
||||
If you have installed the docker database your information should be:
|
||||
- database_host: 127.0.0.1
|
||||
- database_port: [see above]
|
||||
- database_port: see :ref:`docker-database-port`
|
||||
- database_name: postgres
|
||||
- database_user: postgres
|
||||
- database_password: postgres
|
||||
@ -95,20 +92,18 @@ Install composer on your system :
|
||||
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
Move composer.phar to your system
|
||||
"""""""""""""""""""""""""""""""""
|
||||
Install composer.phar globally
|
||||
""""""""""""""""""""""""""""""
|
||||
|
||||
.. note::
|
||||
This part is not necessary, but this will be more convenient for the process. If you do not want to install composer on your system, you will have to replace the commands `composer` by `php composer.phar`.
|
||||
This part is not mandatory, if you do not want to install composer globally, you will have to replace in the commands of this tutorial `composer` by `php composer.phar`.
|
||||
|
||||
Install composer globally on you system will made the installation process more convenient. To do this, simply run
|
||||
Install composer globally on you system will made the installation process easier. To do this, simply run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo mv composer.phar /usr/local/bin/composer
|
||||
|
||||
Then, just run `composer` instead of `php composer.phar`
|
||||
|
||||
You can test the installation by running `which composer` or `composer`: those command should not raise any error.
|
||||
|
||||
.. note::
|
||||
@ -123,8 +118,7 @@ Create your Chill project using composer:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
php composer.phar create-project chill-project/standard \
|
||||
path/to/your/directory --stability=dev
|
||||
composer create-project chill-project/standard path/to/your/directory --stability=dev
|
||||
|
||||
You should, now, move your cursor to the new directory
|
||||
|
||||
@ -163,7 +157,7 @@ You may accept the default parameters of `debug_toolbar`, `debug_redirects` and
|
||||
`php app/console doctrine:migrations:status` and/or
|
||||
`php app/console doctrine:migrations:migrate` to apply them to your DB.
|
||||
|
||||
We will proceed to this step some steps further. See :ref:`create-database-schema`.
|
||||
We will proceed this step a bit later. See :ref:`create-database-schema`.
|
||||
|
||||
Check your requirements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -194,12 +188,13 @@ SQL queries will be printed into your console.
|
||||
Populate your database with basic information
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Once your database schema is ready, you should populate your database with some basic information. Those are provided through scripts and might depends from the bundle you choose to install (see :ref:`install-new-bundles`)
|
||||
Once your database schema is ready, you should populate your database with some basic information. Those are provided through scripts and might depends from the bundle you choose to install (see :ref:`install-additional-bundles`)
|
||||
|
||||
The main bundle require two scripts to be executed :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
php app/console doctrine:fixtures:load
|
||||
php app/console chill:main:countries:populate
|
||||
php app/console chill:main:languages:populate
|
||||
|
||||
@ -237,7 +232,25 @@ If everything was fine, you are able to launch your built-in server :
|
||||
|
||||
php app/console server:run
|
||||
|
||||
Your server should now be available at `http://localhost:8000`. Type this address on your browser and you should see the homepage.
|
||||
Your server should now be available at `http://localhost:8000`. Type this address on your browser and you should see the homepage.
|
||||
The default login is 'center a_social' with password 'password'.
|
||||
|
||||
Have fun exploring Chill.
|
||||
|
||||
|
||||
Uninstall Chill
|
||||
```````````````
|
||||
|
||||
.. todo::
|
||||
|
||||
the section "Uninstall Chill" must be written. Help appreciated :-)
|
||||
|
||||
Uninstall the docker database
|
||||
-----------------------------
|
||||
|
||||
Uninstall the application
|
||||
-------------------------
|
||||
|
||||
|
||||
.. _the composer documentation: https://getcomposer.org/doc/
|
||||
.. _the composer introduction: https://getcomposer.org/doc/00-intro.md
|
||||
|
Loading…
x
Reference in New Issue
Block a user