Skip to content

PS-11173: Declarative init.groovy.d boot loading for Terraform-managed masters#31

Draft
nogueiraanderson wants to merge 1 commit into
mainfrom
PS-11173-init-groovy-hooks
Draft

PS-11173: Declarative init.groovy.d boot loading for Terraform-managed masters#31
nogueiraanderson wants to merge 1 commit into
mainfrom
PS-11173-init-groovy-hooks

Conversation

@nogueiraanderson
Copy link
Copy Markdown
Collaborator

Feature

  • Adds init_groovy_hooks (map of filename to pinned raw URL) to the jenkins-master module; user-data fetches each into init.groovy.d at boot, generalizing the single-file plugin_install_hook. Wires ps3 with its full set (cloud, matrix, durability, hetznerArmHealth, ec2FleetCloud + htz.cloud from the hetzner branch).

Why

  • A TF master's init.groovy.d wiring currently lives only on the carried-forward EBS data volume; a fresh-volume rebuild comes up bare (the bootstrap gap only pxc.cd escaped). This makes the wiring declarative-in-TF and self-healing on rebuild.
  • ps3 surfaced this concretely: its EC2FleetCloud was in-memory-only and vanished on a JVM restart. On-disk + boot-loaded is the durable fix; jenkins iac deploy stays the no-restart hot-reload path for live edits.
  • Scales to the CFN-to-TF migration: each master declares its hooks and the same boot loop self-heals it. A failed fetch warns, never blocks boot.

Tickets

…asters

- Add init_groovy_hooks (map filename=>pinned URL) to the jenkins-master module; user-data fetches each into init.groovy.d at boot, generalizing the single-file plugin_install_hook.

- Closes the bootstrap gap: a fresh-volume rebuild re-materializes the master's full wiring instead of relying on the carried-forward EBS volume. A failed fetch warns, never blocks boot.

- Wire ps3 with its full set (cloud, matrix, durability, hetznerArmHealth, ec2FleetCloud from a pinned ref; htz.cloud.groovy from the hetzner branch). jenkins iac deploy stays the no-restart hot-reload path.
@nogueiraanderson
Copy link
Copy Markdown
Collaborator Author

nogueiraanderson commented May 28, 2026

Validation

  • tofu validate: Success (template directives + the map(string) var typecheck clean).
  • Scoped plan (-target=module.ps3.aws_launch_template.master, percona-dev-admin): one in-place update to the launch template (user_data to a new version), no instance replacement. ignore_changes = [user_data] was already lifted in PS-11173 Phase 1, so the new wiring rides the next launch / fresh-volume rebuild without churn.
  • The on-disk + boot-load path itself was already proven on ps57 this week (the jenkins iac deploy --branch of ec2FleetCloud.groovy registered + survived, end-to-end Graviton allocation validated).

Before merge / apply

  • ps3_init_groovy_ref is a master placeholder. Pin it to the merge commit of jenkins-pipelines PR 4126 + PR 4129 before relying on this for DR: until those land, durability.groovy and ec2FleetCloud.groovy are absent on master, so the boot loop warns (without blocking) for those two.
  • htz.cloud.groovy is pulled from the hetzner branch (the two-IaC-branch split); pin that to a commit before trusting it for a fresh-volume rebuild.

Scope

  • plugin_install_hook is unchanged (back-compat); init_groovy_hooks is additive and {}-default, so every other master is a no-op until it opts in. This is the generalized pxc bootstrap pattern, ready for the CFN-to-TF migration to adopt per master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant