Akeneo is Product information management system which is a very effective tool to manage Multilingual, multi-currency and large no. of products in the single or multi-channel environment.
Import and export in Akeneo are done via Jobs. These jobs run in the background and perform import/export/calculation. Process control manages background process for these jobs.
Without process control system or any other alternative, jobs will always show Status Starting … and they will never start.
Process control system like supervisor is the solution for this.
Process control with supervisor
Supervisor is most commonly used and recommended process control for Akeneo.
how to setup?
1. Install supervisor by running the commands
apt install supervisor
2. setup supervisor configuration by editing file /etc/supervisor/conf.d/conf.conf by running the command
sudo nano /etc/supervisor/conf.d/conf.conf
then Insert following data in the file and save
command=/path/to/php /path/to/your/pim/bin/console akeneo:batch:job-queue-consumer-daemon --env=prod
- you must create stderr_logfile (akeneo_daemon.err.log) and stdout_logfile (akeneo_daemon.out.log) at mentioned path.
- modify my_user with username of user that runs php fpm
Now run commands
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start akeneo_queue_daemon
After that jobs will get the start.
Process Control with Monit
Monit is another process control system. Monit is the possible replacement of supervisor. It is a common choice with docker. It has some interesting features like manage boot order, dependencies, max retry count, timeout etc other than obvious process monitoring.
how to setup? (for: ubuntu, debian, mint)
- install monit by running the command
1sudo apt-get install monit
- Setup monit configurations by editing file /etc/monit/monitrc by running the command
1sudo nano /etc/monit/monitrc
set up the access server, username, password etc
123456set httpd port 2812 anduse address localhost # only accept connection from localhostallow localhost # allow localhost to connect to the server andallow admin:monit # require user 'admin' with password 'monit'allow @monit # allow users of group 'monit' to connect (rw)allow @users readonly # allow users of group 'users' to connect readonly
- add akeneo daemon in config by editing file /etc/monit/conf.d/akeneo_queue_daemon
12check process akeneo_queue_daemon with pidfile /var/run/akeneo_queue_daemon.pidstart program = “/path/to/php /path/to/your/pim/bin/console akeneo:batch:job-queue-consumer-daemon --env=prod”
- reload monit service and start akeneo queue daemon
1sudo /etc/init.d/monit start
1sudo monit start akeneo_queue_daemon
The user may also use other process controls system like systemd.
But above-listed process control systems are popular ones and supervisor is generally used in Akeneo.