Skip to content

Scripts and recipes

This page covers two related-but-distinct components: the scripts that automate install/config/export, and the recipes that add optional features to a tenant site.

Scripts (fedms/scripts)

GitLab: fedms/components/scripts

Composer: fedms/scripts — installed to vendor/fedms/scripts/.

What it ships

1
2
3
4
5
6
7
8
9
vendor/fedms/scripts/
├── ahoy.yml                ← imported by the site's .ahoy.yml
├── composer.json
├── config.sh
├── environments/           ← per-environment fixtures
├── fedms.gitlab-ci.yml     ← included by every site's .gitlab-ci.yml
├── install.sh
├── phpstan.neon
└── src/

Ahoy commands exposed

Command What it does
l3d ahoy fedms install Run install.sh — full fresh install.
l3d ahoy fedms update-config Run config.sh — apply idempotent config updates.
l3d ahoy fedms export-config Run drush config:devel-export for the profile and all seven modules in one shot.

install.sh

The fresh-install pipeline:

  1. Workaround for book#3563936 — copy field.storage.node.body.yml from core's article_content_type recipe into the book module's config/optional/.
  2. Base setup (.base.sh).
  3. Import profile config from web/profiles/contrib/fedms/config/optional.
  4. Import fedms_content config.
  5. Import fedms_eca config.
  6. Import fedms_federation config.
  7. Disable the ECA modeler (drush modeler_api:disable eca) so the next imports don't trigger model auto-generation.
  8. User setup (.user.sh).
  9. Config tweaks (config.sh).
  10. Optional config/install.sh for site-specific extras.
  11. Re-enable the ECA modeler.
  12. drush cron to flush any post-install jobs.

config.sh

Idempotent config updates. Whenever a structural change ships in a release that needs imperative SQL or Drush commands beyond what config sync handles, the relevant line goes here.

fedms.gitlab-ci.yml

The CI pipeline template. Site .gitlab-ci.yml files include this:

1
2
3
4
include:
  - project: fedms/components/scripts
    ref: develop
    file: fedms.gitlab-ci.yml

The pipeline enforces deployment, ignores CSP in outdated checks, and ignores composer audit (until upstream is clean).

Recipes

Drupal recipes are Composer-published bundles of config that add optional features.

The shipped recipes

Recipe GitLab Composer
Attachment Recording fedms/components/recipes/attachment-recording fedms-recipe/attachment_recording
Send Email fedms/components/recipes/send-email fedms-recipe/send_email
Zoom Video fedms/components/recipes/zoom-video fedms-recipe/zoom_video

Plus the parent recipe scaffold at fedms/components/recipe which provides the shared composer.json skeleton.

Recipe anatomy

A recipe is a directory with:

1
2
3
4
5
6
my-recipe/
├── composer.json
├── README.md
├── recipe.yml         ← the manifest
└── config/            ← config files to import
    └── ...

recipe.yml typically looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: 'My Recipe'
description: |-
  What this recipe adds.
type: FedMS
install:
  - module_a
  - module_b
input:
  some_key:
    data_type: string
    description: ...
    prompt:
      method: ask
      arguments:
        question: 'Some question?'
    default:
      source: value
      value: 'default'
config:
  strict: false
  actions:
    some_config.id:
      simpleConfigUpdate:
        some_key: '${some_key}'

Applying a recipe

1
2
l3d composer require fedms-recipe/send_email
l3d drush recipe ../recipes/fedms-recipe-send_email

(The exact path depends on the installer-paths config.)

Authoring a new recipe

  1. Fork the parent recipe scaffold at fedms/components/recipe.
  2. Set the name, description, install list, input, and config actions in recipe.yml.
  3. Add any starter config files under config/.
  4. Test on a clean install of a tenant site.
  5. Open an MR.
  6. Tag a release once approved.

Site-level recipes vs framework recipes

Site repositories may have their own recipes under recipes/. The Amplius site, for example, has alerts and monitoring recipes that are part of the LakeDrops operational stack — these are site-level and unrelated to the FedMS framework.

Keep this distinction clear: framework recipes ship under fedms-recipe/* in the FedMS group; site-level recipes live in the site repo and are private to the site.

Next steps