Code Monkey home page Code Monkey logo

piraeus's Introduction

Piraeus Datastore - HA Datastore for Kubernetes

Piraeus is a high performance (i.e., in Linux kernel), highly-available, simple, secure, and cloud agnostic data store for Kubernetes.

Getting started

Requirements

Using a Kubernetes cluster with at least 4 worker nodes is recommended. Due to CSI compatibility, kubelet version must be one of:

  • v1.14.x
  • v1.15.x
  • v1.16.x
  • v1.17.x

The hosts should use Docker as their container runtime and be running one of the following distributions to enable automatic DRBD kernel module injection:

  • CentOS/RHEL 7
  • CentOS/RHEL 8
  • Ubuntu 16
  • Ubuntu 18

Node selection

The 3 nodes on which piraeus runs etcd clusters should be labelled as follows:

kubectl label nodes $NODE_NAME piraeus/etcd=true

The nodes on which piraeus should provide or consume storage should be labelled as follows:

kubectl label nodes $NODE_NAME piraeus/node=true

These nodes must also have the appropriate kernel development package installed unless DRBD is already present. This is kernel-devel for CentOS based distributions and linux-headers-`uname -r` for Ubuntu.

Installation

Install as follows:

kubectl apply -f https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/deploy/all.yaml

This may take several minutes. You may observe the pods by command:

kubectl -n kube-system get pod -l app.kubernetes.io/name=piraeus

Once the pods have started, the status of Piraeus can be checked by following commands.

On each Kubernetes work node where piraeus is deployed:

/opt/piraeus/client/linstor node list

Also on Kuberntes master nodes:

kubectl -n piraeus-system exec -it piraeus-controller-0 -- linstor node list

This should show that the selected nodes are Online at the LINSTOR level.

Upgrade

all.yaml is only for installation. For upgrade, please use upgrade.yaml. It skips etcd upgrade (which is dangerous), and storageclass upgrade (which is immutable).

kubectl apply -f https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/deploy/upgrade.yaml

Using storage (demo)

Piraeus preconfigures a DfltStorPool by using LINSTOR's FileThin backend, which is ready to use after yaml deployment.

The demo directory contains examples of how to use DfltStorPool. For instance:

kubectl apply -f https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/demo/demo-sts.yaml

This demo statefulset is a 3-node MySQL cluster. Demo pods and pvcs are under piraeus namespace.

Storage configuration

Piraeus can use storage that is local to the application as well as storage on other nodes. On the nodes that should provide storage, backing devices must be available. Assuming the hosts have empty storage devices of at least 1GB capacity, they can be listed as follows:

linstor physical-storage list

Piraeus can then configure LVM on these devices and create a storage pool. Use the following steps for each node:

linstor physical-storage create-device-pool --pool-name pool0 LVM $NODE_NAME /dev/$DEVICE
linstor storage-pool create lvm $NODE_NAME DfltStorPool pool0

Components

Piraeus consists of a number of open source components.

DRBD

DRBD is used as the underlying storage replication mechanism. Documentation is provided by LINBIT.

LINSTOR

LINSTOR is used for storage management. Documentation is provided by LINBIT.

LINSTOR CSI Plugin

The LINSTOR CSI plugin integrates LINSTOR with the Container Storage Interface. Documentation is included with the LINSTOR documentation.

Structure of this repository

dockerfiles

This directory contains Dockerfiles and shell scripts for Piraeus components. Each of the subdirectories has a README.md with more information.

piraeus's People

Contributors

alexzhc avatar rck avatar joelcolledge avatar pigmej 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.