Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lm in operator #2109

Merged
merged 2 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
- [You have created StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)

{{ ent.ent_begin }}
- You have prepared the license file for NebulaGraph Enterprise Edition clusters.

!!! enterpriseonly
- [LM has been installed and the License Key has been successfully loaded](../../9.about-license/2.license-management-suite/3.license-manager.md)

The license file is required only when creating a NebulaGraph Enterprise Edition cluster.
{{ ent.ent_end }}
## Create clusters

Expand Down Expand Up @@ -63,36 +61,17 @@ The following example shows how to create a NebulaGraph cluster by creating a cl

| Parameter | Default value | Description |
| :---- | :--- | :--- |
| `spec.metad.license` | - | The configuration of the license for creating a NebulaGraph Enterprise Edition cluster. |
| `spec.metad.licenseManagerURL` | - | Configure the URL that points to the LM, which consists of the access address and port number (default port `9119`) of the LM. For example, `192.168.8.100:9119`. **You must configure this parameter in order to obtain the license information; otherwise, the enterprise edition cluster cannot be used.** |
|`spec.storaged.enableAutoBalance`| `false`| Specifies whether to enable automatic data balancing. For more information, see [Balance storage data after scaling out](../8.custom-cluster-configurations/8.3.balance-data-when-scaling-storage.md).|
|`spec.enableBR`|`false`|Specifies whether to enable the BR tool. For more information, see [Backup and restore](../10.backup-restore-using-operator.md).|

!!! enterpriseonly

Make sure that you have access to NebulaGraph Enterprise Edition images before pulling the image. For details, contact our sales team ([[email protected]](mailto:[email protected]))


2. Configure the license for the Enterprise Edition cluster.

!!! enterpriseonly

- This step is required only for creating a NebulaGraph Grpah Enterprise Edition cluster.

- Ignore this step if you are creating a NebulaGraph Community Edition cluster.


```bash
kubectl create secret generic nebula-license --from-file=nebula.license
```

To check the details of the license, run the following command:

```bash
kubectl get secrets nebula-license -o yaml
```
{{ ent.ent_end }}

3. Create a NebulaGraph cluster.
2. Create a NebulaGraph cluster.

```bash
kubectl create -f apps_v1alpha1_nebulacluster.yaml
Expand All @@ -104,7 +83,7 @@ The following example shows how to create a NebulaGraph cluster by creating a cl
nebulacluster.apps.nebula-graph.io/nebula created
```

4. Check the status of the NebulaGraph cluster.
3. Check the status of the NebulaGraph cluster.

```bash
kubectl get nebulaclusters.apps.nebula-graph.io nebula
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
- [You have created StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)

{{ ent.ent_begin }}
- You have prepared the license file for NebulaGraph Enterprise Edition clusters.

!!! enterpriseonly
- [LM has been installed and the License Key has been successfully loaded](../../9.about-license/2.license-management-suite/3.license-manager.md)

The license file is required only when creating a NebulaGraph Enterprise Edition cluster.
{{ ent.ent_end }}

## Create clusters
Expand Down Expand Up @@ -46,50 +44,24 @@
kubectl create namespace "${NEBULA_CLUSTER_NAMESPACE}"
```

{{ ent.ent_begin }}

5. Configure the license for the Enterprise Edition cluster.

!!! enterpriseonly

- This step is required only for creating a NebulaGraph Grpah Enterprise Edition cluster.

- Ignore this step if you are creating a NebulaGraph Community Edition cluster.


```bash
kubectl create secret generic nebula-license --from-file=nebula.license
```

To check the details of the license, run the following command:

```bash
kubectl get secrets nebula-license -o yaml
```
{{ ent.ent_end }}

6. Apply the variables to the Helm chart to create a NebulaGraph cluster.
5. Apply the variables to the Helm chart to create a NebulaGraph cluster.

```bash
helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
{{ ent.ent_begin }}
# Configure the access address and port (default port is '9119') that points to the LM. You must configure this parameter in order to obtain the license information. Only for NebulaGraph Enterprise Edition clusters.
--set nebula.metad.licenseManagerURL=`192.168.8.XXX:9119` \
{{ ent.ent_end }}
--set nameOverride=${NEBULA_CLUSTER_NAME} \
--set nebula.storageClassName="${STORAGE_CLASS_NAME}" \
# Specify the version of the NebulaGraph cluster.
--set nebula.version=v{{nebula.release}} \
# Specify the version of the nebula-cluster chart. If not specified, the latest version of the chart is installed by default.
--version={{operator.release}}
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
```

{{ ent.ent_begin }}

!!! enterpriseonly

You must add `--set nebula.metad.license.secretName=nebula-license` and `--set nebula.metad.license.licenseKey=nebula.license` when creating a NebulaGraph Enterprise Edition cluster.

{{ ent.ent_end }}

7. Check the status of the NebulaGraph cluster you created.
6. Check the status of the NebulaGraph cluster you created.

```bash
kubectl -n "${NEBULA_CLUSTER_NAMESPACE}" get pod -l "app.kubernetes.io/cluster=${NEBULA_CLUSTER_NAME}"
Expand Down Expand Up @@ -187,7 +159,7 @@ helm uninstall nebula --namespace=nebula
| `nebula.metad.resources` | `{"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}}` | The resource configurations for the Metad service. |
| `nebula.metad.logStorage` | `500Mi` | The log disk capacity for the Metad service. |
| `nebula.metad.dataStorage` | `1Gi` | The data disk capacity for the Metad service. |
| `nebula.metad.license` | `{}` | The license configurations for creating a NebulaGraph Enterprise Edition cluster. |
| `nebula.metad.licenseManagerURL` | `{}` | Configure the URL that points to the LM, which consists of the access address and port number (default port `9119`) of the LM. For example, `192.168.8.100:9119`. **You must configure this parameter in order to obtain the license information; otherwise, the enterprise edition cluster cannot be used.**|
| `nebula.metad.podLabels` | `{}` | Labels for the Metad pod in a NebulaGraph cluster. |
| `nebula.metad.podAnnotations` | `{}` | Pod annotations for the Metad pod in a NebulaGraph cluster. |
| `nebula.metad.nodeSelector` | `{}` | Labels for the Metad pod to be scheduled to the specified node. |
Expand Down