Portal:Toolforge/Admin/puppet refactor

From Wikitech
Jump to navigation Jump to search

This page contains some notes on the puppet refactor we are doing for Toolforge, specifically some agreements in how we will be organizing the puppet code.

We agree in refactoring away all the old toollabs namespace in favour of the modern toolforge one.
We also agree in using the modern roles/profiles/classes puppet model:

  • a machine has one role
  • this role includes one or more profiles
  • each profile can include/depend on other profiles, or directly call other classes

Profiles and roles explanation

TODO: review & fill if required.


This profile contains common class declarations and configuration for all VM instances in the Toolforge project.
Mind that this profile may be compiled for different OS and servers with different roles.


This profile contains common class declarations and configuration for grid integration, specifically submit nodes (i.e, servers which can somehow submit jobs to the grid).


Specific profile for servers which are not meant to be SSH-accesible by end-users of Toolforge.

Refactor examples

Some concrete examples, in this case using the services role.

We have several options for the refactor. For sanity, we should probably follow some practices already established by other of our stuff (i.e, openstack). But still, plenty of options for the resulting organization.

option 1

(AKA: single role, single profile, multiple subclasses)

option 2

(AKA: single role, multiple specific profiles)

main services role:

 role::wmcs::toolforge::services (modules/role/manifests/wmcs/toolforge/services.pp)
 --> from here include several profiles

services profile:

 profile::toolforge::services (modules/profile/manifests/toolforge/services.pp)
 --> configure here all the webservicemonitor stuff, etc

aptly profile:

 profile::toolforge::aptly (modules/profile/manifests/toolforge/aptly.pp)
 --> configure here all the aptly stuff, calling directly aptly::repo

bigbrother profile:

 profile::toolforge::bigbrother (modules/profile/manifests/toolforge/bigbrother.pp)
 --> does the same as the current toollabs::bigbrother at modules/toollabs/manifests/bigbrother.pp


option 3

(AKA: single role, single profile which includes more specific profiles)