Hosting module suite map
omega8cc/hosting is a suite of Drupal 7 modules — one root framework module
(hosting) plus nineteen top-level submodule directories — that defines Aegir's
node types (server, platform, site, client, task, package) and the
admin UI over them. It is the frontend half of the two-surface backend API: the
hooks it exposes live in six *.api.php files (root + five submodules), and its
task nodes drive the Provision backend across the round-trip on the
topic chapter. This page is the module-by-module map — which module owns
what, which *.api.php it carries, and which of the nineteen BOA actually enables
versus which ship dormant. The frontend hook contracts (bodies, invocation
points) are the Hosting API leaf; this page is the index
into them.
Two authorities decide "enabled", and they disagree with the on-disk module count on purpose:
hostmaster.infodependencies[](hostmaster.info:23-37) — the D7 install-profile manifest Drupal enables at INIT. This is the source of truth for "on by default", not the presence of a directory in thehosting/tree._satellite_child_b_aegir_ui_enhance()(satellite.sh.inc:6120) and the Master analog — the BOA post-installdrush @hostmaster en …pass that enables the golden-tier and satellite modules the.infomanifest does not list. Adding a module to existing instances always means anencall here, never just a.infoedit (the manifest fires only at INIT).
The root hosting module
hosting/hosting.module (~47 KB) is the framework every submodule
dependencies[] = hosting against. It owns:
- Task dispatch + queue registry —
hosting_queues()(hosting.module:822),hosting_get_queues()and the queue-frequency admin form; the dispatch mechanics live inhosting.queues.inc. - Node-graph glue — breadcrumbs,
_hosting_node_link(), the CTools features-export layer (hosting.features.inc, ~19 KB) that lets the Aegir config ship as a Feature. - The framework hook surface —
hosting/hosting.api.php(below), the suite's largest*.api.php. - Front-end assets —
hosting.css,hosting.js.
hosting.info declares no dependencies[] of its own; it is the base every
other suite module sits on.
The six *.api.php hook surfaces
Six *.api.php hook-documentation files ship across the suite — one in the root
hosting module and one in each of five submodules (task, alias, quota,
server, site). Each is the
canonical stub reference for that module's hooks — implemented frontend-side as
<yourmodule>_<hook>() and invoked with module_invoke_all() /
drupal_alter() at the cited points. Line numbers are the stub definitions at
HEAD.
*.api.php |
Key hooks (stub line) | What it governs |
|---|---|---|
hosting/hosting.api.php |
hook_hosting_feature():110, hook_hosting_queues():138, hook_hosting_queues_alter():156, hook_hosting_TASK_OBJECT_context_options():218, hook_hosting_TASK_TYPE_task_rollback():246, hook_post_hosting_TASK_TYPE_task():325, hook_hosting_task_dangerous_tasks():446 |
Feature registration, queue declaration, the task-node → backend-context bridge, the post-task result hook |
hosting/task/hosting_task.api.php |
hook_hosting_tasks():42, hook_hosting_tasks_alter():66, hosting_task_TASK_TYPE_form():82, hook_query_hosting_get_new_tasks_alter():119 |
Declaring a task type (button + form + backend command) and altering the queue-claim query |
hosting/alias/hosting_alias.api.php |
hook_hosting_automatic_aliases():13, …_alter():27 |
Programmatic domain-alias generation per site |
hosting/quota/hosting_quota.api.php |
hook_hosting_quota_resource():16, …_get_usage():42, …_resource_render():63 |
Registering a per-client quota resource + its usage meter |
hosting/server/hosting_server.api.php |
hook_hosting_service():52, hook_hosting_service_type():65, hook_hosting_servers_titles_alter():33 |
Declaring a frontend service + service-type (the frontend twin of Provision's hook_provision_services()) |
hosting/site/hosting_site.api.php |
hook_hosting_site_options_alter():29, hook_hosting_site_site_list_filters():82, …_alter():100 |
Injecting site-node options and site-list filters |
Note the split of the task hooks across two files: the lifecycle hooks
(hook_hosting_TASK_OBJECT_context_options, hook_post_hosting_TASK_TYPE_task,
the rollback and dangerous-task hooks) are in the root hosting.api.php, while
the task-type declaration hooks (hook_hosting_tasks, the per-type form
callbacks) are in hosting_task.api.php. Declaring a new task type touches both.
The remaining fourteen submodules (19 minus the five that carry an .api.php)
ship no *.api.php — extend them through the
root suite hooks (hook_hosting_feature, the TASK_TYPE/TASK_OBJECT family)
or the standard D7 hook_nodeapi/hook_form_alter surface.
Enabled-by-default — the Aegir core tier
hostmaster.info:23-37 enables these fifteen at INIT (module machine name ←
directory):
| Module | Dir | Role | .api.php |
|---|---|---|---|
hosting |
hosting/ |
Root framework | yes |
hosting_alias |
alias/ |
Domain aliases / redirects | yes |
hosting_client |
client/ |
Client node type; per-client access (hosting_client.access.inc) — the multi-tenancy primitive |
— |
hosting_clone |
clone/ |
Site-clone task (backup as snapshot source) | — |
hosting_cron |
cron/ |
Per-site Drupal cron as Aegir tasks; declares the cron queue |
— |
hosting_db_server |
db_server/ |
DB-server service type | — |
hosting_le |
(separate repo) | Let's Encrypt lifecycle — resolves from the bundled hosting_le project, not the hosting/ tree |
— |
hosting_migrate |
migrate/ |
Platform-to-platform migration | — |
hosting_package |
package/ |
Module/theme/profile tracking across platforms (the "Software" UI) | — |
hosting_platform |
platform/ |
Platform node type | — |
hosting_server |
server/ |
Server node type + service model | yes |
hosting_site |
site/ |
Site node type | yes |
hosting_task |
task/ |
Task framework; declares the tasks queue |
yes (hosting_task.api.php) |
hosting_tasks_extra |
(separate repo) | BOA task-set trimmer + extra site tasks — see below | — |
hosting_web_server |
web_server/ |
Web-server service type | — |
Two of the fifteen — hosting_le and hosting_tasks_extra — are not in the
hosting/ tree at all; they resolve from separately-bundled projects the make
chain places under modules/aegir/. The .info manifest names them because
Drupal enables by machine name regardless of where the code came from.
Nginx submodules enabled at runtime, not by the manifest. hosting_nginx
(web_server/nginx/), hosting_ssl (web_server/ssl/) and hosting_nginx_ssl
(web_server/nginx/ssl/) are not in dependencies[]. hostmaster_install()
enables them itself when the server context reports http_service_type === 'nginx' (always true on BOA) — see the
Hostmaster frontend internals leaf. On disk they
are submodules of hosting_web_server, hence the web_server/nginx/… nesting.
Golden contrib enabled at INIT. hostmaster.info:40-41 also enables
hosting_platform_composer_git and hosting_platform_git (D7 contrib in the
Aegir tier). The Drupal-core and D7-contrib tiers of the manifest
(:10-20, :44-55) are covered on the
Hostmaster frontend internals leaf.
Enabled-by-default — BOA satellite / golden tier
Beyond the .info manifest, BOA clones a set of golden and satellite projects
at branch 5.x-${tree} (master.sh.inc:580-588,
satellite.sh.inc:3159-3167) — these live outside the hosting/ tree, in
their own omega8cc repos, kept in lock-step with BOA — and enables the frontend
halves inside _satellite_child_b_aegir_ui_enhance() (satellite.sh.inc:6120).
Most fire in the module en block (:6139-6159); hosting_le /
hosting_le_vhost / hosting_custom_settings are enabled in later branches of
the same function (:6282-6294, :6391-6395):
| Project (own repo) | Enabled as | Role |
|---|---|---|
aegir_objects |
aegir_objects |
Shared Aegir helper objects |
hosting_civicrm |
hosting_civicrm, hosting_civicrm_cron |
CiviCRM platform support |
hosting_custom_settings |
hosting_custom_settings |
BOA per-site custom settings injection |
hosting_deploy |
hosting_deploy |
Deploy-across-platforms task |
hosting_git |
hosting_platform_composer, hosting_platform_composer_git, hosting_platform_git |
Git/Composer platform build tasks |
hosting_site_backup_manager |
hosting_site_backup_manager |
Per-site backup-manager UI |
hosting_le |
hosting_le, hosting_le_vhost |
Let's Encrypt (frontend + vhost injector) |
hosting_remote_import |
(cloned; not in .info) |
Remote-site import support |
The hosting_tasks_extra project (below) also carries three modules BOA
enables from inside its tree — fix_ownership, fix_permissions,
hosting_http_basic_auth (satellite.sh.inc:6140-6152). hosting_remote_import
is cloned but not enabled by the .info manifest; do not present it as a core
hosting/-suite module — it exists only as a separate satellite repo.
Ship-disabled — present in the tree, never enabled
These submodule directories exist in omega8cc/hosting but appear in neither
hostmaster.info nor any drush @hostmaster en call in the BOA stack
(grep -rn "en hosting_signup\|en hosting_quota\|en hosting_subdirs" lib/functions/ returns nothing):
| Module | Dir | Why it ships disabled |
|---|---|---|
hosting_signup |
signup/ |
Anonymous self-signup form. BOA closes registration (user_register = 0 in hostmaster.install), so signup ships but is inert. Re-enable manually to expose a signup flow. |
hosting_quota |
quota/ |
Per-client disk/site-count quotas. Ships with hosting_quota.api.php but is not part of the BOA default profile. |
hosting_subdirs |
subdirs/ |
Subdirectory-style URLs (example.com/sitea). Niche; off by default. |
hosting_queued |
queued/ |
The async task daemon — see below. |
hosting_queued — the dormant daemon
hosting_queued (queued/) is Aegir's optional long-running task daemon
(hosting_queued.drush.inc, an init script, and a .plist). BOA does not use
it. BOA drains the queue from cron instead. The master queue runner
(/var/xdrago/runner.sh) iterates the per-account run-* scripts under
/var/xdrago (_runner_action(), runner.sh:121) and bashes each; those
child runners are what invoke @hostmaster hosting-dispatch
(manage_ltd_users.sh:1041) — the real hosting-dispatch drush command
(hosting.drush.inc:20, implemented in dispatch.hosting.inc). Before dispatch
the runner calls _enable_master_cron() (runner.sh:27, unconditionally in the
non-wait branch, :222) to keep the master Aegir crontab un-parked.
There is no hook_hosting_queued_process hook anywhere in the suite — do not
document one; the only hosting_queued_* symbols are the …_process_started /
…_process_lifetime timestamp variables. Queue-driver mechanics and the
dispatch cadence are the
topic chapter's task round-trip; the queue-declaration hook contract is on
Hosting API.
Where the task queue sits
The queue system is three modules, not one, and each hook_hosting_queues()
implementation (hosting_task.module, hosting_cron.module,
hosting_task_gc.module) contributes exactly one queue — so BOA runs three
queues, all cron-driven, none via the hosting_queued daemon:
| Queue | Declared by | Module tier | Job |
|---|---|---|---|
tasks |
hosting_task |
core (enabled) | Claim + run the next task nodes via provision_backend_invoke() |
cron |
hosting_cron |
core (enabled) | Fire per-site Drupal cron on schedule |
task_gc |
hosting_task_gc |
core (enabled) | Garbage-collect old completed Task nodes |
hosting_queues() (hosting.module:822) renders the queue index UI;
hosting.queues.inc holds the dispatch loop and the cron-command wiring. For
the frontend hook you implement to add a queue —
hook_hosting_queues() (hosting.api.php:138) — and the TASK_TYPE form/lifecycle
hooks that hang a task on the tasks queue, go to
Hosting API. The backend command each task node ultimately
invokes is on Provision API. This map deliberately stops
at "which module owns the queue"; the operator-facing dispatch/semaphore
mechanics are out of scope for this guide.
Pedagogical + integration directories
example/— three reference modules for learning to extend Aegir:hosting_example(example/example_service/, machine name fromhosting_example.info) demonstrates a new frontend service type;hosting_server_data(example/server_data/) attaches per-server custom data;hosting_site_data(example/site_data/) attaches per-site custom data. All three declarepackage = Hosting Examplesand are not enabled by BOA. (Note the directory-vs-machine-name mismatch:example/example_service/→hosting_example.) Read these plus Extending Aegir before writing an extension.includes/views/— Drupal Views integration; the field handlers (includes/views/handlers/hosting_field_handler_interval.inc,hosting_field_handler_status.inc) expose the Aegir node types to Views. Not a standalone module — code loaded by the suite; it powers the default Aegir listings.
Deprecated — do not enable
hosting_web_cluster(web_cluster/) +hosting_web_pack(web_pack/) — the upstream master/slave web-cluster modules. They ship in the fork but BOA does not enable them and does not support the topology. Graded discontinued: Discontinued features.
hosting_tasks_extra — BOA's task-set governor
omega8cc/hosting_tasks_extra is not part of the hosting/ tree — it is
its own repo, cloned and re-pulled on the same 5.x-${tree} branch as the rest
of the stack (master.sh.inc:588, satellite.sh.inc:3167), so its task set always
matches the running BOA release, and enabled against @hostmaster on every
install/upgrade pass (satellite.sh.inc:6150; the module itself sits in
the .info manifest, hostmaster.info:36). Its BOA-facing job is to prune
the Aegir task-button set to what BOA supports and add a few BOA-specific
tasks:
- Two surviving site tasks at HEAD: Flush all caches and Rebuild
registry, both now version-aware. On D8+ they route through Provision's
shared
_provision_drupal_rebuild_d8plus()helper (platform/provision_drupal.drush.inc:665) —drush crvia the site-local Drush on D10+, Aegir Drush 8cache-rebuildon D8/D9 — instead of the D7-only registry/--fire-bazookapath. - Retired from the UI (backend verbs still work from the CLI, buttons gone): Run drush cron (attack-surface removal), Run db updates (wrong-workflow guard), plus Update translations, Revert features, Update features, the server-level Flush Drush cache, and the BOA Run health check.
- Carries three enabled sub-modules inside its tree —
fix_ownership,fix_permissions,hosting_http_basic_auth— enabled by the same post-installenpass.hosting_http_basic_auth's backend half (http_basic_auth.drush.inc) is the canonical paired-extension example on the Provision API leaf.
The task types it declares/hides are hook_hosting_tasks()
(hosting_task.api.php:42) implementations — the same surface any task-adding
module uses, documented on Hosting API.
On-disk layout after install
The make chain places the whole suite under the Hostmaster profile (paths and the make-chain detail are on Hostmaster frontend internals):
profiles/hostmaster/modules/aegir/
hosting/ hosting_alias/ hosting_client/
hosting_clone/ hosting_cron/ hosting_db_server/
hosting_le/ hosting_migrate/ hosting_package/
hosting_platform/ hosting_server/ hosting_site/
hosting_task/ hosting_tasks_extra/ hosting_web_server/
aegir_objects/ hosting_civicrm/ hosting_deploy/ …
The web_server/nginx* and web_server/ssl submodules live inside
hosting_web_server/, and the golden/satellite projects (aegir_objects,
hosting_civicrm, …) sit beside the core tier — all under modules/aegir/. The
sites/all/* tree is intentionally empty; extend by adding a hosting_* module
to the make chain and the enable pass, never by dropping code into sites/all.
Maintainer contract
- "Enabled" is the
.infomanifest + the BOAenpass, not the directory list. Nineteen submodule dirs exist (plus the roothosting); the manifest enables fifteen (two from separate repos), the BOA post-install pass adds the golden/satellite tier, and four dirs (signup,quota,subdirs,queued) ship dormant. - New task type = both api files.
hook_hosting_tasks()inhosting_task.api.phpfor the type/form; theTASK_OBJECT/TASK_TYPElifecycle +post_hosting_*hooks in the roothosting.api.php. - New module for existing instances needs an
encall. Add it to_satellite_child_b_aegir_ui_enhance()and the Master path; the.infomanifest only fires at INIT, so a manifest-only add reaches fleet installs never. hosting_le/hosting_tasks_extraare separate repos. They are enabled by machine name but resolve from their own projects; keep them on the5.x-${tree}clone list, not in thehosting/tree.- No
hosting_queueddaemon on BOA. The queue is cron-driven; there is nohook_hosting_queued_process. - Master/satellite build duplication is deliberate — the clone/enable logic
exists twice (
master.sh.inc/satellite.sh.inc); fix both copies. See code style & conventions. - PHP 5.6 floor applies to every
.module/.inc/ hook implementation in the suite — syntax and runtime both (see the topic chapter).
Related
- Aegir backend APIs (topic chapter) — the task round-trip these modules drive, and the two-surface API model.
- Hostmaster frontend internals — the install profile that bundles every module here, the make chain, and on-disk paths.
- Hosting API — the frontend hook contracts
(
hook_hosting_feature,hook_hosting_queues, theTASK_TYPE/TASK_OBJECTfamily) this map indexes. - Provision API — the backend command each task node
invokes, and the
http_basic_authpaired-extension example. - Extending Aegir: contexts, hooks, module pairs — the
end-to-end paired-module pattern; start from
example/plus this leaf. - Variables and
Commands — consolidated
_VARand CLI tables. - Discontinued features — where
hosting_web_cluster/hosting_web_packland.