Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Development documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine R. Dumont
Development documentation
Commits
60b82e1c
Unverified
Commit
60b82e1c
authored
1 month ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
docs/kafka: Document debian upgrade procedure
Refs.
swh/infra/sysadm-environment#5556
parent
e63ae66c
No related branches found
No related tags found
No related merge requests found
Pipeline
#12935
failed
1 month ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/sysadm/data-silos/kafka/debian-upgrade.rst
+142
-0
142 additions, 0 deletions
docs/sysadm/data-silos/kafka/debian-upgrade.rst
docs/sysadm/data-silos/kafka/index.rst
+1
-0
1 addition, 0 deletions
docs/sysadm/data-silos/kafka/index.rst
with
143 additions
and
0 deletions
docs/sysadm/data-silos/kafka/debian-upgrade.rst
0 → 100644
+
142
−
0
View file @
60b82e1c
.. _upgrade-debian-kafka-cluster:
Upgrade Procedure for Debian Nodes in Kafka Cluster
===================================================
.. admonition:: Intended audience
:class: important
sysadm staff members
Purpose
--------
This page documents the steps to upgrade Debian nodes running in a Kafka cluster. The
upgrade process involves various commands and checks before and after rebooting the
node.
Prerequisites
-------------
+ Familiarity with SSH and CLI-based command execution
+ Out-of-band Access to the node (IDRAC/ILO) for reboot
+ Access to the node through SSH (requires the vpn)
Step 0: Initial Steps
---------------------
The kafka nodes are mostly running on bare metal machines. So, ensuring the out of band
access to the machine is ok. This definitely helps when something goes wrong during a
reboot (disk order or names change, network, ...).
Note: For (kubernetes) pods running kafka, this kind is dealt with automatically for
kafka operator so this documentation does not cover this part.
Step 1: Migrate to the next debian suite
----------------------------------------
Update the Debian version of the node (e.g. bullseye to bookworm) using the following
command:
.. code::
root@node:~# /usr/local/bin/migrate-to-${NEXT_CODENAME}.sh
Note: The script should be present on the machine (installed through puppet).
Step 2: Run Puppet Agent
-------------------------
Once the upgrade procedure happened, run the puppet agent to apply any necessary
configuration changes (e.g. /etc/apt/sources.list change, etc...)
.. code::
root@node:~# puppet agent -t
Step 2: Stop Puppet Agent
-------------------------
As we will stop the service, we don't want the agent to start it back again.
.. code::
root@node:~# puppet agent --disable "Ongoing debian upgrade"
Step 4: Autoremove and Purge
-----------------------------
Perform autoremove to remove unnecessary packages left-over from the migration.
.. code::
root@node:~# apt autoremove
Step 5: Stop the kafka service
-------------------------------
The cluster can support one non-responding node so it's ok to stop the service (and let
the node leave the cluster for maintenance operation).
We can check the cluster's status which should stay green after the elasticsearch
service is stopped.
.. code::
root@node:~# systemctl stop kafka
root@node:~# kcat -b $server
Note: ``$server`` if of the form ``hostname:9092`` (with the hostname another cluster
node than the one we are currently upgrading). ``kcat`` is a program from the kafkacat
debian package.
Step 6: Reboot the node
-----------------------
We are ready to reboot the node:
.. code::
root@node:~# reboot
You can connect to the serial console of the machine to follow through the reboot (and
unstuck it if any problem arises).
Step 7: Clean up some more
--------------------------
Once the machine is restarted, some cleanup might be necessary.
.. code::
root@node:~# apt autopurge
Step 8: Activate puppet agent
-----------------------------
Activate back the puppet agent and make it run. This will start back the disabled
service again.
.. code::
root@node:~# puppet agent --enable && puppet agent --test
Step 8: Join back the cluster
-----------------------------
After the service restarted, check the node joined back the cluster.
.. code::
root@node:~# kcat -b $server
Example:
.. code::
root@kafka1:~# kcat -L -b $server | head
Metadata for all topics (from broker -1: kafka1:9092/bootstrap):
2 brokers:
broker 3 at kafka3.internal.staging.swh.network:9092
broker 1 at journal2.internal.staging.swh.network:9092 (controller)
This diff is collapsed.
Click to expand it.
docs/sysadm/data-silos/kafka/index.rst
+
1
−
0
View file @
60b82e1c
...
...
@@ -7,6 +7,7 @@ Kafka
:titlesonly:
manage-topics
debian-upgrade
.. todo::
This page is a work in progress.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment