Skip to content

Commit

Permalink
docs: add deployment of using S3 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 authored Oct 23, 2023
1 parent c4bd1aa commit 2ab1f6b
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 51 deletions.
52 changes: 29 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ helm repo update
You can run the following command to see the charts:

```console
helm search repo greptime -l --devel
helm search repo greptime
```

**Note**: Since our charts are still in development, we don't release the stable release version, and the `--devel` option is required.

### Install the GreptimeDB Cluster

If you want to deploy the GreptimeDB cluster, you can use the following command(use the `default` namespace):
Expand All @@ -37,10 +35,10 @@ If you want to deploy the GreptimeDB cluster, you can use the following command(

```console
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
```

2. **Deploy GreptimeDB operator**
Expand All @@ -52,23 +50,31 @@ If you want to deploy the GreptimeDB cluster, you can use the following command(

3. **Deploy GreptimeDB cluster**

```console
helm install mycluster greptime/greptimedb-cluster -n default
```

If you already have the etcd cluster, you can configure the `etcdEndpoints`:

```console
helm install mycluster greptime/greptimedb-cluster \
--set etcdEndpoints=etcd.default:2379 \
-n default
```

You also can list the current releases by `helm` command:
- **Default Installation**

The default installation will use the local storage:
```console
helm install mycluster greptime/greptimedb-cluster -n default
```

- **Use AWS S3 as backend storage**

Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage:
```console
helm template mycluster greptime/greptimedb-cluster -n default \
--set storage.s3.bucket=<your-bucket> \
--set storage.s3.region=<region-of-bucket> \
--set storage.s3.root=<root-directory-of-data> \
--set storage.s3.secretName=s3-credentials \
--set storage.credentials.secretName=s3-credentials \
--set storage.credentials.secretCreation.enabled=true \
--set storage.credentials.secretCreation.enableEncryption=false \
--set storage.credentials.secretCreation.data.access-key-id=<your-access-key-id> \
--set storage.credentials.secretCreation.data.secret-access-key=<your-secret-access-key>
```

```console
helm list -n default
```

4. **Use `kubectl port-forward` to access the GreptimeDB cluster**

Expand Down
53 changes: 39 additions & 14 deletions charts/greptimedb-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,56 @@ A Helm chart for deploying GreptimeDB cluster in Kubernetes
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.1](https://img.shields.io/badge/AppVersion-0.4.1-informational?style=flat-square)

## Source Code

- https://github.com/GreptimeTeam/greptimedb

## How to install

**Note**: Make sure you already install the [greptimedb-operator](../greptimedb-operator/README.md).
### Prerequisites

1. Install the [greptimedb-operator](../greptimedb-operator/README.md);

2. Install the etcd cluster:

```console
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
```

### Default installation

The default installation will use the local storage:

```console
# Add charts repo.
helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
```

### Use AWS S3 as backend storage

Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage:

```console
# Optional: Install etcd cluster.
# You also can use your own etcd cluster.
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
helm install mycluster greptime/greptimedb-cluster \
--set storage.s3.bucket=<your-bucket> \
--set storage.s3.region=<region-of-bucket> \
--set storage.s3.root=<root-directory-of-data> \
--set storage.s3.secretName=s3-credentials \
--set storage.credentials.secretName=s3-credentials \
--set storage.credentials.secretCreation.enabled=true \
--set storage.credentials.secretCreation.enableEncryption=false \
--set storage.credentials.secretCreation.data.access-key-id=<your-access-key-id> \
--set storage.credentials.secretCreation.data.secret-access-key=<your-secret-access-key>
```

```console
# Install greptimedb in default namespace.
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
If you set `storage.s3.root` as `mycluser`, then the data layout will be:

```
<your-bucket>
├── mycluser
│ ├── data/
```

## How to uninstall
Expand Down
54 changes: 40 additions & 14 deletions charts/greptimedb-cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,57 @@
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

## Source Code

- https://github.com/GreptimeTeam/greptimedb

## How to install

**Note**: Make sure you already install the [greptimedb-operator](../greptimedb-operator/README.md).
### Prerequisites

1. Install the [greptimedb-operator](../greptimedb-operator/README.md);

2. Install the etcd cluster:

```console
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
```


### Default installation

The default installation will use the local storage:

```console
# Add charts repo.
helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
```

### Use AWS S3 as backend storage

Before installation, you must create the AWS S3 bucket, and the cluster will use the bucket as backend storage:

```console
# Optional: Install etcd cluster.
# You also can use your own etcd cluster.
helm install etcd oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.rbac.token.enabled=false \
-n default
helm install mycluster greptime/greptimedb-cluster \
--set storage.s3.bucket=<your-bucket> \
--set storage.s3.region=<region-of-bucket> \
--set storage.s3.root=<root-directory-of-data> \
--set storage.s3.secretName=s3-credentials \
--set storage.credentials.secretName=s3-credentials \
--set storage.credentials.secretCreation.enabled=true \
--set storage.credentials.secretCreation.enableEncryption=false \
--set storage.credentials.secretCreation.data.access-key-id=<your-access-key-id> \
--set storage.credentials.secretCreation.data.secret-access-key=<your-secret-access-key>
```

```console
# Install greptimedb in default namespace.
helm install greptimedb-cluster greptime/greptimedb-cluster -n default
If you set `storage.s3.root` as `mycluser`, then the data layout will be:

```
<your-bucket>
├── mycluser
│ ├── data/
```

## How to uninstall
Expand Down

0 comments on commit 2ab1f6b

Please sign in to comment.