Skip to content

Commit

Permalink
Merge pull request #671 from akeneo/update-install-doc
Browse files Browse the repository at this point in the history
Update install doc
  • Loading branch information
nidup committed Sep 27, 2017
2 parents 6fc820d + 575901c commit 895e094
Show file tree
Hide file tree
Showing 36 changed files with 171 additions and 129 deletions.
2 changes: 1 addition & 1 deletion contribute_to_pim/contribution_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Then, if you introduced BC Breaks in namespaces for example (but you should/must
description of the BC Break.
Moreover, you have to add in ``UPGRADE-1.x.md`` a way to fix this BC Break in files (like sed command for example).
To finish, if you introduced database BC Break, you have to add migration files in `upgrades/schema/`.
In most of the cases using `php app/console doctrine:migrations:diff` is enough to create a database migration class
In most of the cases using `php bin/console doctrine:migrations:diff` is enough to create a database migration class
(see `Doctrine migration documentation`_) but sometimes you will have to do it manually.

When your patch is not about a bug fix (when you add a new feature or change
Expand Down
2 changes: 1 addition & 1 deletion design_pim/guides/add_a_new_tab_to_an_entity_edit_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ You can now create your template ``/src/Acme/Bundle/EnrichBundle/Resources/views
{{ dump(form) }}
After a cache clear (``app/console cache:clear``) you should see something like this on the category edit form:
After a cache clear (``bin/console cache:clear``) you should see something like this on the category edit form:

As you can see, you will have to translate the tab title in your translations file (see https://symfony.com/doc/2.7/translation.html).

Expand Down
2 changes: 1 addition & 1 deletion design_pim/guides/add_a_tab_to_product_edit_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Now that our file is registered in `requirejs` configuration, we can add this ex
aclResourceId: pim_enrich_product_categories_view # The user will need this ACL for this extension to be registered
position: 90 # The extension position
After a cache clear (`app/console cache:clear`), you should see your new tab in the product edit form. If not, make sure that you ran the `app/console assets:install --symlink web` command
After a cache clear (`bin/console cache:clear`), you should see your new tab in the product edit form. If not, make sure that you ran the `bin/console assets:install --symlink web` command

Now that we have our extension loaded in our form, we can add some logic into it

Expand Down
4 changes: 2 additions & 2 deletions design_pim/guides/how_to_customize_menu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To add an element at the root of the tree you can reuse the tab module provided
config:
title: pim_menu.item.import_profile # You can define a translation key for the tab name
After running the command ``app/console pim:install:asset`` your new item should appear at the root of the menu
After running the command ``bin/console pim:install:asset`` your new item should appear at the root of the menu

Define a simple node inside a tab of the menu
*********************************************
Expand All @@ -39,7 +39,7 @@ Now if you want to add an element inside the menu, you can use the item module:
title: pim_menu.item.import_profile # You can define a translation key for the item name
to: pim_importexport_import_profile_index # The route to redirect to
After running the command ``app/console pim:install:asset`` your new item should appear in the menu
After running the command ``bin/console pim:install:asset`` your new item should appear in the menu

Use you own menu extension item
*******************************
Expand Down
8 changes: 4 additions & 4 deletions import_and_export_data/guides/automate-import-exports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Akeneo PIM provides a simple command to launch jobs:
.. code-block:: bash
:linenos:
app/console akeneo:batch:job [-c|--config CONFIG] [--email EMAIL] [--no-log] [--] <code>
bin/console akeneo:batch:job [-c|--config CONFIG] [--email EMAIL] [--no-log] [--] <code>
So to run the job csv_product_import you can run:

.. code-block:: bash
:linenos:
app/console akeneo:batch:job csv_product_import --env=prod
bin/console akeneo:batch:job csv_product_import --env=prod
.. tip::
Don't forget to add --env=prod to avoid memory leaks in dev environment (the default environment for commands)
Expand All @@ -28,7 +28,7 @@ You can also provide a custom configuration (in JSON format) for the job:
.. code-block:: bash
:linenos:
app/console akeneo:batch:job csv_product_import -c "{\"filePath\": \"/custom/path/to/product.csv\"}" --env=prod
bin/console akeneo:batch:job csv_product_import -c "{\"filePath\": \"/custom/path/to/product.csv\"}" --env=prod
Scheduling the jobs
-------------------
Expand Down Expand Up @@ -56,6 +56,6 @@ You can now add a new line at the end of the opened file:
.. code-block:: bash
:linenos:
0 * * * * /home/akeneo/pim/app/console akeneo:batch:job csv_product_import -c "{\"filePath\": \"/custom/path/to/product.csv\"}" --env=prod > /tmp/import.log
0 * * * * /home/akeneo/pim/bin/console akeneo:batch:job csv_product_import -c "{\"filePath\": \"/custom/path/to/product.csv\"}" --env=prod > /tmp/import.log
With this cron configuration a product import will be launched every hour with the file `/custom/path/to/product.csv`
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ You can run the job from the UI or you can use following command:

.. code-block:: bash
php app/console akeneo:batch:job my_job_code
php bin/console akeneo:batch:job my_job_code
10 changes: 5 additions & 5 deletions import_and_export_data/guides/create-connector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ We can create an instance with the following command:
.. code-block:: bash
# akeneo:batch:create-job <connector> <job> <type> <code> <config> [<label>]
php app/console akeneo:batch:create-job 'Acme CSV Notify Connector' csv_product_export_notify export my_app_product_export '{"urlToNotify": "http://my-app.com/product-export-done"}'
php bin/console akeneo:batch:create-job 'Acme CSV Notify Connector' csv_product_export_notify export my_app_product_export '{"urlToNotify": "http://my-app.com/product-export-done"}'
You can also list the existing job instances with the following command:

.. code-block:: bash
php app/console akeneo:batch:list-jobs
php bin/console akeneo:batch:list-jobs
Execute our new job instance
----------------------------
Expand All @@ -119,7 +119,7 @@ You can run the job with the following command:

.. code-block:: bash
php app/console akeneo:batch:job my_app_product_export
php bin/console akeneo:batch:job my_app_product_export
[2017-04-18 18:43:55] batch.DEBUG: Job execution starting: startTime=, endTime=, updatedTime=, status=2, exitStatus=[UNKNOWN] , exitDescription=[], job=[my_app_product_export] [] []
[2017-04-18 18:43:55] batch.INFO: Step execution starting: id=0, name=[export], status=[2], exitCode=[EXECUTING], exitDescription=[] [] []
Expand All @@ -135,7 +135,7 @@ The ``--config`` option can be used to override the job instance parameters at r

.. code-block:: bash
php app/console akeneo:batch:job my_app_product_export --config='{"filePath":"\/tmp\/new_path.csv"}'
php bin/console akeneo:batch:job my_app_product_export --config='{"filePath":"\/tmp\/new_path.csv"}'
Configure the UI for our new job
--------------------------------
Expand Down Expand Up @@ -290,7 +290,7 @@ Now that our file is registered in ``requirejs`` configuration, we can add this
tabTitle: acme_enrich.form.job_instance.tab.mapping.title
tabCode: pim-job-instance-mapping
After a cache clear (``app/console cache:clear``), you should see your new tab in the job edit form. If not, make sure that you ran the `app/console assets:install --symlink web` command.
After a cache clear (``bin/console cache:clear``), you should see your new tab in the job edit form. If not, make sure that you ran the `bin/console assets:install --symlink web` command.

Now that we have our extension loaded in our form, we can add some logic into it, check how to `customize the UI`_.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Now you can run the job from the UI or use the following command:

.. code-block:: bash
php app/console akeneo:batch:job xml_product_import
php bin/console akeneo:batch:job xml_product_import
Adding support for invalid items export
---------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions install_pim/crontab_tasks.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ The application needs the following tasks to be executed in background on a regu
:linenos:

# for community and enterprise editions
/path/to/php /path/to/installation/pim-community-standard/app/console pim:completeness:calculate --env=prod # recalculates the products completeness
/path/to/php /path/to/installation/pim-community-standard/app/console pim:versioning:refresh --env=prod # processes pending versions
/path/to/php /path/to/installation/pim-community-standard/bin/console pim:completeness:calculate --env=prod # recalculates the products completeness
/path/to/php /path/to/installation/pim-community-standard/bin/console pim:versioning:refresh --env=prod # processes pending versions

# for enterprise edition only
path/to/php /path/to/installation/pim-community-standard/app/console akeneo:rule:run --env=prod # executes rules on products
path/to/php /path/to/installation/pim-community-standard/bin/console akeneo:rule:run --env=prod # executes rules on products

Edit your crontab with ``crontab -e`` and configure each task. For example, the following line will run the completeness calculation every 15 minutes:

.. code-block:: bash
:linenos:

# m h dom mon dow command
*/15 * * * * /path/to/php /path/to/installation/pim-community-standard/app/console pim:completeness:calculate --env=prod > /path/to/installation/pim-community-standard/app/logs/calculate_completeness.log 2>&1
*/15 * * * * /path/to/php /path/to/installation/pim-community-standard/bin/console pim:completeness:calculate --env=prod > /path/to/installation/pim-community-standard/app/logs/calculate_completeness.log 2>&1

.. note::

Expand Down
4 changes: 2 additions & 2 deletions install_pim/customize_dataset/add_translation_packs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ To add a pack you have to:

* rename the directories by following the rule ``src/Pim/Bundle/EnrichBundle`` to ``PimEnrichBundle``
* move this directory to ``app/Resources/``
* run ``php app/console oro:translation:dump fr de en --env=prod`` (if you use en, fr and de locales)
* run ``php app/console cache:clear --env=prod``
* run ``php bin/console oro:translation:dump fr de en --env=prod`` (if you use en, fr and de locales)
* run ``php bin/console cache:clear --env=prod``
4 changes: 2 additions & 2 deletions install_pim/customize_dataset/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can now (re)install your database by running:

.. code-block:: bash
php app/console pim:installer:db --env=prod
php bin/console pim:installer:db --env=prod
Using Your Own Dataset
----------------------
Expand Down Expand Up @@ -112,4 +112,4 @@ You can now (re)install your database by running:

.. code-block:: bash
php app/console pim:installer:db --env=prod
php bin/console pim:installer:db --env=prod
2 changes: 1 addition & 1 deletion install_pim/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Once the requirements are fulfilled, you are ready to install Akeneo PIM. Otherw
.. toctree::
:maxdepth: 1

system_requirements/system_requirements
installation_ce_archive
installation_ee_archive

Expand All @@ -17,6 +16,7 @@ Here are the guidelines to set everything up according to your operating system:

system_requirements/system_install_ubuntu_1604
system_requirements/manual_system_installation_debian9
system_requirements/system_requirements


.. toctree::
Expand Down
36 changes: 30 additions & 6 deletions install_pim/installation_archive.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,53 @@ Extracting the archive
:linenos:

$ mkdir -p /path/to/installation
$ tar -xvzf pim-community-standard-v1.8-latest-icecat.tar.gz -C /path/to/installation/
$ tar -xvzf pim-community-standard-v2.0-latest-icecat.tar.gz -C /path/to/installation/

.. note::
Replace */path/to/installation* by the path to the directory where you want to install the PIM.

.. note::
* For Community Edition, replace *pim-community-standard-v1.8-latest-icecat.tar.gz* by the location and the name
* For Community Edition, replace *pim-community-standard-v2.0-latest-icecat.tar.gz* by the location and the name
of the archive you have downloaded from https://www.akeneo.com/download
* For Enterprise Edition, replace *pim-community-standard-v1.8-latest-icecat.tar.gz* by the location and the name
* For Enterprise Edition, replace *pim-community-standard-v2.0-latest-icecat.tar.gz* by the location and the name
of the archive you have downloaded from `Partner portal <https://partners.akeneo.com/login>`_

.. note::
The PIM will be extracted in the folder /path/to/installation/pim-community-standard.

Initializing Akeneo
-------------------

.. code-block:: bash
:linenos:

$ cd /path/to/installation/pim-community-standard
$ ../composer.phar install --optimize-autoloader --prefer-dist # optional for community edition
$ php app/console cache:clear --env=prod
$ php app/console pim:install --env=prod

Dependencies,

.. code-block:: bash
:linenos:

$ ../composer.phar install --optimize-autoloader --prefer-dist memory_limit=3G
$ yarn install

Frontend,

.. code-block:: bash
:linenos:

$ php bin/console cache:clear --env=prod
$ php bin/console --env=prod pim:installer:assets --symlink --clean
$ yarn run webpack

Installation,

.. code-block:: bash
:linenos:

$ bin/console --env=prod pim:install --force --symlink --clean
$ php bin/console pim:install --env=prod
$ yarn run webpack

.. note::
The ``../composer.phar install`` command writes the database configuration to ``app/config/parameters.yml``
Expand Down
4 changes: 2 additions & 2 deletions install_pim/installation_ce_archive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can also download them directly from the command line:
.. code-block:: bash
:linenos:
$ wget https://download.akeneo.com/pim-community-standard-v1.8-latest-icecat.tar.gz #for icecat version
$ wget https://download.akeneo.com/pim-community-standard-v1.8-latest.tar.gz #for minimal version
$ wget https://download.akeneo.com/pim-community-standard-v2.0-latest-icecat.tar.gz #for icecat version
$ wget https://download.akeneo.com/pim-community-standard-v2.0-latest.tar.gz #for minimal version
.. include:: ./installation_archive.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ It's also recommended to disable all non desired tools, such as MySQL Workbench

.. code-block:: bash
# apt install lsb-release apt-transport-https ca-certificates
# wget -O mysql-apt-config.deb https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb
# dpkg -i mysql-apt-config.deb
$ apt install lsb-release apt-transport-https ca-certificates
$ wget -O mysql-apt-config.deb https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb
$ dpkg -i mysql-apt-config.deb
Now is the time to install what has been configured in the step before:

.. code-block:: bash
# apt update
# apt install mysql-server
$ apt update
$ apt install mysql-server
PHP 7.1
*******
Expand All @@ -44,22 +44,22 @@ First, install the `repository <https://packages.sury.org/php/README.txt>`_:

.. code-block:: bash
# apt install apt-transport-https ca-certificates
# wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
# sh -c 'echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list'
# apt update
$ apt install apt-transport-https ca-certificates
$ wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
$ sh -c 'echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list'
$ apt update
Then, install PHP and the required extensions:

.. code-block:: bash
# apt install php7.1-apcu php7.1-bcmath php7.1-cli php7.1-curl php7.1-fpm php7.1-gd php7.1-intl php7.1-mcrypt php7.1-mysql php7.1-soap php7.1-xml php7.1-zip
$ apt install php7.1-apcu php7.1-bcmath php7.1-cli php7.1-curl php7.1-fpm php7.1-gd php7.1-intl php7.1-mcrypt php7.1-mysql php7.1-soap php7.1-xml php7.1-zip
For Enterprise Edition, please also install:

.. code-block:: bash
# apt install php7.1-imagick
$ apt install php7.1-imagick
Elasticsearch 5.5+
******************
Expand All @@ -71,28 +71,28 @@ The easiest way to install Elasticsearch 5.5+ is to use the `official vendor pac

.. code-block:: bash
# apt install apt-transport-https
# wget -O - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
# echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list
# apt update
# apt install openjdk-8-jre-headless
# apt install elasticsearch
$ apt install apt-transport-https
$ wget -O - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
$ echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list
$ apt update
$ apt install openjdk-8-jre-headless
$ apt install elasticsearch
Apache
******

.. code-block:: bash
# apt install apache2
# a2enmod rewrite proxy_fcgi
# systemctl restart apache2
$ apt install apache2
$ a2enmod rewrite proxy_fcgi
$ systemctl restart apache2
.. note::

If you migrate from Apache with mod_php, don't forget to deactivate it by running the following commands

.. code-block:: bash
# a2dismod php5
$ a2dismod php5
.. include:: system_configuration.rst.inc
Loading

0 comments on commit 895e094

Please sign in to comment.