huly-selfhost icon indicating copy to clipboard operation
huly-selfhost copied to clipboard

Problem kube deployement

Open ed-auvinet opened this issue 1 year ago • 4 comments

I am using huly self-hosted with the kube directory deployement for kubernetes.

Both transator and account crash and tell with the logs that they need DB_URL.

This reference does not exist in the config map.

What should I had or configure.

Thanks a lot in advance,

Best regards,

ed-auvinet avatar Oct 13 '24 18:10 ed-auvinet

Finally I found out with the platform code

I added DB_URL in the config_map

DB_URL: 'mongodb://mongodb:27017'

and : - name: DB_URL valueFrom: configMapKeyRef: name: huly-config key: DB_URL

in both account-deployemnt.yaml and transactor-deployement.yaml

Now it deploys nicely

ed-auvinet avatar Oct 13 '24 18:10 ed-auvinet

@ed-auvinet thanks for reporting this and glad that you managed to find the solution by yourself. This env variable is a recent change related to PostgreSQL support added to Huly. I'm planning to update our configuration examples with proper env variables for the latest Huly version.

aonnikov avatar Oct 14 '24 06:10 aonnikov

@aonnikov Are you supporting Postgres additionally or removing it? I see the other repo and they are commented out. When I tried deploying the code from this repo, I used the MongoDB URL as the DB_URL.

0xtejas avatar Oct 14 '24 16:10 0xtejas

@0xtejas Postgres is supposed to be used instead of MongoDB. But currently we still have couple of services that use MongoDB directly and that's the reason why we have both DB_URL and MongoDB URL env variables.

aonnikov avatar Oct 15 '24 03:10 aonnikov

@aonnikov

Meanwhile, can I make a PR (will add a placeholder in the config and the k8 deployment) as a placeholder to use the MongoDB URL in the DB_URL variable until we have Postgres compatibility?

Finally I found out with the platform code

I added DB_URL in the config_map

DB_URL: 'mongodb://mongodb:27017'

and : - name: DB_URL valueFrom: configMapKeyRef: name: huly-config key: DB_URL

in both account-deployemnt.yaml and transactor-deployement.yaml

Now it deploys nicely

0xtejas avatar Oct 15 '24 06:10 0xtejas

The problem has been fixed with https://github.com/hcengineering/huly-selfhost/pull/73

aonnikov avatar Oct 17 '24 04:10 aonnikov