Posts
Install Docker on Ubuntu
1. Completely uninstall Docker from Ubuntu Linux Find what packages are installed
dpkg -l | grep -i docker Remove Docker based on what packages were found
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli docker-compose-plugin sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce docker-compose-plugin find docker
sudo find / -name "*docker*" | grep doclker Found:
/var/lib/docker sudo rm -rf /var/lib/docker sudo rm -rf ~/.docker/ 2. Installing Docker on Ubuntu server sudo su - sudo apt update -y sudo apt install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.
Posts
Install Kafdrop
https://towardsdatascience.com/overview-of-ui-monitoring-tools-for-apache-kafka-clusters-9ca516c165bd
Github https://github.com/obsidiandynamics/kafdrop
Community Kafdrop - An Open-Source Kafka Web UI
Downloading the JAR file To get to the latest release look at the right hand side of the GitHub page click on the link “Latest” Release : 4.0.1 Download the Jarfile kafdrop-4.0.1.jar
On your server:
sudo su - cd /opt wget https://github.com/obsidiandynamics/kafdrop/releases/download/4.0.1/kafdrop-4.0.1.jar Running from JAR java --add-opens=java.base/sun.nio.ch=ALL-UNNAMED \ -jar target/kafdrop-<version>.jar \ --kafka.brokerConnect=<host:port,host:port>,... Run this command from your Kafka server
Posts
Create Quarkus Application Connecting to Kafka Topics
1. Create Quarkus Project cd ~/Documents/workspace-quarkus/ quarkus create app za.co.nico:kafka-quarkus:1.0 ls -la cd kafka-quarkus/ tree 2. Add dependencies 2.1 Add Kafka Search for Kafka
quarkus ext list --concise -i -s kafka Expect to find
✬ ArtifactId Extension Name ✬ quarkus-smallrye-reactive-messaging-kafka SmallRye Reactive Messaging - Kafka Connector Add kafka dependency
quarkus extension add quarkus-smallrye-reactive-messaging-kafka 2.2 add json Search for json
quarkus ext list --concise -i -s json Expect to find:
✬ ArtifactId Extension Name ✬ camel-quarkus-gson Camel Gson ✬ camel-quarkus-jackson Camel Jackson ✬ camel-quarkus-jolt Camel JOLT ✬ camel-quarkus-jq Camel JQ ✬ camel-quarkus-jslt Camel JSLT ✬ camel-quarkus-json-validator Camel JSON Schema Validator ✬ camel-quarkus-jsonata Camel JSONATA ✬ camel-quarkus-jsonb Camel JSON-B ✬ camel-quarkus-jsonpath Camel JSON Path ✬ quarkus-jackson Jackson ✬ quarkus-jsonb JSON-B ✬ quarkus-jsonp JSON-P ✬ quarkus-logging-json Logging JSON quarkus-logging-json Logging JSON Jackson ✬ quarkus-rest-client-jackson RESTEasy Classic's REST Client Jackson ✬ quarkus-rest-client-jsonb RESTEasy Classic's REST Client JSON-B ✬ quarkus-rest-client-reactive-jackson RESTEasy Reactive's REST Client Jackson ✬ quarkus-rest-client-reactive-jsonb RESTEasy Reactive's REST Client JSON-B ✬ quarkus-rest-client-reactive-kotlin-serialization RESTEasy Reactive's REST Client Kotlin Serialization ✬ quarkus-resteasy-jackson RESTEasy Classic Jackson ✬ quarkus-resteasy-jsonb RESTEasy Classic JSON-B ✬ quarkus-resteasy-reactive-jackson RESTEasy Reactive Jackson ✬ quarkus-resteasy-reactive-jsonb RESTEasy Reactive JSON-B ✬ quarkus-resteasy-reactive-kotlin-serialization RESTEasy Reactive Kotlin Serialization ✬ quarkus-smallrye-jwt SmallRye JWT ✬ quarkus-smallrye-jwt-build SmallRye JWT Build timefold-solver-quarkus-jackson Timefold Jackson timefold-solver-quarkus-jsonb Timefold JSON-B Removing quarkus-jackson Extension
Posts
Install Kafka on Linux Using KRaft
We need to start using Kafka with KRaft it now uses that by default
1. You need Java Open JDK 17 installed https://youtu.be/Abo7d9SpWXg
https://computingforgeeks.com/install-java-on-rocky-almalinux-9/#google_vignette
sudo yum install java-11-openjdk -y 2. Download Kafka as root user sudo su - https://kafka.apache.org/downloads
cd /opt wget https://downloads.apache.org/kafka/3.6.1/kafka_2.12-3.6.1.tgz ls -la Expect to find:
kafka_2.12-3.6.1.tgz 3. Extract the tarball sudo tar xzf kafka_2.12-3.6.1.tgz ls -la Expect to find directory : kafka_2.12-3.6.1
4. Create User kafka If you installing Kafka on a dedicated server you need to create a Kafka user However if in your laptop or PC computer yo skip this step In my laptop the user is nickm
Posts
Install Kafka on Linux
We need to start using Kafka with KRaft it now uses that by default
1. You need Java Open JDK installed https://youtu.be/Abo7d9SpWXg
2. you need to install Zookeeper sudo apt-get install zookeeperd sudo service zookeeper status # Check Zookeeper telnet localhost 2181 # at the Telnet prompt send: ruok Create zookeeper service
sudo nano /etc/systemd/system/zookeeper.service Put in file:
[Unit] Requires=network.target remote-fs.target After=network.target remote-fs.target [Service] Type=simple User=kafka ExecStart=/home/kafka/kafka/bin/zookeeper-server-start.sh /home/kafka/kafka/config/zookeeper.properties ExecStop=/home/kafka/kafka/bin/zookeeper-server-stop.sh Restart=on-abnormal [Install] WantedBy=multi-user.
Posts
Install Quarkus CLI and Create Projects
1. Installing Quarkus on Linux using SdkMan 1.1 Install SDKMAN https://sdkman.io/ Click on Install
Run This command:
curl -s "https://get.sdkman.io" | bash # in the terminal expect to get: source "/home/nickm/.sdkman/bin/sdkman-init.sh" It is important to open a new terminal or tab in your terminal now
Run these commands:
source "/home/nickm/.sdkman/bin/sdkman-init.sh" # verify it sdk version expect to get:
SDKMAN! script: 5.18.2 native: 0.4.6 1.2 Install Quarkus java -version #You need version 17 or above sdk install java x.
Posts
Using an NTP Time Server From the NTP Pool
1. What is NTP (Network Time Protocol)? Standard protocol for time synchronization in computer networks.* Ensures accurate and consistent timekeeping across connected devices. Clock Synchronization:
NTP synchronizes clocks on servers and devices. Mitigates issues related to time discrepancies in distributed systems. Precision and Accuracy:
Facilitates precise timekeeping by adjusting clocks to a common reference. Crucial for various applications, including security, log management, and global coordination.
2. Why should we install NTP on our servers?
Posts
Create K3S Cluster Ansible Playbook With Roles
1. Clone project in required folder Run these commands
# SSH to your Ansible Server VM ssh nickm@10.154.2.95 # Become root sudo su - # Create k3s folder mkdir /opt/k3s cd /opt/k3s # Clone this project from Github git clone https://github.com/nic0michael/create_k3s_cluster_playbook_generator_with_ansible_roles.git # Open this project in terminal ls -la cd create_k3s_cluster_playbook_generator_with_ansible_roles/ 1.1 Git / GitHub / GitLab / BitBucket Requirements for this project After Cloning our project you need to delete the .
Posts
Use Proxmox not VirtualBox or other VM Solutions for your Homelab
1. Reasons to use VirtualBox Ease of Use and Accessibility: VirtualBox is renowned for its user-friendly interface, making it a great choice for beginners and enthusiasts. Its intuitive setup and configura> Cross-Platform Compatibility: VirtualBox supports a wide range of host operating systems, including Windows, macOS, Linux, and Solaris. This flexibility makes it an excellent c> Development and Testing Environment: It’s widely used in software development for creating sandboxed environments. Developers can test software across different operating syste> Snapshot and Clone Capabilities: VirtualBox offers snapshot and cloning features that allow users to create copies of virtual machines at specific points in time.
Posts
Installing Ansible in a Proxmox VM
This procedure is for installing Ansible on a Debian/Ubuntu VM
Step 1: Configure Ansible Managed Hosts create a new user named ansible and grant it superuser privileges.
# DONT DO THIS using the -m option to create a default home directory /home/ansible for it: # DONT USE THIS COMMAND useradd -m ansible # BETTER OPTION create the ansible user this way adduser ansible # NOT NEEDED NOW: Create a password for this new user.