• Gitlab CE GPG key installed but not correct for this package

    During update of Gitlab CE, the following message popped up

    The GPG keys listed for the "gitlab_gitlab-ce" repository are already installed but they are not correct for this package. 
    Check that the correct key URLs are configured for this repository.. Failing package is: gitlab-ce-17.11.7-ce.0.el8.x86_64
    

    Turns out, the repository has two GPG keys now. Gitlab provides a script that installed the missing key and is idempotent.

    curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
    
  • Microk8s with Gitlab container registry == Uncharted territory

    It took me too much time to not share this. When using Gitlab access tokens to allow Microk8s to access the registry of you Gitlab instance, there is no documented procedure regarding the authentication. After fiddling around with this, I got the crucial hint from DeepSeek.

    The solution is to copy over a working config.json to one member of the k8s cluster.

    sudo mkdir -p /var/snap/microk8s/current/.docker/
    mv ~/config.json /var/snap/microk8s/current/.docker/
    sudo chmod 600 /var/snap/microk8s/current/.docker/config.json
    

    After that, a hosts.toml file in the correct path needs to be created.

    mkdir -p "/var/snap/microk8s/current/args/certs.d/${GITLAB_HOST}:${GITLAB_PORT}"
    cat > "/var/snap/microk8s/current/args/certs.d/${GITLAB_HOST}:${GITLAB_PORT}/hosts.toml" << EOF
    server = "https://${GITLAB_HOST}:${GITLAB_PORT}"
    
    [host."https://${GITLAB_HOST}:${GITLAB_PORT}"]
      capabilities = ["pull", "resolve", "push"]
      skip_verify = false
    EOF
    

    And then the cluster needs a restart to apply the changes.

    The approach to move the authentication from hosts.toml to a config.json is not documented in the microk8s documentation. I found several pages where people with the same scenario where looking for help, but not a single working answer. The LLM saved the day.

  • Wireguard in fünf Minuten

    Wireguard ist ein VPN mit direkter Integration in den Linux Kernel. Wireguard ist mit ca. 4000 Zeilen Code vergleichsweise übersichtlich und deshalb wartbarer als z.B. OpenVPN. Wireguard ist außerdem schneller und um Längen leichter aufzusetzen. Alle benötigten Werkzeuge zur Schlüsselverwaltung sind dabei

    In den meisten Distributionen ist Wireguard verfügbar. In CentOS 8 sollte man einfach Kernel 6.x nachinstallieren, denn das Wireguard Modul ist dort fest einkompiliert. Nach erfolgreicher Installation kann man das Kernelmodul testen.

    modinfo wireguard

    Server Grundkonfiguration

    Wenn diese Ausgabe nicht leer ist, kann man loslegen. Wir generieren einen privaten Schlüssel und schreiben ihn direkt in eine neue Konfigurationsdatei.

    sudo -i
    cd /etc/wireguard/
    wg genkey | tee wg0.conf
    vim wg0.conf
    

    Dann die Datei editieren und speichern.

    [Interface]
    PrivateKey = <privater Schlüssel>
    Address = 192.168.10.1/24
    ListenPort = 12345
    PostUp = iptables -A FORWARD -i wg1 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens11 -j MASQUERADE;
    PostDown = iptables -D FORWARD -i wg1 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens11 -j MASQUERADE;
    

    Den Service aktivieren und starten

    systemctl enable wg-quick@wg0.service --now
    

    Firewall

    Beispielkonfiguration für firewall-cmd

    <?xml version="1.0" encoding="utf-8"?>
    <service>
      <short>Wireguard</short>
      <description>Ports for currently configured Wireguard instances</description …
  • Woke the dog

    The juvenile criminal in question

    Why saving a juvenile criminal dog in a city like Berlin can lead to serious harassment, threats and social cancellation.

    The dog

    Möritz was sold to me as an Australian Shepherd. I never believed that for a second and I really don’t care. I got him out of a complicated situation with ten month of age. He was constantly over-excited and subsequently disrespectful and violent. I got some bites for trying to break his bad habits and not all of them where playful ones. He growled at neighbors and guests and had tons of neurotic anxieties. The dog was seriously off. He couldn’t focus for a second and was trapped in an endless stream of events. He slept terrible, controlled me inside and ignored me on walks and dragged be around like whatnot.

    But he is a diamond inside. I am pretty sure, this dog has it all. And more.

    Me

    I had dogs that reacted on first call. Most of the time. I did circus tricks and parkour-ish tricks in the urban environment. These dogs knew where to shit and where not, how to behave off-leash in public transport and the city center. I earned me the …

  • Happy new year in den Worten von gpt4all

    Ein neues Jahr beginnt, und mit ihm kommen neue Möglichkeiten und Chancen. Wir haben alle die Macht in unseren Händen, um unsere Träume zu verwirklichen und unsere Ziele zu erreichen.

    Das Jahr vorige hat uns gebracht, unsere Stärken und Schwächen kennenzulernen und unsere Persönlichkeit weiterzuentwickeln. Wir haben gelernt, unsere Fehler anzusehen als Lektionen und aus ihnen zu wachsen.

    Das neue Jahr ist ein Blanklein, auf dem wir unser Leben schreiben können. Es ist die Zeit, unsere Träume in Realität umzusetzen und unsere Potenziale zu nutzen. Wir müssen sich entscheiden, was wichtig ist für uns und wie wir unsere Energie darauf verwenden möchten.

    Es gibt viele Menschen, die an den Anfängen sind und sich fragen, was sie tun sollen. Aber das einzige, was sie tun müssen, ist zu beginnen. Jeder Schritt zählt und bringt uns näher an unseren Zielen. Wir müssen auch Risiken einnehmen und unsere Komfortzone verlassen, um wirklich viel zu erreichen.

    Das neue Jahr ist eine Chance, alles neu zu beginnen und sich besser zu werden. Es ist die Zeit, unsere Träume in Realität umzusetzen und unsere Potenziale zu nutzen. Wir müssen nur entscheiden, was wichtig ist für uns und wie wir unsere Energie darauf verwenden möchten.

    Viel Erfolg …

  • Pyduin 0.6.4 Release

    Neue Version von pyduin verfügbar.

    Hauptsächlich Qualitätssicherung durch pytest, yamllint und pylint. Unter der Haube wurden pinfiles zu boardfiles. Das Wording emanzipiert sich zunehmend von der Arduino-Umgebung. Es macht mehr Sinn, von Devices zu sprechen.

    Bei den Tests setze ich erstmalig auf pytest und das funktioniert nach einigen Startschwierigkeiten sehr gut und spart tatsächlich einen Menge boilerplate. Die coverage liegt derzeit bei 78% und deckt die neuralgischen Punkte ab.

    Es gibt jetzt eine Github-Pipeline. Alle Tests können nach wie vor lokal mit tests.sh lokal getestet werden.

    Mit dem sparkfun_promicro16 wird ein neues Gerät unterstützt. Kleine Firmwarebugs wurden beseitigt. Das Abrufen der gestzten Modi bei einem Pin funktioniert nun korrekt. Das Protokoll zwischen Code und Microkontroller ist nun etwas weniger komplex und intuitiver.

    Im boardfile können nun Zusatzfunktionen für Pins abgelegt werden.

    pins:
        [...]
        - physical_id: 12
          extra:
            - led1
            - mosi
            - miso
    

    Die erste Funktionalität, die damit arbeitet, erlaubt das Ansprechen der definierten LEDs über ihre Namen. Z.B.:

    pyduin -B buddy led1 on
    
  • Too much no-shows? Hands off Outlook!

    Today I encountered my first no-show for a job interview. Not me, the actual employer, did not show up in the meeting set up.

    At least that’s what I thought. Having a closer look, the failure from service - Microsoft - was playing me. Outlook sends out broken appointments. Broken to an extend, that poeple will just not meet.

    Because when one imports the appointment sent from Outlook into a smartphone, it will probably get saved with a wrong time. This seems to be true not only for Android smartphones. Whenever Microsoft touches somethin, it turns into a broken mess.

    If you, beloved german IT-Industry, want to reach out to talented, skilled and motivated people: Get rid of the drugs! Microsoft leaves you sick, stupid and poor.

  • 3D Drucker mit Octoprint in KVM VM automatisch verbinden

    Der Gedanke, einen echten PC als zentralen Rechner mit vielen Octoprint-Instanzen zu nutzen, ist naheliegend und preiswert. Dabei will man jedoch nicht zwangsweise auf dem Host selbst installieren, sondern in eine virtuelle Maschine. Das hat zahlreiche Vorteile, wie z.B. Snapshots und vereinfachte Hostmigration, bringt aber auch Komplexität mit sich.

    Die virtuelle Maschine kann die Drucker nun nicht mehr direkt sehen, weil /dev auf dem Host nicht gleich /dev in der virtuellen Maschine ist. Daher müssen die Drucker dynamisch und möglichst automatisch an die die virtuelle Maschine durch gereicht werden. Unter Linux kein Problem, dank udev.

    Udev-Regel im VM Host erstellen

    Die Regeln für udev sind leicht erstellt. Vorher braucht man aber den Identifikator des Gerätes. Ich nehme meist watch -n .1 lsusb und verbinde dann das Gerät. So sehe ich schnell, welches Gerät dazu kommt und welchen Identifikator es hat. Mein Drucker sieht dann so aus. Die ID ist die entscheidende Information.

    Bus 003 Device 007: ID 1a86:7523 QinHeng Electronics CH340 serial converter
    

    Nun die Konfigurationsdatei in /etc/udev/rules.d/20_3dprinter.rules erstellen. Meine sieht so aus.

    ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ENV{DEVTYPE}=="usb_device", RUN+="/opt/scripts/attach_wanhaoi3plus.sh"
    

    Damit …

  • Bye, bye stackoverflow

    Today I quit stackoverflow after 12 Years and as part of the 17 Percent of the most active users on the platform. The amount gate keeping and the lack of professionalism, psychic hygiene and sanity was just not bearable anymore. The problem is of structural nature and that makes it an inseparable part of the platform. The idea is idiotic, thus the platform is.

    The idea of censoring questions is pure hate. To allow that anonymously is an invitation for bad behavior. And the invitation is taken by all sorts of antisocial individuals. I grew up being mistreated and misused, so I took that for a norm a substantial part of my life. But that time is over. Stackoverflow has no place in a sane life.

  • Pyduin 0.6.3 Release

    Neue Version von pyduin verfügbar.

    Die neue default_buddy-Option erlaubt das definieren eines Buddies aus der Buddylist. Damit werden Kommandozeileneingaben noch kürzer, wenn nur ein Gerät im Einsatz ist. Beispiel:

    pyduin p 13 h
    

    Es ist nun auch möglich Aliasnamen für Pins zu vergeben. Da viele Nutzer an Pinnamen wie A0 oder auch D1 gewöhnt sind, halte ich das für ein sinnvolles Feature. Last, but not least: Arbeiten an Unittests, Pinfiles refaktorieren, Pylint Action auf Github aktivieren, Badges ins Readme, Readme aktualisieren, Code aufräumen.

    Die Implementation von analogRead ist auch durch. Damit machen auch die Pinaliasnamen dann voll Sinn, wenn man in Arduino-Terminologie denkt.

    pyduin p A0 read
    
  • Page 1 / 2 »