Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Incus

OPTINAL: Uninstall LXD

snap remove lxd

Incus installation
https://github.com/zabbly/incus
https://linuxcontainers.org/incus/docs/main/installing/

curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --show-keys --fingerprint

mkdir -p /etc/apt/keyrings
curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc

# Add incus stable repository
sh -c 'cat < /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/stable
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc

EOF'

apt-get update
apt-get install -y incus bash-completion #incus-tools

# OPTIONAL: add default ubuntu user to incus group
sudo usermod -aG incus-admin ubuntu
newgrp incus-admin

# fixme
# incus completion fish

Prerequisits (ZFS filesystem)

# ZFS (optional)
sudo apt install -y zfsutils-linux
sudo lvcreate --name storage --size 100G ubuntu-vg
sudo zpool create rpool /dev/ubuntu-vg/storage
sudo zpool set autotrim=on rpool
sudo zfs create rpool/incus

Install Incus with Ansible

Deploy LXD container with terraform

Docs
https://registry.terraform.io/providers/terraform-lxd/lxd/latest/docs
https://registry.terraform.io/providers/terraform-lxd/lxd/latest/docs/resources/container

Create LXD container

# terraform init
# terraform apply -auto-approve
# terraform destroy -auto-approve


terraform {
  required_providers {
    lxd = {
      source = "terraform-lxd/lxd"
    }
  }
}

provider "lxd" {
  generate_client_certificates = true
  accept_remote_certificate    = true
}

resource "lxd_container" "lxd_container_u2004" {
  name  = "u2004"
  image = "ubuntu:20.04"

  config = {
    "boot.autostart" = true
  }

  limits = {
    cpu = 2
  }
}

resource "lxd_container" "lxd_container_u2110" {
  name = "u2110"
  image = "ubuntu:21.10"
  # image = "images:ubuntu-minimal:21.10" # fixme

  config = {
    "boot.autostart" = true
  }

  limits = {
    cpu = 2
  }
}

Links
https://dev.to/smashse/snap-lxd-terraform-3f0p

Docker container: Gitea

Docker container on DockerHub
https://hub.docker.com/r/gitea/gitea

Docker installation
https://docs.gitea.io/en-us/install-with-docker/

apt -y install docker-compose

# Add second ip to hypervisor
ip a add 192.168.1.3 dev eth0:1

# Bound SSHD on hypervisor to specific IP
sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 10.0.1.3/' /etc/ssh/sshd_config
service ssh restart

# OPTIONAL: create ZFS pool
zfs create -o mountpoint=/media/docker tank/docker

# create required directories
mkdir -p /media/docker/gitea/mysql /media/docker/gitea/data

cat < /media/docker/gitea/docker-compose.yml
version: "2"

networks:
  gitea:
    external: false

services:
  web:
    image: gitea/gitea:latest
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - DB_TYPE=mysql
      - DB_HOST=db:3306
      - DB_NAME=gitea
      - DB_USER=gitea
      - DB_PASSWD=gitea
    restart: always
    networks:
      - gitea
    volumes:
      - /media/docker/gitea/data:/data
    ports:
       - 192.168.1.3:80:3000
       - 192.168.1.3:22:22
    depends_on:
      - db

  db:
    image: mariadb:latest
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=gitea
      - MYSQL_USER=gitea
      - MYSQL_PASSWORD=gitea
      - MYSQL_DATABASE=gitea
    networks:
      - gitea
    volumes:
      - /media/docker/gitea/mysql:/var/lib/mysql
EOF

# deploy container
cd /media/docker/gitea
docker-compose up -d

Post-install
http://GITEA_IP/install

Debug

Docker: Container

Ubuntu

docker run -it ubuntu:18.04

Import MySql / Mariadb dump into container

cat gogs.sql | docker exec -i gitea_db_1 mysql --host=localhost --user=gitea --password=gitea gitea

Apache

docker run -d --name apache -p 8080:80 httpd:latest

Nginx
https://hub.docker.com/_/nginx

docker run --name nginx -v /tmp:/usr/share/nginx/html:ro -d -p 8080:80 nginx

GitLab runner

docker run -d --name gitlab-runner --restart always \
  -v /srv/gitlab-runner/config:/etc/gitlab-runner \
  -v /var/run/docker.sock:/var/run/docker.sock \
  gitlab/gitlab-runner:latest

docker run --rm -t -i -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register \
    ...

Nginx (proxy) Docker container

Create required directories

mkdir -p /etc/docker/nginx/{conf.d,html}

Configure nginx as webserver

cat < /etc/docker/nginx/conf.d/default.conf
server {
    listen 80;
    server_name _;

    root   /usr/share/nginx/html; 
    index  index.html index.htm;
}
EOF

Configure nginx as proxy

cat < /etc/docker/nginx/conf.d/proxy.conf
server {
    listen 80;
    server_name foo.example.com;

    location / {
        proxy_pass http://localhost:8080/;
    }
}
EOF

Create container

sudo docker run -d \
  --name nginx \
  --net host \
  -v /etc/docker/nginx/html:/usr/share/nginx/html:ro \
  -v /etc/docker/nginx/conf.d:/etc/nginx/conf.d:ro \
  nginx

debug

docker restart nginx
docker logs nginx -f

Links
https://hub.docker.com/_/nginx

Kubernetes

Changelog
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md

Dump Kubernetes Objects

container
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung