citusdata / docker

:ship: Docker images and configuration for Citus
Apache License 2.0
241 stars 100 forks source link

Adds hyperscale image for pg14 #280

Closed gurkanindibay closed 2 years ago

gurkanindibay commented 2 years ago

Created the image for pg 14. I will need to create for each pg version.

I haven't added a user with the privileges you sent. I will add it after you first pre-review you can create a new docker image in the docker repo with the command below PG14 docker build -t hyperscale_image_14 -f hyperscale/pg-14/Dockerfile .

PG13 docker build -t hyperscale_image_13 -f hyperscale/pg-13/Dockerfile .

PG12 docker build -t hyperscale_image_12 -f hyperscale/pg-12/Dockerfile .

and run with the following command (replacing with the pg version you give above)

docker run --name test1 -p 5432:5432 -e CITUS_PASSWORD="Citus123" hyperscaleimage

I compared the plugins between the docker image I created and th list you've sent and the comparison excel is below Hyperscale Image Extensions.xlsx

gurkanindibay commented 2 years ago

[11/18/2021 1:42 PM] Marco Slot well, that's if you want to allow anyone to connect from anywhere

[11/18/2021 1:42 PM] Marco Slot to any database

[11/18/2021 1:42 PM] Marco Slot we only want the citus user to connect to the citus database

[11/18/2021 1:42 PM] Marco Slot so for that we could have: host citus citus all scram-sha-256

[11/18/2021 1:42 PM] Marco Slot but there seems to be some background process (perhaps Citus?) that also connects as postgres user

[11/18/2021 1:43 PM] Marco Slot which is being blocked by my pg_hba.conf

gurkanindibay commented 2 years ago

[11/18/2021 1:42 PM] Marco Slot well, that's if you want to allow anyone to connect from anywhere

[11/18/2021 1:42 PM] Marco Slot to any database

[11/18/2021 1:42 PM] Marco Slot we only want the citus user to connect to the citus database

[11/18/2021 1:42 PM] Marco Slot so for that we could have: host citus citus all scram-sha-256

[11/18/2021 1:42 PM] Marco Slot but there seems to be some background process (perhaps Citus?) that also connects as postgres user

[11/18/2021 1:43 PM] Marco Slot which is being blocked by my pg_hba.conf

[11/18/2021 1:42 PM] Marco Slot well, that's if you want to allow anyone to connect from anywhere

[11/18/2021 1:42 PM] Marco Slot to any database

[11/18/2021 1:42 PM] Marco Slot we only want the citus user to connect to the citus database

[11/18/2021 1:42 PM] Marco Slot so for that we could have: host citus citus all scram-sha-256

[11/18/2021 1:42 PM] Marco Slot but there seems to be some background process (perhaps Citus?) that also connects as postgres user

[11/18/2021 1:43 PM] Marco Slot which is being blocked by my pg_hba.conf

I performed some configurations that prevent postgres user to connect into the image

First I added connection policies to prevent postgres user to connect locally. https://github.com/citusdata/docker/blob/1fe2a6c149a397c697e362f24f55b7389c04b35c/hyperscale/pg_hba.conf#L94-L96 Then I added random possword to prevent connecting using host https://github.com/citusdata/docker/blob/1fe2a6c149a397c697e362f24f55b7389c04b35c/hyperscale/docker-entrypoint.sh#L9

marcocitus commented 2 years ago

Probably a file permissions problem. Adding RUN chmod 755 /usr/local/bin/docker-entrypoint.sh seems to fix it.

gurkanindibay commented 2 years ago

Probably a file permissions problem. Adding RUN chmod 755 /usr/local/bin/docker-entrypoint.sh seems to fix it.

I was trying to replicate it in my local. You found the problem thanks. I added execute permission into the file in git repository. This will fix it. No need to add additional command on Dockerfile