/images/avatar.png

How to check disk write and read speed

I have k8s cluster and ceph cluster are connected to each other. Both are built on HDD. Let’s name them hdd-cluster. Also, I have k8s cluster and ceph cluster are built on SSD. They are connected to each other. Let’s name them ssd-cluster Ok, we have hdd-cluster: the first k8s cluster can create persistentVolume from ceph(hdd) ssd-cluster: the second k8s cluster can create persistentVolume from ceph(ssd) Let’s create pod connected with pv.

Obtain keycloak token

Prepare info.json with data of your app: 1 2 3 4 5 6 7 8 { "host": "keycloak.your.domain.com", "realm": "your-realm-name", "username": "admin", "password": "admin123", "clientid": "name-of-your-client", "client_secret": "client_secret" } Prepare script.sh: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #!/usr/bin/env bash set -eou pipefail HOST=$(cat $1 | jq -r .host) REALM=$(cat $1 | jq -r .realm) USERNAME=$(cat $1 | jq -r .

Send and recieve udp

Let’s start listening udp on port 2193 and host 172.16.4.105: 1 sudo tcpdump -i ens18 udp port 2193 -vv -X Send messages to listener: 1 echo -n "HELLO FROM LINUX|c" | nc -w 1 -u -4 172.16.4.105 2193 The same step, but for windows (powershell): Install nmap (includes netcat) before. 1 echo -n "HELLO FROM WINDOWS|c" | ncat -w 1 -u -4 172.16.4.105 2193 And we can see udp-datagrams on the listener:

Replace disk in raid-array

The post describes the steps to replace a mirror disk in a software raid array. In this example, we have 2 arrays: /dev/md0(system) and /dev/md1(data). Also we have boot partitions on each disk. So, we have two disks: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 lsblk -f /dev/sdb /dev/sdc NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sdb ├─sdb1 vfat FAT16 D506-F28D ├─sdb2 linux_raid_member 1.

OpenConnect

| Ubuntu 22.04 Install certbot 1 sudo snap install certbot --classic Example how to manual generate and revoke certificate 1 2 3 YOUR_DOMAIN=www.ubukubu.ru sudo certbot certonly --manual --preferred-challenges=dns -d ${YOUR_DOMAIN} -d nonexistent.${YOUR_DOMAIN} sudo certbot revoke --cert-path /etc/letsencrypt/live/${YOUR_DOMAIN}/fullchain.pem Get the cert with key 1 2 YOUR_DOMAIN=www.ubukubu.ru sudo certbot certonly --standalone --preferred-challenges http -d ${YOUR_DOMAIN} Run docker container: 1 2 docker pull quay.io/aminvakil/ocserv docker run --name ocserv --sysctl net.ipv4.ip_forward=1 --cap-add NET_ADMIN --security-opt no-new-privileges -p 443:443 -p 443:443/udp -v /etc/letsencrypt/live/${YOUR_DOMAIN}/privkey.

gpg

| Ubuntu 22.04 we need to use /usr/share/keyrings to keep keys for key managed local - /etc/apt/keyrings (need to create it by own with 755 permissions) key should be in binary shape and have the name: repo-archive-keyring.gpg also we should have deb [signed-by=/usr/share/keyrings/repo-archive-keyring.gpg] ... in the line of repo Example for mongo with amd64,arm64: 1 deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse Determinating the type of key: 1 2 3 file repo_signing.