github.com/alibaba/sealer@v0.8.6-0.20220430115802-37a2bdaa8173/applications/openebs/README.md (about)

     1  # Overview
     2  
     3  OpenEBS provides block volume support through the iSCSI protocol. Install iSCSI tools and make sure that iSCSI service
     4  is running. See [iSCSI installation](https://openebs.io/docs/user-guides/prerequisites)
     5  
     6  There are three OpenEBS Data Engine included in this section:
     7  
     8  * [cStor](https://openebs.io/docs/concepts/cstor)
     9  * [Jiva](https://openebs.io/docs/concepts/jiva)
    10  * [LocalPV](https://openebs.io/docs/concepts/localpv)
    11  
    12  ## About cStor
    13  
    14  cStor provides enterprise grade features such as synchronous data replication, snapshots, clones, thin provisioning of
    15  data, high resiliency of data, data consistency and on-demand increase of capacity or performance.
    16  
    17  Components included in this image:
    18  
    19  * StatefulSet resource for openebs-cstor-csi-controller.
    20  * Deployment resource for openebs-ndm-operator.
    21  * Deployment resource for cspc-operator.
    22  * Deployment resource for cvc-operator.
    23  * Deployment resource for openebs-cstor-admission-server.
    24  * DaemonSet resource for openebs-cstor-csi-node .
    25  * DaemonSet resource for openebs-ndm.
    26  
    27  ## How to run it
    28  
    29  1, Apply a kubernetes cluster with "openebs-cstor" installed.
    30  
    31  use example/Clusterfile.yaml to apply "openebs-cstor" by modifying the image filed
    32  as `image: registry.cn-qingdao.aliyuncs.com/sealer-apps/openebs-cstor:2.11.0`,and then run
    33  command `sealer apply -f Clusterfile.yaml`
    34  
    35  2, Create [CStorPoolCluster](https://openebs.io/docs/user-guides/cstor) to make
    36  the storage cluster in ready status. example see cstor/cspc.yaml
    37  
    38  ## How to use it
    39  
    40  1, use it as base cluster to deploy StatefulSet application.
    41  
    42  After perform all the installation steps,you need get the default StorageClass name by run command:`kubectl get sc`.
    43  
    44  To deploy a sample application using the default StorageClass: "cstor-csi-disk"
    45  
    46  ```yaml
    47  kind: PersistentVolumeClaim
    48  apiVersion: v1
    49  metadata:
    50    name: cstor-pvc
    51  spec:
    52    storageClassName: cstor-csi-disk
    53    accessModes:
    54      - ReadWriteOnce
    55    resources:
    56      requests:
    57        storage: 5Gi
    58  ---
    59  apiVersion: v1
    60  kind: Pod
    61  metadata:
    62    name: busybox
    63    namespace: default
    64  spec:
    65    containers:
    66      - command:
    67          - sh
    68          - -c
    69          - 'date >> /mnt/openebs-csi/date.txt; hostname >> /mnt/openebs-csi/hostname.txt; sync; sleep 5; sync; tail -f /dev/null;'
    70        image: busybox
    71        imagePullPolicy: Always
    72        name: busybox
    73        volumeMounts:
    74          - mountPath: /mnt/openebs-csi
    75            name: demo-vol
    76    volumes:
    77      - name: demo-vol
    78        persistentVolumeClaim:
    79          claimName: cstor-pvc
    80  ```
    81  
    82  2, use it as base image to build anther cloud image
    83  
    84  Kubefile:
    85  
    86  ```shell
    87  FROM registry.cn-qingdao.aliyuncs.com/sealer-apps/openebs-cstor:2.11.0
    88  # add helm repo and run helm install
    89  RUN helm repo add bitnami https://charts.bitnami.com/bitnami
    90  CMD helm install my-kafka --create-namespace --namespace kafka-system --set global.storageClass=cstor-csi-disk bitnami/kafka --version 14.0.5
    91  ```
    92  
    93  ## About Jiva
    94  
    95  Jiva is a light weight storage engine that is recommended to use for low capacity workloads. The snapshot and storage
    96  management features of the other cStor engine are more advanced and is recommended when snapshots are a need.
    97  
    98  Components included in this image:
    99  
   100  * StatefulSet resource for openebs-jiva-csi-controller.
   101  * Deployment resource for openebs-localpv-provisioner.
   102  * Deployment resource for jiva-operator.
   103  * DaemonSet resource for openebs-jiva-csi-node.
   104  
   105  ## How to run it
   106  
   107  Apply a kubernetes cluster with "openebs-jiva" installed. use example/Clusterfile.yaml to apply "openebs-jiva" by
   108  modifying the image filed as `image: registry.cn-qingdao.aliyuncs.com/sealer-apps/openebs-jiva:2.11.0`,and then run
   109  command `sealer apply -f Clusterfile.yaml`
   110  
   111  ## How use it
   112  
   113  Same with cStor engine.
   114  
   115  ## About LocalPV
   116  
   117  OpenEBS provides Dynamic PV provisioners for Kubernetes Local Volumes. A local volume implies that storage is available
   118  only from a single node. A local volume represents a mounted local storage device such as a disk, partition or
   119  directory.
   120  
   121  Components included in this image:
   122  
   123  * Deployment resource for openebs-localpv-provisioner.
   124  
   125  ## How to run it
   126  
   127  Apply a kubernetes cluster with "openebs-localpv" installed. use example/Clusterfile.yaml to apply "openebs-localpv" by
   128  modifying the image filed as `image: registry.cn-qingdao.aliyuncs.com/sealer-apps/openebs-localpv:2.11.0`,and then run
   129  command `sealer apply -f Clusterfile.yaml`
   130  
   131  ## How to use it
   132  
   133  Same with cStor engine.
   134  
   135  ## How to rebuild it
   136  
   137  Modify manifest yaml file according to your needs, then run below command to rebuild it.
   138  
   139  ```shell
   140  sealer build -t {Your Image Name} -f Kubefile -m cloud .
   141  ```
   142  
   143  More information see [official document here](https://openebs.io).