Errar es humano. Propagar errores automáticamente es #devops

https://vsis.online/

  • 1 Post
  • 21 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle



  • Some security tips:

    Firewall should block everything by default, and you start allowing incoming and outgoing connections when you need them or if something fails.

    Disable passwords and root access in ssh daemon.

    Use fail2ban or something similar to block bots failing to log-in.

    Use random long passwords for everything (eg: like databases). And put then in a password manager. If you can remember the database password, it’s not strong enough. If you can remember the admin password for a public web service, it’s weak.

    Don’t repeat the passwords. Everything should have its own random long password.

    .env files and files with secrets should be readable only by its service user. Chmod them to 400.

    Monitor logs from time to time to see if something funny is happening.











  • vsis@feddit.cltoSelfhosted@lemmy.worldAny love for Kubernetes here?
    link
    fedilink
    English
    arrow-up
    119
    arrow-down
    3
    ·
    2 years ago

    Kubernetes is useful if you have gone full cattle over pets. And that is very uncommon in home setups. If you only own one or two small machines you cannot destroy infra easily in a “cattle” way, and the bloatware that comes with Kubernetes doesn’t help you neither.

    In homelabs and home servers the pros of Kubernetes are not very useful: high availability, auto-scaling, gitops integrations, etc: Why would you need autoscaling and HA for a SFTP used only by you? Instead you write a docker-compose.yml and call it a day.



  • It looks like system is thrashing. Because of the high disk usage and very low amount of physical memory available previous the incident. Look what dmesg says. Maybe you’ll see some OOM errors.

    The solution, I believe, should be to limit the amount of resources your services can use. In their config or something, or put them inside containers with limited amount of memory, or migrate one of the services to other machine.




  • On a completely unrelated side note: I like to see paralellisms of SOLID principles of OOP development and system administration.

    A container may have one responsability. Or a service config (like nginx) may be closed to modifications but open to extensions, to avoid some automated client breaking elsewhere, etc, etc.

    Sometimes I like to thing about system administration like some kind of very high level development.

    spoiler

    To mods: I have no problem to delete this comments if it doesn’t fit this community


  • In my opinion, for home selfhosted stuff you don’t have to go for complex solutions. In the industry, the problem is that secrets needs to be served to different systems, by different people, with some kind of audit logs. Unless you are working with lots of people, environment variables are OK. You github/gitlab may have all scripts with variables, and your disk may have a .env file with mode 400. If you make any machine or container with a single responsibility, there should be no secret leaks among them.

    For example, let say your wordpress instance gets pwned. It should only have its needed secrets (like its db credentials), so your wikimedia instance is still fine.


  • vsis@feddit.cltoSelfhosted@lemmy.worldHot RAID swapping?
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 years ago

    Do you really need the RAID online all the time? Because if you can afford to shut it down for a few hours, it is way less work to do a backup, and then build a new RAID with your SSDs.

    I’m not sure if the RAID controller will like two different kind of drives. I’d check the docs if it says something.