How can I run Redis 3.2 in Circle? I need it because of the geo* commands.
Read some tips on downloading/compiling it manually here, but trying these out I’m running into issues as the new server apparently conflicts with the Redis provisioned automatically by Circle (3.0.7).
My circle.yml:
machine:
environment:
REDIS_URL: redis://localhost:6391
dependencies:
pre:
- wget http://download.redis.io/releases/redis-3.2.0.tar.gz
- tar xzf redis-3.2.0.tar.gz
- cd redis-3.2.0 && make
cache_directories:
- redis-3.2.0
test:
pre:
- sudo service redis-server start --port 6391
That pre step fails like:
sudo service redis-server start --port 6391
/var/run/redis-server.pid exists, process is already running or crashed
I tried restarting the server to see if it would reboot with the newer version but that doesn’t seem to do it.
Does redis have a docker image? If so I think that might be the easiest way to get a newer version running. You can either run it on a different port, or kill redis after the container starts to use the same port.
I suspect it’s because the new Redis didn’t finish booting (or just didn’t boot properly), but wasn’t able to tweak the redis-server call to address this yet :{
To get 3.2 running, keep the above ‘machine’ section and add:
dependencies:
pre:
- sudo service redis-server stop
- >
cd ~ && if [ ! -d "redis-3.2.5" ]; then
wget http://download.redis.io/releases/redis-3.2.5.tar.gz
tar xzf redis-3.2.5.tar.gz
cd redis-3.2.5 && make;
fi
- cd ~/redis-3.2.5 && sudo make install
- sudo sed -i 's/bin/local\/bin/g' /etc/init/redis-server.conf
- sudo service redis-server start
cache_directories:
- ~/redis-3.2.5
Installing redis this way should allow it to run more reliably in our environment and the installation will be cached so the process will only add a couple of seconds to your build after the initial installation.
This is correct now, the original posts were regarding the old platform. In 2.0 running redis (along with any other database service) is a breeze thanks to docker.