-
Notifications
You must be signed in to change notification settings - Fork 9
Description
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) -
decommissionedjenkins-01
-
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:
- Reduce jQuery CDN risk, separate and upgrade codeorigin site. https://github.com/jquery/infrastructure/issues/554
- Upgrade TestSwarm to PHP 7. https://github.com/jquery/infrastructure/issues/444
- Upgrade WordPress hosts to PHP 7. Upgrade WordPress hosts to PHP 8 #6
- Trac: Replace with static export. Make Trac read-only, possibly replace by a static dump #10
- CLA export and decom. Decom CLA droplets #12
- Plugins: Replace with static export Archive plugins.jquery.com, replace with static site #29
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:
- https://elatov.github.io/2016/07/upgrade-puppet-3x-to-4x/
- https://puppet.com/docs/puppet/4.10/upgrade_major_server.html
- https://puppet.com/docs/puppet/3.8/environments.html
- https://puppet.com/docs/puppet/3.8/dirs_manifest.html
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 branchpuppet-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 branchpuppet-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...