Skip to content

Commit

Permalink
Changes involving LM (#2072)
Browse files Browse the repository at this point in the history
* Changes involving LM

* update

* update

* update

* Update 0.FAQ.md (#2089)

* link-fix-for-dashboart-ent (#2088)

* support-ssl-in-operator (#2095)

* add-lm-by-docker-compose (#2104)

* Update 6.cheatsheet-for-ngql.md (#2101)

* allow-expression-like-return-v.tag (#2100)

* tag-license-to-ent-only (#2097)

* tag-license-to-ent-only

* add opts

---------

Co-authored-by: abby.huang <[email protected]>
  • Loading branch information
cooper-lzy and abby-cyber authored Jun 26, 2023
1 parent f034f7f commit ee2471d
Show file tree
Hide file tree
Showing 25 changed files with 261 additions and 549 deletions.
4 changes: 2 additions & 2 deletions docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@
| Retrieve vertices | `LOOKUP ON player WHERE player.name == "Tony Parker" YIELD player.name AS name, player.age AS age` | The following example returns vertices whose `name` is `Tony Parker` and the tag is `player`. |
| Retrieve edges | `LOOKUP ON follow WHERE follow.degree == 90 YIELD follow.degree` | Returns edges whose `degree` is `90` and the edge type is `follow`. |
| List vertices with a tag | `LOOKUP ON player YIELD properties(vertex),id(vertex)` | Shows how to retrieve the VID of all vertices tagged with `player`. |
| List edges with an edge types | `LOOKUP ON like YIELD edge AS e` | Shows how to retrieve the source Vertex IDs, destination vertex IDs, and ranks of all edges of the `like` edge type. |
| List edges with an edge types | `LOOKUP ON follow YIELD edge AS e` | Shows how to retrieve the source Vertex IDs, destination vertex IDs, and ranks of all edges of the `follow` edge type. |
| Count the numbers of vertices or edges | `LOOKUP ON player YIELD id(vertex)| YIELD COUNT(*) AS Player_Count` | Shows how to count the number of vertices tagged with `player`. |
| Count the numbers of edges | `LOOKUP ON like YIELD id(vertex)| YIELD COUNT(*) AS Like_Count` | Shows how to count the number of edges of the `like` edge type. |
| Count the numbers of edges | `LOOKUP ON follow YIELD edge as e| YIELD COUNT(*) AS Like_Count` | Shows how to count the number of edges of the `follow` edge type. |



Expand Down
22 changes: 12 additions & 10 deletions docs-2.0/3.ngql-guide/8.clauses-and-options/return.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,24 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) \

## Return properties

To return a vertex or edge property, use the `{<vertex_name>|<edge_name>}.<property>` syntax.
When returning properties of a vertex, it is necessary to specify the tag to which the properties belong because a vertex can have multiple tags and the same property name can appear on different tags.

It is possible to specify the tag of a vertex to return all properties of that tag, or to specify both the tag and a property name to return only that property of the tag.

```ngql
nebula> MATCH (v:player) \
RETURN v.player.name, v.player.age \
RETURN v.player, v.player.name, v.player.age \
LIMIT 3;
+------------------+--------------+
| v.player.name | v.player.age |
+------------------+--------------+
| "Danny Green" | 31 |
| "Tiago Splitter" | 34 |
| "David West" | 38 |
+------------------+--------------+
+--------------------------------------+---------------------+--------------+
| v.player | v.player.name | v.player.age |
+--------------------------------------+---------------------+--------------+
| {age: 33, name: "LaMarcus Aldridge"} | "LaMarcus Aldridge" | 33 |
| {age: 25, name: "Kyle Anderson"} | "Kyle Anderson" | 25 |
| {age: 40, name: "Kobe Bryant"} | "Kobe Bryant" | 40 |
+--------------------------------------+---------------------+--------------+
```

Use the syntax `<vertex_name>.<tag_name>.<property_name>` to return the property of a vertex; use the syntax `<edge_name>.<property_name>` to return the property of an edge.
When returning edge properties, it is not necessary to specify the edge type to which the properties belong, because an edge can only have one edge type.

```ngql
// Return the property of a vertex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Installing NebulaGraph from the source code allows you to customize the compilin

- The host to be installed with NebulaGraph has access to the Internet.

{{ ent.ent_begin }}
- The [license key](../../9.about-license/2.license-management-suite/3.license-manager.md) is loaded.
{{ ent.ent_end }}

## Installation steps

1. Use Git to clone the source code of NebulaGraph to the host.
Expand Down Expand Up @@ -72,7 +76,13 @@ Installing NebulaGraph from the source code allows you to customize the compilin
$ sudo make install
```

7. The configuration files in the `etc/` directory (`/usr/local/nebula/etc` by default) are references. Users can create their own configuration files accordingly. If you want to use the scripts in the `script` directory to start, stop, restart, and kill the service, and check the service status, the configuration files have to be named as `nebula-graph.conf`, `nebula-metad.conf`, and `nebula-storaged.conf`.
{{ ent.ent_begin }}
7. (Enterprise only) For Enterprise Edition, set the value of `license_manager_url` to the host IP and port number `9119` where the license management tool is located in the Meta service configuration file of NebulaGraph (`nebula-metad.conf`), e.g. `192.168.8.100:9119`.
{{ ent.ent_end }}

!!! note

The configuration files in the `etc/` directory (`/usr/local/nebula/etc` by default) are references. Users can create their own configuration files accordingly. If you want to use the scripts in the `script` directory to start, stop, restart, and kill the service, and check the service status, the configuration files have to be named as `nebula-graph.conf`, `nebula-metad.conf`, and `nebula-storaged.conf`.

## Update the master branch

Expand All @@ -84,11 +94,7 @@ The source code of the master branch changes frequently. If the corresponding Ne

## Next to do

{{ ent.ent_begin }}
- (Enterprise Edition)[Deploy license](../deploy-license.md)
{{ ent.ent_end }}

- [Manage NebulaGraph services](../../2.quick-start/5.start-stop-service.md)
[Manage NebulaGraph services](../../2.quick-start/5.start-stop-service.md)

## CMake variables

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Using Docker Compose can quickly deploy NebulaGraph services based on the prepar

## Deploy NebulaGraph


1. Clone the `{{dockercompose.release}}` branch of the `nebula-docker-compose` repository to your host with Git.

!!! danger
Expand All @@ -34,13 +35,47 @@ Using Docker Compose can quickly deploy NebulaGraph services based on the prepar

The `x.y` version of Docker Compose aligns to the `x.y` version of NebulaGraph. For the NebulaGraph `z` version, Docker Compose does not publish the corresponding `z` version, but pulls the `z` version of the NebulaGraph image.

!!! note
For installation of the NebulaGraph enterprise version, [contact us](https://www.nebula-graph.io/contact).

2. Go to the `nebula-docker-compose` directory.

```bash
$ cd nebula-docker-compose/
```

3. Run the following command to start all the NebulaGraph services.
{{ ent.ent_begin }}

3. Configure License Manager address (skip this step if you are using the community version).

1. Edit the `docker-compose.yml` file.

```bash
$ cd nebula-docker-compose/
$ vim docker-compose.yml
```

2. Add the `license_manager_url` field under all `services.metad{number}.command` and set its value to the access address of LM.

```yaml
...
services:
metad0:
command:
- --license_manager_url=<LM_ADDR>:<LM_PORT> // <LM_ADDR> is the address of the LM service, and <LM_PORT> is the port of the LM service, which is 9119 by default.
metad1:
command:
- --license_manager_url=<LM_ADDR>:<LM_PORT>
...
```

3. Save and exit.


{{ ent.ent_end }}


4. Run the following command to start all the NebulaGraph services.


!!! Note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ You can install NebulaGraph by downloading the tar.gz file.

- NebulaGraph is currently only supported for installation on Linux systems, and only CentOS 7.x, CentOS 8.x, Ubuntu 16.04, Ubuntu 18.04, and Ubuntu 20.04 operating systems are supported.

{{ ent.ent_begin }}
## Prerequisites

- The [license key](../../9.about-license/2.license-management-suite/3.license-manager.md) is loaded.
{{ ent.ent_end }}

## Installation steps

Expand Down Expand Up @@ -65,13 +70,19 @@ You can install NebulaGraph by downloading the tar.gz file.

3. Modify the name of the configuration file.

Enter the decompressed directory, rename the files `nebula-graphd.conf.default`, `nebula-metad.conf.default`, and `nebula-storaged.conf.default` in the subdirectory `etc`, and delete `.default` to apply the default configuration of NebulaGraph. To modify the configuration, see [Configurations](../../5.configurations-and-logs/1.configurations/1.configurations.md).
Enter the decompressed directory, rename the files `nebula-graphd.conf.default`, `nebula-metad.conf.default`, and `nebula-storaged.conf.default` in the subdirectory `etc`, and delete `.default` to apply the default configuration of NebulaGraph.

{{ ent.ent_begin }}
4. (Enterprise only) For Enterprise Edition, set the value of `license_manager_url` to the host IP and port number `9119` where the license management tool is located in the Meta service configuration file of NebulaGraph (`nebula-metad.conf`), e.g. `192.168.8.100:9119`.
{{ ent.ent_end }}


!!! note

To modify the configuration, see [Configurations](../../5.configurations-and-logs/1.configurations/1.configurations.md).

So far, you have installed NebulaGraph successfully.

## Next to do
{{ ent.ent_begin }}
- (Enterprise Edition)[Deploy license](../deploy-license.md)
{{ ent.ent_end }}

- [Manage NebulaGraph services](../manage-service.md)
[Manage NebulaGraph services](../manage-service.md)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ For now, NebulaGraph does not provide an official deployment tool. Users can dep

- Prepare 5 machines for deploying the cluster.
- Use the NTP service to synchronize time in the cluster.
{{ ent.ent_begin }}
- The [license key](../../9.about-license/2.license-management-suite/3.license-manager.md) is loaded.
{{ ent.ent_end }}

## Manual deployment process

Expand All @@ -27,15 +30,6 @@ Install NebulaGraph on each machine in the cluster. Available approaches of inst

* [Install NebulaGraph by compiling the source code](1.install-nebula-graph-by-compiling-the-source-code.md)

{{ ent.ent_begin }}
### Add a license (for the Enterprise Edition only).

- Adding a license is only required when you deploy a NebulaGraph cluster with the Enterprise Edition. For details, see [Deploy a license for NebulaGraph Enterprise Edition](../../4.deployment-and-installation/deploy-license.md).

- Skip this step when you deploy a cluster with the Community Edition.

{{ ent.ent_end }}

### Modify the configurations

To deploy NebulaGraph according to your requirements, you have to modify the configuration files.
Expand All @@ -62,6 +56,12 @@ Users can refer to the content of the following configurations, which only show

- [Storage Service configurations](../../5.configurations-and-logs/1.configurations/4.storage-config.md)

{{ ent.ent_begin }}
!!! enterpriseonly

For Enterprise Edition, set the value of `license_manager_url` to the host IP and port number `9119` where the license management tool is located in the Meta service configuration file of NebulaGraph (`nebula-metad.conf`), e.g. `192.168.8.100:9119`.
{{ ent.ent_end }}

- Deploy machine A

- `nebula-graphd.conf`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ This topic takes the enterprise edition of NebulaGraph v3.1.0 as an example and

After the upgrade, a `data` directory will be generated in the v{{nebula.release}} installation directory, containing the upgraded data files.

4. Upload the license file to the `share/resources` directory under the v{{nebula.release}} installation directory.

5. Start and connect to the NebulaGraph v{{nebula.release}} enterprise edition service and verify that the data is correct. The following commands can be used as reference:
4. Start and connect to the NebulaGraph v{{nebula.release}} enterprise edition service and verify that the data is correct. The following commands can be used as reference:

```
nebula> SHOW HOSTS;
Expand Down
106 changes: 0 additions & 106 deletions docs-2.0/4.deployment-and-installation/deploy-license.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ For all parameters and their current values, see [Configurations](1.configuratio
| `pid_file` | `pids/nebula-metad.pid` | The file that records the process ID. | No|
| `timezone_name` | - | Specifies the NebulaGraph time zone. This parameter is not predefined in the initial configuration files. You can manually set it if you need it. The system default value is `UTC+00:00:00`. For the format of the parameter value, see [Specifying the Time Zone with TZ](https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html "Click to view the timezone-related content in the GNU C Library manual"). For example, `--timezone_name=UTC+08:00` represents the GMT+8 time zone.|No|

!!! note

* While inserting property values of [time types](../../3.ngql-guide/3.data-types/4.date-and-time.md), NebulaGraph transforms time types (except TIMESTAMP) to the corresponding UTC according to the time zone specified by `timezone_name`. The time-type values returned by nGQL queries are all UTC time.
* `timezone_name` is only used to transform the data stored in NebulaGraph. Other time-related data of the NebulaGraph processes still uses the default time zone of the host, such as the log printing time.

{{ ent.ent_begin }}
## enterprise license configurations

| Name | Predefined value | Description |Whether supports runtime dynamic modifications|
| ----------- | ----------------------- | ---------------------------------------------------- |----------------- |
|`license_path`|`share/resources/nebula.license`| Path of the license of the NebulaGraph Enterprise Edition. Users need to [deploy a license file](../../4.deployment-and-installation/deploy-license.md) before starting the Enterprise Edition. This parameter is required only for the NebulaGraph Enterprise Edition. For details about how to configure licenses for other ecosystem tools, see the deployment documents of the corresponding ecosystem tools.| No|
|`license_manager_url`|-|The address of license manager. Set the value to the host IP and port number `9119` where the license management tool is located in the Meta service configuration file of NebulaGraph (`nebula-metad.conf`), e.g. `192.168.8.100:9119`.|No|

{{ ent.ent_end }}

!!! note

* While inserting property values of [time types](../../3.ngql-guide/3.data-types/4.date-and-time.md), NebulaGraph transforms time types (except TIMESTAMP) to the corresponding UTC according to the time zone specified by `timezone_name`. The time-type values returned by nGQL queries are all UTC time.
* `timezone_name` is only used to transform the data stored in NebulaGraph. Other time-related data of the NebulaGraph processes still uses the default time zone of the host, such as the log printing time.

## Logging configurations

| Name | Predefined value | Description |Whether supports runtime dynamic modifications|
Expand Down
Loading

0 comments on commit ee2471d

Please sign in to comment.