GithubHelp home page GithubHelp logo

randomjoe211 / nebula-docker-compose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vesoft-inc/nebula-docker-compose

1.0 0.0 0.0 131 KB

Docker compose for Nebula Graph

Home Page: https://github.com/vesoft-inc/nebula

License: Apache License 2.0

Shell 0.17% Smarty 99.83%

nebula-docker-compose's Introduction


English | 中文
A distributed, scalable, lightning-fast graph database

build docker image workflow nebula star nebula fork

Deploy Nebula Graph with Docker Compose

Using Docker Compose is a convenient way to deploy and manage Nebula Graph.

Prerequisites

  • You have installed the following applications on your host.

    Application Recommended version Official installation reference
    Docker Latest Install Docker Engine
    Docker Compose Latest Install Docker Compose
    Git Latest Download Git
  • If you are deploying Nebula Graph as a non-root user, grant the user with Docker-related privileges. For a detailed instruction, see Docker document: Manage Docker as a non-root user.

  • You have started the Docker service on your host.

  • If you have already deployed another version of Nebula Graph with Docker Compose on your host, to avoid compatibility issues,back up the service data if you need, and delete the nebula-docker-compose/data directory.

How to deploy

  1. Clone the nebula-docker-compose repository to your host with Git.

    • To install the latest version of Nebula Graph 1.x, clone the v1.0 branch.
    $ git clone --branch v1.0 https://github.com/vesoft-inc/nebula-docker-compose.git
    • To install the latest version of Nebula Graph 2.x, clone the master branch.
    $ git clone https://github.com/vesoft-inc/nebula-docker-compose.git
  2. Go to the nebula-docker-compose directory.

    $ cd nebula-docker-compose/
  3. Run the following command to start all the Nebula Graph services.

    $ docker-compose up -d

    If these information is returned, Nebula Graph is started successfully.

    Creating nebula-docker-compose_metad0_1 ... done
    Creating nebula-docker-compose_metad2_1 ... done
    Creating nebula-docker-compose_metad1_1 ... done
    Creating nebula-docker-compose_graphd2_1   ... done
    Creating nebula-docker-compose_graphd_1    ... done
    Creating nebula-docker-compose_graphd1_1   ... done
    Creating nebula-docker-compose_storaged0_1 ... done
    Creating nebula-docker-compose_storaged2_1 ... done
    Creating nebula-docker-compose_storaged1_1 ... done

    NOTE: For more information of the preceding services, see Design and Architecture of Nebula Graph.

  4. Use Nebula Console to connect to Nebula Graph.

    Nebula Console is the native CLI client of Nebula Graph. In this step, Docker pulls the Nebula Console images automatically from Docker Hub according to the path we set in the following commands and uses it to connect to the Graph Service of Nebula Graph. You can use other clients to connect to Nebula Graph instead of Nebula Console, such as Nebula Graph Studio and clients for different programming languages.

    • For Nebula Graph 1.0:
    $ docker run --rm -ti --network=host vesoft/nebula-console:nightly -u <user> -p <password> --addr=127.0.0.1 --port=3699
    • For Nebula Graph 2.0:
    $ docker run --rm -ti --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2-nightly
    docker> nebula-console -u <user> -p <password> --address=graphd --port=9669
    

    NOTE: By default, the authentication is disabled, and you can use any username or password to connect to Nebula Graph. To enable authentication, see Authentication Configurations.

    The following information indicates that you have connected to the Nebula Graph services:

    Welcome to Nebula Graph (Version 5d10861)
    
    ([email protected]) [(none)]>

Check the Nebula Graph service status and ports

Run docker-compose ps to list all the services of Nebula Graph and their status and ports.

$ 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

NOTE: The Nebula Graph services listen on port 3699 for v1.x and 9669 for v2.x by default. To use other ports, modify the docker-compose.yaml file in the nebula-docker-compose directory.

Check the service data and logs

All data and logs of Nebula Graph are stored persistently in the nebula-docker-compose/data and nebula-docker-compose/logs directories.

The structure of the directories is as follows:

nebula-docker-compose/
  |-- docker-compose.yaml
  |-- data
  |     |- meta0
  |     |- meta1
  |     |- meta2
  |     |- storage0
  |     |- storage1
  |     `- storage2
  `-- logs
        |- meta0
        |- meta1
        |- meta2
        |- storage0
        |- storage1
        |- storage2
        `- graph

Stop the Nebula Graph services

You can run the following command to stop the Nebula Graph services:

$ docker-compose down -v

The following information indicates you have successfully stopped the Nebula Graph services:

Stopping nebula-docker-compose_storaged1_1 ... done
Stopping nebula-docker-compose_storaged0_1 ... done
Stopping nebula-docker-compose_graphd_1    ... done
Stopping nebula-docker-compose_storaged2_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_storaged1_1 ... done
Removing nebula-docker-compose_storaged0_1 ... done
Removing nebula-docker-compose_graphd_1    ... done
Removing nebula-docker-compose_storaged2_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

Other ways to install Nebula Graph

FAQ

How to update the Nebula Console client?

To update the Nebula Console client, use the docker pull command in the nebula-docker-compose directory on your host. For example, if you want to update Nebula Console for the Nebula Graph 1.0 series, run the follow command.

docker pull vesoft/nebula-console:nightly

If you want to update Nebula Console for the Nebula Graph v2.0, run the following command instead.

docker pull vesoft/nebula-console:v2-nightly

How to upgrade Nebula Graph?

To upgrade Nebula Graph, update the Nebula Graph docker images and restart the services.

  1. In the nebula-docker-compose directory, run docker-compose pull to update the Nebula Graph docker images.

CAUTION: Make sure you have backed up all important data before following the next step to stop the Nebula Graph services.

  1. Run docker-compose down to stop the Nebula Graph services.

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

Why can't I connect to Nebula Graph through port 3699 after updating the nebula-docker-compose repository?

On the release of Nebula Graph 2.0.0-RC, the default port for connection changed from 3699 to 9669. To connect to Nebula Graph after updating the repository, use port 9669 or modify the port number in the docker-compose.yaml file.

Why can't I access the data after updating the nebula-docker-compose repository?

If you updated the nebula-docker-compose repository after Jan 4, 2021 and there are pre-existing data, modify the docker-compose.yaml file and change the port numbers to the previous ones before connecting to Nebula Graph.

What to do next

You can start using Nebula Graph by creating spaces and inserting data. For more information, see Quick Start.

nebula-docker-compose's People

Contributors

amber1990zhang avatar codlin avatar darionyaphet avatar jievince avatar jude-zhu avatar laura-ding avatar matrixji avatar megabyte875 avatar monadbobo avatar nevermore3 avatar randomjoe211 avatar shylock-hg avatar whitewum avatar wilsonyou avatar yixinglu avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.