How to enable ZooKeeper the four-letter words
Enable the four-letter words. Keep in mind that this functionality will be deprecated, please use AdminServer instead. Enable the four letter words inside zoo.cfg configuration file. $ sudo -u...
View ArticleHow to use ZooKeeper to lock resources with a Python script
Use ZooKeeper to lock resources with a Python script. Create lock_example.py Python script. #!/usr/bin/env python3 import argparse import time from datetime import datetime from kazoo.client import...
View ArticleHow to use ZooKeeper to elect the leader with a Python script
Use ZooKeeper to elect the leader and share data with a Python script. Create leader_example.py Python script. #!/usr/bin/env python3 from kazoo.client import KazooClient from datetime import datetime...
View ArticleHow to generate Kafka cluster ID
Generate Kafka cluster ID for Kafka Raft metadata mode. Kafka cluster ID is expected to contain 16 bytes of a base64-encoded UUID. You can generate cluster ID using official utilities. $ cd...
View ArticleHow to install and configure a Kafka cluster with ZooKeeper
Install and configure a Kafka cluster with ZooKeeper to play with it. Update package index. $ sudo apt update Install GNU privacy guard. $ sudo apt -y install gpg Install Java. $ sudo apt -y install...
View ArticleHow to install and configure a Kafka cluster without ZooKeeper
Install and configure a Kafka cluster without ZooKeeper to play with it. Update package index. $ sudo apt update Install uuidgen application. $ sudo apt-get install uuid-runtime Generate Kafka cluster...
View ArticleHow to inspect and improve docker image using dive utility
Inspect and improve docker image using dive utility for exploring each layer in a docker image. Download dive utility. $ wget...
View ArticleHow to install mainline Linux kernel on Ubuntu-based distribution
Install mainline Linux kernel on Ubuntu-based distribution. Add a PPA to your system’s software sources. $ sudo add-apt-repository ppa:cappelikan/ppa Update package index. $ sudo apt update Inspect...
View ArticleHow to align simple MariaDB output
Use column utility to align simple MariaDB output like variable list. Display variables like wsrep%. $ sudo mariadb --skip-column-names --batch --execute "show variables like 'wsrep%'" wsrep_osu_method...
View ArticleHow to resize live tmpfs filesystem
Resize live tmpfs filesystem. Ensure that enough RAM is available. $ free -h total used free shared buff/cache available Mem: 251G 15G 233G 96M 2.7G 235G Swap: 0B 0B 0B Inspect current tmpfs size. $ df...
View ArticleHow to display active Kafka brokers
Display active Kafka brokers using command-line utilities. I will use kafka-broker-api-versions.sh shell script which is a part of the Kafka release. $ cd kafka Execute it to extract the current broker...
View ArticleHow to perform basic console operations on Kafka cluster
Perform basic console operations on Kafka cluster. Topics Create first-topic with replication factor 1, single partition, and short retention time. $ bin/kafka-topics.sh --bootstrap-server...
View ArticleHow to use tmpfs for temporary directory
How to use tmpfs for temporary directory (/tmp). Inspect Temporary Directory (/tmp) systemd mount. $ cat /usr/share/systemd/tmp.mount # SPDX-License-Identifier: LGPL-2.1-or-later # # This file is part...
View ArticleHow to reset offset of Kafka consumer group
Reset offset of Kafka consumer group. Preparations Create sample keep-up-with-topic topic. $ bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic keep-up-with-topic...
View ArticleHow to fix broken Prometheus service in GitLab arm64 14.4.2
Fix broken Prometheus service in GitLab arm64 14.4.2. The issue Prometheus in GitLab arm64 14.4.2 is not working after installation. Inspect GitLab status. The Prometheus service is running, which is a...
View ArticleHow to downgrade cgroup version on DietPi
DietPi an extremely lightweight Debian OS is using cgroup v2 on Raspberry Pi, but this causes warning when using snap packages… Use sample snap package usage that causes a warning. $ snap run lxd...
View ArticleHow to enable memory cgroup on DietPi
Enable memory cgroup on a DietPi an extremely lightweight Debian OS on Raspberry Pi. As described inside issue cpuset disabled #1950 the memory cgroup is disabled due to memory overhead, so you need to...
View ArticleHow to install LXD on Raspberry Pi
Install LXD a next generation system container and virtual machine manager on Raspberry Pi using DietPi a highly optimized minimal Debian OS. Preparations Update package index. $ sudo apt update...
View ArticleHow to install GitLab on Raspberry Pi
Install GitLab on Raspberry Pi. I will use previous LXD setup on Raspberry Pi 4 with DietPi operating system. Update operating system Update package index. $ sudo apt update Upgrade operating system. $...
View ArticleHow to debug ZooKeeper connection inside a Python script
Debug ZooKeeper connection inside a Python script. Create zookeeper_debug_example.py Python script. #!/usr/bin/env python3 import argparse import logging import os.path from kazoo.client import...
View Article