1 ###################################################################################
2 # ============LICENSE_START=======================================================
4 # ================================================================================
5 # Copyright (C) 2020 Hcl Technologies Limited.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
19 ###################################################################################
23 The redis-cluster currently is NOT part of RIC platform & hence is completely optional.
24 This piece of document has been created as part of delivery item for below jira ticket
25 https://jira.o-ran-sc.org/browse/RIC-109
26 This ticket is about assessing the feasibility of redis-cluster (with data sharding)
27 supporting desired pod anti-affinity for high availability as per the ticket.
31 This document describes the environment/conditions used to test the feasibility of Redis
32 cluster set-up as detailed in the above ticket. Redis Cluster is a distributed implementation
33 of Redis with high performance goals. More details at https://redis.io/topics/cluster-spec
37 The set up was tested with kubernetes v1.19 cluster with
38 #. Pod topology spread constraint enabled
39 Reference: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints
40 #. CEPH as the Cluster Storage Solution.
41 Reference: https://github.com/rook/rook.github.io/blob/master/docs/rook/v1.4/ceph-filesystem.md
42 #. Three worker nodes in the kubernet cluster
46 Once environment is set-up, a redis-cluster can be set up using the helm-chart (also provided with
47 this commit). Once cluster is running, any master/slave of the redis instance pods can be deleted which
48 will be compensated automatically by new instances
50 At this stage the perl utility program (included with helm-chart) can be run. The helm chart installation
51 output generates the requirement commands to invoke.
53 This utility program identifies the missing anti-affinity(as per above ticket) of redis instances required
54 in a redis-cluster. When executed it communicates to redis nodes to switch roles (e.g. master/slave)
55 such that the end-state meets the desired anti-affinity.