Sergey Chulanov
My notes to remember

Install Ubuntu on ZFS with ZFSBootMenu

Tested on: Ubuntu 26.04 LTS (Resolute), x86_64, UEFI

This guide installs a minimal Ubuntu system directly on ZFS. It supports three root-pool layouts:

Layout Minimum disks Disk failures tolerated Rough RAID equivalent
Mirror 2 1 RAID1
RAIDZ1 3 1 RAID5
RAIDZ2 4 2 RAID6

The installation flow is the same for every layout. Only the zpool create command changes.

The procedure follows the official ZFSBootMenu Ubuntu UEFI guide, adapted for redundant pools and an EFI System Partition (ESP) on every disk.

Persist Always on Visible Workspace

| Ubuntu 22.04

It doesn’t work on Wayland, only on Xorg

Install devilspie2 an create test config for Mozilla Firefox

sudo apt install devilspie2
mkdir -pv ~/.config/devilspie2

cat <<EOF > /home/goto/.config/devilspie2/firefox.lua
if (string.match(get_window_name(), "Mozilla Firefox")) then
    stick_window();
--  maximize();
end
EOF

devilspie2 --debug

Mozilla Firefox should open in maximize and be visible on all workspaces

User systemd service

| Ubuntu 22.04

All of users’ systemd have to place in directory ~/.config/systemd/user/

If you want start user systemd unit when user login, run:

systemctl --user enable <service>

List of available types of systemd units:

systemctl -t help
Available unit types:
service
mount
swap
socket
target
device
automount
timer
path
slice
scope

Create user systemd file to make ssh connection:

Ceph on isolated environment

Ubuntu 22.04 on all nodes

Let’s prepare our network environment to deploy Ceph without the Internet

We need to create 6 nodes:

  • 3 for ceph installation (ceph1, ceph2, ceph3)
  • 1 for apt repository (aptly)
  • 1 for docker registry (harbor)
  • 1 for dns server (infra)

Also we need set up 3 networks:

  • Ceph Internal to connect only ceph nodes to each other
  • Internal to connect ceph, aptly and harbor nodes
  • vLan to connect aptly and harbor nodes to the internet

And we need a dns server to resolve names connected with ip pools:

Aptly deb repository

Tested on: Ubuntu 22.04

Install Aptly

Official instruction here:

echo "deb [signed-by=/etc/apt/keyrings/aptly.asc] http://repo.aptly.info/ squeeze main" | sudo tee /etc/apt/sources.list.d/aptly.list
sudo mkdir -p /etc/apt/keyrings; sudo chmod 755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/aptly.asc https://www.aptly.info/pubkey.txt
sudo apt update && sudo apt install aptly

Create aptly config:

cat <<EOF | sudo tee /etc/aptly.conf
{
  "rootDir": "/opt/aptly",
  "downloadConcurrency": 4,
  "downloadSpeedLimit": 0,
  "architectures": ["amd64"],
  "dependencyFollowSuggests": false,
  "dependencyFollowRecommends": false,
  "dependencyFollowAllVariants": false,
  "dependencyFollowSource": false,
  "dependencyVerboseResolve": false,
  "gpgDisableSign": false,
  "gpgDisableVerify": false,
  "gpgProvider": "gpg",
  "downloadSourcePackages": true,
  "skipLegacyPool": true,
  "ppaDistributorID": "ubuntu",
  "ppaCodename": "",
  "FileSystemPublishEndpoints": {
    "on-premises-repos": {
      "rootDir": "/var/www/aptly",
      "linkMethod": "symlink",
      "verifyMethod": "md5"
    }
  },
  "enableMetricsEndpoint": false
}
EOF

Prepare repos

Create 3 repos: k8s, ceph and shared for ubuntu jammy:

Create tls connect between MongoDB and Java Spring Boot application

Tested on: Ubuntu 22.04

  • List of parameters used in application.yaml
  • Parameters from mongo
  • Good connect string: mongodb+srv://<login>:<password>@<hostname>/<database-to-connect>?replicaSet=<name-of-replicaset>&readPreference=secondary&retryWrites=true&w=majority&authSource=admin&tls=true
  • Repository with all files

Run mongodb inside Docker

docker run --rm --name mongodb -p 27017:27017 \
  -e MONGO_INITDB_ROOT_USERNAME=admin \
  -e MONGO_INITDB_ROOT_PASSWORD=secret \
  mongo

Connect to admin’s db and create a db with user (auth db will be the same db):