Open matiasAS opened 7 months ago
No, you just need to set your dns settings on your hosting provider to point to those ip address / hostnames, which need to be publicly exposed.
@dcaputo-harmoni as this:
results:
@dcaputo-harmoni logs of openbalena-admin-postgrest-1 servuce;
28/Nov/2023:19:10:43 +0000: Attempting to reconnect to the database in 32 seconds... 28/Nov/2023:19:11:15 +0000: {"details":"invalid integer value \"xxxxxx@db.abcde.online:5432\" for connection option \"port\"\n","code":"","message":"Database connection error. Retrying the connection."}
Regards
Just to confirm - there should be two haproxy instances in your environment, one for open-balena and one for open-balena-admin. The admin related domain names (admin, dashboard, postgrest, remote) should all be pointing to the open-balena-admin haproxy instance's public IP address / fqdn.
@dcaputo-harmoni I only have 1 instance of haproxy according to this:
@dcaputo-harmoni The service.yml file had the network defined twice and I had to modify it because I got an error:
version: "2.0"
services: ui:
extends:
file: ./common.yml
service: component
image: harmonidcaputo/open-balena-ui:${OPENBALENA_UI_VERSION_TAG}
depends_on:
- postgrest
- remote
environment:
PORT: 8080
OPEN_BALENA_JWT_SECRET: ${OPENBALENA_JWT_SECRET}
OPEN_BALENA_S3_URL: https://s3.${OPENBALENA_HOST_NAME}
OPEN_BALENA_S3_ACCESS_KEY: ${OPENBALENA_S3_ACCESS_KEY}
OPEN_BALENA_S3_SECRET_KEY: ${OPENBALENA_S3_SECRET_KEY}
REACT_APP_OPEN_BALENA_UI_URL: http://admin.${OPENBALENA_HOST_NAME}:8080
REACT_APP_OPEN_BALENA_POSTGREST_URL: http://postgrest.${OPENBALENA_HOST_NAME}:8000
REACT_APP_OPEN_BALENA_REMOTE_URL: http://remote.${OPENBALENA_HOST_NAME}:10000
REACT_APP_OPEN_BALENA_API_URL: https://api.${OPENBALENA_HOST_NAME}
REACT_APP_OPEN_BALENA_API_VERSION: ${OPENBALENA_API_VERSION_TAG}
ports:
- "8080:8080"
networks:
openbalena_default:
aliases:
- admin.${OPENBALENA_HOST_NAME}
remote: extends: file: ./common.yml service: component image: harmonidcaputo/open-balena-remote:${OPENBALENA_REMOTE_VERSION_TAG} environment: BALENARC_BALENA_URL: ${OPENBALENA_HOST_NAME} HOST_MODE: ${OPENBALENA_ADMIN_HOST_MODE} ports:
"10009:10009" networks: openbalena_default: aliases:
postgrest: extends: file: ./common.yml service: component image: harmonidcaputo/open-balena-postgrest:${OPENBALENA_POSTGREST_VERSION_TAG} environment: PGRST_DB_URI: postgres://${OPENBALENA_DB_USERNAME}:${OPENBALENA_DB_PASSWORD}@db.${OPENBALENA_HOST_NAME}:${OPENBALENA_DB_PORT}/resin PGRST_JWT_SECRET: ${OPENBALENA_JWT_SECRET} ports:
networks: openbalena_default: external: true
Also in the compose file change "docker-compose" to "docker compose" (remove the -)
It is the only thing that changes after doing the git clone of the repository
Openbalena and openbalena admin are on the same server
If you aren't using a second haproxy instance, you will need to either reconfigure your existing haproxy instance to route to those containers based on the hostnames (i.e. remote.xyc.com goes to the open-balena-remote container) or make sure the open-balena-admin services each have their own public IP, and point the hostnames at those IP addresses.
@dcaputo-harmoni
That's what I said at the beginning, and why don't I have another instance of haproxy?
Can you give me the new updated haproxy.cfg file please?...or add it to the repository
@dcaputo-harmoni
or the other thing is that you add the haproxy service to docker compose.....so that everything works well, and there are no errors with other users of the openbalena community
Everyone's networking setup is different (i.e. some people have multiple public IPs whcih would allow for multiple haproxy instances, others have one which would need it integrated with the open-balena instance, etc.), so it's hard to create a one-size-fits-all approach to this. I'd be interested in any solution you have; feel free to send in a PR to the repo and I will review. Just note that it should be generic enough to cover a wide range of setups. Because open-balena-admin is meant to run alongside open-balena, but doesn't actually modify anything within open-balena, including the open-balena-haproxy instance. So if you want to integrate it into the open-balena-haproxy instance, you would need to manually modify that config. A cleaner way to deploy all of this is to k8s using the helm scripts, which are linked in the main README page of the repo. This has all of the required configurations baked in, but obviously is a higher level of complexity than a traditional docker compose.
@dcaputo-harmoni
For me the unclear step to run openbalena-admin according to the readme is the definition of the domains:
I'm sorry but I'm not able to support the docker-compose environment, we are using it in k8s and it works fine with the helm scripts. I know that others who have posted here have got it working with docker-compose so perhaps they can help you.
@dcaputo-harmoni
Can you give me the detailed step by step to execute everything using helm?
@dcaputo-harmoni
From what I see, is it changing everything or not? In that case, I prefer not to touch what already works.
Who has implemented it with docker compose?
I do not understand this: