Skip to content

Latest commit

 

History

History
117 lines (72 loc) · 3.89 KB

notes.md

File metadata and controls

117 lines (72 loc) · 3.89 KB

FIX MISSING SSHFS

  • vagrant plugin install vagrant-sshfs

FIX MISSING OVSDB

VCC-control: WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running.

  • install openvswitch on the node
  • systemctl start ovsdb-server

Ansible vscode extension stuffs

  • sudo pacman -S ansible-language-server ansbile-lint
  • poetry init
  • POETRY_VIRTUALENVS_IN_PROJECT=true poetry install --no-root
  • poetry add ansible-creator

BAD MOUNT POINT (vagrant meme)

sshfs: bad mount point `Desktop/exam-2023-2024-vfs/project': No such file or directory

if a there's a space in the relative path the resolved one will be truncated ex: /home/fabio/Downloads/Fake Desktop/exam-2023-2024-vfsr

LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

Remember that the synced folder is in /vagrant and not in /home/vagrant

Ansible vault

We used ansible vault
we store the vault password in a file placed under project/secret.txt
this file should NOT be committed in the repository
to add support for the linter we create an ansible.cfg containing the path to the password file to easy the usage of vault we added a vault_edit script inside the scripts folder

Traefik labels in deploy

Traefik in swarm mode doesn't care about labels in the container root section but searches them in the deploy section

Traefik SSL pem

For some reason traefik doesn't accept crt and key in separate files but wants a single pem file

Forgejo traefik routers

DO NOT GIVE THE SAME NAME TO ROUTER OF DIFFERENT SERVICES

Traefik service with multiple networks

If a container has multiple networks and at least one of them is unreachable from traefik
Traefik fails with a gateway timeout error and the page seems to not loading
This happens also when forwarding a port because the container is inserted into the ingress network
To solve this one should specify the network with traefik.docker.network=vcc_default

traefik bad gateway during update / resume / deploy

https://stackoverflow.com/a/67954730 https://doc.traefik.io/traefik/master/routing/providers/swarm/#services

When:

  • make setup-services on a running swarm
  • suspend the PC and resume it (causing a reload)
  • every time you restart/re-deploy while a swam is already running

This affects only Grafana in my case (mon.vcc.local) causing a loop on the auth wait (could not reach auth.vcc.local)

hostname resolution

short hostnames are resolved to the longest ones. this would lead to request to pass outside the docker swarm network without using the internal hostname. ex: traefik -> traefik.vcc.local instead of traefik

solution: change service name to avoid this match (ex. traefik -> reverse-proxy) better solution: see how hostnames are resolved

filter double traefik metrics

for some reason prometheus picks metrics from both the internal and the external ip where traefik is running

To fix this we can use traefik without binding it to the host port or by adding the following rule to prometheus:

      - source_labels:
         [
           __meta_dockerswarm_task_port_publish_mode,
           __meta_dockerswarm_network_ingress,
         ]
       regex: host;
       action: drop

fluent-bit systemd plugin failed

For some reason the systemd plugin fails

Forgejo stale file handle

For some reason sometimes forgejo reports a nfs stale file handle for the configuration file This was caused by a docker mount inside another mount which breaks nfs

Traefik first boot doesn't load certificates

For some reason traefik at first boot doesn't load the certificates created by the init container This was caused by the fact that traefik is stupid and doesn't watch for certificate changes

Keycloak admin page

For some reason sometimes randomly keycloak doesn't show the option to access the admin page

Postgres exit code 0

solved with restart-mode: any

Prometheus exit code 0

solved with restart-mode: any