thomasjpfan / redis-cluster-docker-swarm

Redis cluster cache configuration for docker swarm
MIT License
112 stars 46 forks source link

build.sh question #7

Open gitreapur opened 5 years ago

gitreapur commented 5 years ago

Hello, Are the images in your repo different from the ones build by build.sh? For example, I want to make some custom images, and I'm using build.sh to get the redis images and apply your changes as well as mine and produce a new image. For some reason I'm seeing strange behavior where the other nodes aren't coming up. Even if I back out my changes and just build using your build.sh and then of course modify the yml file to include, for example: redis-utils instead of thomasjpfan/redis-utils.

Thanks,

thomasjpfan commented 5 years ago

The images on docker hub are built with build.sh. If they pass my integration tests on circleci, they are pushed to docker hub automatically.

gitreapur commented 5 years ago

Hi Thomas, thanks for the response. I'm having an issue that I'm not sure I've seen before. I need to build these images with some security additions that do not affect redis, like a MOTD and etc/issue. Obviously I need to name the resulting images something other than thomasjpfan/something.

What I'm seeing is if I simply change thomasjpfan to abc in bootstrap.sh, docker-compose.yml and build.sh. Then I build the images (no changes to Dockerfile), create the network and run bootstrap.sh, only one node of my swarm gets any instances. Using thomasjpfan in the name, works fine.

This one has me stumped. Any ideas where to look? Thanks

thomasjpfan commented 5 years ago

My docker-compose.yml uses 3 replicas. If you want your instances to run on each node, you can try running the instances in global mode.

gtmadev commented 5 years ago

I ran into this, and then realized that I did not build the custom image on each node. When looking at the logs, I was seeing that the custom image name was not found when trying to create containers on the other two nodes.

Of course, this won't be an issue if the image is being published to a repo. But when building a custom image, it exists on that node only unless it's published somewhere.

All you have to do is just build the image on each node and it works fine.