Sign inSign up

kvaps/linstor-satellite

By kvaps

‱Updated about 5 years ago

linstor-satellite

Image
1

10K+

kvaps/linstor-satellite repository overview

⁠Kube-Linstor

Containerized Linstor Storage easy to run in your Kubernetes cluster.

⁠Images

⁠Requirements

  • Working Kubernetes cluster (v1.17 or higher).
  • DRBD9 kernel module installed on each sattelite node.
  • PostgeSQL database / etcd or any other backing store for redundancy.

⁠QuckStart

Kube-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.
  • Linstor-stork - Stork is a scheduler extender plugin for Kubernetes which allows a storage driver to give the Kubernetes scheduler hints about where to place a new pod so that it is optimally located for storage performance.
⁠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.

Create linstor namespace.

kubectl create ns linstor
⁠Database
  • Install stolon⁠ chart:

    helm repo add stable https://kubernetes-charts.storage.googleapis.com
    helm install linstor-db stable/stolon --namespace linstor -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 --namespace linstor
    
    helm install \
      --set node=node2,path=/var/lib/linstor-db \
      data-linstor-db-stolon-keeper-1 \
      helm/pv-hostpath --namespace linstor
    
    helm install \
      --set node=node3,path=/var/lib/linstor-db \
      data-linstor-db-stolon-keeper-2 \
      helm/pv-hostpath --namespace linstor
    

    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 linstor helm/kube-linstor --namespace linstor -f examples/linstor.yaml
    

⁠Usage

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

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

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

⁠SSL notes

This chart enables SSL encryption for control-plane by default. It does not affect the DRBD performance but makes your LINSTOR setup more secure.

Any way, do not forget to specify --communicates-type SSL option during node creation, example:

linstor node create alpha 1.2.3.4 --communication-type SSL

If you want to have external access, you need to download certificates for linstor client:

kubectl get secrets --namespace linstor linstor-linstor-client-tls \
  -o go-template='{{ range $k, $v := .data }}{{ $v | base64decode }}{{ end }}'

Then follow official linstor documentation⁠ to configure client.

⁠Enable SSL for existing nodes

If you're switching your setup from PLAIN to SSL, this simple command will reconfigure all your nodes:

linstor n l | awk '/(PLAIN)/ { print "linstor n i m -p 3367 --communication-type SSL " $2 " default" }' | sh -ex

⁠Additional Information

⁠Licenses

Tag summary

Content type

Image

Digest

Size

239.9 MB

Last updated

about 5 years ago

docker pull kvaps/linstor-satellite:v1.14.0