Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Ansible/Podman/systemd #35

Open
wants to merge 358 commits into
base: main
Choose a base branch
from
Open

Switch to Ansible/Podman/systemd #35

wants to merge 358 commits into from

Conversation

PlqnK
Copy link
Owner

@PlqnK PlqnK commented Nov 24, 2023

Here we go again, this time for real, I've finally made the switch to using Ansible, Podman and systemd to manage my services.

I've been running this code since April and it's been pretty much rock solid. The scope of my infrastructure has also expanded a bit in the meantime, I have two physical hosts and one cloud host now:

Physical:

  • One running Fedora IoT on bare metal to hosts my "medias" services
  • The other running Proxmox VE hosting 3 VM, all of them running Fedora IoT:
    • One to host my monitoring stack
    • Another to host my backup services
    • The last to host my home assistant services

Cloud:

  • One VPS hosted on Hetzner Cloud running Fedora Server to hosts my "documents" services

I've externalized the hosting of my critical services (mainly Nextcloud and Immich) because I've had some internet connection problems at home several times recently and I need those services to be available, Hetzner being a much more reliable hoster than myself!

The expansion of my infrastructure is another reason of why I really wanted to use Ansible to manage it, it's a better suited tool than docker-compose to manage multiple hosts.

The repo is in a good enough state to open this PR but there's still some things I would like to do before merging in main:

  • Switch to Fedora CoreOS as the containers host OS for both home and cloud hosts
    • I chose Fedora IoT initially but there's no official image available for my cloud provider of choice. CoreOS is extremely similar in its base, better suited for a "server" application and there's an image available for my cloud provider which makes it the perfect replacement. I've made the switch to using immutable OSes for both my Desktop/Laptop and servers OS and I can't see myself going back.
  • Use btrfs as the filesystem to store containers data so that I can use it's snapshot capability to make consistent backups as well as being alerted if there's any bitrot.
  • Switch to Quadlet to manage podman systemd units
  • Either update or remove the Vagrantfile
  • Update the demo inventory to match the production one
  • Update the README

Closes #12

PlqnK added 30 commits May 21, 2023 13:28
In the create subtasks file there's a task looping on a filtered
variable registered in a previous task. Ansible fails on the task
because it tries to evaluate the filter on an undefined variable even
though the task should be skipped.
So we use include_tasks instead.
Promtail only supports RFC5424 on syslog input, the standard port for
it is 601/tcp, so we change it for 1601/tcp for a better match.
Some equipments that use RFC3164 "BSD-syslog" can be configured to use
TCP instead of of the standard UDP so add a syslog-ng TCP listener on
port 514 for RFC3164 formatted messages.
Containers can't reach other containers published ports when the network
is isolated using netavark 1.6.0.
PlqnK added 30 commits June 16, 2024 20:26
The rules are already present in the nginx.conf file
To stay closer to upstream version in order to facilitate diffs in the long run
Before Fedora CoreOS 41, /sysroot was bind-mounted on / as rw so we could target a rw scrub on the root partition
Now, only /var and /etc are bind-mounted from /sysroot so we need to target a ro scrub on it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace docker/moby daemon with OCI compliant container daemon like CRI-O
2 participants