Change milvus deploy path to /var/milvus

This commit is contained in:
quicksilver 2019-12-03 10:58:56 +08:00
parent 59526bdc82
commit fb84afc36d
23 changed files with 53 additions and 49 deletions

View File

@ -26,6 +26,8 @@ pipeline {
environment {
PROJECT_NAME = "milvus"
MILVUS_ROOT_PATH="/var/lib"
MILVUS_INSTALL_PREFIX="${env.MILVUS_ROOT_PATH}/${env.PROJECT_NAME}"
LOWER_BUILD_TYPE = params.BUILD_TYPE.toLowerCase()
SEMVER = "${BRANCH_NAME.contains('/') ? BRANCH_NAME.substring(BRANCH_NAME.lastIndexOf('/') + 1) : BRANCH_NAME}"
PIPELINE_NAME = "${env.JOB_NAME.contains('/') ? env.JOB_NAME.getAt(0..(env.JOB_NAME.indexOf('/') - 1)) : env.JOB_NAME}"

View File

@ -17,6 +17,8 @@ pipeline {
environment {
PROJECT_NAME = "milvus"
MILVUS_ROOT_PATH="/var/lib"
MILVUS_INSTALL_PREFIX="${env.MILVUS_ROOT_PATH}/${env.PROJECT_NAME}"
LOWER_BUILD_TYPE = params.BUILD_TYPE.toLowerCase()
SEMVER = "${BRANCH_NAME.contains('/') ? BRANCH_NAME.substring(BRANCH_NAME.lastIndexOf('/') + 1) : BRANCH_NAME}"
PIPELINE_NAME = "${env.JOB_NAME.contains('/') ? env.JOB_NAME.getAt(0..(env.JOB_NAME.indexOf('/') - 1)) : env.JOB_NAME}"

View File

@ -3,9 +3,9 @@ timeout(time: 60, unit: 'MINUTES') {
withCredentials([usernamePassword(credentialsId: "${params.JFROG_CREDENTIALS_ID}", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
def checkResult = sh(script: "./check_ccache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache", returnStatus: true)
if ("${env.BINRARY_VERSION}" == "gpu") {
sh ". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -o /opt/milvus -l -g -x -u -c"
sh ". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -o ${env.MILVUS_INSTALL_PREFIX} -l -g -x -u -c"
} else {
sh ". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -o /opt/milvus -l -u -c"
sh ". ./before-install.sh && ./build.sh -t ${params.BUILD_TYPE} -o ${env.MILVUS_INSTALL_PREFIX} -l -u -c"
}
sh "./update_ccache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache -u ${USERNAME} -p ${PASSWORD}"
}

View File

@ -1,6 +1,6 @@
timeout(time: 30, unit: 'MINUTES') {
dir ("ci/scripts") {
sh "./coverage.sh -o /opt/milvus -u root -p 123456 -t \$POD_IP"
sh "./coverage.sh -o ${env.MILVUS_INSTALL_PREFIX} -u root -p 123456 -t \$POD_IP"
// Set some env variables so codecov detection script works correctly
withCredentials([[$class: 'StringBinding', credentialsId: "${env.PIPELINE_NAME}-codecov-token", variable: 'CODECOV_TOKEN']]) {
sh 'curl -s https://codecov.io/bash | bash -s - -f output_new.info || echo "Codecov did not collect coverage reports"'

View File

@ -1,6 +1,6 @@
timeout(time: 30, unit: 'MINUTES') {
dir ("ci/scripts") {
sh "./coverage.sh -o /opt/milvus -u root -p 123456 -t \$POD_IP"
sh "./coverage.sh -o ${env.MILVUS_INSTALL_PREFIX} -u root -p 123456 -t \$POD_IP"
}
}

View File

@ -1,15 +1,15 @@
timeout(time: 5, unit: 'MINUTES') {
dir ("ci/jenkins/scripts") {
sh "pip3 install -r requirements.txt"
sh "./yaml_processor.py merge -f /opt/milvus/conf/server_config.yaml -m ../yaml/update_server_config.yaml -i && rm /opt/milvus/conf/server_config.yaml.bak"
sh "sed -i 's/\\/tmp\\/milvus/\\/opt\\/milvus/g' /opt/milvus/conf/log_config.conf"
}
sh "rm -rf /opt/milvus/unittest"
sh "tar -zcvf ./${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz -C /opt/ milvus"
// dir ("ci/jenkins/scripts") {
// sh "pip3 install -r requirements.txt"
// sh "./yaml_processor.py merge -f ${env.MILVUS_INSTALL_PREFIX}/conf/server_config.yaml -m ../yaml/update_server_config.yaml -i && rm ${env.MILVUS_ROOT_PATH}/conf/server_config.yaml.bak"
// }
sh "rm -rf ${env.MILVUS_INSTALL_PREFIX}/unittest"
sh "tar -zcvf ./${env.PROJECT_NAME}-${env.PACKAGE_VERSION}.tar.gz -C ${env.MILVUS_ROOT_PATH}/ ${env.PROJECT_NAME}"
withCredentials([usernamePassword(credentialsId: "${params.JFROG_CREDENTIALS_ID}", usernameVariable: 'JFROG_USERNAME', passwordVariable: 'JFROG_PASSWORD')]) {
def uploadStatus = sh(returnStatus: true, script: "curl -u${JFROG_USERNAME}:${JFROG_PASSWORD} -T ./${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz ${params.JFROG_ARTFACTORY_URL}/milvus/package/${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz")
def uploadStatus = sh(returnStatus: true, script: "curl -u${JFROG_USERNAME}:${JFROG_PASSWORD} -T ./${env.PROJECT_NAME}-${env.PACKAGE_VERSION}.tar.gz ${params.JFROG_ARTFACTORY_URL}/milvus/package/${env.PROJECT_NAME}-${env.PACKAGE_VERSION}.tar.gz")
if (uploadStatus != 0) {
error("\" ${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz \" upload to \" ${params.JFROG_ARTFACTORY_URL}/milvus/package/${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz \" failed!")
error("\" ${env.PROJECT_NAME}-${env.PACKAGE_VERSION}.tar.gz \" upload to \" ${params.JFROG_ARTFACTORY_URL}/milvus/package/${env.PROJECT_NAME}-${env.PACKAGE_VERSION}.tar.gz \" failed!")
}
}
}

View File

@ -1,2 +1,2 @@
db_config:
primary_path: /opt/milvus
primary_path: /var/lib/milvus

View File

@ -14,7 +14,7 @@ MILVUS_CORE_DIR="${SCRIPTS_DIR}/../../core"
CORE_BUILD_DIR="${MILVUS_CORE_DIR}/cmake_build"
BUILD_TYPE="Debug"
BUILD_UNITTEST="OFF"
INSTALL_PREFIX="/opt/milvus"
INSTALL_PREFIX="/var/lib/milvus"
FAISS_ROOT=""
CUSTOMIZATION="OFF" # default use origin faiss
BUILD_COVERAGE="OFF"
@ -65,7 +65,7 @@ do
echo "
parameter:
-o: install prefix(default: /opt/milvus)
-o: install prefix(default: /var/lib/milvus)
-t: build type(default: Debug)
-b: core code build directory
-f: faiss root path

View File

@ -8,7 +8,7 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
SCRIPTS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
INSTALL_PREFIX="/opt/milvus"
INSTALL_PREFIX="/var/lib/milvus"
MILVUS_CORE_DIR="${SCRIPTS_DIR}/../../core"
CORE_BUILD_DIR="${MILVUS_CORE_DIR}/cmake_build"
MYSQL_USER_NAME=root
@ -38,7 +38,7 @@ do
echo "
parameter:
-o: milvus install prefix(default: /opt/milvus)
-o: milvus install prefix(default: /var/lib/milvus)
-b: core code build directory
-u: mysql account
-p: mysql password

View File

@ -1,6 +1,6 @@
export MILVUS_CORE_DIR=${TRAVIS_BUILD_DIR}/core
export MILVUS_BUILD_DIR=${TRAVIS_BUILD_DIR}/core/cmake_build
export MILVUS_INSTALL_PREFIX=/opt/milvus
export MILVUS_INSTALL_PREFIX=/var/lib/milvus
export MILVUS_TRAVIS_COVERAGE=${MILVUS_TRAVIS_COVERAGE:=0}
if [ "${MILVUS_TRAVIS_COVERAGE}" == "1" ]; then

View File

@ -23,7 +23,7 @@ RUN sh -c 'echo export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2019.5
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
WORKDIR /opt/milvus
WORKDIR /root
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -23,7 +23,7 @@ RUN sh -c 'echo export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2019.5
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
WORKDIR /opt/milvus
WORKDIR /root
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -21,7 +21,7 @@ RUN sh -c 'echo export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2019.5
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
WORKDIR /opt/milvus
WORKDIR /root
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -21,7 +21,7 @@ RUN sh -c 'echo export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2019.5
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
WORKDIR /opt/milvus
WORKDIR /root
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -7,13 +7,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
COPY ./docker-entrypoint.sh /opt
COPY ./milvus /opt/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/milvus/lib"
COPY ./milvus /var/lib/milvus
COPY ./docker-entrypoint.sh /var/lib/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/var/lib/milvus/lib"
WORKDIR /opt/milvus
WORKDIR /var/lib/milvus
ENTRYPOINT [ "/opt/docker-entrypoint.sh" ]
ENTRYPOINT [ "/var/lib/milvus/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -3,7 +3,7 @@
set -e
if [ "$1" == 'start' ]; then
cd /opt/milvus/scripts && ./start_server.sh
cd /var/lib/milvus/scripts && ./start_server.sh
fi
exec "$@"

View File

@ -7,13 +7,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
COPY ./docker-entrypoint.sh /opt
COPY ./milvus /opt/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/milvus/lib"
COPY ./milvus /var/lib/milvus
COPY ./docker-entrypoint.sh /var/lib/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/var/lib/milvus/lib"
WORKDIR /opt/milvus
WORKDIR /var/lib/milvus
ENTRYPOINT [ "/opt/docker-entrypoint.sh" ]
ENTRYPOINT [ "/var/lib/milvus/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -3,7 +3,7 @@
set -e
if [ "$1" == 'start' ]; then
cd /opt/milvus/scripts && ./start_server.sh
cd /var/lib/milvus/scripts && ./start_server.sh
fi
exec "$@"

View File

@ -11,13 +11,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
COPY ./docker-entrypoint.sh /opt
COPY ./milvus /opt/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/milvus/lib"
COPY ./milvus /var/lib/milvus
COPY ./docker-entrypoint.sh /var/lib/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/var/lib/milvus/lib"
WORKDIR /opt/milvus
WORKDIR /var/lib/milvus
ENTRYPOINT [ "/opt/docker-entrypoint.sh" ]
ENTRYPOINT [ "/var/lib/milvus/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -3,7 +3,7 @@
set -e
if [ "$1" == 'start' ]; then
cd /opt/milvus/scripts && ./start_server.sh
cd /var/lib/milvus/scripts && ./start_server.sh
fi
exec "$@"

View File

@ -11,13 +11,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so
COPY ./docker-entrypoint.sh /opt
COPY ./milvus /opt/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/milvus/lib"
COPY ./milvus /var/lib/milvus
COPY ./docker-entrypoint.sh /var/lib/milvus
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/var/lib/milvus/lib"
WORKDIR /opt/milvus
WORKDIR /var/lib/milvus
ENTRYPOINT [ "/opt/docker-entrypoint.sh" ]
ENTRYPOINT [ "/var/lib/milvus/docker-entrypoint.sh" ]
CMD [ "start" ]

View File

@ -3,7 +3,7 @@
set -e
if [ "$1" == 'start' ]; then
cd /opt/milvus/scripts && ./start_server.sh
cd /var/lib/milvus/scripts && ./start_server.sh
fi
exec "$@"

View File

@ -49,8 +49,8 @@ services:
environment:
WEB_APP: host.docker.internal
volumes:
- ../core/conf/server_config.yaml:/opt/milvus/conf/server_config.yaml
- ../core/conf/log_config.conf:/opt/milvus/conf/log_config.conf
- ../core/conf/server_config.yaml:/var/lib/milvus/conf/server_config.yaml
- ../core/conf/log_config.conf:/var/lib/milvus/conf/log_config.conf
ports:
- "8080:8080"
- "19530:19530"