Coder Social home page Coder Social logo

dravanet / truenas-csi Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 669 KB

CSI driver utilizing TrueNAS for volume management

License: BSD 2-Clause "Simplified" License

Go 98.68% Dockerfile 0.65% Shell 0.24% Makefile 0.44%
csi-driver truenas golang

truenas-csi's Introduction

github.com/dravanet/truenas-csi

CSI driver utilizing TrueNAS for volume management.

Warning: in BETA state.

Deployment

For deployment, see truenas-csi-chart.

Configuration

TL;DR see examples.

The driver needs configuration to access one or more TrueNAS instances. Check config.go for full configuration structure.

The configuration has yaml syntax, must be passed to the application with -controller-config argument. This enables controller services.

The configuration file format is:

truenas-1: <truenas-config>
backup: <truenas-config>
default: <truenas-config>

A truenas-config has the structure:

apiurl: <url of truenas api>
[username: <username for api access>]
[password: <password for api access>]
[apikey: <api key for api access>]
[nfs: <nfs configuration>]
[iscsi: <iscsi configuration>]
configurations:
  sub-config-1: <configuration>
  default: <configuration>

apikey is recommended over username+password.

nfs configuration has the strucure:

server: <server address>
[allowedhosts: [array of allowed hosts to access share]]
[allowednetworks: [array of allowed networks to access share]]

iscsi configuration has the structure:

portal: <portal address>
portalid: <portal id in TrueNAS>

Each configuration section has the structure:

dataset: <root dataset>
deletePolicy: [delete|retain]
[sparse: [true|false]]
[nfs: <nfs sub-configuration>]
[iscsi: <iscsi sub-configuration>]

Detailed operation

During volume create, evaluating capability requests, the driver makes a decision to create an nfs or an iscsi share.

Then a dataset is created under the selected configuration section. If nfs was chosen, an nfs export is created according to the selected configuration's nfs section. If iscsi was chosen, a new secret/target is created according to the selected configuration's iscsi section. Then, connection parameters are returned in the volume_context.

NAS configuration selection

On CreateVolume request, parameters may specify which TrueNAS to use, and may select its sub-configuration. Any of these parameters may be omitted, then default entries are looked up.

Parameter name Effect
truenas-csi.dravanet.net/nas NAS Selection
truenas-csi.dravanet.net/config Sub-configuration selection

Implementation goals

  • Use TrueNAS API only.
  • Meet CSI requirements as much as can
    • idempotency during volume operations
    • implement as much capabilities

Capabilities

The following capabilities are supported from CSI Specification 1.3.0:

Plugin:

  • online volume expansion

Controller:

  • create/delete volume
  • expand-volume

Node:

  • stage-unstage volume
  • get volume stats
  • expand volume

Planned features

  • Snapshot handling

Related projects

truenas-csi's People

Contributors

rkojedzinszky avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.