github.com/alibaba/sealer@v0.8.6-0.20220430115802-37a2bdaa8173/applications/rookceph/rookceph-block/README.md (about) 1 # Overview 2 3 This image will create CephBlockPool with three replicas and also will create default storage class 4 named `rook-ceph-block` for use. 5 6 Components included in this image: 7 8 Ceph cluster: 9 10 * 1 Deployment for rookceph operator. 11 * 3 ceph mon for ceph cluster. 12 * 3 ceph osd for ceph cluster. 13 * 2 ceph mgr for ceph cluster. 14 * enable ceph dashboard with ssl port 8443. 15 16 CephBlockPool: 17 18 * 3 replicated ceph block pool for ceph block. 19 20 ## How to run it 21 22 Use default Clusterfile to apply the ceph cluster. 23 24 see : [default ceph block Clusterfile examples](../../../applications/rookceph/rookceph-block/examples/Clusterfile.yaml) 25 26 ## How to use it 27 28 Connect to ceph cluster using below tools.Then run `ceph status` to check the status of ceph cluster. 29 30 ```yaml 31 apiVersion: apps/v1 32 kind: Deployment 33 metadata: 34 name: rook-ceph-tools 35 namespace: rook-ceph 36 labels: 37 app: rook-ceph-tools 38 spec: 39 replicas: 1 40 selector: 41 matchLabels: 42 app: rook-ceph-tools 43 template: 44 metadata: 45 labels: 46 app: rook-ceph-tools 47 spec: 48 dnsPolicy: ClusterFirstWithHostNet 49 containers: 50 - name: rook-ceph-tools 51 image: rook/ceph:v1.7.2 52 command: [ "/tini" ] 53 args: [ "-g", "--", "/usr/local/bin/toolbox.sh" ] 54 imagePullPolicy: IfNotPresent 55 env: 56 - name: ROOK_CEPH_USERNAME 57 valueFrom: 58 secretKeyRef: 59 name: rook-ceph-mon 60 key: ceph-username 61 - name: ROOK_CEPH_SECRET 62 valueFrom: 63 secretKeyRef: 64 name: rook-ceph-mon 65 key: ceph-secret 66 volumeMounts: 67 - mountPath: /etc/ceph 68 name: ceph-config 69 - name: mon-endpoint-volume 70 mountPath: /etc/rook 71 volumes: 72 - name: mon-endpoint-volume 73 configMap: 74 name: rook-ceph-mon-endpoints 75 items: 76 - key: data 77 path: mon-endpoints 78 - name: ceph-config 79 emptyDir: { } 80 tolerations: 81 - key: "node.kubernetes.io/unreachable" 82 operator: "Exists" 83 effect: "NoExecute" 84 tolerationSeconds: 5 85 86 ``` 87 88 Launch the rook-ceph-tools pod: 89 90 `kubectl create -f toolbox.yaml` 91 92 Wait for the toolbox pod to download its container and get to the running state: 93 94 `kubectl -n rook-ceph rollout status deploy/rook-ceph-tools` 95 96 Once the rook-ceph-tools pod is running, you can connect to it with: 97 98 `kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- bash` 99 100 Use ceph as the block storage backend to deploy mysql application. 101 102 see: [mysql with ceph block examples](../../../applications/rookceph/rookceph-block/examples/examples.yaml) 103 104 ## How to rebuild it 105 106 Modify manifest.yaml or cephblockpool.yaml file according to your needs, then run below command to rebuild it. 107 108 ```shell 109 sealer build -t {Your Image Name} -f Kubefile -m cloud . 110 ``` 111 112 More parameters see [official docs here](https://rook.io/docs/rook/v1.7/ceph-block.html).