From 9ed4102897f45c0874a5ed64d0342001de92cdf4 Mon Sep 17 00:00:00 2001 From: Marko Budiselic Date: Fri, 16 Jun 2017 14:50:46 +0200 Subject: [PATCH] Release preparation. Summary: Alpha config fix. Docker volume support. Reviewers: teon.banek, dgleich Reviewed By: teon.banek, dgleich Subscribers: pullbot, buda Differential Revision: https://phabricator.memgraph.io/D484 --- CMakeLists.txt | 4 +++- config/alpha.conf | 14 ++++++++++---- release/alpha.dockerfile | 2 +- release/build_interpreter | 2 +- release/package_deploy | 22 +++++++++++++++------- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d790479fa..fb832d0d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,10 +162,12 @@ endif() option (LOG_NO_STDOUT "Disable logging to stdout. (Docker has a bug with large logs.)" OFF) -option(LOG_NO_TRACE "Disable trace logging" OFF) if (LOG_NO_STDOUT) add_definitions(-DLOG_NO_STDOUT) endif() +message(STATUS "LOG_NO_STDOUT: ${LOG_NO_STDOUT}") + +option(LOG_NO_TRACE "Disable trace logging" OFF) message(STATUS "LOG_NO_TRACE: ${LOG_NO_TRACE}") if (LOG_NO_TRACE) add_definitions(-DLOG_NO_TRACE) diff --git a/config/alpha.conf b/config/alpha.conf index ba0928eca..094a7b26e 100644 --- a/config/alpha.conf +++ b/config/alpha.conf @@ -4,13 +4,13 @@ # (where the executable is run) # path to the codes which will be compiled ---compile_path="./compiled/" +--compile_path=./compiled/ # path to the template (cpp) for codes generation ---template_cpp_path="./template/plan_template_cpp" +--template_cpp_path=./template/plan_template_cpp # path to the folder with snapshots ---snapshots_path="snapshots" +--snapshot_directory=/var/lib/memgraph/snapshots # cleaning cycle interval # if set to -1 the GC will not run @@ -31,4 +31,10 @@ --interpret=true # database recovering is disabled by default ---recovery=true +--recover_on_startup=true + +# use ast caching +--ast_cache=false + +# path to where the log should be stored +--log_file=/var/lib/memgraph/memgraph.log diff --git a/release/alpha.dockerfile b/release/alpha.dockerfile index 3a8379675..068ca8df2 100644 --- a/release/alpha.dockerfile +++ b/release/alpha.dockerfile @@ -5,8 +5,8 @@ FROM ubuntu:16.04 # FROM debian:jessie # doesn't work because CXXABI_1.3.9 & GLIBCXX_3.4.21 not found ENV MEMGRAPH_CONFIG /memgraph/config/memgraph.conf - ARG build_name +RUN mkdir -p /var/lib/memgraph COPY ${build_name} /memgraph diff --git a/release/build_interpreter b/release/build_interpreter index 3912a027c..2e35c38ef 100755 --- a/release/build_interpreter +++ b/release/build_interpreter @@ -74,7 +74,7 @@ if [[ "${skip_compile}" == false ]]; then # compile memgraph cd ${project_dir}/build rm -rf ./* - cmake -DCMAKE_BUILD_TYPE:String=${build_type} .. + cmake -DLOG_NO_STDOUT=ON -DCMAKE_BUILD_TYPE:String=${build_type} .. make -j8 fi diff --git a/release/package_deploy b/release/package_deploy index 4f3e37bc6..a267b8351 100755 --- a/release/package_deploy +++ b/release/package_deploy @@ -5,12 +5,13 @@ function print_help () { echo "Usage: $0 [OPTION] --version MAJOR.MINOR.PATCH" echo "Optional arguments:" - echo -e " -h|--help Print help." - echo -e " --skip-compile Skip compilation process." - echo -e " --skip-deploy Skip deployment process." - echo -e " -s|--server Deployment server address. -|" - echo -e " -u|--user Deployment server user. -| -> Required if deployment isn't skipped." - echo -e " -k|--key Deployment server SSH key. -|" + echo -e " -h|--help Print help." + echo -e " --skip-compile Skip compilation process." + echo -e " --skip-deploy Skip deployment process." + echo -e " --docker-image-name Custom docker image name, otherwise the image name will be the same as the package name." + echo -e " -s|--server Deployment server address. -|" + echo -e " -u|--user Deployment server user. -| -> Required if deployment isn't skipped." + echo -e " -k|--key Deployment server SSH key. -|" } working_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -21,6 +22,7 @@ required_args_no=0 skip_compile=false skip_deploy=false version=0 +docker_image_name="" while [[ $# -gt 0 ]] do case $1 in @@ -49,6 +51,10 @@ do --skip-deploy) skip_deploy=true ;; + --docker-image-name) + docker_image_name="$2" + shift + ;; --version) version=$2 required_args_no=$((required_args_no+1)) @@ -102,7 +108,9 @@ package_name=`ls -t -d memgraph_*/ | head -1 | sed 's/.$//'` # for some reason docker image has to be lowercase string # and because our package name is based on the cmake build type # string (which can be camel case) the package name has to be transformed -docker_image_name=$(echo "${package_name}"| tr '[:upper:]' '[:lower:]') +if [[ "${docker_image_name}" == "" ]] ; then + docker_image_name=$(echo "${package_name}"| tr '[:upper:]' '[:lower:]') +fi docker build -t ${docker_image_name} -f ${working_dir}/alpha.dockerfile --build-arg build_name=${package_name} . docker save ${docker_image_name} > ${docker_image_name}.tar.gz