-
Notifications
You must be signed in to change notification settings - Fork 9
Upgrade from Debian 7 Wheezy (Puppet 3) to Debian 11 Bullseye (Puppet 7) #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Things I think we are not using, and I will omit initially in the Puppet 4 branch:
I'll mention this during this Friday's infra meeting (tomorrow) in case any we know of any of these definitely still being used. /cc @mgol @brianwarner |
I don't know much about our usage of any of these services with the exception of the fact that running:
on
so it looks like New Relic is somehow interfering with Puppet runs. I'm not sure if those errors are blocking anything. |
Aye, that looks familiar. I'll continue the jenkins-01 issue at https://github.com/jquery/infrastructure/issues/433. |
This cleanup was useful and benefitted our current droplets as well. But, the issue as originally written I'm closing for now per https://github.com/jquery/infrastructure/issues/482#issuecomment-907890935. Might pick it up again depending on whether if/when we're going to have droplets running newer Debian versions. |
@atdt I've created the puppet-02.ops.jquery.net instance (IP: 104.131.63.112, DNS not yet assigned), with a Debian 11 image, a small 2-CPU / 4GB RAM plan, and both of our SSH keys attached for initial bootstrapping. Empty repo for Puppet manifests: https://github.com/jquery/infrastructure-puppet. |
This is in place as well, also with proxying enabled until you tell me not to. |
@brianwarner Aye, yeah, this one should be without proxying as it's for internal use such as shell access and receiving webhooks. |
What version of Puppet should we target? Puppet <= 5 has already reached EOL, and Puppet 6 is projected to reach EOL in less than a year. (See: Puppet platform lifecycle. OTOH, Puppet 7 has not yet been packaged for Debian 11 Bullseye. Puppet Labs estimates packages for Debian 11 will be available within the next month. |
@atdt I see. I suppose we could wait another month. Alternatively, we could go with Puppet 7 now if we use Debian 10 Buster, I think? I don't see Debian 6 for Debian 11 Bullseye, but I'm not sure if I'm looking in the right place, is there one? I can't tell from the raw index at https://apt.puppet.com/. Either way, I imagine from one major Debian or Puppet to the next should be relatively simple with a few inline conditionals perhaps. |
@Krinkle Puppet intends to release puppetserver 7.6.0 next week, with packages for Bullseye. Since it's so close, let's just wait. |
OK, I installed puppetserver 7.6.0 on puppet-02. Here's what I ran: #!/usr/bin/env bash
set -eux
# Enable the Puppet platform repository
# https://puppet.com/docs/puppet/7/install_puppet.html#enable_the_puppet_platform_repository
wget https://apt.puppet.com/puppet7-release-bullseye.deb
sudo dpkg -i puppet7-release-bullseye.deb
# Install Puppet server
apt install -y puppetserver
systemctl start puppetserver
# Install Puppet agent
apt install -y puppet-agent
# Start the Puppet service
/opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
echo 'source /etc/profile.d/puppet-agent.sh' >> ~/.bashrc
/opt/puppetlabs/bin/puppet config set server puppet-02.ops.jquery.net --section main
/opt/puppetlabs/bin/puppet ssl bootstrap |
I've created, in following with wiki: DNS and and wiki: Provisioning:
Both nyc3, 1 vCPU and 2 GB RAM, with Debian 11, and ori-2021 and krinkle-2020 for initial root. (Prod ones later expected as 2 vCPU / 4 GB RAM.) |
@atdt I've followed your steps on both of the droplets (puppetserver only for puppet-02, puppet agent on both), with one minor change. The
After an
But then the service didn't want to start, because:
So I've re-created it with 4GB instead of 2GB. In addition, for the codeorigin-02 droplet one extra step as the
So I ran |
I've set up a basic skeleton at https://github.com/jquery/infrastructure-puppet for the puppet server, and provisioned as follows:
This does not require a deployment ssh key, it can be an unauthenticated clone over HTTPS since this is the public puppet repository. @atdt I originally wanted to set it up such that the public repo reflects
But alas, it wasn't applying anything. There was no error though, it ran cleanly on codeorigin-01, but just didn't apply any roles. So the modulepath may've worked but that it was
Let me know if anything is off here, or could be better. Otherwise, next steps:
I think it'd be neat if the public repo is standalone and self-sufficient for staging and local use, e.g. not hard-require a third repo with pseudo secrets to be integrated to substitute for the real secret repo. Instead, we might be able to get away with only having private data come from Hieradata YAML files, which have a straight-forward inheritence chain that we can configure in production to include one extra layer from a checkout of the private repo.
In particular, the following non-trivial things seem best to provision via puppet instead of statically once:
|
What would happen if a secret were to get accidentally deleted from the private repo? IIUC, with the setup that you're suggesting, we wouldn't get an error; the secret will simply quietly get the dummy value in production. I don't think we want that; we'd want Puppet to fail loudly in that case, which we'd get if we had a real and fake Puppet private repos. |
@atdt Thanks, I hadn't thought of that! I'd still like to try once more if we can avoid a third repo for fake-secrets, however. Rather than place all the dummy values in a "common" file in the puppet repo as I described before, what if we instead placed (most) of that in a "dummy" file that is still in the same puppet repo but indeed only optionally included, similarly to how we'd optionally include the private files. I believe that would effectively achieve the same, but with the file present in the repo rather than being brought in or symlinked from a separate repo, right? |
@Krinkle I think that works, yes. Let's give it a shot. |
While running I'm gonna assume this is expected and simply because we ran |
Also switch away from shared common.yaml to a fake and secret one, per discussion at https://github.com/jquery/infrastructure/issues/484.
Also switch away from shared common.yaml to a fake and secret one, per discussion at https://github.com/jquery/infrastructure/issues/484.
Also switch away from shared common.yaml to a fake and secret one, per discussion at https://github.com/jquery/infrastructure/issues/484.
Also switch away from shared common.yaml to a fake and secret one, per discussion at https://github.com/jquery/infrastructure/issues/484.
I've provisioned myself and Ori on the new system, and also resolved https://github.com/jquery/infrastructure/issues/560 at the same time (Automatically remove unpuppetized root keys). |
Notes from meeting with @atdt and myself:
|
Last remaining work:
The first one is blocked on #29 |
I've deleted the tarsnap backups of wp-01 using the command at #19 (comment), and turned off the droplet. I'll delete it next week if nothing comes up by then. ![]() Just shy of its 10 year anniversary. Pretty good uptime! |
Decommissioning jenkins can be tracked specifically here: #47 After that, we can decommission puppet.ops.jquery.net and close this issue. |
List of hosts
https://github.com/jquery/infrastructure/blob/puppet-stage/manifests/site.pp
puppet.ops.jquery.net
wp-01
, jquery.comwp-02
, most other sites (incl *.jquery.org, jqueryui.com, etc)wp-03
, codeorigin.jquery.com, releases.jquery.com, and recipient of Git assetswp-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
, TestSwarmview-01.ops.jquery.net
, View, git assetstrac.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 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: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 containenvironment = 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
, andmodulepath
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...
The text was updated successfully, but these errors were encountered: