Skip to content

Upgrade from Debian 7 Wheezy (Puppet 3) to Debian 11 Bullseye (Puppet 7) #8

@Krinkle

Description

@Krinkle

List of hosts

https://github.com/jquery/infrastructure/blob/puppet-stage/manifests/site.pp

  • puppet.ops.jquery.net
  • wp-01, jquery.com
    • jquery.com
    • api.jquery.com
    • learn.jquery.com
    • plugins.jquery.com
  • wp-02, most other sites (incl *.jquery.org, jqueryui.com, etc)
  • wp-03, codeorigin.jquery.com, releases.jquery.com, and recipient of Git assets
  • wp-01.stage, WordPress doc sites, staging, all domains (stage.api.jquery.com, etc)
  • builder-01
  • builder-03.stage
  • jq03.stage.jquery.com (stage.demos.jquerymobile.com, stage.themeroller.jquerymobile.com)
  • jenkins-01 decommissioned
  • cla-01.ops.jquery.net
  • cla-01.stage.jquery.net
  • gruntjs.ops.jquery.net
  • gruntjs.stage.jquery.net
  • origin-01.ops.jquery.net, contentorigin (content.jquery.com, static.jquery.com)
  • swarm-01.ops.jquery.net, TestSwarm
  • view-01.ops.jquery.net, View, git assets
  • trac.ops.jquery.net, Trac, (bugs.jquery.com, bugs.jquerui.com)

Dedicated tickets:

Overview

In order to get away from the very outdated Debian versions and such, we need to also get to a newer Puppet version.

We are currently using numerous Puppet 2 features that were deprecated in Puppet 3 and removed in Puppet 4. The main change that I think affects us is the change from "environment configs" to "environment directories".

Some relevant links:

Status quo: Puppet 3

The puppet server runs at puppet.ops.jquery.net (in legacy docs: puppet-master). The config for the server is at /etc/puppet/puppet.conf. There are two Git clones that we care about on this server:

  • /etc/puppet - This is a clone of jquery/infrastructure.git at branch puppet-master. This currently replaces the entire /etc/puppet directory.
  • /etc/puppet-stage – This is a directory we made up, containing another clone of jquery/infrastructure.git at branch puppet-stage.

In /etc/puppet/puppet.conf (the only place the Puppet server actually looks at) we have the following stuff:

[main]
# …
templatedir=$confdir/templates
manifest=/etc/puppet/manifests/site.pp

[stage]
manifest=/etc/puppet-stage/manifests/site.pp
modulepath=/etc/puppet-stage/modules
# …

[master]
# …

By default, with one of our droplets that runs a puppet agent asks for provisioning, it gets provisoned by the main config which points simply at the subdirectories within /etc/puppet. On staging hosts, we have another /etc/puppet/puppet.conf file that may contain environment = stage, which the agent passes on to the Puppet server, and so the Puppet server will consider that manifest and modulepath directory instead (in addition to compling it with $::environment = "stage").

Beyond this, the only other thing worth knowing is that we use jquery::postreceive instances (similar to for the content sites) to automatically update these git checkouts after commits to them. The actual applying of changes however is passive, based on puppet agents checking in with the server every 30 minutes (default Puppet agent behaviour).

Puppet 4

Under Puppet 4, things are a little bit different. There is no longer support for the templatedir, manifest, and modulepath parameters, and there is no longer support for per-environment configuration section overrides.

Instead, modules are read from a directory like /etc/puppet/code/environments/:environment/modules and manifests are read from a directory like /etc/puppet/code/environments/:environment/manifests. For example: /etc/puppet/code/environments/production/modules.

I think global templates are no longer supported, or at least not varying by environment. But that's okay, we only have one file in /templates and that'll either just not support staging or maybe we can even get rid of it (do we still use Zabbix?).

The new directory layout seems feasible, we just create two more clones and keep both for a little while.

Transition

I noticed just now that, apart from a few minor tweaks being needed for deprecated features, more generally it is not supported to connect Puppet 4 clients to a Puppet 3 server. However, the other way around is supported. So, the puppet master will have to go first, and that means a master switch, and setting up a new one of those first as well.

The good news is, a Puppet server is relatively easy to configure and gradually switch to...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions