hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.09k stars 114 forks source link

Implement make compose, using docker-compose for local interactive testing. #825

Closed DimCitus closed 2 years ago

DimCitus commented 2 years ago

This PR adds a new make compose command that works the same way as the make cluster command, though uses docker-compose to start the monitor and the Postgres nodes in a way that uses a single tmux pane.

When using make compose it is possible to use PGVERSION to test with a specific docker image, such as e.g. in the command make PGVERSION=13 NODES=6 NODES_ASYNC=3 NODES_PRIOS=50,50,50,0 compose.

Be sure to run the usual build and also make build build-check first, that should clean-up the local docker images you might have dangling, and hopefully make everything just work.

rheaton commented 2 years ago

Hi! I took a look at this on a MacOS.

I like how easy is has become to run the tests against different versions of postgres. :)

I am unable to get the make compose command to work -- am I doing something wrong?

Testing now! I needed to re-compile

This is very cool! I like how you've added the helper text after the system is set up.