mr-redis
mr-redis copied to clipboard
Support for redis.conf configuration file(s)
Currently, the actual redis-server is run through the following command:
R.Cmd = exec.Command("./redis-server", "--port", fmt.Sprintf("%d", R.Port))
As far as I'm concerned, this will launch redis with the default settings (except for the specified port of course). It seems that this leads to redis running in "protected mode" which only allows access from the loopback device, rendering all instances secluded from the outside world.
Am I missing an integral step? A redis.conf seems essential for me to properly configure the instances.
@Dawodo Could you try this change in your executor , re-compile and re-distribute it.
Or you could simply distribute older version of redis-server like 2.8 which will not enforce this.
if isSlave {
R.Cmd = exec.Command("./redis-server", "--protected-mode", "no", "--port", fmt.Sprintf("%d", R.Port), "--SlaveOf", IP, port)
} else {
R.Cmd = exec.Command("./redis-server", "--protected-mode", "no", "--port", fmt.Sprintf("%d", R.Port))
}
@dhilipkumars Yes, this should certainly work. However, I decided to modify the scheduler to simply serve a "redis.conf" artifact for each executor (identical to how the "redis-server" binary itself is distributed).
This has some limitations, too (e.g. changing the redis.conf requires restarting the framework), but it works well for me.
In case you like this approach, I can create a PR for it.
Thanks thats a great idea. I would appreciate a PR.
@Dawodo I'm currently implementing running redis
docker containers directly avoids the need to distribute redis-binary. You should be able to specify docker image you want the executor to pull.
I'm checking if we could also send some 'CMD' along with configuration.
Open for contribution