Closed mzimbres closed 3 months ago
My recommendation is to:
docker build
and docker push
. I use GitHub Actions for this, because it has a lot of built-in functionality to do this easy and fast. See this workflow file. I'm pushing this to an anarthal-containers
account - that's legacy and I want to get rid of it. I think you can push them to ghcr.io/boostorg/redis
- but I'm not sure about this point. The main thing is that the images are public so your CIs can pick them.services.<service-name>.image
property should point to the image you built. This will run your Redis server with the configuration you want, for all builds.services.<service-name>.ports
should include a port binding for the ports you're using - likely 6379:6379
in your case.<service-name>
. In my case, I use "mysql"
, so that's the hostname I use in my tests.Should you have any questions or need any help with this, please let me know.
@anarthal Thanks for detailed overview. Would it make sense to enhance the container you are using with a Redis server so I can avoid all the trouble?
I'm afraid it does not. The MySQL containers are just MySQL. I'm also using build containers (which I don't think you're using), but these don't contain MySQL at all. It's good practice to keep containers as small as possible.
I can write you a minimal Dockerfile, GHA workflow to build an image, and GHA workflow to run your CI with a local Redis server, but you will need to adjust it afterwards to run the tests only for that workflow. I'll also need the specific configuration you need for your tests.
I can write you a minimal Dockerfile, GHA workflow to build an image, and GHA workflow to run your CI with a local Redis server, but you will need to adjust it afterwards to run the tests only for that workflow. I'll also need the specific configuration you need for your tests.
Any help would be much appreciated, thanks.
Does the server need to have any particular configuration regarding SSL?
The TLS tests are very simple and won't even validate server the certificate. At the moment I am using the following parameters
config cfg;
cfg.use_ssl = true;
cfg.username = "aedis";
cfg.password = "aedis";
cfg.addr.host = "db.occase.de";
cfg.addr.port = "6380";
but those are rather arbitrary.
My server on db.occase.de
was also exposed to the network so I set an ACL that would only accept PING
commands from the aedis
user. Thefore I also used the TLS server to test how the handshake works in this case. You can ignore this at first because ACL can be set on the client side via commands too, no need to put on the config files.
I had to disable the TLS tests after shutting down my server running on
occase.de
. A new one will be needed in the CI. I believe the work of @anarthal in Boost.MySql could offer some guidance here (although I haven't looked at it yet).