Docker images for run containerized linstor storage in your kubernetes cluster.
| Image | Build Status | Description |
|---|---|---|
| linstor-controller | linstor-controller daemon with prostgres backend | |
| linstor-satellite | linstor-satellite daemon with drbd/zfs/lvm tools | |
| linstor-client | linstor-client binaries and drbdtop |
You can test linstor without k8s cluster, check docker.sh for more info.
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
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
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=
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.
docker pull kvaps/linstor-client:latest