Coder Social home page Coder Social logo

strogo / nebula-docker-compose Goto Github PK

View Code? Open in Web Editor NEW

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

0.0 1.0 0.0 73 KB

Docker compose for Nebula Graph

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

License: Apache License 2.0

Shell 100.00%

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 Docker, Docker Compose, and Git on your host.

    NOTE:

    • To use Docker as a non-root user, follow the steps in Manage Docker as a non-root user.
    • We recommend that you install the latest version of these applications to make sure they work properly.
  • 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 Nebula Graph 1.0, clone the v1.0 branch.
    $ git clone --branch v1.0 https://github.com/vesoft-inc/nebula-docker-compose.git
    • To install Nebula Graph 2.0, 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

    The following information indicates the services have started:

    Creating nebula-docker-compose_metad2_1 ... done
    Creating nebula-docker-compose_metad1_1 ... done
    Creating nebula-docker-compose_metad0_1 ... done
    Creating nebula-docker-compose_storaged2_1 ... done
    Creating nebula-docker-compose_graphd_1    ... done
    Creating nebula-docker-compose_storaged0_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 graphd 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 the -u and -p options are unnecessary. To enbale 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

Running the following command to list the service information of Nebula Graph, such as state and ports.

$ docker-compose ps

The following information is displayed:

Name                     Command                       State                                                   Ports
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
nebula-docker-compose_graphd_1      ./bin/nebula-graphd --flag ...   Up (health: starting)   0.0.0.0:32867->13000/tcp, 0.0.0.0:32866->13002/tcp, 3369/tcp, 0.0.0.0:3699->3699/tcp
nebula-docker-compose_metad0_1      ./bin/nebula-metad --flagf ...   Up (health: starting)   0.0.0.0:32865->11000/tcp, 0.0.0.0:32864->11002/tcp, 45500/tcp, 45501/tcp
nebula-docker-compose_metad1_1      ./bin/nebula-metad --flagf ...   Up (health: starting)   0.0.0.0:32863->11000/tcp, 0.0.0.0:32862->11002/tcp, 45500/tcp, 45501/tcp
nebula-docker-compose_metad2_1      ./bin/nebula-metad --flagf ...   Up (health: starting)   0.0.0.0:32861->11000/tcp, 0.0.0.0:32860->11002/tcp, 45500/tcp, 45501/tcp
nebula-docker-compose_storaged0_1   ./bin/nebula-storaged --fl ...   Up (health: starting)   0.0.0.0:32879->12000/tcp, 0.0.0.0:32877->12002/tcp, 44500/tcp, 44501/tcp
nebula-docker-compose_storaged1_1   ./bin/nebula-storaged --fl ...   Up (health: starting)   0.0.0.0:32876->12000/tcp, 0.0.0.0:32872->12002/tcp, 44500/tcp, 44501/tcp
nebula-docker-compose_storaged2_1   ./bin/nebula-storaged --fl ...   Up (health: starting)   0.0.0.0:32873->12000/tcp, 0.0.0.0:32870->12002/tcp, 44500/tcp, 44501/tcp

NOTE: Nebula Graph graphd services listen on the port 3699 for v1.x and 9669 for v2.x by default. You can change the default port according to network configurations.

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

Q: How to update the nebula-console client?

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

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 darionyaphet avatar jievince avatar jude-zhu avatar laura-ding avatar monadbobo avatar randomjoe211 avatar shylock-hg avatar whitewum avatar wilsonyou avatar yixinglu avatar

Watchers

 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.