|
1 | | -# databend-operator |
2 | | -// TODO(user): Add simple overview of use/purpose |
| 1 | +# Databend Operator |
3 | 2 |
|
4 | | -## Description |
5 | | -// TODO(user): An in-depth paragraph about your project and overview of use |
| 3 | +<img src="https://github.com/databendlabs/databend/assets/172204/9997d8bc-6462-4dbd-90e3-527cf50a709c" alt="databend" /> |
6 | 4 |
|
7 | | -## Getting Started |
| 5 | +<div align="center"> |
8 | 6 |
|
9 | | -### Prerequisites |
10 | | -- go version v1.22.0+ |
11 | | -- docker version 17.03+. |
12 | | -- kubectl version v1.11.3+. |
13 | | -- Access to a Kubernetes v1.11.3+ cluster. |
| 7 | +<div> |
| 8 | +<a href="https://link.databend.com/join-slack"> |
| 9 | +<img src="https://img.shields.io/badge/slack-databend-0abd59?logo=slack" alt="slack" /> |
| 10 | +</a> |
14 | 11 |
|
15 | | -### To Deploy on the cluster |
16 | | -**Build and push your image to the location specified by `IMG`:** |
| 12 | +<a href="https://link.databend.com/join-feishu"> |
| 13 | +<img src="https://img.shields.io/badge/feishu-databend-0abd59" alt="feishu" /> |
| 14 | +</a> |
17 | 15 |
|
18 | | -```sh |
19 | | -make docker-build docker-push IMG=<some-registry>/databend-operator:tag |
20 | | -``` |
21 | | - |
22 | | -**NOTE:** This image ought to be published in the personal registry you specified. |
23 | | -And it is required to have access to pull the image from the working environment. |
24 | | -Make sure you have the proper permission to the registry if the above commands don’t work. |
| 16 | +<br> |
25 | 17 |
|
26 | | -**Install the CRDs into the cluster:** |
| 18 | +</div> |
| 19 | +</div> |
27 | 20 |
|
28 | | -```sh |
29 | | -make install |
30 | | -``` |
| 21 | +[Kubernetes](https://kubernetes.io/docs/home/) is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. [Operators](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) are software extensions to Kubernetes that make use of custom resources to manage applications and their components. Operators follow Kubernetes principles, notably the control loop. |
31 | 22 |
|
32 | | -**Deploy the Manager to the cluster with the image specified by `IMG`:** |
| 23 | +Use this operator to manage [Databend](https://github.com/databendlabs/databend) clusters which are deployed as custom resources. In short, the task of configuring, creating, managing, automatically scaling up and scaling-in of Databend cluster(s) in a Kubernetes environment has been made simple, easy and quick. |
33 | 24 |
|
34 | | -```sh |
35 | | -make deploy IMG=<some-registry>/databend-operator:tag |
36 | | -``` |
| 25 | +## Deploying Operator |
37 | 26 |
|
38 | | -> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin |
39 | | -privileges or be logged in as admin. |
| 27 | +Run the following command to install the latest changes of the Databend Operator: |
40 | 28 |
|
41 | | -**Create instances of your solution** |
42 | | -You can apply the samples (examples) from the config/sample: |
43 | | - |
44 | | -```sh |
45 | | -kubectl apply -k config/samples/ |
| 29 | +```shell |
| 30 | +kubectl apply -k "github.com/databendcloud/databend-operator/manifests" |
46 | 31 | ``` |
47 | 32 |
|
48 | | ->**NOTE**: Ensure that the samples has default values to test it out. |
49 | | -
|
50 | | -### To Uninstall |
51 | | -**Delete the instances (CRs) from the cluster:** |
52 | | - |
53 | | -```sh |
54 | | -kubectl delete -k config/samples/ |
55 | | -``` |
| 33 | +## Get Started |
56 | 34 |
|
57 | | -**Delete the APIs(CRDs) from the cluster:** |
| 35 | +You can get started by deploying [this example](./examples/get-started/) from `examples/get-started`! |
58 | 36 |
|
59 | | -```sh |
60 | | -make uninstall |
61 | | -``` |
| 37 | +Learn more about Databend deployments from [this guide](https://docs.databend.com/guides/deploy/deploy/understanding-deployment-modes). |
62 | 38 |
|
63 | | -**UnDeploy the controller from the cluster:** |
| 39 | +Step1: Deploy Databend Meta Cluster |
64 | 40 |
|
65 | | -```sh |
66 | | -make undeploy |
| 41 | +```shell |
| 42 | +helm repo add databend https://charts.databend.com |
| 43 | +helm install meta databend/databend-meta --namespace databend-system |
67 | 44 | ``` |
68 | 45 |
|
69 | | -## Project Distribution |
| 46 | +Step2: Prepare Object Storage |
70 | 47 |
|
71 | | -Following are the steps to build the installer and distribute this project to users. |
| 48 | +We'll use [Minio](https://github.com/minio/minio) as the object storage for our example. |
72 | 49 |
|
73 | | -1. Build the installer for the image built and published in the registry: |
74 | | - |
75 | | -```sh |
76 | | -make build-installer IMG=<some-registry>/databend-operator:tag |
| 50 | +```shell |
| 51 | +kubectl apply -f "github.com/databendcloud/databend-operator/examples/get-started/minio.yaml" |
77 | 52 | ``` |
78 | 53 |
|
79 | | -NOTE: The makefile target mentioned above generates an 'install.yaml' |
80 | | -file in the dist directory. This file contains all the resources built |
81 | | -with Kustomize, which are necessary to install this project without |
82 | | -its dependencies. |
83 | | - |
84 | | -2. Using the installer |
| 54 | +Step3: Define Tenant |
85 | 55 |
|
86 | | -Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.: |
87 | | - |
88 | | -```sh |
89 | | -kubectl apply -f https://raw.githubusercontent.com/<org>/databend-operator/<tag or branch>/dist/install.yaml |
| 56 | +```shell |
| 57 | +kubectl apply -f "github.com/databendcloud/databend-operator/examples/get-started/tenant.yaml" |
90 | 58 | ``` |
91 | 59 |
|
92 | | -## Contributing |
93 | | -// TODO(user): Add detailed information on how you would like others to contribute to this project |
94 | | - |
95 | | -**NOTE:** Run `make help` for more information on all potential `make` targets |
| 60 | +Step4: Deploy Dataebend Query Cluster(Warehouse) |
96 | 61 |
|
97 | | -More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html) |
| 62 | +```shell |
| 63 | +kubectl apply -f "github.com/databendcloud/databend-operator/examples/get-started/warehouse.yaml" |
| 64 | +``` |
98 | 65 |
|
99 | 66 | ## License |
100 | 67 |
|
|
0 commit comments