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

[wip] [sc]updates for operator #2255

Merged
merged 12 commits into from
Sep 19, 2023
4 changes: 2 additions & 2 deletions docs-2.0/4.deployment-and-installation/5.zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ In the above figure, the six machines with the running storage service are group
- The value of `--assigned_zone` is a string and does not support English commas (,).
- When the value of `--assigned_zone` is empty, it indicates that all Zones are accessed.

2. Set `--enable_intra_zone_routing=true` to enable the function of accessing the specified Zone.
2. Set `--prioritize_intra_zone_reading=true` to enable the function of accessing the specified Zone.

!!! caution

It is recommended that the values of `--enable_intra_zone_routing` in different Graph services be consistent, otherwise, the load of Storage nodes will be unbalanced and unknown risks will occur.
It is recommended that the values of `--prioritize_intra_zone_reading` in different Graph services be consistent, otherwise, the load of Storage nodes will be unbalanced and unknown risks will occur.

For details on the Graph configuration, see [Graph service configuration](../5.configurations-and-logs/1.configurations/3.graph-config.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The following features are already available in NebulaGraph Operator:
- **Deploy and uninstall clusters**: NebulaGraph Operator simplifies the process of deploying and uninstalling clusters for users. NebulaGraph Operator allows you to quickly create, update, or delete a NebulaGraph cluster by simply providing the corresponding CR file. For more information, see [Deploy NebulaGraph Clusters with Kubectl](3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md) or [Deploy NebulaGraph Clusters with Helm](3.deploy-nebula-graph-cluster/3.2create-cluster-with-helm.md).

{{ent.ent_begin}}
- **Manage Zones**: Supports dividing multiple storage hosts into managed zones and creating graph spaces on specified storage hosts to achieve resource isolation. For more information, see [Create clusters using Zones with kubectl](3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md#create_clusters) or [Create clusters using Zones with Helm](3.deploy-nebula-graph-cluster/3.2create-cluster-with-helm.md).

- **Scale clusters**: NebulaGraph Operator calls NebulaGraph's native scaling interfaces in a control loop to implement the scaling logic. You can simply perform scaling operations with YAML configurations and ensure the stability of data. For more information, see [Scale clusters with Kubectl](3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md) or [Scale clusters with Helm](3.deploy-nebula-graph-cluster/3.2create-cluster-with-helm.md).

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,67 @@
--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.
# Run 'helm search repo nebula-operator/nebula-cluster' to view the available versions of the chart.
--version={{operator.release}}
--version={{operator.release}} \
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
```

{{ent.ent_begin}}
!!! enterpriseonly

For NebulaGraph Enterprise, run the following command to create a NebulaGraph cluster:

```bash
helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \
# 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` \
# Configure the image addresses for each service in the cluster.
--set nebula.graphd.image=<reg.example-inc.com/test/graphd-ent> \
--set nebula.metad.image=<reg.example-inc.com/test/metad-ent> \
--set nebula.storaged.image=<reg.example-inc.com/test/storaged-ent> \
# Configure the Secret for pulling images from a private repository.
--set nebula.imagePullSecrets=<image-pull-secret> \
--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.
# Run 'helm search repo nebula-operator/nebula-cluster' to view the available versions of the chart.
--version={{operator.release}}
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
```
{{ent.ent_end}}

To create a NebulaGraph cluster for Enterprise Edition, run the following command:

=== "Cluster without Zones"

```bash
helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \
# 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` \
# Configure the image addresses for each service in the cluster.
--set nebula.graphd.image=<reg.example-inc.com/test/graphd-ent> \
--set nebula.metad.image=<reg.example-inc.com/test/metad-ent> \
--set nebula.storaged.image=<reg.example-inc.com/test/storaged-ent> \
# Configure the Secret for pulling images from a private repository.
--set nebula.imagePullSecrets=<image-pull-secret> \
--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.
# Run 'helm search repo nebula-operator/nebula-cluster' to view the available versions of the chart.
--version={{operator.release}} \
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
```

=== "Cluster with Zones"

NebulaGraph Operator supports the [Zones](../../4.deployment-and-installation/5.zone.md) feature. For how to use Zones in NebulaGraph Operator, see [Learn more about Zones in NebulaGraph Operator](3.1create-cluster-with-kubectl.md)

```bash
helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \
# 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` \
# Configure the image addresses for each service in the cluster.
--set nebula.graphd.image=<reg.example-inc.com/test/graphd-ent> \
--set nebula.metad.image=<reg.example-inc.com/test/metad-ent> \
--set nebula.storaged.image=<reg.example-inc.com/test/storaged-ent> \
# Configure the Secret for pulling images from a private repository.
--set nebula.imagePullSecrets=<image-pull-secret> \
--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.
# Run 'helm search repo nebula-operator/nebula-cluster' to view the available versions of the chart.
--version={{operator.release}} \
# Configure Zones
# Once Zones are configured, the Zone information cannot be modified.
# It's suggested to configure an odd number of Zones.
--set nebula.metad.config.zone_list=<zone1,zone2,zone3> \
--set nebula.graphd.config.prioritize_intra_zone_reading=true \
--set nebula.graphd.config.stick_to_intra_zone_on_failure=false \
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
```

{{ent.ent_end}}

To view all configuration parameters of the NebulaGraph cluster, run the `helm show values nebula-operator/nebula-cluster` command or click [nebula-cluster/values.yaml](https://github.com/vesoft-inc/nebula-operator/blob/{{operator.branch}}/charts/nebula-cluster/values.yaml).

Expand All @@ -108,7 +139,7 @@
Use the `--set` argument to set configuration parameters for the cluster. For example, `--set nebula.storaged.replicas=3` will set the number of replicas for the Storage service in the cluster to 3.


7. Check the status of the NebulaGraph cluster you created.
1. 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
52 changes: 47 additions & 5 deletions docs-2.0/nebula-operator/4.connect-to-nebula-graph-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ Steps:
- `-u`: The username of your NebulaGraph account. Before enabling authentication, you can use any existing username. The default username is root.
- `-p`: The password of your NebulaGraph account. Before enabling authentication, you can use any characters as the password.

!!! note

If the `spec.console` field is set in the cluster configuration file, you can also connect to NebulaGraph databases with the following command:

```bash
# Enter the nebula-console Pod.
kubectl exec -it nebula-console -- /bin/sh

# Connect to NebulaGraph databases.
nebula-console -addr <node_ip> -port <node_port> -u <username> -p <password>
```

For information about the nebula-console container, see [nebula-console](https://github.com/vesoft-inc/nebula-operator/blob/v{{operator.release}}/doc/user/nebula_console.md#nebula-console).

## Connect to NebulaGraph databases from within a NebulaGraph cluster

Expand Down Expand Up @@ -160,6 +173,7 @@ You can also create a `ClusterIP` type Service to provide an access point to the

```bash
kubectl run -ti --image vesoft/nebula-console:{{console.tag}} --restart=Never -- nebula-console -addr 10.98.213.34 -port 9669 -u root -p vesoft
```

- `--image`: The image for the tool NebulaGraph Console used to connect to NebulaGraph databases.
- `<nebula-console>`: The custom Pod name.
Expand All @@ -176,13 +190,27 @@ You can also create a `ClusterIP` type Service to provide an access point to the
(root@nebula) [(none)]>
```

You can also connect to NebulaGraph databases with **Fully Qualified Domain Name (FQDN)**. The domain format is `<cluster-name>-graphd.<cluster-namespace>.svc.<CLUSTER_DOMAIN>`. The default value of `CLUSTER_DOMAIN` is `cluster.local`.
You can also connect to NebulaGraph databases with **Fully Qualified Domain Name (FQDN)**. The domain format is `<cluster-name>-graphd.<cluster-namespace>.svc.<CLUSTER_DOMAIN>`. The default value of `CLUSTER_DOMAIN` is `cluster.local`.

```bash
kubectl run -ti --image vesoft/nebula-console:{{console.tag}} --restart=Never -- <nebula_console_name> -addr <cluster_name>-graphd-svc.default.svc.cluster.local -port <service_port> -u <username> -p <password>
```
```bash
kubectl run -ti --image vesoft/nebula-console:{{console.tag}} --restart=Never -- <nebula_console_name> -addr <cluster_name>-graphd-svc.default.svc.cluster.local -port <service_port> -u <username> -p <password>
```

`service_port` is the port to connect to Graphd services, the default port of which is `9669`.
`service_port` is the port to connect to Graphd services, the default port of which is `9669`.

!!! note

If the `spec.console` field is set in the cluster configuration file, you can also connect to NebulaGraph databases with the following command:

```bash
# Enter the nebula-console Pod.
kubectl exec -it nebula-console -- /bin/sh

# Connect to NebulaGraph databases.
nebula-console -addr nebula-graphd-svc.default.svc.cluster.local -port 9669 -u <username> -p <password>
```

For information about the nebula-console container, see [nebula-console](https://github.com/vesoft-inc/nebula-operator/blob/v{{operator.release}}/doc/user/nebula_console.md#nebula-console).

## Connect to NebulaGraph databases from outside a NebulaGraph cluster via Ingress

Expand Down Expand Up @@ -275,3 +303,17 @@ Steps are as follows.
If you don't see a command prompt, try pressing enter.
(root@nebula) [(none)]>
```

!!! note

If the `spec.console` field is set in the cluster configuration file, you can also connect to NebulaGraph databases with the following command:

```bash
# Enter the nebula-console Pod.
kubectl exec -it nebula-console -- /bin/sh

# Connect to NebulaGraph databases.
nebula-console -addr <host_ip> -port <external_port> -u <username> -p <password>
```

For information about the nebula-console container, see [nebula-console](https://github.com/vesoft-inc/nebula-operator/blob/v{{operator.release}}/doc/user/nebula_console.md#nebula-console).
Loading