Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
whitewum committed Sep 2, 2021
2 parents 9e5cd84 + eb22b30 commit 7979f3d
Show file tree
Hide file tree
Showing 47 changed files with 5,759 additions and 401 deletions.
36 changes: 0 additions & 36 deletions docs-2.0/20.appendix/2.graph-modeling.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Most configurations are the same as the configurations of [Storage Service](../.

| Name | Default value | Description |
| :----------- | :----------------------- | :------------------|
| `daemonize` | `true` | Indicates whether to start the daemon. |
| `daemonize` | `true` | When set to `true`, the process is a daemon process. |
| `pid_file` | `pids_listener/nebula-storaged.pid` | The file that records the process ID. |
| `meta_server_addrs` | - | IP addresses and ports of all Meta services. Multiple Meta services are separated by commas. |
| `local_ip` | - | The local IP address of the Listener service. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Configurations

This document gives some introduction to configurations in Nebula Graph.
Nebula Graph builds the configurations based on the [gflags](https://gflags.github.io/gflags/) repository. Most configurations are flags. When the Nebula Graph service starts, it will get the configuration information from [Configuration files](#_4) by default. Configurations that are not in the file apply the default values.

For the path and usage of local configuration files for Nebula Graph services, see:
!!! note

* [Meta configuration](2.meta-config.md)
* [Graph configuration](3.graph-config.md)
* [Storage configuration](4.storage-config.md)
* Because there are many configurations and they may change as Nebula Graph develops, this topic will not introduce all configurations. To get detailed descriptions of configurations, follow the instructions below.
* It is not recommended to modify the configurations that are not introduced in this topic, unless you are familiar with the source code and fully understand the function of configurations.

## Get configurations
!!! compatibility "Legacy version compatibility"

In the topic of 1.x, we provide a method of using the `CONFIGS` command to modify the configurations in the cache. However, using this method in a production environment can easily cause inconsistencies of configurations between clusters and the local. Therefore, this method will no longer be introduced in the topic of 2.x.

## Get the configuration list and descriptions

Most configurations are gflags. You can get all the gflags and the explanations by the following command.
Use the following command to get all the configuration information of the service corresponding to the binary file:

```bash
<binary> --help
Expand All @@ -19,37 +22,72 @@ Most configurations are gflags. You can get all the gflags and the explanations
For example:

```bash
$ ./nebula-metad --help
$ ./nebula-graphd --help
$ ./nebula-storaged --help
$ ./nebula-console --help
# Get the help information from Meta
$ /usr/local/nebula/bin/nebula-metad --help

# Get the help information from Graph
$ /usr/local/nebula/bin/nebula-graphd --help

# Get the help information from Storage
$ /usr/local/nebula/bin/nebula-storaged --help
```

Besides, you can get the values of running flags by `curl`-ing from the services.
The above examples use the default storage path `/usr/local/nebula/bin/`. If you modify the installation path of Nebula Graph, use the actual path to query the configurations.

## Get configurations

Use the `curl` command to get the value of the running configurations.

!!! compatibility "Legacy version compatibility"

The `curl` commands and parameters in Nebula Graph v2.x. are different from Nebula Graph v1.x.

For example:

```bash
$ curl 127.0.0.1:19559/flags # From Meta
$ curl 127.0.0.1:19669/flags # From Graph
$ curl 127.0.0.1:19779/flags # From Storage
# Get the running configurations from Meta
curl 127.0.0.1:19559/flags

# Get the running configurations from Graph
curl 127.0.0.1:19669/flags

# Get the running configurations from Storage
curl 127.0.0.1:19779/flags
```

## Modify configurations
!!! Note

In an actual environment, use the real host IP address instead of `127.0.0.1` in the above example.

## 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/`.

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.

!!! caution

To ensure the availability of services, the configurations of the same service must be consistent, except for the local IP address `local_ip`. For example, three Storage servers are deployed in one Nebula Graph cluster. The configurations of the three Storage servers need to be the same, except for the IP address.

The initial configuration files corresponding to each service are as follows.

We suggest that you change configurations from local configure files. To change configurations from local files, follow these steps:
| Nebula Graph service | Initial configuration file | Description |
| - | - | - |
| Meta | `nebula-metad.conf.default` and `nebula-metad.conf.production` | [Meta service configuration](2.meta-config.md) |
| Graph | `nebula-graphd.conf.default` and `nebula-graphd.conf.production` | [Graph service configuration](3.graph-config.md) |
| Storage | `nebula-storaged.conf.default` and `nebula-storaged.conf.production` | [Storage service configuration](4.storage-config.md) |

1. Add `--local_config=true` to each configuration file.
The configuration files are stored in `/usr/local/nebula/etc/` by default. If you have customized your Nebula Graph installation directory, the path to your configuration files is `$pwd/nebula/etc/`.
2. Save your modification to the files.
3. Restart the Nebula Graph services.
Each initial configuration file of all services contains `local_config`. The default value is `true`, which means that the Nebula Graph service will get configurations from its configuration files and start it.

!!! caution

Remember to add `--local_config=true` to each configuration file.
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.

## 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:

To make your modifications take effect, restart all the Nebula Graph services.
1. Use a text editor to modify the configuration files of the target service and save the modification.

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

The `curl` commands and parameters in Nebula Graph v2.x. are different from Nebula Graph v1.x. Those `curl` commands in v1.x are deprecated now.
Loading

0 comments on commit 7979f3d

Please sign in to comment.