Merge pull request #521 from travisn/simplify-example

Simplied storage pool example
This commit is contained in:
Travis Nielsen
2017-03-30 10:18:16 -07:00
committed by GitHub
4 changed files with 19 additions and 28 deletions
+2 -7
View File
@@ -47,14 +47,9 @@ rook-api-1709486253-gvdnc 1/1 Running 0 1m
```
### Provision Storage
Before Rook can start provisioning storage, a StorageClass and its storage pool need to be created. This is needed for Kubernetes to interoperate with Rook for provisioning persistent volumes.
Before Rook can start provisioning storage, a StorageClass and its storage pool need to be created. This is needed for Kubernetes to interoperate with Rook for provisioning persistent volumes. The rook-storageclass.yaml sample will create the storage pool automatically. For more options on pools, see the documentation on [creating storage pools](pool-tpr.md).
First create the storage pool. See the documentation on [creating storage pools](pool-tpr.md).
```
kubectl create -f rook-pool.yaml
```
Rook already creates a default admin and rbd user, whose secrets are already specified in the sample [rook-storageclass.yaml](/demo/kubernetes/rook-storageclass.yaml). Now we just need to specify the Ceph monitor endpoints (requires `jq`):
Rook already creates a default admin and rbd user, whose secrets are specified in the sample [rook-storageclass.yaml](/demo/kubernetes/rook-storageclass.yaml). Now we just need to specify the Ceph monitor endpoints (requires `jq`):
```
export MONS=$(kubectl -n rook get pod mon0 mon1 mon2 -o json|jq ".items[].status.podIP"|tr -d "\""|sed -e 's/$/:6790/'|paste -s -d, -)
@@ -1,21 +0,0 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rook-operator
spec:
replicas: 1
template:
metadata:
labels:
name: rook-operator
spec:
containers:
- name: rook-operator
image: quay.io/myrepo/rook-operator:mytag
env:
- name: ROOK_OPERATOR_REPO_PREFIX
value: quay.io/myrepo
- name: ROOK_OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
+2
View File
@@ -17,3 +17,5 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ROOK_OPERATOR_REPO_PREFIX
value: quay.io/rook
+15
View File
@@ -1,3 +1,18 @@
apiVersion: rook.io/v1beta1
kind: Rookpool
metadata:
name: rook-replicapool
spec:
name: replicapool
namespace: rook
replication:
count: 1
# For an erasure-coded pool, comment out the replication count above and uncomment the following settings.
# Make sure you have enough OSDs to support the replica count or erasure code chunks.
#erasureCode:
# codingChunks: 2
# dataChunks: 2
---
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata: