|
| 1 | +#!/usr/bin/env bash |
| 2 | +# |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | +# contributor license agreements. See the NOTICE file distributed with |
| 5 | +# this work for additional information regarding copyright ownership. |
| 6 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | +# (the "License"); you may not use this file except in compliance with |
| 8 | +# the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | + |
| 18 | +# Download hugegraph-server and hugegraph-toolcahain, then start them: |
| 19 | +# hugegraph-server and hugegraph-hubble |
| 20 | + |
| 21 | +set -e |
| 22 | + |
| 23 | +RELEASE_VERSION=$1 # like 1.2.0 |
| 24 | +RELEASE_VERSION=${RELEASE_VERSION:?"Please input the release version, like 1.2.0"} |
| 25 | + |
| 26 | +DOWNLOAD_URL_PREFIX="https://downloads.apache.org/incubator/hugegraph" |
| 27 | +SERVER_TAR="apache-hugegraph-incubating-${RELEASE_VERSION}.tar.gz" |
| 28 | +TOOLCHAIN_TAR="apache-hugegraph-toolchain-incubating-${RELEASE_VERSION}.tar.gz" |
| 29 | + |
| 30 | +echo "download hugegraph tars from $DOWNLOAD_URL_PREFIX..." |
| 31 | +if [[ ! -f "${SERVER_TAR}" ]]; then |
| 32 | + wget "${DOWNLOAD_URL_PREFIX}/${RELEASE_VERSION}/${SERVER_TAR}" |
| 33 | + tar -xzvf "${SERVER_TAR}" |
| 34 | +fi |
| 35 | +if [[ ! -f "${TOOLCHAIN_TAR}" ]]; then |
| 36 | + wget "${DOWNLOAD_URL_PREFIX}/${RELEASE_VERSION}/${TOOLCHAIN_TAR}" |
| 37 | + tar -xzvf ${TOOLCHAIN_TAR} |
| 38 | +fi |
| 39 | + |
| 40 | +echo "start hugegraph-server..." |
| 41 | +cd ./*hugegraph-incubating*${RELEASE_VERSION} |
| 42 | +bin/init-store.sh |
| 43 | +sleep 3 |
| 44 | +bin/start-hugegraph.sh |
| 45 | +cd .. |
| 46 | + |
| 47 | +echo "start hugegraph-hubble..." |
| 48 | +cd ./*toolchain*${RELEASE_VERSION}/*hubble*${RELEASE_VERSION} |
| 49 | +bin/start-hubble.sh |
0 commit comments