HUB
Sign inSign up

kvaps/linstor-client

By kvaps

•Updated over 7 years ago

linstor-client

Image
0

10K+

kvaps/linstor-client repository overview

⁠Containerized Linstor Storage

Docker images for run containerized linstor storage in your kubernetes cluster.

⁠Images

ImageBuild StatusDescription
linstor-controller⁠linstor-controller-statuslinstor-controller daemon with prostgres backend
linstor-satellite⁠linstor-satellite-statuslinstor-satellite daemon with drbd/zfs/lvm tools
linstor-client⁠linstor-client-statuslinstor-client binaries and drbdtop

⁠Requirements

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

⁠QuckStart

⁠Simple run

You can test linstor without k8s cluster, check docker.sh⁠ for more info.

⁠Controller daemon
⁠Simple solution with backing store

If you already have fault-tolerant storage, you can use it as a backend for linstor-controller's database, which will saved inside the linstor-controller daemon's container.

  • This example will deploy linstor-controller with local database:

    kubectl create -f examples/linstor-controller.yaml
    
⁠Complex solution with PostgreSQL database

Here we will use stolon⁠ and local-volumes⁠ feature for create fault-tollerance PostgreSQL database.

  • First we should add role and role binding:

    kubectl apply -f https://raw.githubusercontent.com/sorintlab/stolon/master/examples/kubernetes/role.yaml
    kubectl apply -f https://raw.githubusercontent.com/sorintlab/stolon/master/examples/kubernetes/role-binding.yaml
    
  • Initialize cluster (Generate specific configmap for stolon)

    kubectl run -i -t stolonctl --image=sorintlab/stolon:master-pg9.6 --restart=Never --rm -- /usr/local/bin/stolonctl --cluster-name=linstordb --store-backend=kubernetes --kube-resource-kind=configmap init
    
  • Then we need to create local volumes for stolon-keeper daemons.
    Let's assume that we going to use this three nodes for linstor database: node1, node2 and node3.
    Each one should have created /data/k8s/linstordb directory for store postgres data.

  • Then we should define this directories as persitentVolumes in our kubernetes cluster:

    ID=1 NODE=node1 envsubst < examples/linstordb-volume.tpl | kubectl create -f-
    ID=2 NODE=node2 envsubst < examples/linstordb-volume.tpl | kubectl create -f-
    ID=3 NODE=node3 envsubst < examples/linstordb-volume.tpl | kubectl create -f-
    
  • Now we can create database daemons:

    kubectl create -f examples/database/
    
  • And database itself:

    kubectl run -i -t psql --image=sorintlab/stolon:master-pg9.6 --restart=Never --env=PGPASSWORD=linstor --rm /usr/bin/psql -- --host linstordb --port 5432 postgres -U linstor -c 'CREATE DATABASE linstor;'
    
  • Now we ready for deploy linstor-container:

    kubectl create -f examples/linstor-cotroller-psql.yaml
    
⁠Satellite daemons
  • Before continue, please ensure that you have installed drbd9 kernel module on each satellite node.

  • Apply linstor satellite daemonset:

    kubectl create -f examples/linstor-satellite.yaml
    
  • Then label wanted nodes for run this daemonset:

    kubectl label node node{1..10} linstor-satellite=
    
⁠Usage
  • You can access to linstor console from linstor-controller container, or run new linstor-client for this purpose:

    kubectl run -i -t linstor-client --image=kvaps/linstor-client --restart=Never --env=LS_CONTROLLERS=linstor-controller --rm /bin/bash
    
  • Then read linstor documentation⁠ for define nodes and new resources.

⁠Licenses

Tag summary
Recent tags
Content type
Image
Digest
Size
69.7 MB
Last updated
over 7 years ago
docker pull kvaps/linstor-client:latest