Giter Club home page Giter Club logo

sandstone-csi-driver's Introduction

SandStone CSI 1.0.0

Container Storage Interface (CSI) driver, provisioner, and attacher for SandStone Block/NFS/ISCSI.

Overview

SandStone CSI plugins implement an interface between CSI enabled Container Orchestrator (CO) and SandStone cluster. It allows dynamically provisioning SandStone volumes and attaching them to workloads. Current implementation of SandStone CSI plugins was tested in Kubernetes environment (requires Kubernetes 1.11+), but the code does not rely on any Kubernetes specific calls (WIP to make it k8s agnostic) and should be able to run with any CSI enabled CO.

For details about configuration and deployment of NFS CSI plugins, please refer the documentation.

For example usage of this NFS CSI plugins, see examples below.

Before to go, you should have installed SandStone USP

You can get latest version of SandStone CSI driver at docker hub

Deployment

In this section,you will learn how to deploy the CSI driver and some necessary sidecar containers

Prepare cluster

Cluster version
Kubernetes 1.13 +
SandStone USP 3.0+

Deploy CSI plugins

Plugins

Get yaml file

Get yaml file from below links:

Create sidecar(Helper container)& node plugin

  1. Deploy RBACs for sidecar containers and node plugins:

    $ kubectl create -f csi-attacher-rbac.yaml
    $ kubectl create -f csi-nodeplugin-rbac.yaml
    $ kubectl create -f csi-provisioner-rbac.yaml
  2. Deploy CSI sidecar containers:

    $ kubectl create -f csi-sandstone-nfsplugin-attacher.yaml
    $ kubectl create -f csi-sandstone-nfsplugin-provisioner.yaml
  3. Deploy NFS CSI driver:

    $ kubectl create -f csi-sandstone-nfsplugin.yaml
  4. Verify pod:

    $ kubectl get all

    kube_info

Congratulation to you, you have just finished the deployment. Now you can use them to provisioning SandStone NFS service .

Usage

In this section,you will learn how to dynamic provision NFS with SandStone CSI driver. Here will Assumes that you have installed SandStone USP Cluster.

Preparation

To continue,make sure you have finish the Deployment part.

Login to you SDS dashboard, your dashboard address should be https://your_domain_ip

dashboard

Creating NFS Gateway

sandstone_nfs_gateway

Edit yaml for StorageClass

Sample(storageclass.yaml) & Explanation

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
   name: csi-nfs
provisioner: csi-sandstone-nfsplugin
parameters:

    omip: 10.10.199.121    #om dashboard ip
    
    pool: pool01           #name of storage pool 
    
    gateway: gateway01     #name of nfs gateway 
    
    vip: 10.10.15.199      #vip
    
    omuser: admin          #om user name
    
    omsecret: 123456       #om password

Create storageclass

$ kubectl create -f storageclass.yaml

Edit yaml for PersistentVolumeClaim

Sample(pvc.yaml)

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-pvc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
  storageClassName: csi-nfs

Create pvc

$ kubectl create -f pvc.yaml

Verify

  • Run kubectl check command

    $ kubectl get pvc

    pvc_info

  • Check at om dashboard

    sandstone_nfs_share

Edite yaml for pod

sample(pod.yaml)

apiVersion: v1
kind: Pod
metadata:
  name: nginx-nfs-csi-demo-pod
spec:
  containers:
  - image: nginx
    imagePullPolicy: IfNotPresent
    name: nginx
    ports:
    - containerPort: 80
      protocol: TCP
    volumeMounts:
      - mountPath: /usr/share/nginx/html
        name: data-nfsplugin 
  volumes:
  - name: data-nfsplugin
    persistentVolumeClaim:
      claimName: nfs-pvc

Create pod

$ kubectl create -f pod.yaml

Verify pod

  $ kubectl get pods | grep nginx-nfs-csi-demo-pod

pod_info

sandstone-csi-driver's People

Contributors

sandstone-storage avatar

Stargazers

yma avatar Aric Smith 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.