How to install Redpanda on Ubuntu 22.04 LTS

How to install Redpanda on Ubuntu 22.04

In this tutorial, we will learn how to install Redpand on Ubuntu 22.04 LTS operating system.

Introduction

Redpanda is a modern streaming platform that is built as a Kafka alternative. Redpanda is open-source software, licensed under the Apache 2.0 license. It is maintained by the company Vectorized, which offers enterprise-level support and additional features for Redpanda It is designed to handle large volumes of streaming data and provide high-throughput and low-latency processing of data. Redpanda is designed to be a drop-in replacement for Kafka, with an API that is fully compatible with the Kafka API. It supports all of the Kafka features, including Kafka Connect and Kafka Streams, making it easy to integrate with existing Kafka-based systems.

Redpanda is optimized for modern hardware, such as high-core count CPUs and NVMe storage, and is designed to take full advantage of these resources. It uses a combination of lock-free algorithms, kernel-bypass networking, and other performance optimizations to achieve high performance and low latency.

One of the unique features of Redpanda is that it is designed to be cloud-native, with support for Kubernetes, Prometheus, and other cloud-native technologies. It is easy to deploy and manage on Kubernetes clusters, and it provides built-in metrics and monitoring capabilities for easy observability.

Redpanda Installation On Ubuntu 22.04 LTS Operating

Prerequisites

Before are going to install Redpanda, there are several prerequisites that must be met, namely:

  • Updated Ubuntu 20.04 Server.
  • Non-root user with sudo access.
  • Sufficient disk space to accommodate files and installation.
  • Good network connection to download source files.

The Redpanda installation will be consist of several steps, as mentioned below :

  1. Update Ubuntu System
  2. Download Redpanda repository
  3. Install Redpanda
  4. Starting Redpanda Service
  5. Installing Redpand Console

 

1. Update Ubuntu System

Every time we add a new application/package to the Linux operating system, it is advisable to update and upgrade the system repository first. This task is to make sure if we are accessing the latest packages versions and will cut down the installation time and it also helps prevent zero-day exploits against outdated software. To update our packages software we will use command line :

$ sudo apt update
$ sudo apt upgrade

2. Download Redpanda Repository

To add Redpanda repository we need to run the script which was provided, we will submit the following command line :

$ curl -1sLf 'https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash

Output :

ramans@dev01:~$ curl -1sLf 'https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash
Executing the setup script for the 'redpanda/redpanda' repository ...

OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'apt-get' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=ubuntu version=22.04 codename=jammy arch=x86_64 
>>>>:
OK: Checking for apt dependency 'apt-transport-https' ...
OK: Checking for apt dependency 'ca-certificates' ...
OK: Checking for apt dependency 'gnupg' ...
RUN: Importing 'redpanda/redpanda' repository GPG key ...gpg: WARNING: unsafe ownership on homedir '/home/ramans/.gnupg'
OK: Checking for apt signed-by key support ...
OK: Importing 'redpanda/redpanda' repository GPG key ...
OK: Checking if upstream install config is OK ...
OK: Installing 'redpanda/redpanda' repository via apt ...
OK: Updating apt repository metadata cache ...
OK: The repository has been installed successfully - You're ready to rock!

3.  Install Redpanda

After Redpanda repo was added to the system, then we will install it by submitting command line :

$ sudo apt install redpanda -y

Output :

ramans@dev01:~$ sudo apt install redpanda -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
libllvm13
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
redpanda
0 upgraded, 1 newly installed, 0 to remove and 52 not upgraded.
Need to get 46,0 MB of archives.
After this operation, 212 MB of additional disk space will be used.
Get:1 https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/deb/ubuntu jammy/main amd64 redpanda amd64 23.1.1-1 [46,0 MB]
Fetched 46,0 MB in 23s (2.025 kB/s) 
Selecting previously unselected package redpanda.
(Reading database ... 311891 files and directories currently installed.)
Preparing to unpack .../redpanda_23.1.1-1_amd64.deb ...
Unpacking redpanda (23.1.1-1) ...
Setting up redpanda (23.1.1-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/redpanda-tuner.service → /lib/systemd/system/redpanda-tuner.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redpanda.service → /lib/systemd/system/redpanda.service.
Created symlink /etc/systemd/system/multi-user.target.wants/wasm_engine.service → /lib/systemd/system/wasm_engine.service.
redpanda:x:998:998::/var/lib/redpanda:/bin/sh
redpanda:x:998:

Redpanda is set to run in development mode. To get the most out of the
fastest queue in the west, enable production mode by running the following:

sudo rpk redpanda mode production

followed by:

sudo rpk redpanda tune all
sudo systemctl start redpanda

This will autotune your system to give you the best performance from Redpanda.
You can get more information on the tuning parameters here:
https://docs.redpanda.com/docs/introduction/autotune/

By default, when Redpanda is installed, it is set to run in development mode. We need to enable production mode by running the following command line :

$ sudo rpk redpanda mode production
$ sudo rpk tune all

Output :

ramans@dev01:~$ sudo rpk redpanda mode production
Writing "production" mode defaults to "/etc/redpanda/redpanda.yaml"
ramans@dev01:~$ sudo rpk tune all
Command "tune" is deprecated, use "rpk redpanda tune" instead
Restarting & Configuring 'irqbalance' with banned IRQs '[19]'
Restarting & Configuring 'irqbalance' with banned IRQs '[17]'
TUNER APPLIED ENABLED SUPPORTED ERROR 
aio_events true true true 
ballast_file true true true 
clocksource true true true 
coredump false false true 
cpu true true true 
disk_irq true true true 
disk_nomerges true true true 
disk_scheduler true true true 
disk_write_cache false true false Disk write cache tuner is 
only supported in GCP 
fstrim false false true 
net true true true 
swappiness true true true 
transparent_hugepages false false true 
We'd love to hear about your experience with Redpanda:
https://redpanda.com/feedback

In this installation script, we also installed Redpanda Keeper (rpk), a single binary application that provides a way to interact with your Redpanda clusters from the command line. To verify it was installed on the system, we will submit the following command line :

$ rpk version

Output :

ramans@dev01:~$ rpk version
v23.1.1 (rev 92761c3)

4. Starting Redpanda Service

After Redpanda installation was completed done, then we need to start up its service and make it enabled, by submitting command line :

$ sudo systemctl start redpanda
$ sudo systemctl enable redpanda

Then we will verify it by showing its status with following command line :

$ sudo systemctl status redpanda

Output :

ramans@dev01:~$ sudo systemctl status redpanda
● redpanda.service - Redpanda, the fastest queue in the West.
Loaded: loaded (/lib/systemd/system/redpanda.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-03-03 19:58:02 WIB; 10min ago
Main PID: 1692 (redpanda)
Status: "redpanda is ready! - v23.1.1 - 92761c383979a27941a5721c8445b537d9fe0394-dirty"
Tasks: 9 (limit: 9406)
Memory: 1000.9M
CPU: 34.507s
CGroup: /redpanda.slice/redpanda.service
└─1692 /opt/redpanda/bin/redpanda --redpanda-cfg /etc/redpanda/redpanda.yaml --unsafe-byp>

Mar 03 19:58:07 dev01.bckinfo.com rpk[1692]: INFO 2023-03-03 19:58:07,726 [shard 0] cluster - members>
Mar 03 19:58:12 dev01.bckinfo.com rpk[1692]: INFO 2023-03-03 19:58:12,686 [shard 0] cluster - metrics>
Mar 03 19:58:37 dev01.bckinfo.com rpk[1692]: Rate-limit: suppressed 76 backtraces on shard 0
Mar 03 19:58:37 dev01.bckinfo.com rpk[1692]: Rate-limit: suppressed 70 backtraces on shard 1
Mar 03 19:58:37 dev01.bckinfo.com rpk[1692]: Rate-limit: suppressed 73 backtraces on shard 2
Mar 03 19:58:37 dev01.bckinfo.com rpk[1692]: Rate-limit: suppressed 70 backtraces on shard 3
Mar 03 20:08:01 dev01.bckinfo.com rpk[1692]: INFO 2023-03-03 20:08:01,897 [shard 0] kafka - group_man>
Mar 03 20:08:01 dev01.bckinfo.com rpk[1692]: INFO 2023-03-03 20:08:01,899 [shard 2] kafka - group_man>
Mar 03 20:08:01 dev01.bckinfo.com rpk[1692]: INFO 2023-03-03 20:08:01,898 [shard 3] kafka - group_man>
Mar 03 20:08:01 dev01.bckinfo.com rpk[1692]: INFO 2023-03-03 20:08:01,898 [shard 1] kafka - group_man>

At this point, the Redpanda installation is complete. The next step is to connect it to the Kafka cluster.

Conclusion

The Redpanda installation on Ubuntu 22.04 has been completed successfully. I hope this tutorial will be helpful.

 

(Visited 141 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *