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
This commit is contained in:
Marko Budiselic 2017-06-13 17:40:18 +02:00
parent 7de8fd4b1b
commit c081281944
3 changed files with 34 additions and 15 deletions

View File

@ -1,7 +1,7 @@
# MEMGRAPH DEFAULT TESTING CONFIG # MEMGRAPH DEFAULT ALPHA CONFIG
# NOTE: all paths are relative to the run folder # 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 # path to the codes which will be compiled
--compile_path="./compiled/" --compile_path="./compiled/"

View File

@ -1,14 +1,13 @@
## Installation ## Installation
Memgraph is a 64-bit Linux compatible database management system. Memgraph is a 64-bit Linux compatible database management system. For the
For the purpose of Alpha testing Memgraph has been packed into purpose of Alpha testing Memgraph has been packed into Ubuntu 16.04 based
Ubuntu 16.04 based [Docker](https://www.docker.com) image. [Docker](https://www.docker.com) image. Before proceeding with the
Before proceeding with the installation, please install installation, please install the Docker engine on your system. Instructions
the Docker engine on your system. how to install Docker can be found
Instructions how to install Docker can be found [here](https://docs.docker.com/engine/installation). Memgraph Docker image was
[here](https://docs.docker.com/engine/installation). built with Docker version `1.12`, so all Docker versions since version `1.12`
Memgraph Docker image was built with Docker version `1.12`, should work.
so all Docker versions since version `1.12` should work.
### Import ### Import
@ -21,11 +20,31 @@ docker load -i /path/to/<memgraph_docker_image_name>.tar.gz
The most convenient way to start Memgraph is The most convenient way to start Memgraph is
``` ```
docker run -d -p 7687:7687 --name <memgraph_docker_container_name> <memgraph_docker_image_name> docker run -it -p 7687:7687 <memgraph_docker_image_name>
```
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 <memgraph_docker_container_name> <memgraph_docker_image_name>
``` ```
`-d` means that the container will be detached (run in the background mode). `-d` means that the container will be detached (run in the background mode).
Because the default Bolt protocol port is `7687`, the straightforward option `-v` mounts snapshots folder inside the container on the host file system
is to run Memgraph on that port. (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).
`<memgraph_docker_container_name>` could be any convenient name e.g.
`memgraph_alpha`.
### Configuration Parameters ### Configuration Parameters

View File

@ -22,7 +22,7 @@ project_dir="${release_dir}/.."
skip_compile=false skip_compile=false
build_type="Debug" build_type="Debug"
config_file="testing.conf" config_file="alpha.conf"
version="" version=""
while [[ $# -gt 0 ]] while [[ $# -gt 0 ]]
do do