forked from contiv/contiv.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvolplugin.html
576 lines (498 loc) · 24.8 KB
/
volplugin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Learn about Contiv Storage.">
<link rel="shortcut icon" href="/assets/images/favicon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<title>Volplugin - Contiv</title>
<link href="/assets/stylesheets/application-799c3eac.css" rel="stylesheet"/>
<!--[if lt IE 9]><script src="/assets/javascripts/html5shiv-8b3747c5.js"></script><script src="/assets/javascripts/respond.min-88c91176.js"></script><![endif]-->
</head>
<body id="page-Volplugin" class=" page-Volplugin layout-docs page-sub">
<div id="header" class="navbar-static-top">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="navbar-header">
<div class="navbar-brand">
<a class="logo" href="/">Contiv</a>
</div>
<button class="navbar-toggle" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="buttons hidden-xs">
<nav role="navigation">
<ul class="main-links nav navbar-nav navbar-left">
<li class="first li-under"><a href="/install/index.html">Getting Started</a></li>
<li class="li-under"><a href="http://docs.contiv.io/" target="_blank">Docs</a></li>
<li class="li-under"><a href="/articles/index.html">Articles</a></li>
</ul>
<ul class="external-links nav navbar-nav navbar-left">
<li class="github">
<a href="https://github.com/contiv" target="_blank">GitHub</a>
</li>
</ul>
<ul class="external-links nav navbar-nav navbar-left">
<li>
<a href="https://twitter.com/projectcontiv" target="_blank"><i class="fa fa-twitter"></i></a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
<div class="sidebar-overlay"></div>
<aside id="sidebar" class="sidebar sidebar-default sidebar-fixed-right" role="navigation">
<div class="sidebar-header header-cover">
<div class="sidebar-image">
<img src="/assets/images/[email protected]" width="49px" height="56px">
</div>
</div>
<ul class="main nav sidebar-nav">
<li class="first"><a href="/intro/index.html">Intro</a></li>
<li class=""><a href="/docs/index.html">Docs</a></li>
</ul>
<div class="divider"></div>
<ul class="external nav sidebar-nav">
<li class=""><a class="v-btn gray sml" href="https://github.com/contiv"><svg id="svg-download" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;">
<style>
</style>
<path class="" d="M13,0H1C0.5,0,0,0.5,0,1v12c0,0.5,0.5,1,1,1h4.7c0,0,0,0,0-0.1c0-0.2,0-0.6,0-1.1c-1.8,0.4-2.2-0.9-2.2-0.9
c-0.3-0.8-0.7-1-0.7-1c-0.6-0.4,0-0.4,0-0.4c0.7,0,1,0.7,1,0.7c0.6,1,1.5,0.7,1.9,0.5c0.1-0.4,0.2-0.7,0.4-0.9c-1.5-0.2-3-0.7-3-3.2
c0-0.7,0.3-1.3,0.7-1.8C3.7,5.8,3.5,5.1,3.9,4.2c0,0,0.6-0.2,1.8,0.7c0.5-0.1,1.1-0.2,1.6-0.2c0.6,0,1.1,0.1,1.6,0.2
c1.3-0.8,1.8-0.7,1.8-0.7c0.4,0.9,0.1,1.6,0.1,1.7c0.4,0.5,0.7,1,0.7,1.8c0,2.5-1.5,3.1-3,3.2C8.7,11.1,9,11.5,9,12.1
c0,0.9,0,1.6,0,1.8c0,0,0,0,0,0.1h4c0.5,0,1-0.5,1-1V1C14,0.5,13.5,0,13,0z"/>
</svg>
GitHub</a></li>
</ul>
</aside>
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-3 col-xs-12">
<div class="docs-sidebar hidden-print affix-top" role="complementary">
<ul class="nav docs-sidenav">
<li>
<a href="/docs/index.html">Documentation Home</a>
</li>
<li>
<a href="/docs/netplugin.html">Contiv Network</a>
</li>
<li class="active">
<a href="/docs/volplugin.html">Contiv Storage</a>
</li>
</ul>
</div>
</div>
<div id="main-content" class="col-sm-9 col-md-9 col-xs-12" role="main">
<div class="bs-docs-section">
<h1>volplugin</h1>
<h2>Getting Started</h2>
<p>This will assist you getting started with our 3 VM test environment. After
that, you will want to go to the "Configure Services" section shortly below.</p>
<h3>Clone and build the project</h3>
<p>Please see the <a href="https://github.com/contiv/volplugin/blob/master/README.md#prerequisites">prerequisites in the README</a>
before attempting these instructions.</p>
<h3>On Linux (without a VM):</h3>
<p>Clone and build the project:</p>
<ul>
<li><a name="git_clone_https_github_com_contiv_volplugin"/><a href="#git_clone_https_github_com_contiv_volplugin"><code>git clone https://github.com/contiv/volplugin</code></a>
</li>
<li><code>make run-build</code>
<ul>
<li>This will install some utilities for building the software in your
<a name="_GOPATH"/><a href="#_GOPATH"><code>$GOPATH</code></a>, as well as the <code>volmaster</code>, <code>volplugin</code> and <code>volcli</code>
utilities.
</li>
</ul>
</li>
</ul>
<h4>Everywhere else (with a VM):</h4>
<ul>
<li><a name="git_clone_https_github_com_contiv_volplugin"/><a href="#git_clone_https_github_com_contiv_volplugin"><code>git clone https://github.com/contiv/volplugin</code></a>
</li>
<li><a name="make_start"/><a href="#make_start"><code>make start</code></a>
</li>
</ul>
<p>The build and each binary will be on the VM in <code>/opt/golang/bin</code>.</p>
<h2>Do it yourself</h2>
<h3>Install Dependencies</h3>
<p>You may wish to use one of our <a href="https://github.com/contiv/volplugin/releases">nightly releases</a> for these steps. It
will be much simpler than building the applications.</p>
<ul>
<li><a href="https://github.com/coreos/etcd/releases/tag/v2.2.0">etcd release notes and install instructions</a>
<ul>
<li>We currently support versions 2.0 and up.
</li>
</ul>
</li>
<li><a href="http://docs.ceph.com/docs/master/start/">Ceph</a>
<ul>
<li>If you have not installed Ceph before, a quick installation guide <a href="http://docs.ceph.com/docs/master/start/">is here</a>.
</li>
<li>You can find ansible to configure Ceph <a href="https://github.com/ceph/ceph-ansible">here</a>.
</li>
<li>Ceph can be a complicated beast to install. If this is your first time
using the project, please be aware there are pre-baked VMs that will work
for you on any unix operating system. <a href="https://github.com/contiv/volplugin/blob/master/README.md#running-the-processes">See the README for more information</a>.
</li>
</ul>
</li>
<li>Start volmaster in debug mode (as root): <a name="volmaster_debug_amp_"/><a href="#volmaster_debug_amp_"><code>volmaster --debug &</code></a>
<ul>
<li>volmaster has a debug mode as well, but it's really noisy, so avoid using
it with background processes. volplugin currently connects to volmaster
using port 9005, but this will be variable in the future.
</li>
</ul>
</li>
<li>Start volsupervisor (as root): <a name="volsupervisor_amp_"/><a href="#volsupervisor_amp_"><code>volsupervisor &</code></a>
<ul>
<li>Note that debug mode for this tool is very noisy and is not recommended.
</li>
</ul>
</li>
<li>Start volplugin in debug mode (as root): <code>volplugin --debug &</code>
<ul>
<li>If you run volplugin on multiple hosts, you can use the <a name="_master"/><a href="#_master"><code>--master</code></a> flag to
provide a ip:port pair to connect to over http. By default it connects to
<code>127.0.0.1:9005</code>.
</li>
</ul>
</li>
</ul>
<h2>Configure Services</h2>
<p>Ensure ceph is fully operational, and that the <code>rbd</code> tool works as root.</p>
<ol>
<li>Upload a tenant policy with <code>volcli tenant upload tenant1</code>. It accepts the
policy from stdin, e.g.: <code>volcli tenant upload tenant1 < mypolicy.json</code>
<ul>
<li>You can find some examples of policy in
<a href="https://github.com/contiv/volplugin/tree/master/systemtests/testdata">systemtests/testdata</a>.
</li>
</ul>
</li>
</ol>
<h3>Run Stuff!</h3>
<p>Let's start a container with a volume.</p>
<ul>
<li>Create a volume that refers to the volplugin driver:
</li>
</ul>
<pre class="highlight plaintext"><code>docker volume create -d volplugin tenant1/test
</code></pre>
<ul>
<li><p>Notes:</p>
<ul>
<li><a name="test"/><a href="#test"><code>test</code></a> is the name of your volume, and it lives under tenant <code>tenant1</code>,
which you uploaded with <code>volcli tenant upload</code>.
</li>
<li>This will inherit the properties of your tenant policy, so you will get a
volume with the appropriate size, iops, etc.
</li>
<li>Note there are numerous options (see below) you can use to declare overrides
for most parameters in the policy configuration.
</li>
</ul>
</li>
<li><p>Run a container that uses it:</p>
</li>
</ul>
<pre class="highlight plaintext"><code>docker run -it -v tenant1/test:/mnt ubuntu bash
</code></pre>
<ul>
<li>Run <a name="mount_grep_mnt"/><a href="#mount_grep_mnt"><code>mount | grep /mnt</code></a> in the container, you should see the <code>/dev/rbd#</code>
attached to that directory.
<ul>
<li>Once you have a multi-host setup, anytime the volume is not mounted, it
can be mounted on any host that has a connected rbd client available, and
volplugin running.
</li>
</ul>
</li>
</ul>
<h2>Architecture</h2>
<p>"volplugin", despite the name, is actually a suite of components:</p>
<p><code>volmaster</code> is the master process. It exists to coordinate the volplugins in a
way that safely manages container volumes. It talks to <code>etcd</code> to keep its
state.</p>
<p><code>volplugin</code> is the slave process. It exists to bridge the state management
between <code>volmaster</code> and <code>docker</code>, and to mount volumes on specific hosts.</p>
<p><code>volcli</code> is a utility for managing <code>volmaster</code>'s data. It makes both REST calls
into the volmaster and additionally can write directly to etcd.</p>
<h3>Organizational Architecture</h3>
<p><code>volmaster</code> is completely stateless, and can be run multi-host for redundancy.
<code>volmaster</code> needs both root permissions, and capability to manipulate RBD
images with the <code>rbd</code> tool.</p>
<p><code>volsupervisor</code> handles scheduled and supervised tasks such as snapshotting. It
may only be deployed on one host at a time.</p>
<p><code>volplugin</code> needs to run on every host that will be running containers. Upon
start, it will create a unix socket in the appropriate plugin path so that
docker recognizes it. This creates a driver named <code>volplugin</code>.</p>
<p><code>volcli</code> is a management tool and can live anywhere that has access to the etcd
cluster and volmaster.</p>
<h3>Security Architecture</h3>
<p>There is none currently. This is still an alpha, security will be a beta
target.</p>
<h3>Network Architecture</h3>
<p><code>volmaster</code>, by default, listens on <code>0.0.0.0:9005</code>. It provides a REST
interface to each of its operations that are used both by <code>volplugin</code> and
<code>volcli</code>. It connects to etcd at <code>127.0.0.1:2379</code>, which you can change by
supplying <code>--etcd</code> one or more times.</p>
<p><code>volsupervisor</code> needs root, connections to etcd, and access to ceph <code>rbd</code> tools
as admin.</p>
<p><code>volplugin</code> contacts the volmaster but listens on no network ports (it uses a
unix socket as described above, to talk to docker). It by default connects to
the volmaster at <code>127.0.0.1:9005</code> and must be supplied the <code>--master</code> switch to
talk to a remote <code>volmaster</code>.</p>
<p><code>volcli</code> talks to both <code>volmaster</code> and <code>etcd</code> to communicate various state and
operations to the system.</p>
<h2>Configuration</h2>
<p>This section describes various ways to manipulate volplugin through
configuration and options.</p>
<h3>Volume Formatting</h3>
<p>Because of limitations in the docker volume implementation, we use a <em>pattern</em>
to describe volumes to docker. This pattern is <code>tenant-name/volume-name</code>, and
is supplied to <code>docker volume create --name</code> and transfers to <code>docker run -v</code>.</p>
<p>For example, a typical use of volplugin might work like this presuming we have
a tenant uploaded named <code>tenant1</code>:</p>
<pre class="highlight plaintext"><code>$ docker volume create -d volplugin --name tenant1/foo
$ docker run -it -v tenant1/foo:/mnt ubuntu bash
</code></pre>
<p>This pattern creates a volume called <code>foo</code> in <code>tenant1</code>'s default ceph pool. If
you wish to change the pool (or other options), see "Driver Options" below.</p>
<h3>JSON Tenant Configuration</h3>
<p>Tenant configuration uses JSON to configure the default volume parameters such
as what pool to use. It is uploaded to etcd by the <code>volcli</code> tool.</p>
<p>Here is an example:</p>
<pre class="highlight javascript"><code><span class="p">{</span>
<span class="s2">"default-options"</span><span class="err">:</span> <span class="p">{</span>
<span class="s2">"size"</span><span class="err">:</span> <span class="s2">"10MB"</span><span class="p">,</span>
<span class="s2">"snapshots"</span><span class="err">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="s2">"snapshot"</span><span class="err">:</span> <span class="p">{</span>
<span class="s2">"frequency"</span><span class="err">:</span> <span class="s2">"30m"</span><span class="p">,</span>
<span class="s2">"keep"</span><span class="err">:</span> <span class="mi">20</span>
<span class="p">},</span>
<span class="s2">"filesystem"</span><span class="err">:</span> <span class="s2">"btrfs"</span><span class="p">,</span>
<span class="s2">"ephemeral"</span><span class="err">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="s2">"rate-limit"</span><span class="err">:</span> <span class="p">{</span>
<span class="s2">"write-iops"</span><span class="err">:</span> <span class="mi">1000</span><span class="p">,</span>
<span class="s2">"read-iops"</span><span class="err">:</span> <span class="mi">1000</span><span class="p">,</span>
<span class="s2">"write-bps"</span><span class="err">:</span> <span class="mi">100000000</span><span class="p">,</span>
<span class="s2">"read-bps"</span><span class="err">:</span> <span class="mi">100000000</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="s2">"filesystems"</span><span class="err">:</span> <span class="p">{</span>
<span class="s2">"btrfs"</span><span class="err">:</span> <span class="s2">"mkfs.btrfs %"</span><span class="p">,</span>
<span class="s2">"ext4"</span><span class="err">:</span> <span class="s2">"mkfs.ext4 -m0 %"</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>Let's go through what these parameters mean.</p>
<ul>
<li><code>default-options</code>: the options that will be persisted unless overridden (see
"Driver Options" below)
<ul>
<li><a name="pool"/><a href="#pool"><code>pool</code></a>: this option is <strong>required</strong>. It specifies the ceph pool volumes
will be added to by default.
</li>
<li><a name="size"/><a href="#size"><code>size</code></a>: the size of the volume. Required is a unit of measurement like <code>GB</code>, <code>KB</code>, <code>MB</code> etc.
</li>
<li><a name="snapshots"/><a href="#snapshots"><code>snapshots</code></a>: use the snapshots facility.
</li>
<li><a name="snapshot"/><a href="#snapshot"><code>snapshot</code></a>: sub-level configuration for snapshots
</li>
<li><code>frequency</code>: the frequency between snapshots in Go's <a href="https://golang.org/pkg/time/#ParseDuration">duration notation</a>
</li>
<li><a name="keep"/><a href="#keep"><code>keep</code></a>: how many snapshots to keep
</li>
<li><a name="filesystem"/><a href="#filesystem"><code>filesystem</code></a>: which filesystem to use. See below for how this works.
</li>
<li><a name="ephemeral"/><a href="#ephemeral"><code>ephemeral</code></a>: when <code>true</code>, deletes volumes upon <code>docker volume rm</code>.
</li>
<li><a name="rate_limit"/><a href="#rate_limit"><code>rate-limit</code></a>: sub-level configuration for rate limiting.
</li>
<li><a name="write_iops"/><a href="#write_iops"><code>write-iops</code></a>: Write IOPS
</li>
<li><a name="read_iops"/><a href="#read_iops"><code>read-iops</code></a>: Read IOPS
</li>
<li><a name="read_bps"/><a href="#read_bps"><code>read-bps</code></a>: Read b/s
</li>
<li><a name="write_bps"/><a href="#write_bps"><code>write-bps</code></a>: Write b/s
</li>
</ul>
</li>
<li><code>filesystems</code>: Provides a map of filesystem -> command for volumes to use in
the <code>filesystem</code> option.
<ul>
<li>Commands are run when the filesystem is specified and the volume has not
been created already.
</li>
<li>Each command must contain a <a name="_"/><a href="#_"><code>%</code></a>, which will be replaced with the block
device to be used. Supply <code>%%</code> to use a literal <code>%</code>.
</li>
<li>Commands run in a POSIX (not bash, zsh) shell.
</li>
<li>If the <a name="filesystems"/><a href="#filesystems"><code>filesystems</code></a> block is omitted, <code>mkfs.ext4 -m0 %</code> will be applied to
all volumes within this tenant.
</li>
</ul>
</li>
</ul>
<p>You supply them with <code>volcli tenant upload <tenant name></code>. The JSON itself is
provided via standard input, so for example if your file is <code>tenant2.json</code>:</p>
<pre class="highlight plaintext"><code>$ volcli tenant upload myTenant < tenant2.json
</code></pre>
<h3>Driver Options</h3>
<p>Driver options are passed at <code>docker volume create</code> time with the <code>--opt</code> flag.
They are <code>key=value</code> pairs and are specified as such, f.e.:</p>
<pre class="highlight plaintext"><code>docker volume create -d volplugin \
--name tenant2/image \
--opt size=1000
</code></pre>
<p>The options are as follows:</p>
<ul>
<li><a name="pool"/><a href="#pool"><code>pool</code></a>: the pool to use for this volume.
</li>
<li><a name="size"/><a href="#size"><code>size</code></a>: the size (in MB) for the volume.
</li>
<li><code>snapshots</code>: take snapshots or not. Affects future options with <code>snapshot</code> in the key name.
<ul>
<li>the value must satisfy <a href="https://golang.org/pkg/strconv/#ParseBool">this specification</a>
</li>
</ul>
</li>
<li><a name="snapshots_frequency"/><a href="#snapshots_frequency"><code>snapshots.frequency</code></a>: as above in the previous chapter, the frequency which we
take snapshots.
</li>
<li><a name="snapshots_keep"/><a href="#snapshots_keep"><code>snapshots.keep</code></a>: as above in the previous chapter, the number of snapshots to keep.
</li>
<li><a name="filesystem"/><a href="#filesystem"><code>filesystem</code></a>: the named filesystem to create. See the JSON Configuration
section for more information on this.
</li>
<li><a name="ephemeral"/><a href="#ephemeral"><code>ephemeral</code></a>: delete this volume after <code>docker volume rm</code> occurs.
</li>
<li><a name="rate_limit_write_iops"/><a href="#rate_limit_write_iops"><code>rate-limit.write.iops</code></a>: Write IOPS
</li>
<li><a name="rate_limit_read_iops"/><a href="#rate_limit_read_iops"><code>rate-limit.read.iops</code></a>: Read IOPS
</li>
<li><a name="rate_limit_read_bps"/><a href="#rate_limit_read_bps"><code>rate-limit.read.bps</code></a>: Read b/s
</li>
<li><a name="rate_limit_write_bps"/><a href="#rate_limit_write_bps"><code>rate-limit.write.bps</code></a>: Write b/s
</li>
</ul>
<h2>volcli Reference</h2>
<p><code>volcli</code> controls the <code>volmaster</code>, which in turn is referenced by the
<code>volplugin</code> for local management of storage. Think of volcli as a tap into the
control plane.</p>
<h3>Top-Level Commands</h3>
<p>These four commands present CRUD options on their respective sub-sections:</p>
<ul>
<li><a name="volcli_tenant"/><a href="#volcli_tenant"><code>volcli tenant</code></a> manipulates tenant configuration
</li>
<li><a name="volcli_volume"/><a href="#volcli_volume"><code>volcli volume</code></a> manipulates volumes.
</li>
<li><a name="volcli_mount"/><a href="#volcli_mount"><code>volcli mount</code></a> manipulates mounts.
</li>
<li><code>volcli help</code> prints the help.
<ul>
<li>Note that for each subcommand, <a name="volcli_help_subcommand_"/><a href="#volcli_help_subcommand_"><code>volcli help [subcommand]</code></a> will print the
help for that command. For multi-level commands, <code>volcli [subcommand] help
[subcommand]</code> will work. Appending <code>--help</code> to any command will print the
help as well.
</li>
</ul>
</li>
</ul>
<h3>Tenant Commands</h3>
<p>Typing <code>volcli tenant</code> without arguments will print help for these commands.</p>
<ul>
<li><a name="volcli_tenant_upload"/><a href="#volcli_tenant_upload"><code>volcli tenant upload</code></a> takes a tenant name, and JSON configuration from standard input.
</li>
<li><a name="volcli_tenant_delete"/><a href="#volcli_tenant_delete"><code>volcli tenant delete</code></a> removes a tenant. Its volumes and mounts will not be removed.
</li>
<li><a name="volcli_tenant_get"/><a href="#volcli_tenant_get"><code>volcli tenant get</code></a> displays the JSON configuration for a tenant.
</li>
<li><a name="volcli_tenant_list"/><a href="#volcli_tenant_list"><code>volcli tenant list</code></a> lists the tenants etcd knows about.
</li>
</ul>
<h3>Volume Commands</h3>
<p>Typing <code>volcli volume</code> without arguments will print help for these commands.</p>
<ul>
<li><a name="volcli_volume_create"/><a href="#volcli_volume_create"><code>volcli volume create</code></a> will forcefully create a volume just like it was created with
<code>docker volume create</code>. Requires a tenant, and volume name.
</li>
<li><a name="volcli_volume_get"/><a href="#volcli_volume_get"><code>volcli volume get</code></a> will retrieve the volume configuration for a given tenant/volume combination.
</li>
<li><a name="volcli_volume_list"/><a href="#volcli_volume_list"><code>volcli volume list</code></a> will list all the volumes for a provided tenant.
</li>
<li><a name="volcli_volume_list_all"/><a href="#volcli_volume_list_all"><code>volcli volume list-all</code></a> will list all volumes, across tenants.
</li>
<li><a name="volcli_volume_remove"/><a href="#volcli_volume_remove"><code>volcli volume remove</code></a> will remove a volume given a tenant/volume
combination, deleting the underlying data. This operation may fail if the
device is mounted, or expected to be mounted.
</li>
<li><a name="volcli_volume_force_remove"/><a href="#volcli_volume_force_remove"><code>volcli volume force-remove</code></a>, given a tenant/volume combination, will remove
the data from etcd but not perform any other operations. Use this option with
caution.
</li>
</ul>
<h3>Mount Commands</h3>
<p>Typing <code>volcli mount</code> without arguments will print help for these commands.</p>
<p><strong>Note:</strong> <code>volcli mount</code> cannot control mounts -- this is managed by
<code>volplugin</code> which lives on each host. Eventually there will be support for
pushing operations down to the volplugin, but not yet.</p>
<ul>
<li><a name="volcli_mount_list"/><a href="#volcli_mount_list"><code>volcli mount list</code></a> lists all known mounts in etcd.
</li>
<li><a name="volcli_mount_get"/><a href="#volcli_mount_get"><code>volcli mount get</code></a> obtains specific information about a mount from etcd.
</li>
<li><a name="volcli_mount_force_remove"/><a href="#volcli_mount_force_remove"><code>volcli mount force-remove</code></a> removes the contents from etcd, but does not
attempt to perform any unmounting. This is useful for removing mounts that
for some reason (e.g., host failure, which is not currently satsified by
volplugin)
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<div class="row">
<div class="col-sm-6 col-xs-12">
<ul class="footer-links nav navbar-nav">
<li><a href="/install/index.html">Getting Started</a></li>
<li><a href="http://docs.contiv.io/">Docs</a></li>
<li><a href="/articles/index.html">Articles</a></li>
<li><a href="https://github.com/contiv">GitHub</a></li>
</ul>
</div>
<div class="footer-contiv col-sm-6 col-xs-12">
<div class="pull-right">
<a class="contiv-project" href="http://contiv.io">
Contiv
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-74790221-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>