From c081281944426d5cc98703bf46ffbe5d9f8749c7 Mon Sep 17 00:00:00 2001 From: Marko Budiselic Date: Tue, 13 Jun 2017 17:40:18 +0200 Subject: [PATCH] Docker mount volume documentation. Summary: Add snapshots mount documentation. By default, build_interpreter takes alpha.conf as a config file. Reviewers: teon.banek, dtomicevic Reviewed By: teon.banek Subscribers: pullbot, buda Differential Revision: https://phabricator.memgraph.io/D464 --- config/alpha.conf | 4 +-- docs/user_technical/installation.md | 43 +++++++++++++++++++++-------- release/build_interpreter | 2 +- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/config/alpha.conf b/config/alpha.conf index 0ac769953..ba0928eca 100644 --- a/config/alpha.conf +++ b/config/alpha.conf @@ -1,7 +1,7 @@ -# MEMGRAPH DEFAULT TESTING CONFIG +# MEMGRAPH DEFAULT ALPHA CONFIG # NOTE: all paths are relative to the run folder -# (where the executable is runned) +# (where the executable is run) # path to the codes which will be compiled --compile_path="./compiled/" diff --git a/docs/user_technical/installation.md b/docs/user_technical/installation.md index 2c49c7cb7..9ae8fb099 100644 --- a/docs/user_technical/installation.md +++ b/docs/user_technical/installation.md @@ -1,14 +1,13 @@ ## Installation -Memgraph is a 64-bit Linux compatible database management system. -For the purpose of Alpha testing Memgraph has been packed into -Ubuntu 16.04 based [Docker](https://www.docker.com) image. -Before proceeding with the installation, please install -the Docker engine on your system. -Instructions how to install Docker can be found -[here](https://docs.docker.com/engine/installation). -Memgraph Docker image was built with Docker version `1.12`, -so all Docker versions since version `1.12` should work. +Memgraph is a 64-bit Linux compatible database management system. For the +purpose of Alpha testing Memgraph has been packed into Ubuntu 16.04 based +[Docker](https://www.docker.com) image. Before proceeding with the +installation, please install the Docker engine on your system. Instructions +how to install Docker can be found +[here](https://docs.docker.com/engine/installation). Memgraph Docker image was +built with Docker version `1.12`, so all Docker versions since version `1.12` +should work. ### Import @@ -21,11 +20,31 @@ docker load -i /path/to/.tar.gz The most convenient way to start Memgraph is ``` -docker run -d -p 7687:7687 --name +docker run -it -p 7687:7687 +``` +The `-it` option enables displaying Memgraph's logs inside the current shell. +The `-p` option is used to specify the port which Memgraph will use to listen +for requests. Since the default Bolt protocol is `7687`, the straightforward +option is to use that port. + +The recommended way to run Memgraph requires some additional configuration. A +folder for database snapshots needs to be created and mounted on the host file +system. It is also recommended to run the container in the background. On Linux +system all of that can be executed as follows +``` +# create snapshots folder on the host +mkdir -p memgraph_snapshots +# Docker expects full path to the created folder +FULL_SNAPSHOTS_PATH=$PWD/memgraph_snapshots +# run Memgraph +docker run -d -p 7687:7687 -v ${FULL_SNAPSHOTS_PATH}:/memgraph/snapshots --name ``` `-d` means that the container will be detached (run in the background mode). -Because the default Bolt protocol port is `7687`, the straightforward option -is to run Memgraph on that port. +`-v` mounts snapshots folder inside the container on the host file system +(useful for the recovery process). With `--name` a user can set a custom name +for the container (useful when the container has to be stopped). +`` could be any convenient name e.g. +`memgraph_alpha`. ### Configuration Parameters diff --git a/release/build_interpreter b/release/build_interpreter index f143a4a77..3912a027c 100755 --- a/release/build_interpreter +++ b/release/build_interpreter @@ -22,7 +22,7 @@ project_dir="${release_dir}/.." skip_compile=false build_type="Debug" -config_file="testing.conf" +config_file="alpha.conf" version="" while [[ $# -gt 0 ]] do