Install Guide

Install from Source

You are advised to read init.conf file, and modify it as you wish. (this file will configure the basic options of gStore system.)

gStore is a green software, and you just need to compile it with three commands. Please run  sudo ./scripts/setup/setup_$(ARCH).sh  ,  make pre  and  make  in the gStore home directory to prepare the dependency, link the ANTLR lib, compile the gStore code, and build executable “gbuild”, "gquery", "ghttp", "gserver", "gclient", "gconsole". (Please substitute the $(ARCH) with your system version, like setup_archlinux.sh, setup_centos.sh and setup_ubuntu.sh) What is more, the api of gStore is also built now.

Setup scripts and dependency preparation only need to be done once, later you can directly use  make  to compile the code. For faster compiling speed, use  make -j4  instead, using how many threads is up to your machine. To check the correctness of the program, please type  make test  command. Only if you use the   make dist  command, then you need to run  make pre  command again.

If you want to use API examples of gStore, please run  make APIexample  to compile example codes for both C++ API and Java API. For details of API, please visit API chapter.

Use  make clean  command to clean all objects, executables, and use  make dist  command to clean all objects, executables, libs, datasets, databases, debug logs, temp/text files in the gStore root directory.

You are free to modify the source code of gStore and create your own project while respecting our work, and type  make tarball  command to compress all useful files into a .tar.gz file, which is easy to carry.

Type  make gtest  to compile the gtest program if you want to use this test utility.

You can see the HOW TO USE for details of gtest program. 

 

Docker Deployment

Roughly speaking, there are two ways to deploy gStore via Docker. The first one is using Dockerfile in the root directory of project to automatically build it. And then run the container. Another one is downloading the mirror which has been automatically built directly, then just run it.

Prepare the Environment

Official doc of Docker has explained how to download and use it on common Linux release version in details. And here is the link: Docker Docs.

It's worth noting that the Docker with too high version may lead to some problems. Please read the precautions carefully. The current version of test environment is Docker CE 17.06.1.

Build the Mirror via Dockerfile

After having the correct Docker environment and network, use  git clone  to download the project firstly. After inputting command docker  build -t gstore , it's available to start building. In the default case, it will use the Dockerfile in the root directory. More specififc explanation has been written in the Dockerfile.

Atter the building, using  docker run -it gstore  directly to enter the container and execute other operations.

Pulling the Mirror Directly to Run

Instead of downloading project or building on your own, input  docker pull suxunbin/auto_gstore:latest  to pull the mirror which has been automatically built well on the docker hub. Then input  docker run -it suxunbin/auto_gstore:latest  to enter the container and execute other operations.

Problems That Exist

Owing to the uncertain influence accompanying the containerization, including but not limited to some problems about network, lock, caching, rights and so on, it's quite difficult to locate the problem when debugging.

It has been known that the following problems may exist: (The host is CentOS 7.4)

1. If add the environment ENV CC="ccache g++" in the process of Dockerfile building, it will lead to compile error. The reason is still unkown and it may affect the mirror cache layer, which results in repeated errors in the later process of building.

2. The case of shutdown automatically as soon as its reboot may occur after starting the container via docker run.