Community discussions

MikroTik App
 
h1ghrise
just joined
Topic Author
Posts: 21
Joined: Fri Apr 14, 2023 5:05 pm
Location: Vienna, Austria

Homeassistant + Maria DB

Tue Mar 05, 2024 10:17 pm

Hi,
I recently migrated my hexS to an RB5009 and im quite happy with it.
Now, the next step is to migrate my Home Assistant instance + AdGuard Container from my Lenovo M900 to the RB5009.

AdGuard and MQTT is already running fine on the RB5009 and an attached 1TB SSD.
Now, I want to migrate HomeAssistant, which is currently running as HASSOS (HomeAssistant and Addons (which are docker containers running inside of HA)) VM on the M900.

I need the following containers:
- HomeAssistant
- MariaDB (to move away from Sqlite DB as im running quite a few devices, which have caused already some db corruptions during backups)

My questions are:
- Can I run Maria DB as a container from the RB5009?
- Each container needs a veth interface. I don't want to have dozens of IPs taken up by the containers, when they provide only a single Service.. Is DSTNAT the only option here?
- Any idea on how to backup config from HA? (I found https://hub.docker.com/r/linuxserver/duplicati this as an option)
- Is this a feasible approach to run that many containers (especially HA + Maria DB) on a 2GB RAM device?

I would like to have some opinions from you guys, before migrating the important stuff.
Much appreciated.
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 388
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: Homeassistant + Maria DB

Wed Mar 06, 2024 10:56 am

Im running MariaDB together with PhotoPrism and Caddy for https proxy on RB5009

I installer MariaDB:
set up envs:
/container envs
add key=MARIADB_AUTO_UPGRADE name=mariadb2 value=1
add key=MARIADB_INITDB_SKIP_TZINFO name=mariadb2 value=1
add key=MARIADB_DATABASE name=mariadb2 value=database
add key=MARIADB_USER name=mariadb2 value=lala
add key=MARIADB_PASSWORD name=mariadb2 value=lala
add key=MARIADB_ROOT_PASSWORD name=mariadb2 value=lala

/container mounts
add dst=/var/lib/mysql name=mysql src=/disk1/database

/container
add cmd="mariadbd --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb\
    4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait\
    -timeout=120" envlist=mariadb2 interface=mariadb logging=yes mounts=mysql root-dir=disk1/mariadb_mysql remote-image=mariadb:11
Go through usernames/passwords and disk locations and you should be set
 
h1ghrise
just joined
Topic Author
Posts: 21
Joined: Fri Apr 14, 2023 5:05 pm
Location: Vienna, Austria

Re: Homeassistant + Maria DB

Wed Mar 06, 2024 11:16 pm

great :) thanks a lot for your post. Will give it a try.
I found a different way to access my HA config.
Idea was, to access it through an SMB share. Unfortunately, my RB5009 crashes immediately when I try to access the share (after upgrading to 7.14)

Who is online

Users browsing this forum: No registered users and 2 guests