mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Install reviewed + update chill + install additional bundles
This commit is contained in:
parent
54f4814953
commit
bf48f22bd9
@ -6,6 +6,8 @@
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
.. _custom-fields-bundle:
|
||||
|
||||
Custom fields bundle
|
||||
====================
|
||||
|
||||
@ -42,7 +44,7 @@ Some entities needs a **default** custom fields group. For instance, the default
|
||||
In the future of the `person bundle`, other custom fields group will be added in forms accessible from the menu, allowing users to completely customize and separate their entities.
|
||||
|
||||
Allow custom fields on a entity
|
||||
--------------------------------
|
||||
-------------------------------
|
||||
|
||||
As a developer, you must allow your users to add custom fields on your entities.
|
||||
|
||||
@ -126,7 +128,7 @@ Add those file under `chill_custom_fields` section :
|
||||
* The class, which is a full FQDN class path
|
||||
|
||||
Automatically, in DependencyInjection/Extension class
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
This is the preferred way for declaring customizable classes.
|
||||
|
||||
@ -262,7 +264,7 @@ In the `PrependExtensionInterface::prepend` function, the options key will be ad
|
||||
Note that `custom_fields_group_linked_custom_fields` does not create any input on `CustomFieldsGroup` creation : there aren't any fields associated with the custom fields just after the group creation... You have to add custom fields and associate them with the newly created group to see them appears.
|
||||
|
||||
Rendering custom fields in a template
|
||||
--------------------------------------
|
||||
-------------------------------------
|
||||
|
||||
Two function are available :
|
||||
|
||||
@ -310,7 +312,7 @@ Examples:
|
||||
|
||||
|
||||
Custom Fields's form
|
||||
---------------------
|
||||
--------------------
|
||||
|
||||
You should simply use the 'custom_field' type in a template, with the group you would like to render in the `group` option's type.
|
||||
|
||||
@ -377,7 +379,7 @@ Example :
|
||||
|
||||
|
||||
Development tips
|
||||
-----------------
|
||||
----------------
|
||||
|
||||
If you want to test the rendering of a custom fields group, you may use this method :
|
||||
|
||||
|
@ -5,7 +5,9 @@
|
||||
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".
|
||||
|
||||
|
||||
.. _main-bundle:
|
||||
|
||||
Main bundle
|
||||
###########
|
||||
|
||||
|
@ -5,7 +5,9 @@
|
||||
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".
|
||||
|
||||
|
||||
.. _person-bundle:
|
||||
|
||||
Person bundle
|
||||
#############
|
||||
|
||||
@ -23,12 +25,12 @@ Entities provided
|
||||
|
||||
|
||||
Search terms
|
||||
*************
|
||||
************
|
||||
|
||||
The class `Chill\PersonBundle\Search\PersonSearch` provide the search module.
|
||||
|
||||
Domain
|
||||
=======
|
||||
======
|
||||
|
||||
The search upon "person" is provided by default. The `@person` domain search may be omitted.
|
||||
|
||||
|
@ -5,7 +5,9 @@
|
||||
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".
|
||||
|
||||
|
||||
.. _report-bundle:
|
||||
|
||||
Report bundle
|
||||
#############
|
||||
|
||||
|
@ -6,8 +6,10 @@
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
.. _create-new-bundle:
|
||||
|
||||
Create a new bundle
|
||||
********************
|
||||
*******************
|
||||
|
||||
Create your own bundle is not a trivial task.
|
||||
|
||||
|
@ -20,7 +20,9 @@ You will learn here :
|
||||
:maxdepth: 2
|
||||
|
||||
How to install the software <installation.rst>
|
||||
Update Chill <update_chill.rst>
|
||||
Add bundles to your installation <install_additional_bundles.rst>
|
||||
Uninstall Chill <uninstall_chill.rst>
|
||||
Install a PosgresSql server <install_postgres_server.rst>
|
||||
Install production webserver <install_production_webserver.rst>
|
||||
|
||||
|
@ -11,50 +11,39 @@
|
||||
Install additional bundles
|
||||
##########################
|
||||
|
||||
There are four available bundles.
|
||||
A basic installation of Chill include four bundles:
|
||||
|
||||
- Main bundle
|
||||
- Custom Fields bundle
|
||||
- Person bundle
|
||||
- Report bundle
|
||||
- :ref:`main-bundle`
|
||||
- :ref:`person-bundle`
|
||||
- :ref:`report-bundle`
|
||||
- :ref:`custom-fields-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.
|
||||
but you can add as many as needed by your project, and if the bundle does not exists yet, you can create a new one, see :ref:`create-new-bundle` .
|
||||
|
||||
In Chill you are free to do what is most suitable for your activity, so let's go into details on how to add an existing bundle.
|
||||
We will add the bundle 'icpc2' that does something very important...
|
||||
|
||||
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:
|
||||
.. todo::
|
||||
Add description of the bundle
|
||||
|
||||
Open your terminal let composer do the magic for you:
|
||||
|
||||
.. 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
|
||||
cd path/to/your/directory
|
||||
composer require chill-main/icpc2
|
||||
|
||||
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.`
|
||||
As composer ends its task, it could notify you that `Some migration files have been imported.
|
||||
In this case 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
|
||||
|
||||
.. note::
|
||||
The following has to be automated:
|
||||
|
||||
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
|
||||
|
||||
Finally we should modify the AppKernel.php file adding 'new Chill\Icpc2Bundle\ChillIcpc2Bundle(),' in the $bundle array.
|
||||
|
@ -32,56 +32,13 @@ 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.
|
||||
* Composer.
|
||||
* 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
|
||||
-----------
|
||||
|
||||
To create your project, you will need the following information :
|
||||
|
||||
* 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 :ref:`docker-database-port`
|
||||
- database_name: postgres
|
||||
- database_user: postgres
|
||||
- database_password: postgres
|
||||
- locale: fr
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Chill is installed with `composer`_.
|
||||
Let's start by installing composer as it is needed to create and update our Chill project.
|
||||
|
||||
Install composer
|
||||
^^^^^^^^^^^^^^^^
|
||||
""""""""""""""""
|
||||
|
||||
.. note::
|
||||
If you do not know composer, it is a good idea to have a glance at `the composer documentation`_
|
||||
@ -109,6 +66,76 @@ You can test the installation by running `which composer` or `composer`: those c
|
||||
.. note::
|
||||
See `the composer introduction`_ to learn how to install composer on Mac OS X and Windows
|
||||
|
||||
The docker database
|
||||
"""""""""""""""""""
|
||||
|
||||
Let's continue now 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.
|
||||
You can exit from the terminal and check if the docker database is running with the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo docker ps
|
||||
|
||||
>>>> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
>>>> 08bbb62bd5e8 chill/database "/docker-entrypoint. 6 days ago Up 5 hours 0.0.0.0:32768->5432/tcp chill_db
|
||||
|
||||
If the response does not show up 'chill_db', you can start and stop it via:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo docker start chill_db
|
||||
>>>> chill_db
|
||||
|
||||
sudo docker stop chill_db
|
||||
>>>> chill_db
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Chill is installed with `composer`_.
|
||||
|
||||
.. _preparation:
|
||||
|
||||
Preparation
|
||||
^^^^^^^^^^^
|
||||
|
||||
Before creating your project, make sure that you know the following information :
|
||||
|
||||
* 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, ...).
|
||||
|
||||
.. note::
|
||||
|
||||
**If you have installed the docker database:**
|
||||
|
||||
Open a 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.
|
||||
This is the value to be used to fill the field 'database_port' hereafter.
|
||||
|
||||
Your information should be:
|
||||
|
||||
- database_host: 127.0.0.1
|
||||
- database_port: result of the command hereabove.
|
||||
- database_name: postgres
|
||||
- database_user: postgres
|
||||
- database_password: postgres
|
||||
- locale: fr
|
||||
|
||||
.. _create-your-project:
|
||||
|
||||
Create your project
|
||||
@ -127,7 +154,7 @@ You should, now, move your cursor to the new directory
|
||||
cd path/to/your/directory
|
||||
|
||||
.. note::
|
||||
Until now, the stability of the project is set to "dev". Do not forget this argument, or composer will fail to download and create the project.
|
||||
Until now, the stability of the project is set to "dev". Do not forget this argument, or composer will fail to download and create the project.
|
||||
|
||||
Composer will download `the standard architecture`_ and ask you a few question about how to configure your project.
|
||||
|
||||
@ -137,9 +164,10 @@ Composer will download `the standard architecture`_ and ask you a few question a
|
||||
* `database_user` : the username to reach your database
|
||||
* `database_password` : your username's password
|
||||
* `locale`: the language, as iso code. Until now, only fr is supported
|
||||
* `secret`: the secret string you prepared (see "preparation")
|
||||
* `secret`: the secret string you prepared (see :ref:`preparation`)
|
||||
|
||||
You may accept the default parameters of `debug_toolbar`, `debug_redirects` and `use_assetic_controller` for a demonstration installation. For production, set them all to `false`.
|
||||
You may accept the default parameters of `debug_toolbar`, `debug_redirects` and `use_assetic_controller` for a demonstration installation.
|
||||
For production, set them all to `false`.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -198,11 +226,11 @@ The main bundle require two scripts to be executed :
|
||||
php app/console chill:main:countries:populate
|
||||
php app/console chill:main:languages:populate
|
||||
|
||||
Those will populate database, respectively, with countries (using ISO declaration) and languages (using, also, ISO informations).
|
||||
Those will populate database, respectively, with basic dummy data, countries (using ISO declaration) and languages (using, also, ISO informations).
|
||||
|
||||
|
||||
Building CSS (optionnal)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Building CSS (optional)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
For this step, npm must be installed.
|
||||
|
||||
@ -215,7 +243,6 @@ A build version of the needed CSS file is provided within the main bundle `Resou
|
||||
cd vendor/chill-project/main/Resources/
|
||||
npm install grunt
|
||||
|
||||
|
||||
Go back to your project root before doing next step
|
||||
|
||||
.. code-block:: bash
|
||||
@ -236,20 +263,6 @@ Your server should now be available at `http://localhost:8000`. Type this addres
|
||||
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/
|
||||
|
34
source/installation/uninstall_chill.rst
Normal file
34
source/installation/uninstall_chill.rst
Normal file
@ -0,0 +1,34 @@
|
||||
.. 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".
|
||||
|
||||
.. _uninstall-chill:
|
||||
|
||||
Uninstall Chill
|
||||
```````````````
|
||||
|
||||
.. todo::
|
||||
|
||||
the section "Uninstall Chill" must be written. Help appreciated :-)
|
||||
|
||||
.. _uninstall-docker-database:
|
||||
|
||||
Uninstall the docker database
|
||||
-----------------------------
|
||||
|
||||
.. todo::
|
||||
|
||||
the section "Uninstall the docker database" must be written. Help appreciated :-)
|
||||
|
||||
.. _uninstall-application:
|
||||
|
||||
Uninstall the application
|
||||
-------------------------
|
||||
|
||||
.. todo::
|
||||
|
||||
the section "Uninstall the application" must be written. Help appreciated :-)
|
48
source/installation/update_chill.rst
Normal file
48
source/installation/update_chill.rst
Normal file
@ -0,0 +1,48 @@
|
||||
.. 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".
|
||||
|
||||
.. _update-chill:
|
||||
|
||||
Update Chill
|
||||
############
|
||||
|
||||
Updating the application is very simple, thanks to the use of composer.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd path/to/your/directory
|
||||
|
||||
composer update
|
||||
|
||||
Composer allow to control strictly the versions to be used in the application.
|
||||
This allow to manage a production server, a staging one and a developpement one.
|
||||
|
||||
For the production one, define very precisely the versions of each component in the `composer.json` file at the root of the application and require only `stable` versions.
|
||||
In this situation even if an update of composer is launched, the sources will not be modified.
|
||||
|
||||
For the staging and development one, let open choices to the versions or accept development versions and using `composer update` will automatically update the selected modules.
|
||||
Once validated at staging level they can be sent in production re-precising the latest accepted versions.
|
||||
|
||||
|
||||
.. note::
|
||||
It is advisable to keep the version of composer up to date. To do that, just launch the following command in a terminal.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer self-update
|
||||
|
||||
If this update create troubles (which doesn't happen often) you can always undo this update running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer self-update --rollback
|
||||
|
||||
See the `the composer documentation`_ for all details.
|
||||
|
||||
|
||||
.. _the composer documentation: https://getcomposer.org/doc/
|
Loading…
x
Reference in New Issue
Block a user