Skip to content

Commit

Permalink
Initial v1
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Skriptsov <[email protected]>
  • Loading branch information
sabbot committed Aug 28, 2019
1 parent 0aa1774 commit c0fe6af
Show file tree
Hide file tree
Showing 98 changed files with 1,153 additions and 972 deletions.
2 changes: 1 addition & 1 deletion Documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ High-level Storage Provider design documents:
| Storage Provider | Status | Description |
|---|---|---|
| [Ceph](ceph-storage.md) | Stable | Ceph is a highly scalable distributed storage solution for block storage, object storage, and shared file systems with years of production deployments. |
| [EdgeFS](edgefs-storage.md) | Beta | EdgeFS is high-performance and fault-tolerant object storage system with Geo-Transparent data access to file, block or object. |
| [EdgeFS](edgefs-storage.md) | Stable | EdgeFS is high-performance and fault-tolerant object storage system with Geo-Transparent data access to file, block or object. |

Low level design documentation for supported list of storage systems collected at [design docs](https://github.com/rook/rook/tree/master/design) section.
14 changes: 7 additions & 7 deletions Documentation/edgefs-cluster-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Rook allows creation and customization of storage clusters through the custom re
To get you started, here is a simple example of a CRD to configure a EdgeFS cluster with just one local per-host directory /data:

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand All @@ -34,7 +34,7 @@ spec:
or if you have raw block devices provisioned, it can dynamically detect, format and utilize all raw devices on all nodes with simple CRD as below:

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand Down Expand Up @@ -196,7 +196,7 @@ Here are several samples for configuring EdgeFS clusters. Each of the samples mu

### Storage configuration: All devices, All SSD/NVMes.
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand All @@ -220,7 +220,7 @@ Individual nodes and their config can be specified so that only the named nodes
Each node's 'name' field should match their 'kubernetes.io/hostname' label.
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand Down Expand Up @@ -254,7 +254,7 @@ The example under 'all' would have all services scheduled on Kubernetes nodes la
tolerate taints with a key of 'storage-node'.
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand Down Expand Up @@ -289,7 +289,7 @@ To control how many resources the rook components can request/use, you can set r
You can override these requests/limits for Targts per node when using `useAllNodes: false` in the `node` item in the `nodes` list.

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand Down Expand Up @@ -317,7 +317,7 @@ spec:
An example on how to configure the cluster network to use multus network. Here, a NetworkAttachmentDefinition named flannel on rook-edgefs namespace is assumed.

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand Down
6 changes: 3 additions & 3 deletions Documentation/edgefs-iscsi-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following settings are available for customization of iSCSI Target services.
## Sample

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscsi01
Expand Down Expand Up @@ -130,15 +130,15 @@ efscli service serve isc-pepsi Hawaii/Pepsi/bk1/lun1 X-volsize=20G
5. Create ISCSI CRDs

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscCola
namespace: rook-edgefs
```
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscPepsi
Expand Down
6 changes: 3 additions & 3 deletions Documentation/edgefs-isgw-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following settings are available for customization of ISGW services.
## Sample

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: isgw01 # Inter-Segment Gateway service name
Expand Down Expand Up @@ -180,7 +180,7 @@ Because we creating bi-directional link, on the secondary site we would need to
5. Create ISGW Link CRDs on both EdgeFS sites

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: hawaii
Expand All @@ -192,7 +192,7 @@ spec:
```
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: hawaii
Expand Down
6 changes: 3 additions & 3 deletions Documentation/edgefs-nfs-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following settings are available for customization of EdgeFS NFS services.
## Sample

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs01
Expand Down Expand Up @@ -125,7 +125,7 @@ efscli service serve nfs-pepsi Hawaii/Pepsi/bk1
5. Create NFS CRDs

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs-cola
Expand All @@ -135,7 +135,7 @@ spec:
```
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs-pepsi
Expand Down
6 changes: 3 additions & 3 deletions Documentation/edgefs-s3-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following settings are available for customization of S3 services.
## Sample

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s301
Expand Down Expand Up @@ -135,7 +135,7 @@ efscli service config s3-pepsi X-Domain pepsi.com
5. Create S3 CRDs

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s3-cola
Expand All @@ -145,7 +145,7 @@ spec:
```
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s3-pepsi
Expand Down
6 changes: 3 additions & 3 deletions Documentation/edgefs-s3x-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The following settings are available for customization of Edge-S3 services.
## Sample

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x01
Expand Down Expand Up @@ -130,7 +130,7 @@ efscli service serve s3x-pepsi Hawaii/Pepsi
5. Create S3X CRDs

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x-cola
Expand All @@ -140,7 +140,7 @@ spec:
```
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x-pepsi
Expand Down
6 changes: 3 additions & 3 deletions Documentation/edgefs-swift-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following settings are available for customization of SWIFT services.
## Sample

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swift01
Expand Down Expand Up @@ -126,7 +126,7 @@ efscli service serve swift-pepsi Hawaii
5. Create SWIFT CRDs

```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swiftCola
Expand All @@ -136,7 +136,7 @@ spec:
```
```yaml
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swiftPepsi
Expand Down
52 changes: 34 additions & 18 deletions Documentation/edgefs-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,35 @@ Upgrades from Alpha to Beta not supported. However, please see migration procedu
EdgeFS Operator provides a way of preserving data on disks or directories while moving to a
new version (like Alpha to Beta transitioning) or reconfiguring (like full re-start).

Example of migration from `v1alpha1` to `v1beta1`:

1. Delete all EdgeFS services in Kubernetes, e.g., `kubectl delete -f s3.yaml`
2. Delete EdgeFS cluster, e.g., `kubectl delete -f cluster.yaml`
3. Delete EdgeFS operator, e.g., `kubectl delete -f operator.yaml`
4. Edit operator.yaml to transition to a new version. This has to be done for each CustomResourceDefinition in the file.
5. Create EdgeFS operator, e.g., `kubectl create -f operator.yaml`
6. Edit cluster.yaml to transition to a new version. I.e. `edgefs.rook.io/v1alpha1` to `edgefs.rook.io/v1beta1`.
7. If you using devices, edit cluster.yaml and enable devicesResurrectMode "restore" and delete in-use discovery configmaps. This will preserve old cluster data.
8. Create EdgeFS cluster, e.g., `kubectl create -f cluster.yaml`
9. Login to mgr container and check system status, e.g., `efscli system status`
10. Edit EdgeFS services CRD files to transition to a new version. I.e. `edgefs.rook.io/v1alpha1` to `edgefs.rook.io/v1beta1`.
11. Deploy services CRDs, e.g., `kubectl create -f s3.yaml`

We will do all our work in the EdgeFS example manifests directory.
```sh
cd $YOUR_ROOK_REPO/cluster/examples/kubernetes/edgefs/
```

Example of migration from existing `v1beta1` EdgeFS cluster to stable `v1` EdgeFS cluster:
For already existing EdgeFS manifests we should replace `v1beta1` version to `v1`.
We can use a few simple `sed` commands to do this for all manifests at once.

```sh
sed -i.bak -e "s/edgefs.rook.io\/v1beta1/edgefs.rook.io\/v1beta1/g" *.yaml
sed -i -e "s/edgefs.rook.io\/v1beta1/edgefs.rook.io\/v1/g" *.yaml
mkdir -p backups
mv *.bak backups/
```

Then we should add new `v1` version specification to existing EdgeFS' CRDs.
```sh
kubectl apply -f upgrade-from-v1beta1-create.yaml
```

And replace EdgeFS operator to new stable 'v1' version

```sh
kubectl -n rook-edgefs-system set image deploy/rook-edgefs-operator rook-edgefs-operator=rook/edgefs:v1.1.0
```

Then you could update your cluster's EdgeFS image for latest one as discribed below.

## EdgeFS Version Upgrade

Expand All @@ -52,7 +68,7 @@ export CLUSTER_NAME="rook-edgefs"
The majority of the upgrade will be handled by the Rook operator. Begin the upgrade by changing the
EdgeFS image field in the cluster CRD (`spec:edgefsImageName`).
```sh
NEW_EDGEFS_IMAGE='edgefs/edgefs:1.2.31'
NEW_EDGEFS_IMAGE='edgefs/edgefs:1.2.50'
kubectl -n $CLUSTER_NAME patch Cluster $CLUSTER_NAME --type=merge \
-p "{\"spec\": {\"edgefsImageName\": \"$NEW_EDGEFS_IMAGE\"}}"
```
Expand All @@ -72,14 +88,14 @@ version has fully updated is rather simple.
```sh
kubectl -n $CLUSTER_NAME describe pods | grep "Image:" | sort | uniq
# This cluster is not yet finished:
# Image: edgefs/edgefs:1.1.50
# Image: edgefs/edgefs:1.2.31
# Image: edgefs/edgefs:1.2.50
# Image: edgefs/edgefs-restapi:1.2.31
# Image: edgefs/edgefs-ui:1.2.31
# This cluster is also finished(all versions are the same):
# Image: edgefs/edgefs:1.2.31
# Image: edgefs/edgefs-restapi:1.2.31
# Image: edgefs/edgefs-ui:1.2.31
# Image: edgefs/edgefs:1.2.50
# Image: edgefs/edgefs-restapi:1.2.50
# Image: edgefs/edgefs-ui:1.2.50
```
#### 3. Verify the updated cluster

Expand Down
2 changes: 1 addition & 1 deletion Documentation/quickstart-toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rook provides growing number of storage providers to a Kubernetes cluster, each
| Storage Provider | Status | Description |
|---|---|---|
| [Ceph](ceph-quickstart.md) | V1 | Ceph is a highly scalable distributed storage solution for block storage, object storage, and shared file systems with years of production deployments. |
| [EdgeFS](edgefs-quickstart.md) | Beta | EdgeFS is high-performance and low-latency object storage system with Geo-Transparent data access via standard protocols (S3, NFS, iSCSI) from on-prem, private/public clouds or small footprint edge (IoT) devices. |
| [EdgeFS](edgefs-quickstart.md) | V1 | EdgeFS is high-performance and low-latency object storage system with Geo-Transparent data access via standard protocols (S3, NFS, iSCSI) from on-prem, private/public clouds or small footprint edge (IoT) devices. |
| [Cassandra](cassandra.md) | Alpha | Cassandra is a highly available NoSQL database featuring lightning fast performance, tunable consistency and massive scalability.|
| [CockroachDB](cockroachdb.md) | Alpha | CockroachDB is a cloud-native SQL database for building global, scalable cloud services that survive disasters. |
| [Minio](minio-object-store.md) | Alpha | Minio is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Rook Framework | The framework for common storage specs and logic used to suppor
Ceph | [Ceph](https://ceph.com/) is a distributed storage system that provides file, block and object storage and is deployed in large scale production clusters. | ceph.rook.io/v1 | Stable
CockroachDB | [CockroachDB](https://www.cockroachlabs.com/product/cockroachdb/) is a cloud-native SQL database for building global, scalable cloud services that survive disasters. | cockroachdb.rook.io/v1alpha1 | Alpha
Cassandra | [Cassandra](http://cassandra.apache.org/) is a highly available NoSQL database featuring lightning fast performance, tunable consistency and massive scalability. [Scylla](https://www.scylladb.com) is a close-to-the-hardware rewrite of Cassandra in C++, which enables much lower latencies and higher throughput. | cassandra.rook.io/v1alpha1 | Alpha
EdgeFS | [EdgeFS](http://edgefs.io) is high-performance and fault-tolerant object storage system with Geo-Transparent data access to file, block or object. | edgefs.rook.io/v1beta1 | Beta
EdgeFS | [EdgeFS](http://edgefs.io) is high-performance and fault-tolerant object storage system with Geo-Transparent data access to file, block or object. | edgefs.rook.io/v1 | Stable
Minio | [Minio](https://www.minio.io/) is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. | minio.rook.io/v1alpha1 | Alpha
NFS | [Network File System (NFS)](https://github.com/nfs-ganesha/nfs-ganesha/wiki) allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. | nfs.rook.io/v1alpha1 | Alpha
YugabyteDB | [YugabyteDB](https://docs.yugabyte.com/latest/introduction/) is a high-performance, cloud-native distributed SQL database which can tolerate disk, node, zone and region failures automatically. | yugabytedb.rook.io/v1alpha1 | Alpha
Expand Down
2 changes: 1 addition & 1 deletion build/codegen/codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cd "${scriptdir}/../../vendor/k8s.io/code-generator" && ./generate-groups.sh \
all \
github.com/rook/rook/pkg/client \
github.com/rook/rook/pkg/apis \
"rook.io:v1alpha2 ceph.rook.io:v1 cockroachdb.rook.io:v1alpha1 minio.rook.io:v1alpha1 nfs.rook.io:v1alpha1 cassandra.rook.io:v1alpha1 edgefs.rook.io:v1beta1 yugabytedb.rook.io:v1alpha1"
"rook.io:v1alpha2 ceph.rook.io:v1 cockroachdb.rook.io:v1alpha1 minio.rook.io:v1alpha1 nfs.rook.io:v1alpha1 cassandra.rook.io:v1alpha1 edgefs.rook.io:v1 yugabytedb.rook.io:v1alpha1"
# this seems busted in the release-1.8 branch
# --go-header-file ${SCRIPT_ROOT}/build/codegen/header.txt

Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ subjects:
name: rook-edgefs-cluster
namespace: rook-edgefs
---
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/iscsi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscsi01
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/isgw.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: isgw01 # Inter-Segment Gateway service name
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/nfs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs01
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/s3.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s301
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/s3x.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x01
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/kubernetes/edgefs/swift.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: edgefs.rook.io/v1beta1
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swift01
Expand Down
Loading

0 comments on commit c0fe6af

Please sign in to comment.