Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from postgresql-embedded to otj-pg-embedded #630

Closed
syjer opened this issue Apr 27, 2019 · 6 comments
Closed

switch from postgresql-embedded to otj-pg-embedded #630

syjer opened this issue Apr 27, 2019 · 6 comments
Assignees
Milestone

Comments

@syjer
Copy link
Member

syjer commented Apr 27, 2019

as https://github.com/yandex-qatools/postgresql-embedded is marked as no more maintained.

new library is: https://github.com/opentable/otj-pg-embedded

@syjer syjer self-assigned this Apr 27, 2019
@syjer syjer added this to the 2.0-M2 milestone Apr 27, 2019
@vorburger
Copy link
Contributor

new library is: https://github.com/opentable/otj-pg-embedded

I'm curious why https://github.com/opentable/otj-pg-embedded instead of https://www.testcontainers.org/modules/databases/postgres/ ?

FYI I've used testcontainers.org for other things (to launch Selenium in https://github.com/vorburger/minecraft-storeys-maker as well as to launch etcd in jetcd), and it's great.

https://github.com/yandex-qatools/postgresql-embedded says: "Please be adviced that the main maintainer of this project has successfuly migrated to the use of Test Containers project. This is the best possible alternative nowadays." (but FYI yandex-qatools/postgresql-embedded#163)

@syjer
Copy link
Member Author

syjer commented Apr 27, 2019

@vorburger because test-containers requires docker.

As far as I know, it still require sudo which is something I don't consider good (and the fact that it has a demon).

When they will switch to runc with the rootless mode (https://github.com/opencontainers/runc#rootless-containers) I will be more open about that.

Please correct me if I'm wrong, maybe in the meantime it has changed :)

quoting the manual from docker (https://docs.docker.com/install/linux/docker-ce/fedora/) :

If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like:

    sudo usermod -aG docker your-user

Remember to log out and back in for this to take effect!

Warning:

Adding a user to the “docker” group grants them the ability to run containers which can be used to obtain root privileges on the Docker host. Refer to Docker Daemon Attack Surface for more information.

So yeah, no thanks for me :P

@vorburger
Copy link
Contributor

When they will switch to runc with the rootless mode

perhaps you would like to open an issue proposing this to test-containers? 😸

PS: I'm guessing you know about it already, but just in case, you probably like podman (incl. buildah).

@syjer
Copy link
Member Author

syjer commented Apr 27, 2019

@vorburger ah, good idea about podman, when I've got some time I'll give a try :)

edit: looking at the code from test-containers, it seems to be really docker centric: it really expect the docker daemon :D.

syjer added a commit that referenced this issue Apr 27, 2019
@vorburger
Copy link
Contributor

test-containers seems to be really docker centric: it really expect the docker daemon

yeah, so sudo dnf install podman-docker, which installs a very cool docker compatible CLI, won't work.

@bsideup
Copy link

bsideup commented Apr 28, 2019

Testcontainers dev here :)

edit: looking at the code from test-containers, it seems to be really docker centric: it really expect the docker daemon :D.

Yes, the library is Docker focused, but we do understand that for testing, root maybe too much, and are happy to see the rootless mode progressing in the upstream Docker.

Podman is a nice idea, but, for this use case, you would still need daemon, especially on Mac/Windows. Otherwise, the libraries will be implementing their own daemons, so it isn't that much better.

syjer added a commit that referenced this issue Apr 28, 2019
cbellone pushed a commit that referenced this issue Apr 28, 2019
* #630 switch to otj-pg-embedded: at the unit test level

* #630 launch postgres with the expected conf

* #630 initial fix for start pg instance

* #630 implement stop postgresql
@syjer syjer closed this as completed Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants