Skip to content

Commit

Permalink
new for configs (#965)
Browse files Browse the repository at this point in the history
* new for configs

* Update docs-2.0/5.configurations-and-logs/1.configurations/1.configurations.md

Co-authored-by: max.zhu@vesoft.com <86282370+izhuxiaoqing@users.noreply.github.com>

* Update 1.configurations.md

Co-authored-by: max.zhu@vesoft.com <86282370+izhuxiaoqing@users.noreply.github.com>
  • Loading branch information
abby-cyber and izhuxiaoqing committed Dec 6, 2021
1 parent 2a8d57e commit 0c1663a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ graphd:

2. In the `nebula-docker-compose` directory, run `docker-compose pull` to update the images of the Graph Service, Storage Service, and Meta Service.

!!! note
Note that all the Nebula Graph services are stopped before running the command `docker-compose pull`.

3. Run `docker-compose up -d` to start the Nebula Graph services again.

4. After connecting to Nebula Graph with Nebula Console, run `SHOW HOSTS GRAPH`, `SHOW HOSTS STORAGE`, or `SHOW HOSTS META` to check the version of the responding service respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ curl 127.0.0.1:19779/flags

## Configuration files

Nebula Graph provides two initial configuration files for each service, `<service_name>.conf.default` and `<service_name>.conf.production`. Users can use them in different scenarios conveniently. The default path is `/usr/local/nebula/etc/`.
### Configuration files for clusters installed from source, with an RPM/DEB package, or a TAR package

Nebula Graph provides two initial configuration files for each service, `<service_name>.conf.default` and `<service_name>.conf.production`. You can use them in different scenarios conveniently. For clusters installed from source and with a RPM/DEB package, the default path is `/usr/local/nebula/etc/`. For clusters installed with a TAR package, the path is `<install_path>/<tar_package_directory>/etc`.

The configuration values in the initial configuration file are for reference only and can be adjusted according to actual needs. To use the initial configuration file, choose one of the above two files and delete the suffix `.default` or `.production` to make it valid.

Expand All @@ -83,9 +85,36 @@ Each initial configuration file of all services contains `local_config`. The def

It is not recommended to modify the value of `local_config` to `false`. If modified, the Nebula Graph service will first read the cached configurations, which may cause configuration inconsistencies between clusters and cause unknown risks.

### Configuration files for clusters installed with Docker Compose

For clusters installed with Docker Compose, the configuration file's default installation path of the cluster is `<install_path>/nebula-docker-compose/docker-compose.yaml`. The parameters in the `command` field of the file are the launch parameters for each service.

### Configuration files for clusters installed with Nebula Operator

For clusters installed with Kubectl through Nebula Operator, the configuration file's path is the path of the cluster YAML file. You can modify the configuration of each service through the `spec.{graphd|storaged|metad}.config` parameter.

!!! note

The services cannot be configured for clusters installed with Helm.

## Modify configurations

By default, each Nebula Graph service gets configurations from its configuration files. Users can modify configurations and make them valid according to the following steps:
By default, each Nebula Graph service gets configured from its configuration files. You can modify configurations and make them valid according to the following steps:

* For clusters installed from source, with a RPM/DEB, or a TAR package

1. Use a text editor to modify the configuration files of the target service and save the modification.

2. Choose an appropriate time to restart **all** Nebula Graph services to make the modifications valid.

* For clusters installed with Docker Compose

1. In the `<install_path>/nebula-docker-compose/docker-compose.yaml` file, modify the configurations of the target service.
2. In the `nebula-docker-compose` directory, run the command `docker-compose up -d` to restart the service involving configuration modifications.

* For clusters installed with Kubectl

For details, see [Customize configuration parameters for a Nebula Graph cluster](../../nebula-operator/8.custom-cluster-configurations/8.1.custom-conf-parameter.md).

1. Use a text editor to modify the configuration files of the target service and save the modification.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You have created a Nebula Graph cluster. For how to create a cluster with Kubect

## Steps

The following example uses a cluster named `nebula` to show how to set `config` for the Graph service in a Nebula Graph cluster.
The following example uses a cluster named `nebula` and the cluster's configuration file named `nebula_cluster.yaml` to show how to set `config` for the Graph service in a Nebula Graph cluster.

1. Run the following command to access the edit page of the `nebula` cluster.

Expand Down Expand Up @@ -57,6 +57,8 @@ The following example uses a cluster named `nebula` to show how to set `config`
...
```

3. Run `kubectl apply -f nebula_cluster.yaml` to push your configuration changes to the cluster.

After customizing the parameters `enable_authorize` and `auth_type`, the configurations in the corresponding ConfigMap (`nebula-graphd`) of the Graph service will be overwritten.

## Learn more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You have created a cluster. For how to create a cluster with Kubectl, see [Creat

## Steps

The following example uses a cluster named `nebula` to show how to set `enablePVReclaim`:
The following example uses a cluster named `nebula` and the cluster's configuration file named `nebula_cluster.yaml` to show how to set `enablePVReclaim`:

1. Run the following command to access the edit page of the `nebula` cluster.

Expand Down Expand Up @@ -96,3 +96,5 @@ The following example uses a cluster named `nebula` to show how to set `enablePV
version: {{nebula.branch}}
...
```

3. Run `kubectl apply -f nebula_cluster.yaml` to push your configuration changes to the cluster.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You have created a Nebula Graph cluster. For how to create a cluster with Kubect

## Steps

The following example uses a cluster named `nebula` to show how to set `enableAutoBalance`.
The following example uses a cluster named `nebula` and the cluster's configuration file named `nebula_cluster.yaml` to show how to set `enableAutoBalance`.

1. Run the following command to access the edit page of the `nebula` cluster.

Expand Down Expand Up @@ -101,4 +101,6 @@ The following example uses a cluster named `nebula` to show how to set `enableAu

- When the value of `enableAutoBalance` is set to `false`, the Storage data will not be automatically balanced after the Storage service is scaled out.

- When the `enableAutoBalance` parameter is not set, the system will not automatically balance Storage data by default after the Storage service is scaled out.
- When the `enableAutoBalance` parameter is not set, the system will not automatically balance Storage data by default after the Storage service is scaled out.

3. Run `kubectl apply -f nebula_cluster.yaml` to push your configuration changes to the cluster.

0 comments on commit 0c1663a

Please sign in to comment.