Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Support for redis.conf configuration file(s) #42

Open
Dawodo opened this issue Oct 3, 2016 · 4 comments
Open

Support for redis.conf configuration file(s) #42

Dawodo opened this issue Oct 3, 2016 · 4 comments

Comments

@Dawodo
Copy link
Contributor

Dawodo commented Oct 3, 2016

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.

@dhilipkumars
Copy link
Member

dhilipkumars commented Oct 4, 2016

@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))
    }

@Dawodo
Copy link
Contributor Author

Dawodo commented Oct 4, 2016

@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.

@dhilipkumars
Copy link
Member

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.

@dhilipkumars
Copy link
Member

Open for contribution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants