This is an automated email from the ASF dual-hosted git repository.
elek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new a89ff6d HDDS-3779. Add csi interface documents to show how to use
ozone csi (#1059)
a89ff6d is described below
commit a89ff6de4a66ccce357e6a2c7841c14ab0ceb9f7
Author: maobaolong <[email protected]>
AuthorDate: Thu Jun 25 00:46:49 2020 +0800
HDDS-3779. Add csi interface documents to show how to use ozone csi (#1059)
---
hadoop-hdds/docs/content/interface/CSI.md | 84 +++++++++++++++++++++
.../docs/content/interface/pvtest-webui.png | Bin 0 -> 13830 bytes
2 files changed, 84 insertions(+)
diff --git a/hadoop-hdds/docs/content/interface/CSI.md
b/hadoop-hdds/docs/content/interface/CSI.md
new file mode 100644
index 0000000..b70572f
--- /dev/null
+++ b/hadoop-hdds/docs/content/interface/CSI.md
@@ -0,0 +1,84 @@
+---
+title: CSI Protocol
+weight: 3
+summary: Ozone supports Container Storage Interface(CSI) protocol. You can use
Ozone by mounting an Ozone volume by Ozone CSI.
+---
+
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+`Container Storage Interface` (CSI) will enable storage vendors (SP) to
develop a plugin once and have it work across a number of container
orchestration (CO) systems.
+
+To get more information about CSI at [SCI
spec](https://github.com/container-storage-interface/spec/blob/master/spec.md)
+
+Ozone CSI is an implementation of CSI, it can make possible of using Ozone as
a storage volume for a container.
+
+## Getting started
+
+First of all, we need an Ozone cluster with s3gateway, and its OM rpc port and
s3gateway port must be visible to CSI pod,
+because CSIServer will access OM to create or delete a bucket, also, CSIServer
will publish volume by creating a mount point to s3g
+through goofys.
+
+If you don't have an Ozone cluster on kubernetes, you can reference
[Kubernetes]({{< ref "start/Kubernetes.md" >}}) to create one. Use the
resources from `kubernetes/examples/ozone` where you can find all the required
Kubernetes resources to run cluster together with the dedicated Ozone CSI
daemon (check `kubernetes/examples/ozone/csi`)
+
+You should check if you already have a name of `/s3v` volume, if not create it
by execute follow command:
+
+```bash
+kubectl exec -it scm-0 bash
+[hadoop@scm-0 ~]$ ozone sh vol create s3v
+```
+
+Now, create the CSI related resources by execute the follow command.
+
+```bash
+kubectl create -f /ozone/kubernetes/examples/ozone/csi
+```
+
+## Crete pv-test and visit the result.
+
+Create pv-test related resources by execute the follow command.
+
+```bash
+kubectl create -f /ozone/kubernetes/examples/ozone/pv-test
+```
+
+Attach the pod scm-0 and put a key into the /s3v/pvc* bucket.
+
+```bash
+kubectl exec -it scm-0 bash
+[hadoop@scm-0 ~]$ ozone sh bucket list s3v
+{
+ "metadata" : { },
+ "volumeName" : "s3v",
+ "name" : "pvc-861e2d8b-2232-4cd1-b43c-c0c26697ab6b",
+ "storageType" : "DISK",
+ "versioning" : false,
+ "creationTime" : "2020-06-11T08:19:47.469Z",
+ "encryptionKeyName" : null
+}
+[hadoop@scm-0 ~]$ ozone sh key put
/s3v/pvc-861e2d8b-2232-4cd1-b43c-c0c26697ab6b/A LICENSE.txt
+```
+
+Now, let's forward port of the `ozone-csi-test-webserver-7cbdc5d65c-h5mnn` to
see the UI through the web browser.
+
+```bash
+kubectl port-forward ozone-csi-test-webserver-7cbdc5d65c-h5mnn 8000:8000
+```
+
+Eventually, we can see the result from `http://localhost:8000/`
+
+
diff --git a/hadoop-hdds/docs/content/interface/pvtest-webui.png
b/hadoop-hdds/docs/content/interface/pvtest-webui.png
new file mode 100644
index 0000000..69e0aa1
Binary files /dev/null and
b/hadoop-hdds/docs/content/interface/pvtest-webui.png differ
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]