You are here

README.txt in Hosting 6.2

Same filename in this branch
  1. 6.2 quota/README.txt
  2. 6.2 queued/README.txt
Same filename and directory in other branches
  1. 7.4 queued/README.txt
  2. 7.3 queued/README.txt
Hosting queue daemon
====================

Simple Drupal module intended to make it easy to run the Aegir tasks
queue with near-instant execution times. The daemon is designed to run
standalone, and started through regular services: there's an init.d
script available, which is installed with the Debian package, but that
you will need to manually install in other platforms.

Note that before the service is setup and the daemon can be started,
it needs to be enabled as a module in the frontend.

Install this module in your main hostmaster (Aegir) site. You can
enable the feature from: `admin/hosting`. This will disable your
hosting tasks queue for you, ready for you to enable the daemon.

The daemon logs some of its activities to the Drupal watchdog.

Installing as a service
-----------------------

Those instructions will setup the daemon to run as a regular service
in /etc/init.d/ - instructions will vary according to platforms, the
following should work in Debian, running as root.

1. Install the init script in place

        cp init.d.example /etc/init.d/hosting-queued

2. Setup symlinks and runlevels

        update-rc.d hosting-queued defaults

3. Start the daemon

        /etc/init.d/hosting-queued

Supervisord configuration instructions
--------------------------------------

You can also use a daemon like supervisor to make sure the daemon is
restarted if it crashes, but this is optional. An example
configuration file (hosting_queued.conf) is included.

These instructions are for Debian based linux distributions, you may need to
adjust settings for other distributions.

1. Install supervisor

        sudo apt-get install supervisor

2. Copy the `hosting_queued.sh` script from the module directory to the
   root of the Aegir home directory (usually `/var/aegir`). You will want to
   ensure that the script is executable and owned by the Aegir user:

        chown aegir:aegir hosting_queued.sh
        chmod 700 hosting_queued.sh

3. Copy the supervisor example configuration file from the module directory
   to the conf.d directory of supervisor.

        cp hosting_queued.conf /etc/supervisor/conf.d/

    Adjust the settings in that file to match your environment. If you have a
    standard Aegir setup, and have followed the README so far, then you
    shouldn't need to change anything.

4. Restart supervisor and add a task to your hosting tasks queue in Aegir,
   re-verify a site and see if it executes then you're all set up!
   Supervisor keeps a log about the execution of the queue daemon that may be
   useful if you are trying to resolve an issue where your tasks are not being
   executed. The output from the queue daemon is also logged by supervisor to
   (by default) `/var/log/hosting_queued` it may be useful to view this
   log occasionally to ensure that there are no errors being logged. 'Duplicate
   task' errors, if you get them are nothing to worry about however.

Troubleshooting
---------------

Try to run the bash script from the command line as the Aegir user yourself, if
you can do this, then the issue is with Supervisor, otherwise it might be an
issue with this module/script.

Look into the Drupal watchdog to see when the daemon has been started
or was restarted. The settings page should also tell you the last time
the daemon was started.

File

queued/README.txt
View source
  1. Hosting queue daemon
  2. ====================
  3. Simple Drupal module intended to make it easy to run the Aegir tasks
  4. queue with near-instant execution times. The daemon is designed to run
  5. standalone, and started through regular services: there's an init.d
  6. script available, which is installed with the Debian package, but that
  7. you will need to manually install in other platforms.
  8. Note that before the service is setup and the daemon can be started,
  9. it needs to be enabled as a module in the frontend.
  10. Install this module in your main hostmaster (Aegir) site. You can
  11. enable the feature from: `admin/hosting`. This will disable your
  12. hosting tasks queue for you, ready for you to enable the daemon.
  13. The daemon logs some of its activities to the Drupal watchdog.
  14. Installing as a service
  15. -----------------------
  16. Those instructions will setup the daemon to run as a regular service
  17. in /etc/init.d/ - instructions will vary according to platforms, the
  18. following should work in Debian, running as root.
  19. 1. Install the init script in place
  20. cp init.d.example /etc/init.d/hosting-queued
  21. 2. Setup symlinks and runlevels
  22. update-rc.d hosting-queued defaults
  23. 3. Start the daemon
  24. /etc/init.d/hosting-queued
  25. Supervisord configuration instructions
  26. --------------------------------------
  27. You can also use a daemon like supervisor to make sure the daemon is
  28. restarted if it crashes, but this is optional. An example
  29. configuration file (hosting_queued.conf) is included.
  30. These instructions are for Debian based linux distributions, you may need to
  31. adjust settings for other distributions.
  32. 1. Install supervisor
  33. sudo apt-get install supervisor
  34. 2. Copy the `hosting_queued.sh` script from the module directory to the
  35. root of the Aegir home directory (usually `/var/aegir`). You will want to
  36. ensure that the script is executable and owned by the Aegir user:
  37. chown aegir:aegir hosting_queued.sh
  38. chmod 700 hosting_queued.sh
  39. 3. Copy the supervisor example configuration file from the module directory
  40. to the conf.d directory of supervisor.
  41. cp hosting_queued.conf /etc/supervisor/conf.d/
  42. Adjust the settings in that file to match your environment. If you have a
  43. standard Aegir setup, and have followed the README so far, then you
  44. shouldn't need to change anything.
  45. 4. Restart supervisor and add a task to your hosting tasks queue in Aegir,
  46. re-verify a site and see if it executes then you're all set up!
  47. Supervisor keeps a log about the execution of the queue daemon that may be
  48. useful if you are trying to resolve an issue where your tasks are not being
  49. executed. The output from the queue daemon is also logged by supervisor to
  50. (by default) `/var/log/hosting_queued` it may be useful to view this
  51. log occasionally to ensure that there are no errors being logged. 'Duplicate
  52. task' errors, if you get them are nothing to worry about however.
  53. Troubleshooting
  54. ---------------
  55. Try to run the bash script from the command line as the Aegir user yourself, if
  56. you can do this, then the issue is with Supervisor, otherwise it might be an
  57. issue with this module/script.
  58. Look into the Drupal watchdog to see when the daemon has been started
  59. or was restarted. The settings page should also tell you the last time
  60. the daemon was started.