Git Product home page Git Product logo

openshift-redis-sentinel's Introduction

Redis Sentinel Deployment Template for OpenShift (Origin)

Overview

This project aims to provide a missing template for creating Redis Sentinel cluster in OpenShift Origin. The basic idea is to create a standalone pod with 1 replica to launch a redis master along with a sentinel container in it. Then launch a DeploymentConfig (dc) to create and scale multiple redis slaves. This dc contains a pod with a redis slave container and redis sentinel container.

Prerequisites

Before using the template including in this project, you need to make sure the following prerequisites:

  1. OpenShift Origin server v3.6.0 or above available
  2. OpenShift cli tool oc must be installed in your host machine
  3. A private registry or using Docker Hub to maintain your redis sentinel image

Note: you can get OpenShift via installing MiniShift or download OpenShift Origin server from Github into your VM (RHEL or CentOS recommended)

Import Template

The OpenShift templates and image streams are often been created and maintained within openshift project, which is one of internal projects by OpenShift itself. To import your template, you need to login as system:admin to do that. The sample script would be something as follows:

$ cd openshift-redis-sentinel
$ oc login -u system:admin -n openshift
$ oc create -f templates/redis-sentinel-template.json

Deploy Your App using Template

  1. Deploy Redis Sentinel app into your project
$ oc login -u <username> -p <password> -n <your_project>
$ oc process openshift//redis-sentinel | oc create -f -
  1. Get ingress port and test your redis sentinel
# Get redis ingress port
$ oc export svc redis-sentinel-ingress | grep 'nodePort'
#   - nodePort: 31443
# Take minishift as instance
$ redis-cli -h $(minishift ip) -p 31443

Important Notice

When deployment is completed, the Redis Sentinel cluster is actually not fully up and running. You need to wait for a short while and attempt to login redis via cli by the ingress port exposed by service redis-sentinel-ingress.

References

This project is inspired by the following repo or resources. Many thanks to the respected authors.

openshift-redis-sentinel's People

Contributors

eliu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.