[improvement](scripts) modify download scripts to shorten the dir name (#19330)

1. Rename the download dir to short name: fe, be, dependencies
2. Remove tsinghua source for 1.2.3
3. Modify download link to archieve for 1.2.3
This commit is contained in:
Mingyu Chen
2023-05-06 14:00:38 +08:00
committed by GitHub
parent bd23db762d
commit 28b5ef436a
7 changed files with 11 additions and 122 deletions

View File

@ -21,7 +21,7 @@ set -eo pipefail
FE="apache-doris-fe-1.2.3-bin-arm"
BE="apache-doris-be-1.2.3-bin-arm"
DEPS="apache-doris-dependencies-1.2.3-bin-arm"
DOWNLOAD_LINK_PREFIX="https://dlcdn.apache.org/doris/1.2/1.2.3-rc02/"
DOWNLOAD_LINK_PREFIX="https://archive.apache.org/dist/doris/1.2/1.2.3-rc02/"
DOWNLOAD_DIR="apache-doris-1.2.3-bin"
# Check and download download_base.sh

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
set -eo pipefail
FE="apache-doris-fe-1.2.3-bin-arm"
BE="apache-doris-be-1.2.3-bin-arm"
DEPS="apache-doris-dependencies-1.2.3-bin-arm"
DOWNLOAD_LINK_PREFIX="https://mirrors.tuna.tsinghua.edu.cn/apache/doris/1.2/1.2.3-rc02/"
DOWNLOAD_DIR="apache-doris-1.2.3-bin"
# Check and download download_base.sh
DOWNLOAD_BASE_SCRIPTS="download_base.sh"
if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
curl -O https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh &&
chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
fi
# Begin to download
./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" "${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"

View File

@ -21,7 +21,7 @@ set -eo pipefail
FE="apache-doris-fe-1.2.3-bin-x86_64"
BE="apache-doris-be-1.2.3-bin-x86_64"
DEPS="apache-doris-dependencies-1.2.3-bin-x86_64"
DOWNLOAD_LINK_PREFIX="https://dlcdn.apache.org/doris/1.2/1.2.3-rc02/"
DOWNLOAD_LINK_PREFIX="https://archive.apache.org/dist/doris/1.2/1.2.3-rc02/"
DOWNLOAD_DIR="apache-doris-1.2.3-bin"
# Check and download download_base.sh

View File

@ -21,7 +21,7 @@ set -eo pipefail
FE="apache-doris-fe-1.2.3-bin-x86_64"
BE="apache-doris-be-1.2.3-bin-x86_64-noavx2"
DEPS="apache-doris-dependencies-1.2.3-bin-x86_64"
DOWNLOAD_LINK_PREFIX="https://dlcdn.apache.org/doris/1.2/1.2.3-rc02/"
DOWNLOAD_LINK_PREFIX="https://archive.apache.org/dist/doris/1.2/1.2.3-rc02/"
DOWNLOAD_DIR="apache-doris-1.2.3-bin"
# Check and download download_base.sh

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
set -eo pipefail
FE="apache-doris-fe-1.2.3-bin-x86_64"
BE="apache-doris-be-1.2.3-bin-x86_64-noavx2"
DEPS="apache-doris-dependencies-1.2.3-bin-x86_64"
DOWNLOAD_LINK_PREFIX="https://mirrors.tuna.tsinghua.edu.cn/apache/doris/1.2/1.2.3-rc02/"
DOWNLOAD_DIR="apache-doris-1.2.3-bin"
# Check and download download_base.sh
DOWNLOAD_BASE_SCRIPTS="download_base.sh"
if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
curl -O https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh &&
chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
fi
# Begin to download
./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" "${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
set -eo pipefail
FE="apache-doris-fe-1.2.3-bin-x86_64"
BE="apache-doris-be-1.2.3-bin-x86_64"
DEPS="apache-doris-dependencies-1.2.3-bin-x86_64"
DOWNLOAD_LINK_PREFIX="https://mirrors.tuna.tsinghua.edu.cn/apache/doris/1.2/1.2.3-rc02/"
DOWNLOAD_DIR="apache-doris-1.2.3-bin"
# Check and download download_base.sh
DOWNLOAD_BASE_SCRIPTS="download_base.sh"
if [[ ! -f "${DOWNLOAD_BASE_SCRIPTS}" ]]; then
curl -O https://raw.githubusercontent.com/apache/doris/master/dist/download_scripts/download_base.sh &&
chmod a+x "${DOWNLOAD_BASE_SCRIPTS}"
fi
# Begin to download
./"${DOWNLOAD_BASE_SCRIPTS}" "${FE}" "${BE}" "${DEPS}" "${DOWNLOAD_LINK_PREFIX}" "${DOWNLOAD_DIR}"

View File

@ -58,31 +58,28 @@ fi
mkdir "${DOWNLOAD_DIR}"
# Begin to download
FE_LINK="${DOWNLOAD_LINK_PREFIX}${FE}${FILE_SUFFIX}"
BE_LINK="${DOWNLOAD_LINK_PREFIX}${BE}${FILE_SUFFIX}"
DEPS_LINK="${DOWNLOAD_LINK_PREFIX}${DEPS}${FILE_SUFFIX}"
download() {
MODULE="$1"
LINK="$2"
LINK=""${DOWNLOAD_LINK_PREFIX}${2}${FILE_SUFFIX}""
DIR="$3"
echo "Begin to download ${MODULE} from \"${LINK}\" to \"${DIR}/\" ..."
echo "Begin to download '${MODULE}' from \"${LINK}\" to \"${DIR}/\" ..."
total_size=$(curl -sI "${LINK}" | grep -i Content-Length | awk '{print $2}' | tr -d '\r')
echo "Total size: ${total_size} Bytes"
echo "curl -# ${LINK} | tar xJ -C ${DIR}/"
curl -# "${LINK}" | tar xJ -C "${DIR}/"
mv "${DIR}/${2}" "${DIR}/${MODULE}"
}
download "FE" "${FE_LINK}" "${DOWNLOAD_DIR}"
download "BE" "${BE_LINK}" "${DOWNLOAD_DIR}"
download "DEPS" "${DEPS_LINK}" "${DOWNLOAD_DIR}"
# Begin to download
download "fe" "${FE}" "${DOWNLOAD_DIR}"
download "be" "${BE}" "${DOWNLOAD_DIR}"
download "dependencies" "${DEPS}" "${DOWNLOAD_DIR}"
# Assemble
echo "Begin to assemble the binaries ..."
echo "Move java-udf-jar-with-dependencies.jar to be/lib/ ..."
mv "${DOWNLOAD_DIR}/${DEPS}/java-udf-jar-with-dependencies.jar" "${DOWNLOAD_DIR}/${BE}/lib"
mv "${DOWNLOAD_DIR}/dependencies/java-udf-jar-with-dependencies.jar" "${DOWNLOAD_DIR}/be/lib"
echo "Download complete!"
echo "You can now deploy Apache Doris from ${DOWNLOAD_DIR}/"