From 442263a137e986e5fde744e32ae35d0ad71b7fb9 Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Thu, 14 Sep 2017 16:09:23 -0700 Subject: [PATCH] docs: object store crd settings --- Documentation/client.md | 8 +-- Documentation/helm-operator.md | 2 +- Documentation/object-store-crd.md | 76 ++++++++++++++++++++ Documentation/pool-crd.md | 2 +- Documentation/upgrade.md | 2 +- PendingReleaseNotes.md | 11 +++ cluster/examples/kubernetes/rook-object.yaml | 4 +- 7 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 Documentation/object-store-crd.md diff --git a/Documentation/client.md b/Documentation/client.md index 9551f99e9..46eb52cca 100644 --- a/Documentation/client.md +++ b/Documentation/client.md @@ -104,13 +104,13 @@ If you don't yet have a Rook cluster running, refer to our [Quickstart Guides](. 1. Create an object storage instance in the cluster ```bash - rookctl object create + rookctl object create -n mystore ``` 1. Create an object storage user ```bash - rookctl object user create rook-user "my object store user" + rookctl object user create mystore rook-user "my object store user" ``` ### Consume the Object Storage @@ -121,7 +121,7 @@ the s3cmd tool is included in the [Rook toolbox](toolbox.md) pod. 1. Get the connection information for accessing object storage ```bash - eval $(rookctl object connection rook-user --format env-var) + eval $(rookctl object connection mystore rook-user --format env-var) ``` 1. Create a bucket in the object store @@ -133,7 +133,7 @@ the s3cmd tool is included in the [Rook toolbox](toolbox.md) pod. 1. List buckets in the object store ```bash - rookctl object bucket list + rookctl object bucket list mystore ``` 1. Upload a file to the newly created bucket diff --git a/Documentation/helm-operator.md b/Documentation/helm-operator.md index 9fee5dde6..35aa7a2c7 100644 --- a/Documentation/helm-operator.md +++ b/Documentation/helm-operator.md @@ -1,6 +1,6 @@ --- title: Helm Chart -weight: 18 +weight: 23 indent: true --- diff --git a/Documentation/object-store-crd.md b/Documentation/object-store-crd.md new file mode 100644 index 000000000..ab1f620e7 --- /dev/null +++ b/Documentation/object-store-crd.md @@ -0,0 +1,76 @@ +--- +title: Object Store CRD +weight: 19 +indent: true +--- + +# Creating Rook Object Stores + +Rook allows creation and customization of object stores through the custom resource definitions (CRDs). The following settings are available +for object stores. + +## Sample + +```yaml +apiVersion: rook.io/v1alpha1 +kind: Objectstore +metadata: + name: my-store + namespace: rook +spec: + metadataPool: + replicated: + size: 3 + dataPool: + erasureCoded: + dataChunks: 6 + codingChunks: 2 + gateway: + type: s3 + sslCertificateRef: + port: 80 + securePort: + instances: 1 + allNodes: false + placement: + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: role + # operator: In + # values: + # - rgw-node + # tolerations: + # - key: rgw-node + # operator: Exists + # podAffinity: + # podAntiAffinity: +``` + +## Object Store Settings + +### Metadata + +- `name`: The name of the object store to create, which will be reflected in the pool and other resource names. +- `namespace`: The namespace of the Rook cluster where the object store is created. + +### Pools + +The pools allow all of the settings defined in the Pool CRD spec. For more details, see the [Pool CRD](pool-crd.md) settings. In the example above, there must be at least three hosts (size 3) and at least eight devices (6 data + 2 coding chunks) in the cluster. + +- `metadataPool`: The settings used to create all of the object store metadata pools. Must use replication. +- `dataPool`: The settings to create the object store data pool. Can use replication or erasure coding. + +## Gateway Settings + +The gateway settings correspond to the RGW daemon settings. + +- `type`: `S3` is supported +- `sslCertificateRef`: If the certificate is not specified, SSL will not be configured. If specified, this is the name of the Kubernetes secret that contains the SSL certificate to be used for secure connections to the object store. Rook will look in the secret provided at the `cert` key name. The value of the `cert` key must be in the format expected by the [RGW service](http://docs.ceph.com/docs/master/install/install-ceph-gateway/#using-ssl-with-civetweb): "The server key, server certificate, and any other CA or intermediate certificates be supplied in one file. Each of these items must be in pem form." +- `port`: The port on which the RGW pods and the RGW service will be listening (not encrypted). +- `securePort`: The secure port on which RGW pods will be listening. An SSL certificate must be specified. +- `instances`: The number of pods that will be started to load balance this object store. Ignored if `allNodes` is true. +- `allNodes`: Whether RGW pods should be started on all nodes. If true, a daemonset is created. If false, `instances` must be set. +- `placement`: The Kubernetes placement settings to determine where the RGW pods should be started in the cluster. + diff --git a/Documentation/pool-crd.md b/Documentation/pool-crd.md index b8e4d3565..84cf279d2 100644 --- a/Documentation/pool-crd.md +++ b/Documentation/pool-crd.md @@ -11,7 +11,7 @@ for pools. ## Sample -``` +```yaml apiVersion: rook.io/v1alpha1 kind: Pool metadata: diff --git a/Documentation/upgrade.md b/Documentation/upgrade.md index f0931d6b0..0116ecb1e 100644 --- a/Documentation/upgrade.md +++ b/Documentation/upgrade.md @@ -1,6 +1,6 @@ --- title: Upgrading Rook -weight: 19 +weight: 25 indent: true --- diff --git a/PendingReleaseNotes.md b/PendingReleaseNotes.md index b5135c25a..0b0b8eeff 100644 --- a/PendingReleaseNotes.md +++ b/PendingReleaseNotes.md @@ -7,3 +7,14 @@ ## Deprecations ## Notable Features + +- Object Store + - Object Stores are defined by a CRD and handled by the Operator + - Multiple object stores supported through Ceph realms + - Pools created by object stores are configurable with all options defined in the pool CRD + +## Breaking Changes + +- Pool CRD + - `replication` renamed to `replicated` + - `erasureCode` renamed to `erasureCoded` \ No newline at end of file diff --git a/cluster/examples/kubernetes/rook-object.yaml b/cluster/examples/kubernetes/rook-object.yaml index de7bf18cf..f2ac7adc4 100644 --- a/cluster/examples/kubernetes/rook-object.yaml +++ b/cluster/examples/kubernetes/rook-object.yaml @@ -1,17 +1,15 @@ apiVersion: rook.io/v1alpha1 -kind: ObjectStore +kind: Objectstore metadata: name: my-store namespace: rook spec: # The pool spec used to create the metadata pools metadataPool: - failureDomain: host replicated: size: 2 # The pool spec used to create the data pool dataPool: - failureDomain: osd erasureCoded: dataChunks: 2 codingChunks: 1