Skip to content
Containerized Linstor Storage and Operator easy to run in your Kubernetes cluster.
Dockerfile Smarty Shell
Branch: master
Clone or download
Latest commit fe6c708 Jan 15, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dockerfiles fix operator Jan 14, 2020
examples Add Helm3 support Jan 3, 2020
helm update chart Jan 15, 2020
.gitlab-ci.yml upd: build scripts Dec 5, 2019
LICENSE Create LICENSE Jul 2, 2018
README.md Add Helm3 support Jan 3, 2020

README.md

Kube-Linstor

Containerized Linstor Storage and Operator easy to run in your Kubernetes cluster.

Images

Image Build Status
linstor-controller linstor-controller-status
linstor-satellite linstor-satellite-status
linstor-stunnel linstor-stunnel-status
linstor-operator linstor-operator-status

Requirements

  • Working Kubernetes cluster
  • DRBD9 kernel module installed on each sattelite node
  • PostgeSQL database or other backing store for redundancy

Limitations

  • Containerized Linstor satellites tested only on Ubuntu and Debian systems.

QuckStart

Linstor consists of several components:

  • Linstor-controller - Controller is main control point for Linstor, it provides API for clients and communicates with satellites for creating and monitor DRBD-devices.
  • Linstor-satellite - Satellites run on every node, they listen and perform controller tasks. They operates directly with LVM and ZFS subsystems.
  • Linstor-csi - CSI driver provides compatibility level for adding Linstor support for Kubernetes

We are also using:

  • Stunnel - for encrypt all connections between linstor clients and controller
  • Linstor-operator - for automate ususual tasks, eg. create linstor nodes and storage pools

Preparation

Install Helm and clone this repository, then cd into it.

NOTE:
Commands below provided for Helm v3 but Helm v2 is also supported.
You can use helm template instead of helm install, this is also working as well.

Database

  • Install stolon chart:

    helm repo add stable https://kubernetes-charts.storage.googleapis.com
    helm install linstor-db stable/stolon -f examples/linstor-db.yaml
    

    NOTE:
    In case of update your stolon add --set job.autoCreateCluster=false flag to not reinitialisate your cluster

  • Create Persistent Volumes:

    helm install \
      --set node=node1,path=/var/lib/linstor-db \
      data-linstor-db-stolon-keeper-0 \
      helm/pv-hostpath
    
    helm install \
      --set node=node2,path=/var/lib/linstor-db \
      data-linstor-db-stolon-keeper-1 \
      helm/pv-hostpath
    
    helm install \
      --set node=node3,path=/var/lib/linstor-db \
      data-linstor-db-stolon-keeper-2 \
      helm/pv-hostpath
    

    Parameters name and namespace must match the PVC's name and namespace of your database, node should match exact node name.

    Check your PVC/PV list after creation, if everything right, they should obtain Bound status.

  • Connect to database:

    kubectl exec -ti -n linstor linstor-db-stolon-keeper-0 bash
    PGPASSWORD=$(cat $STKEEPER_PG_SU_PASSWORDFILE) psql -h linstor-db-stolon-proxy -U stolon postgres
    
  • Create user and database for linstor:

    CREATE DATABASE linstor;
    CREATE USER linstor WITH PASSWORD 'hackme';
    GRANT ALL PRIVILEGES ON DATABASE linstor TO linstor;
    

Linstor

  • Install kube-linstor chart:

    helm install -g helm/kube-linstor --namespace linstor -f examples/linstor-db.yaml
    

Usage

You can get interactive linstor shell by simple exec into linstor-controller container:

kubectl exec -ti -n linstor linstor-controller-0 linstor

Refer to official linstor documentation for define nodes and create new resources.

Licenses

You can’t perform that action at this time.