All Projects → AmadeusITGroup → Redis Operator

AmadeusITGroup / Redis Operator

Licence: mit
Redis Operator creates/configures/manages Redis clusters atop Kubernetes

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Redis Operator

Docker Redis Cluster
Dockerfile for Redis Cluster (redis 3.0+)
Stars: ✭ 1,035 (+628.87%)
Mutual labels:  redis, redis-cluster
Redis exporter
Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, 5.x and 6.x
Stars: ✭ 2,092 (+1373.24%)
Mutual labels:  redis, redis-cluster
Flycache
一致性哈希的redis分片存储 (Redis sharding by consistent-hashing)
Stars: ✭ 59 (-58.45%)
Mutual labels:  redis, redis-cluster
Predixy
A high performance and fully featured proxy for redis, support redis sentinel and redis cluster
Stars: ✭ 862 (+507.04%)
Mutual labels:  redis, redis-cluster
E3 Springboot
SpringBoot+Docker重构宜立方商城
Stars: ✭ 139 (-2.11%)
Mutual labels:  redis, redis-cluster
Docker Redis Cluster
Running a distributed 6-node Redis Cluster with Docker Swarm, Docker Compose, and Supervisor
Stars: ✭ 39 (-72.54%)
Mutual labels:  redis, redis-cluster
Ioredis
🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
Stars: ✭ 9,754 (+6769.01%)
Mutual labels:  redis, redis-cluster
Redis Migrate Tool
A convenient and useful tool for migrating data between redis group.
Stars: ✭ 824 (+480.28%)
Mutual labels:  redis, redis-cluster
Php Redis Client
RedisClient is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0
Stars: ✭ 112 (-21.13%)
Mutual labels:  redis, redis-cluster
Nginx Lua Redis Rate Measuring
A lua library to provide distributed rate measurement using nginx + redis, you can use it to do a throttling system within many nodes.
Stars: ✭ 109 (-23.24%)
Mutual labels:  redis, redis-cluster
Predis
A flexible and feature-complete Redis client for PHP.
Stars: ✭ 6,966 (+4805.63%)
Mutual labels:  redis, redis-cluster
Csredis
.NET Core or .NET Framework 4.0+ client for Redis and Redis Sentinel (2.8) and Cluster. Includes both synchronous and asynchronous clients.
Stars: ✭ 1,714 (+1107.04%)
Mutual labels:  redis, redis-cluster
Puppet Redis cluster
Install multiple redis instances via Puppet to configure a cluster with redis-trib.rb (for Redis version >= 3.0)
Stars: ✭ 8 (-94.37%)
Mutual labels:  redis, redis-cluster
Fastonosql
FastoNoSQL is a crossplatform Redis, Memcached, SSDB, LevelDB, RocksDB, UnQLite, LMDB, ForestDB, Pika, Dynomite, KeyDB GUI management tool.
Stars: ✭ 1,001 (+604.93%)
Mutual labels:  redis, redis-cluster
Redis Py Cluster
Python cluster client for the official redis cluster. Redis 3.0+.
Stars: ✭ 934 (+557.75%)
Mutual labels:  redis, redis-cluster
Redis Operator
Redis Operator for Kubernetes
Stars: ✭ 81 (-42.96%)
Mutual labels:  redis, operator
Redis Operator
Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Stars: ✭ 658 (+363.38%)
Mutual labels:  redis, operator
Corvus
A fast and lightweight Redis Cluster Proxy for Redis 3.0
Stars: ✭ 758 (+433.8%)
Mutual labels:  redis, redis-cluster
Phpredis
A PHP extension for Redis
Stars: ✭ 9,203 (+6380.99%)
Mutual labels:  redis, redis-cluster
Redis Game Transaction
在大型游戏中经常使用分布式,分布式中因为游戏逻辑会经常游戏事务,借助redis特性我们可以实现分布式锁和分布式事务。很多redis集群不支持redis的事务特性。 这个框架用来解决分布式服务器下redis集群事务失效的情况下,基于分布式锁完成分布式事务。支持独占锁,共享锁,读写锁,并且支持事务提交失败情况下的回滚操作,让开发者可以有更多时间侧重游戏逻辑.
Stars: ✭ 124 (-12.68%)
Mutual labels:  redis, redis-cluster

Redis-Operator

logo

Build Status

Build Status Go Report Card codecov

Project status: alpha

This is an ongoing project.

The aim of this project is to ease the deployment and operations of a Redis-cluster in a kubernetes environment. It started internally at Amadeus in 2016, we initially designed this project to run on Openshift. This is the second version of our Redis-Operator that is based now on Kubernetes CustomResourceDefinition (CRD) for representing the RedisCluster configuration.

Overview

The Redis-cluster will be deployed thanks to a unique deployment. Each node of the Redis-cluster is running in its own Pod; At startup, each node has no active role (not slave nor master with slot), it just joins the cluster as a master without slot. See representation in the schema below

Initial state

At this point you have your redis process running, each node is aware of each other, but only one master prossess all slots.

In order to configure properly the different redis-servers and setup the redis cluster, we introduce the Redis-Operator.

The redis-operator is watching a new kind of Custom-Resource RedisCluster that stores the redis-cluster configuration: number of masters, and the replication factor (number of slaves by master) and the pod template. Then the redis-operator tries to apply this configuration to the set of redis-server processes. If the number of redis-servers doesn't correspond to the provided configuration, the manager scales the redis-node pods to obtain the proper number of redis-nodes.

Then reconciliation is constantly done between the state of the cluster and the configuration stored in the RedisCluster CR.

Development

If you want to take part of the development, you can follow the document: CONTRIBUTING.md.

Deployment

you can found checkt the docs/cookbook.md that is a step by step commands cookbook to test/demo the deployment of the operator and a redis-cluster with minikube.

Deployment environment requirements

As said, the project was initially designed to works on Openshift, but now support also Kubernetes. Please check the minimum environment version in the table below.

Environment Version
Openshift >= 3.7
Kubernetes >= 1.7

Helm deployment

You can found in the charts folder two helm charts:

  • redis-operator: used to deploy the redis-operator into your kubernetes cluster.
  • redis-cluster: used to create a "Redis Cluster" instance thanks to the redis-operator.

Instanciate the redis-operator:

helm install --name op chart/redis-operator
NAME:   op
LAST DEPLOYED: Tue Jan  9 23:41:13 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1beta1/Deployment
NAME               DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
op-redis-operator  1        1        1           0          0s

TODO: document RBAC support.

Create your "Redis-Cluster"

Thanks to the helm chart chart/redis-cluster you can create a RedisCluster Custom Resource which will be processed by the redis-operator.

You can configure the Topology of the cluster by providing your own values.yml file to helm, or settings the value with the --set parameters when you execute helm install

helm install --name mycluster chart/redis-cluster --set numberOfMaster=3 --set replicationFactor=1
...

! Warning !, if you want to use the docker images corresponding to the level of code present in the "master" branch. you need to set the image tag when you instanciate the Redis-Cluster chart and the Redis-Operator chart. The "latest" tag is corresponding to the last validated release.

helm install --name mycluster chart/redis-cluster --set image.tag=master --set numberOfMaster=3 --set replicationFactor=1
...

Install the kubctl redis-cluster plugin

docs available here.

Deployment from source code

Build the container images

cd $GOPATH/src/github.com/amadeusitgroup/redis-operator
make container
CGO_ENABLED=0 GOOS=linux go build -i -installsuffix cgo -ldflags '-w' -o docker/operator/operator ./cmd/operator/main.go
CGO_ENABLED=0 GOOS=linux go build -i -installsuffix cgo -ldflags '-w' -o docker/redisnode/redisnode ./cmd/redisnode/main.go

you can define the docker images tag by adding the variable "VERSION"

make TAG=<Your-TAG> container

publish the docker images in your docker registry

make TAG=<Your-TAG> publish

In addition to the version, you can also specify the docker registry where will be publish the docker images with the variable DOCKER_REGISTRY

make DOCKER_REGISTRY="mydockerregistry:5000/" TAG=<Your-TAG> publish

How to Release the Redis-Operator

This project is using goreleaser and an additional script for releasing also the Helm chart.

For starting the delivery, you need to clone this repository, then:

zsh hack/release.sh <version> <remove-git>

a concreate example is: zsh ./hack/release.sh v1.0.1 upstream

This script:

  • generates locally the helm chart with the requested version.
  • updates the helm repo index file (docs/index.yaml) file with the new release.
  • creates a new changeset with all changes generated by the new release version, then tag this changeset.
  • push changeset and associated tag to the remote git repository.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].