Skip to content

Instantly share code, notes, and snippets.

@akutz
Last active June 14, 2017 23:29
Show Gist options
  • Save akutz/0dcd0123dbc7e56fbf130c46a942b2f3 to your computer and use it in GitHub Desktop.
Save akutz/0dcd0123dbc7e56fbf130c46a942b2f3 to your computer and use it in GitHub Desktop.
REX-Ray+CSI: Once more unto the breach

REX-Ray+CSI: Once more unto the breach

This document outlines the roadmap for supporting CSI with libStorage and REX-Ray:

Release Description
R1 Initial CSI compatibility
R2 CNCF-ready
R3 Reference CSI implementation

R1 - Initial CSI compatibility

The first release will support both CSI architectures: centralized and decentralized, as well as the hybrid model necessary to satisfy Mesos. Many thanks to @codenrhoden for providing the illustrations!

Arch Diagram
Centralized
Decentralized
Hybrid

Currently the only analogue to the CSI centralized model is K8s where there is a CO master. Docker and Mesos both function in a decentralized model with the libStorage API controller providing optional centralization.

Work Summary Story Points
#1 New REX-Ray module for CSI Ident+Node+Controller Services 21
21

R2 - CNCF-ready

The second release will represent a project ready to donate to the CNCF as the default implementation of CSI. The primary feature of this release will be support for out-of-tree drivers via Go plug-ins, making it trivial to deliver CSI compatibility for a given storage platform via REX-Ray.

Work Summary Story Points
#1 Convert existing drivers into plug-ins 40
#2 Deprecate libStorage executor 21
#3 Update build process to account for plug-ins 21
82

R3 - Reference implementation

Rounding out the roadmap is R3, the release that transforms REX-Ray from a program that embeds the libStorage API to the reference implementation of CSI. This release introduces support for distributed configuration via one or more well-known providers such as Etcd or abstraction libraries like Docker's libkv.

The introduction of distributed configuration support will sunset the libStorage API and complete the transformation of REX-Ray into a reference implementation of the CSI specification.

Work Summary Story Points
#1 Distributed configuration support 40
#2 Relocate CSI endpoint from REX-Ray to libStorage 20
60
@startuml
database storage [
Backend
Storage
<U+0020><U+0020><U+0020><U+0020>API
]
rectangle "Docker Node 1" as dnode1 {
frame "Docker" as dnode1d {
component "dockerd" as dnode1dd
}
frame "REX-Ray" as dnode1rr {
component dnode1csi [
**CSI Node+Controller**
---
libStorage Client
]
component "libS Server" as dnode1lss
}
dnode1dd <-> dnode1csi: gRPC
dnode1csi <-> dnode1lss: HTTP(s)\nJSON
}
rectangle "Docker Node 2" as dnode2 {
frame "Docker" as dnode2d {
component "dockerd" as dnode2dd
}
frame "REX-Ray" as dnode2rr {
component dnode2csi [
**CSI Node+Controller**
---
libStorage Client
]
component "libS Server" as dnode2lss
}
dnode2dd <-> dnode2csi: gRPC
dnode2csi <-> dnode2lss: HTTP(s)\nJSON
}
storage <-> dnode1lss
storage <-> dnode2lss
@enduml
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@startuml
database storage [
Backend
Storage
<U+0020><U+0020><U+0020><U+0020>API
]
rectangle "k8s Master" as knode1 {
frame "k8s" as knode1k {
component "kube-controller-manager" as knode1kd
}
frame "REX-Ray" as knode1rr {
component knode1csi [
**CSI Controller**
---
libStorage Client
]
component "libS Server" as knode1lss
}
knode1kd <-> knode1csi: gRPC
knode1csi <-> knode1lss: HTTP(s)\nJSON
}
rectangle "k8s Minion" as knode2 {
frame "k8s" as knode2k {
component "kubelet" as knode2kd
}
frame "REX-Ray" as knode2rr {
component knode2csi [
**CSI Node**
---
libStorage Client
]
}
knode2kd <-> knode2csi: gRPC
knode2csi <-> knode1lss: HTTP(s)\nJSON
}
knode1lss -> storage
knode1 -[hidden]> storage
storage -[hidden]> knode2
storage -[hidden]> knode2csi
@enduml
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="405px" preserveAspectRatio="none" style="width:883px;height:405px;" version="1.1" viewBox="0 0 883 405" width="883px" zoomAndPan="magnify"><defs><filter height="300%" id="flyetnavfj3d7" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--cluster knode1--><rect fill="#FFFFFF" filter="url(#flyetnavfj3d7)" height="382" style="stroke: #000000; stroke-width: 2.0;" width="570" x="14" y="16"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="259" y="31.5352">k8s Master</text><!--cluster knode1k--><rect fill="#FFFFFF" filter="url(#flyetnavfj3d7)" height="71" style="stroke: #000000; stroke-width: 2.0;" width="214" x="22" y="43"/><path d="M58,44 L58,52.4883 L48,62.4883 L22,62.4883 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="26" x="25" y="57.5352">k8s</text><!--cluster knode1rr--><rect fill="#FFFFFF" filter="url(#flyetnavfj3d7)" height="106" style="stroke: #000000; stroke-width: 2.0;" width="554" x="22" y="284"/><path d="M94,285 L94,293.4883 L84,303.4883 L22,303.4883 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="62" x="25" y="298.5352">REX-Ray</text><!--cluster knode2--><rect fill="#FFFFFF" filter="url(#flyetnavfj3d7)" height="382" style="stroke: #000000; stroke-width: 2.0;" width="198" x="678" y="16"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="81" x="736.5" y="31.5352">k8s Minion</text><!--cluster knode2k--><rect fill="#FFFFFF" filter="url(#flyetnavfj3d7)" height="71" style="stroke: #000000; stroke-width: 2.0;" width="88" x="733" y="43"/><path d="M769,44 L769,52.4883 L759,62.4883 L733,62.4883 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="26" x="736" y="57.5352">k8s</text><!--cluster knode2rr--><rect fill="#FFFFFF" filter="url(#flyetnavfj3d7)" height="106" style="stroke: #000000; stroke-width: 2.0;" width="182" x="686" y="284"/><path d="M758,285 L758,293.4883 L748,303.4883 L686,303.4883 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="62" x="689" y="298.5352">REX-Ray</text><!--entity knode1kd--><rect fill="#FEFECE" filter="url(#flyetnavfj3d7)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="198" x="30" y="70"/><rect fill="#FEFECE" height="5" style="stroke: #A80036; stroke-width: 1.5;" width="10" x="25" y="75"/><rect fill="#FEFECE" height="5" style="stroke: #A80036; stroke-width: 1.5;" width="10" x="25" y="96.4883"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="178" x="40" y="93.5352">kube-controller-manager</text><!--entity knode1csi--><rect fill="#FEFECE" filter="url(#flyetnavfj3d7)" height="70.9766" style="stroke: #A80036; stroke-width: 1.5;" width="166" x="30" y="311"/><rect fill="#FEFECE" height="10" style="stroke: #A80036; stroke-width: 1.5;" width="15" x="176" y="316"/><rect fill="#FEFECE" height="2" style="stroke: #A80036; stroke-width: 1.5;" width="4" x="174" y="318"/><rect fill="#FEFECE" height="2" style="stroke: #A80036; stroke-width: 1.5;" width="4" x="174" y="322"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="101" x="45" y="344.5352">CSI Controller</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="31" x2="195" y1="347.4883" y2="347.4883"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="51" y="365.0234">libStorage Client</text><!--entity knode1lss--><rect fill="#FEFECE" filter="url(#flyetnavfj3d7)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="92" x="476" y="328.5"/><rect fill="#FEFECE" height="5" style="stroke: #A80036; stroke-width: 1.5;" width="10" x="471" y="333.5"/><rect fill="#FEFECE" height="5" style="stroke: #A80036; stroke-width: 1.5;" width="10" x="471" y="354.9883"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="72" x="486" y="352.0352">libS Server</text><!--entity knode2kd--><rect fill="#FEFECE" filter="url(#flyetnavfj3d7)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="741.5" y="70"/><rect fill="#FEFECE" height="5" style="stroke: #A80036; stroke-width: 1.5;" width="10" x="736.5" y="75"/><rect fill="#FEFECE" height="5" style="stroke: #A80036; stroke-width: 1.5;" width="10" x="736.5" y="96.4883"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="51" x="751.5" y="93.5352">kubelet</text><!--entity knode2csi--><rect fill="#FEFECE" filter="url(#flyetnavfj3d7)" height="70.9766" style="stroke: #A80036; stroke-width: 1.5;" width="166" x="694" y="311"/><rect fill="#FEFECE" height="10" style="stroke: #A80036; stroke-width: 1.5;" width="15" x="840" y="316"/><rect fill="#FEFECE" height="2" style="stroke: #A80036; stroke-width: 1.5;" width="4" x="838" y="318"/><rect fill="#FEFECE" height="2" style="stroke: #A80036; stroke-width: 1.5;" width="4" x="838" y="322"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="65" x="709" y="344.5352">CSI Node</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="695" x2="859" y1="347.4883" y2="347.4883"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="114" x="715" y="365.0234">libStorage Client</text><!--entity storage--><path d="M592.5,177 C592.5,167 631,167 631,167 C631,167 669.5,167 669.5,177 L669.5,235.4648 C669.5,245.4648 631,245.4648 631,245.4648 C631,245.4648 592.5,245.4648 592.5,235.4648 L592.5,177 " fill="#FEFECE" filter="url(#flyetnavfj3d7)" style="stroke: #000000; stroke-width: 1.5;"/><path d="M592.5,177 C592.5,187 631,187 631,187 C631,187 669.5,187 669.5,177 " fill="none" style="stroke: #000000; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="602.5" y="204.5352">Backend</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="53" x="602.5" y="221.0234">Storage</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="22" x="618.5" y="237.5117">API</text><!--link knode1kd to knode1csi--><path d="M127.5497,111.4315 C124.8295,155.379 118.9311,250.6763 115.5389,305.4812 " fill="none" id="knode1kd-knode1csi" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="115.2186,310.6554,119.7671,301.9198,115.5276,305.665,111.7824,301.4254,115.2186,310.6554" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="127.8749,106.1772,123.3263,114.9128,127.5659,111.1676,131.3111,115.4072,127.8749,106.1772" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="124" y="211.0684">gRPC</text><!--link knode1csi to knode1lss--><path d="M201.5085,346.5 C283.7593,346.5 403.4126,346.5 470.8354,346.5 " fill="none" id="knode1csi-knode1lss" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="475.997,346.5,466.997,342.5,470.997,346.5,466.997,350.5,475.997,346.5" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="196.2602,346.5,205.2602,350.5,201.2602,346.5,205.2602,342.5,196.2602,346.5" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="48" x="312" y="325.0684">HTTP(s)</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="31" x="320.5" y="340.3789">JSON</text><!--link knode2kd to knode2csi--><path d="M777,111.4315 C777,155.379 777,250.6763 777,305.4812 " fill="none" id="knode2kd-knode2csi" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="777,310.6554,781,301.6554,777,305.6554,773,301.6554,777,310.6554" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="777,106.1772,773,115.1772,777,111.1772,781,115.1772,777,106.1772" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="778" y="211.0684">gRPC</text><!--link knode2csi to knode1lss--><path d="M688.6209,346.5 C650.0611,346.5 606.2155,346.5 573.1832,346.5 " fill="none" id="knode2csi-knode1lss" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="568.1786,346.5,577.1786,350.5,573.1786,346.5,577.1786,342.5,568.1786,346.5" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="693.7812,346.5,684.7812,342.5,688.7812,346.5,684.7812,350.5,693.7812,346.5" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="48" x="607" y="325.0684">HTTP(s)</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="31" x="615.5" y="340.3789">JSON</text><!--link knode1lss to storage--><path d="M535.985,328.4734 C551.3954,308.6096 576.7325,275.9503 597.3681,249.3512 " fill="none" id="knode1lss-storage" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="600.6374,245.1371,591.9601,249.7959,597.5724,249.0875,598.2807,254.6999,600.6374,245.1371" style="stroke: #A80036; stroke-width: 1.0;"/><!--link knode1 to storage--><!--link storage to knode2--><!--link storage to knode2csi--><!--
@startuml
database storage [
Backend
Storage
<U+0020><U+0020><U+0020><U+0020>API
]
rectangle "k8s Master" as knode1 {
frame "k8s" as knode1k {
component "kube-controller-manager" as knode1kd
}
frame "REX-Ray" as knode1rr {
component knode1csi [
**CSI Controller**
- - -
libStorage Client
]
component "libS Server" as knode1lss
}
knode1kd <-> knode1csi: gRPC
knode1csi <-> knode1lss: HTTP(s)\nJSON
}
rectangle "k8s Minion" as knode2 {
frame "k8s" as knode2k {
component "kubelet" as knode2kd
}
frame "REX-Ray" as knode2rr {
component knode2csi [
**CSI Node**
- - -
libStorage Client
]
}
knode2kd <-> knode2csi: gRPC
knode2csi <-> knode1lss: HTTP(s)\nJSON
}
knode1lss -> storage
knode1 -[hidden]> storage
storage -[hidden]> knode2
storage -[hidden]> knode2csi
@enduml
PlantUML version 1.2017.13(Wed May 10 11:52:33 CDT 2017)
(GPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.8.0_20-b26
Operating System: Mac OS X
OS Version: 10.12.5
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>
@startuml
database storage [
Backend
Storage
<U+0020><U+0020><U+0020><U+0020>API
]
rectangle "Mesos Node 1" as mnode1 {
frame "Mesos" as mnode1m {
component "mesosd" as mnode1md
}
frame "REX-Ray" as mnode1rr {
component mnode1csi [
**CSI Node+Controller**
---
libStorage Client
]
component "libS Server" as mnode1lss
}
mnode1md <-> mnode1csi: gRPC
mnode1csi <-> mnode1lss: HTTP(s)\nJSON
}
rectangle "Mesos Node 2" as mnode2 {
frame "Mesos" as mnode2m {
component "mesosd" as mnode2md
}
frame "REX-Ray" as mnode2rr {
component mnode2csi [
**CSI Node+Controller**
---
libStorage Client
]
}
mnode2md <-> mnode2csi: gRPC
mnode2csi <-> mnode1lss: HTTP(s)\nJSON
}
mnode1lss -> storage
mnode1 -[hidden]> storage
storage -[hidden]> mnode2
storage -[hidden]> mnode2csi
@enduml
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment