From 1fc9be15c46b1c949c31213df96694d30cac3738 Mon Sep 17 00:00:00 2001 From: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com> Date: Fri, 6 May 2022 09:48:28 +0800 Subject: [PATCH 1/3] update docker --- ...deploy-nebula-graph-with-docker-compose.md | 118 ++++++++---------- 1 file changed, 52 insertions(+), 66 deletions(-) diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md index 1abb6613248..2014e1173fa 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md @@ -67,40 +67,41 @@ Using Docker Compose can quickly deploy Nebula Graph services based on the prepa 4. Connect to Nebula Graph. - 1. Run the following command to start a new docker container with the Nebula Console image, and connect the container to the network where Nebula Graph is deployed (nebula-docker-compose_nebula-net). + !!! Note + + Starting from Nebula Graph version 3.1.0, the docker-compose automatically starts a Nebula Console docker container and adds the storage host to the cluster (i.e. `ADD HOSTS` command). + + 1. Run the following command to view the name of Nebula Console docker container. ```bash - $ docker run --rm -ti --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:{{console.tag}} + $ docker-compose ps + Name Command State Ports + ---------------------------------------------------------------------------------------------- + nebuladockercompose_console_1 sh -c sleep 3 && Up + nebula-co ... + ...... ``` - !!! Note - - The local network may be different from the `nebula-docker-compose_nebula-net` in the above example. Use the following command. + 2. Run the following command to enter the Nebula Console docker container. ```bash - $ docker network ls - NETWORK ID NAME DRIVER SCOPE - a74c312b1d16 bridge bridge local - dbfa82505f0e host host local - ed55ccf356ae nebula-docker-compose_nebula-net bridge local - 93ba48b4b288 none null local + $ docker exec -it nebuladockercompose_console_1 /bin/sh + / # ``` - 2. Connect to Nebula Graph with Nebula Console. + 3. Connect to Nebula Graph with Nebula Console. ```bash - docker> nebula-console -u -p --address=graphd --port=9669 + / # ./usr/local/bin/nebula-console -u -p --address=graphd --port=9669 ``` !!! Note By default, the authentication is off, you can only log in with an existing username (the default is `root`) and any password. To turn it on, see [Enable authentication](../../7.data-security/1.authentication/1.authentication.md). - 3. Run the following commands to make the `nebula-storaged` processes to the available state. + 4. Run the following commands to view the cluster state. ```bash - nebula> ADD HOSTS "storaged0":9779,"storaged1":9779,"storaged2":9779; - nebula> SHOW HOSTS; +-------------+------+-----------+----------+--------------+----------------------+------------------------+---------+ | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | @@ -111,11 +112,7 @@ Using Docker Compose can quickly deploy Nebula Graph services based on the prepa +-------------+------+-----------+----------+--------------+----------------------+------------------------+---------+ ``` - !!! Note - - Starting from Nebula Graph version 3.0.0, the `nebula-storaged` service reported to metad needs to execute 'ADD HOSTS' manually before it can be used. - -5. Run `exit` twice to switch back to your terminal (shell). You can run Step 4 to log in to Nebula Graph again. +5. Run `exit` twice to switch back to your terminal (shell). ## Check the Nebula Graph service status and ports @@ -123,26 +120,17 @@ Run `docker-compose ps` to list all the services of Nebula Graph and their statu ```bash $ docker-compose ps -Name Command State Ports -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -nebula-docker-compose_graphd1_1 ./bin/nebula-graphd --flag ... Up (health: starting) 13000/tcp, 13002/tcp, 0.0.0.0:33295->19669/tcp, 0.0.0.0:33291->19670/tcp, - 3699/tcp, 0.0.0.0:33298->9669/tcp -nebula-docker-compose_graphd2_1 ./bin/nebula-graphd --flag ... Up (health: starting) 13000/tcp, 13002/tcp, 0.0.0.0:33285->19669/tcp, 0.0.0.0:33284->19670/tcp, - 3699/tcp, 0.0.0.0:33286->9669/tcp -nebula-docker-compose_graphd_1 ./bin/nebula-graphd --flag ... Up (health: starting) 13000/tcp, 13002/tcp, 0.0.0.0:33288->19669/tcp, 0.0.0.0:33287->19670/tcp, - 3699/tcp, 0.0.0.0:9669->9669/tcp -nebula-docker-compose_metad0_1 ./bin/nebula-metad --flagf ... Up (health: starting) 11000/tcp, 11002/tcp, 0.0.0.0:33276->19559/tcp, 0.0.0.0:33275->19560/tcp, - 45500/tcp, 45501/tcp, 0.0.0.0:33278->9559/tcp -nebula-docker-compose_metad1_1 ./bin/nebula-metad --flagf ... Up (health: starting) 11000/tcp, 11002/tcp, 0.0.0.0:33279->19559/tcp, 0.0.0.0:33277->19560/tcp, - 45500/tcp, 45501/tcp, 0.0.0.0:33281->9559/tcp -nebula-docker-compose_metad2_1 ./bin/nebula-metad --flagf ... Up (health: starting) 11000/tcp, 11002/tcp, 0.0.0.0:33282->19559/tcp, 0.0.0.0:33280->19560/tcp, - 45500/tcp, 45501/tcp, 0.0.0.0:33283->9559/tcp -nebula-docker-compose_storaged0_1 ./bin/nebula-storaged --fl ... Up (health: starting) 12000/tcp, 12002/tcp, 0.0.0.0:33290->19779/tcp, 0.0.0.0:33289->19780/tcp, - 44500/tcp, 44501/tcp, 0.0.0.0:33294->9779/tcp -nebula-docker-compose_storaged1_1 ./bin/nebula-storaged --fl ... Up (health: starting) 12000/tcp, 12002/tcp, 0.0.0.0:33296->19779/tcp, 0.0.0.0:33292->19780/tcp, - 44500/tcp, 44501/tcp, 0.0.0.0:33299->9779/tcp -nebula-docker-compose_storaged2_1 ./bin/nebula-storaged --fl ... Up (health: starting) 12000/tcp, 12002/tcp, 0.0.0.0:33297->19779/tcp, 0.0.0.0:33293->19780/tcp, - 44500/tcp, 44501/tcp, 0.0.0.0:33300->9779/tcp +nebuladockercompose_console_1 sh -c sleep 3 && Up + nebula-co ... +nebuladockercompose_graphd1_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49174->19669/tcp,:::49174->19669/tcp, 0.0.0.0:49171->19670/tcp,:::49171->19670/tcp, 0.0.0.0:49177->9669/tcp,:::49177->9669/tcp +nebuladockercompose_graphd2_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49175->19669/tcp,:::49175->19669/tcp, 0.0.0.0:49172->19670/tcp,:::49172->19670/tcp, 0.0.0.0:49178->9669/tcp,:::49178->9669/tcp +nebuladockercompose_graphd_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49180->19669/tcp,:::49180->19669/tcp, 0.0.0.0:49179->19670/tcp,:::49179->19670/tcp, 0.0.0.0:9669->9669/tcp,:::9669->9669/tcp +nebuladockercompose_metad0_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49157->19559/tcp,:::49157->19559/tcp, 0.0.0.0:49154->19560/tcp,:::49154->19560/tcp, 0.0.0.0:49160->9559/tcp,:::49160->9559/tcp, 9560/tcp +nebuladockercompose_metad1_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49156->19559/tcp,:::49156->19559/tcp, 0.0.0.0:49153->19560/tcp,:::49153->19560/tcp, 0.0.0.0:49159->9559/tcp,:::49159->9559/tcp, 9560/tcp +nebuladockercompose_metad2_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49158->19559/tcp,:::49158->19559/tcp, 0.0.0.0:49155->19560/tcp,:::49155->19560/tcp, 0.0.0.0:49161->9559/tcp,:::49161->9559/tcp, 9560/tcp +nebuladockercompose_storaged0_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49166->19779/tcp,:::49166->19779/tcp, 0.0.0.0:49163->19780/tcp,:::49163->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:49169->9779/tcp,:::49169->9779/tcp, 9780/tcp +nebuladockercompose_storaged1_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49165->19779/tcp,:::49165->19779/tcp, 0.0.0.0:49162->19780/tcp,:::49162->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:49168->9779/tcp,:::49168->9779/tcp, 9780/tcp +nebuladockercompose_storaged2_1 /usr/local/nebula/bin/nebu ... Up 0.0.0.0:49167->19779/tcp,:::49167->19779/tcp, 0.0.0.0:49164->19780/tcp,:::49164->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:49170->9779/tcp,:::49170->9779/tcp, 9780/tcp ``` Nebula Graph provides services to the clients through port `9669` by default. To use other ports, modify the `docker-compose.yaml` file in the `nebula-docker-compose` directory and restart the Nebula Graph services. @@ -186,25 +174,27 @@ $ docker-compose down The following information indicates you have successfully stopped the Nebula Graph services: ```bash -Stopping nebula-docker-compose_graphd2_1 ... done -Stopping nebula-docker-compose_graphd1_1 ... done -Stopping nebula-docker-compose_graphd_1 ... done -Stopping nebula-docker-compose_storaged1_1 ... done -Stopping nebula-docker-compose_storaged2_1 ... done -Stopping nebula-docker-compose_storaged0_1 ... done -Stopping nebula-docker-compose_metad0_1 ... done -Stopping nebula-docker-compose_metad1_1 ... done -Stopping nebula-docker-compose_metad2_1 ... done -Removing nebula-docker-compose_graphd2_1 ... done -Removing nebula-docker-compose_graphd1_1 ... done -Removing nebula-docker-compose_graphd_1 ... done -Removing nebula-docker-compose_storaged1_1 ... done -Removing nebula-docker-compose_storaged2_1 ... done -Removing nebula-docker-compose_storaged0_1 ... done -Removing nebula-docker-compose_metad0_1 ... done -Removing nebula-docker-compose_metad1_1 ... done -Removing nebula-docker-compose_metad2_1 ... done -Removing network nebula-docker-compose_nebula-net +Stopping nebuladockercompose_console_1 ... done +Stopping nebuladockercompose_graphd1_1 ... done +Stopping nebuladockercompose_graphd_1 ... done +Stopping nebuladockercompose_graphd2_1 ... done +Stopping nebuladockercompose_storaged1_1 ... done +Stopping nebuladockercompose_storaged0_1 ... done +Stopping nebuladockercompose_storaged2_1 ... done +Stopping nebuladockercompose_metad2_1 ... done +Stopping nebuladockercompose_metad0_1 ... done +Stopping nebuladockercompose_metad1_1 ... done +Removing nebuladockercompose_console_1 ... done +Removing nebuladockercompose_graphd1_1 ... done +Removing nebuladockercompose_graphd_1 ... done +Removing nebuladockercompose_graphd2_1 ... done +Removing nebuladockercompose_storaged1_1 ... done +Removing nebuladockercompose_storaged0_1 ... done +Removing nebuladockercompose_storaged2_1 ... done +Removing nebuladockercompose_metad2_1 ... done +Removing nebuladockercompose_metad0_1 ... done +Removing nebuladockercompose_metad1_1 ... done +Removing network nebuladockercompose_nebula-net ``` !!! danger @@ -239,7 +229,7 @@ graphd: 1. In the `nebula-docker-compose/docker-compose.yaml` file, change all the `image` values to the required image version. -2. In the `nebula-docker-compose` directory, run `docker-compose pull` to update the images of the Graph Service, Storage Service, and Meta Service. +2. In the `nebula-docker-compose` directory, run `docker-compose pull` to update the images of the Graph Service, Storage Service, Meta Service, and Nebula Console. 3. Run `docker-compose up -d` to start the Nebula Graph services again. @@ -255,11 +245,7 @@ You have met the rate limit of Docker Hub. Learn more on [Understanding Docker H ### How to update the Nebula Console client -To update the Nebula Console client, run the following command. - -```bash -docker pull vesoft/nebula-console:{{console.tag}} -``` +The command `docker-compose pull` updates both the Nebula Graph services and the Nebula Console. ## Related documents From 0eef146f1407bf02b8bd77802fe056825bca614f Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Sat, 7 May 2022 10:37:34 +0800 Subject: [PATCH 2/3] Update docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md --- .../3.deploy-nebula-graph-with-docker-compose.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md index 2014e1173fa..3cac18c8561 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md @@ -85,7 +85,7 @@ Using Docker Compose can quickly deploy Nebula Graph services based on the prepa 2. Run the following command to enter the Nebula Console docker container. ```bash - $ docker exec -it nebuladockercompose_console_1 /bin/sh + docker exec -it nebuladockercompose_console_1 /bin/sh / # ``` From 919af0a24bf1ab73cb1da75fc0dcfa6a02ef4c9f Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Thu, 12 May 2022 10:04:10 +0800 Subject: [PATCH 3/3] Update docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md --- .../3.deploy-nebula-graph-with-docker-compose.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md index 3cac18c8561..6e341320379 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md @@ -69,7 +69,7 @@ Using Docker Compose can quickly deploy Nebula Graph services based on the prepa !!! Note - Starting from Nebula Graph version 3.1.0, the docker-compose automatically starts a Nebula Console docker container and adds the storage host to the cluster (i.e. `ADD HOSTS` command). + Starting from Nebula Graph version 3.1.0, nebula-docker-compose automatically starts a Nebula Console docker container and adds the storage host to the cluster (i.e. `ADD HOSTS` command). 1. Run the following command to view the name of Nebula Console docker container.