Sergey Chulanov
My notes to remember

Traefik simple using

Tested on: CentOS 7.9

Ok, let’s start with linux. I’m using a bin file, so I want to check using traefik’s options in yaml files. Get a binary and run it:

curl -LO https://github.com/traefik/traefik/releases/download/v2.9.8/traefik_v2.9.8_linux_amd64.tar.gz
tar -zxf traefik_v2.9.8_linux_amd64.tar.gz traefik
./traefik version
	Version:      2.9.8
	Codename:     banon
	Go version:   go1.19.6
	Built:        2023-02-15T15:23:25Z
	OS/Arch:      linux/amd64

Traefik releases

Minio: local start

Run for Windows:

Minio wrote on golang, so we need only get binary file and run it, according official docs:

.\minio.exe server C:\minio --console-address :9001
	Formatting 1st pool, 1 set(s), 1 drives per set.
	WARNING: Host local has more than 0 drives of set. A host failure will result in data becoming unavailable.
	WARNING: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables
	MinIO Object Storage Server
	Copyright: 2015-2023 MinIO, Inc.
	License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
	Version: RELEASE.2023-03-13T19-46-17Z (go1.19.7 windows/amd64)

	Status:         1 Online, 0 Offline.
	API: http://192.168.137.217:9000  http://172.20.80.1:9000  http://192.168.128.1:9000  http://192.168.169.1:9000  http://192.168.56.1:9000  http://127.0.0.1:9000
	RootUser: minioadmin
	RootPass: minioadmin
	Console: http://192.168.137.217:9001 http://172.20.80.1:9001 http://192.168.128.1:9001 http://192.168.169.1:9001 http://192.168.56.1:9001 http://127.0.0.1:9001
	RootUser: minioadmin
	RootPass: minioadmin

	Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart
	   $ mc.exe alias set myminio http://192.168.137.217:9000 minioadmin minioadmin

	Documentation: https://min.io/docs/minio/linux/index.html
	Warning: The standard parity is set to 0. This can lead to data loss.

Run docker with minio:

# set env for minio data
MINIO_DIR="/tmp/$USER/minio-data"

# create and mount this directory
mkdir -pv "$MINIO_DIR"
docker run -p 9000:9000 -p 9001:9001 -v "$MINIO_DIR":/data --name minio -d quay.io/minio/minio server /data --console-address ":9001"

Run docker logs minio and get auth data and endpoint API:

Ingress on Minikube

Ingress on minikube

First off, remove our minikube:

minikube delete --profile minikube

And install minikube:

# https://minikube.sigs.k8s.io/docs/faq/#how-can-i-access-a-minikube-cluster-from-a-remote-network
minikube start --nodes 3 --profile=minikube --driver=docker --listen-address=0.0.0.0
minikube addons enable metrics-server

Get container id of minikube and check ports (--listen-address):

Changing system drive and resize partition

Changing system drive and resize partition

Run lsblk to see our drives:

NAME                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                 7:0    0    28G  0 loop  
loop1                 7:1    0   800G  0 loop  
loop2                 7:2    0   170G  0 loop  
sda                   8:0    0   1,8T  0 disk
sdb                   8:16   0 447,1G  0 disk  
└─sdb1                8:17   0 447,1G  0 part  
  └─md0               9:0    0   447G  0 raid1 /mnt/pve/ssdraid
sdc                   8:32   0 931,5G  0 disk  
└─sdc1                8:33   0 931,5G  0 part  /mnt/pve/single_backup
sdd                   8:48   0 447,1G  0 disk  
└─sdd1                8:49   0 447,1G  0 part  
  └─md0               9:0    0   447G  0 raid1 /mnt/pve/ssdraid
sde                   8:64   0 931,5G  0 disk  
├─sde1                8:65   0   243M  0 part  /boot
├─sde2                8:66   0     1K  0 part  
└─sde5                8:69   0 931,3G  0 part  
  ├─iron--vg-root   253:0    0 907,3G  0 lvm   /
  └─iron--vg-swap_1 253:1    0    24G  0 lvm   [SWAP]
zram0               252:0    0     2G  0 disk  [SWAP]
  • /dev/sde is our system drive
  • /dev/sda is our new drive (I bought 2TB drive)

Let’s copy with dd all of data from /dev/sde to /dev/sda. Run it inside virtual terminal tmux:

If there are running virtual machines - stop it, otherwise we can get read only file system.

Generate yaml from xml and xml from yaml

First off we should get schema for out pom.xml. It is on the head of pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

Get it:

wget http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd

Secondly, we need to install xml2yaml:

  • Debian, Ubuntu, Kali Linux, Raspbian:

Golang hugo

Install

wget https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_0.110.0_Linux-64bit.tar.gz -O /tmp/hugo_0.110.0_Linux-64bit.tar.gz
tar -zxf /tmp/hugo_0.110.0_Linux-64bit.tar.gz -C /tmp/
sudo mkdir /usr/local/gohugo
sudo install /tmp/hugo /usr/local/gohugo
export PATH=$PATH:/usr/local/gohugo
hugo --help

Put it into ~/.zshrc

# https://gohugo.io/commands/hugo_completion_zsh/
export PATH=$PATH:/usr/local/gohugo
autoload -U compinit; compinit

Quick Start