Changing openbalena RDS to AWS database

Like a few of the other forum posts, I am trying to set up openbalena using AWS S3 and RDS services instead of the provided ones. I have found instructions for changing over the S3, just by changing the environment variables and this seems to be working correctly. However I cannot figure out how to correctly change to the RDS.

Is it as simple as changing the environment of the api in the services.yml file? like so:

DB_HOST: ${DB_HOST}
DB_PASSWORD: ${DB_PASSWORD}
DB_USER: ${DB_USER}

I have tried this but at the very least, the api docker container is outputting errors. Below I have put the actual error itself but if more logs are need I can provide those too.

/usr/local/bin/confd[1455]: INFO Backend set to env
configure-balena.sh[1455]: 2022-07-22T05:07:15Z f3392b07aba6 /usr/local/bin/confd[1455]: INFO Starting confd
configure-balena.sh[1455]: 2022-07-22T05:07:15Z f3392b07aba6 /usr/local/bin/confd[1455]: INFO Backend source(s) set to
configure-balena.sh[1455]: 2022-07-22T05:07:15Z f3392b07aba6 /usr/local/bin/confd[1455]: INFO Target config /usr/src/app/config/env out of sync
configure-balena.sh[1455]: 2022-07-22T05:07:15Z f3392b07aba6 /usr/local/bin/confd[1455]: INFO Target config /usr/src/app/config/env has been updated
systemd[1]: confd.service: Failed to kill control group /system.slice/confd.service, ignoring: Input/output error
systemd[1]: confd.service: Failed to kill control group /system.slice/confd.service, ignoring: Input/output error
systemd[1]: confd.service: Failed to kill control group /system.slice/confd.service, ignoring: Input/output error
systemd[1]: confd.service: Failed to kill control group /system.slice/confd.service, ignoring: Input/output error
systemd[1]: confd.service: Succeeded.
systemd[1]: Finished Confd.
systemd[1]: Started open-balena-api.
systemd[1]: rsyslog.service: Failed to delete controller cgroups /system.slice/rsyslog.service, ignoring: Device or resource busy
systemd[1]: Starting System Logging Service...
systemd[1]: rsyslog.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: rsyslog.service: Failed with result 'exit-code'.

Any pointers in the right direction would be appreciated

I also had to update the DB_PORT and added an extra variable for DB_NAME as it wasn’t the standard “resin”. Looks like that solved the problem.

1 Like

Thank you for your message @crystal_balena and welcome to the balena community.

Let me ping @bversluijs who might be interested on this!

1 Like

Thanks for the mention @mpous!

Definitely interested in this, especially that is succeeded!
I’ll remind this topic so I can implement it in the Kubernetes Helm chart in the same way as the S3 container can be disabled. Will definitely test this!

1 Like

You are welcome @bversluijs

Looking forward to learn more about you can do :slight_smile: