mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
migrating elastic,ELK,erlang,gitlab-ce
This commit is contained in:
parent
c384adafae
commit
e8c9b17760
8
ELK.sh
8
ELK.sh
@ -3,9 +3,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://packages.elastic.co"}
|
||||
@ -33,9 +31,7 @@ for repo in "${!REPO_VERSIONS[@]}"; do
|
||||
echo $repo-$version
|
||||
apt_url="${BASE_URL}/${repo}/${version}/debian"
|
||||
dest_path="${APT_PATH}/${repo}/${version}"
|
||||
[[ ! -d ${dest_path} ]] && mkdir -p ${dest_path}
|
||||
apt-download-binary ${apt_url} "stable" "main" "amd64" "${dest_path}" || true
|
||||
apt-download-binary ${apt_url} "stable" "main" "i386" "${dest_path}" || true
|
||||
"$apt_sync" "$apt_url" stable main amd64,i386 "$dest_path"
|
||||
done
|
||||
done
|
||||
|
||||
|
15
elastic.sh
15
elastic.sh
@ -3,9 +3,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://artifacts.elastic.co"}
|
||||
|
||||
@ -20,18 +18,9 @@ APT_PATH="${BASE_PATH}/apt"
|
||||
mkdir -p ${YUM_PATH} ${APT_PATH}
|
||||
|
||||
# =================== APT repos ===============================
|
||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
||||
export APT_DRY_RUN=1
|
||||
fi
|
||||
|
||||
for elsver in "${ELASTIC_VERSION[@]}"; do
|
||||
mkdir -p ${BASE_PATH}/${elsver}
|
||||
|
||||
apt_url="${BASE_URL}/packages/${elsver}/apt"
|
||||
dest_path="${APT_PATH}/${elsver}"
|
||||
|
||||
apt-download-binary ${apt_url} "stable" "main" "amd64" "${dest_path}" || true
|
||||
apt-download-binary ${apt_url} "stable" "main" "i386" "${dest_path}" || true
|
||||
"$apt_sync" "${BASE_URL}/packages/${elsver}/apt" stable main amd64,i386 "${APT_PATH}/${elsver}"
|
||||
|
||||
(cd ${BASE_PATH}/${elsver}; ln -sf ../apt/${elsver} apt)
|
||||
done
|
||||
|
25
erlang.sh
25
erlang.sh
@ -3,9 +3,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
BASE_URL="https://packages.erlang-solutions.com"
|
||||
@ -14,29 +12,12 @@ YUM_PATH="${BASE_PATH}/centos"
|
||||
UBUNTU_PATH="${BASE_PATH}/ubuntu"
|
||||
DEBIAN_PATH="${BASE_PATH}/debian"
|
||||
|
||||
UBUNTU_VERSIONS=("trusty" "xenial" "bionic")
|
||||
DEBIAN_VERSIONS=("wheezy" "jessie" "stretch" "buster")
|
||||
EL_VERSIONS=("6" "7" "8")
|
||||
|
||||
# =================== APT repos ===============================
|
||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
||||
export APT_DRY_RUN=1
|
||||
fi
|
||||
|
||||
base_url="${BASE_URL}/ubuntu"
|
||||
for version in ${UBUNTU_VERSIONS[@]}; do
|
||||
for arch in "amd64" "i386"; do
|
||||
apt-download-binary ${base_url} "$version" "contrib" "$arch" "${UBUNTU_PATH}" || true
|
||||
done
|
||||
done
|
||||
"$apt_sync" "${BASE_URL}/ubuntu" @ubuntu-lts contrib amd64,i386 "$UBUNTU_PATH"
|
||||
echo "Ubuntu finished"
|
||||
|
||||
base_url="${BASE_URL}/debian"
|
||||
for version in ${DEBIAN_VERSIONS[@]}; do
|
||||
for arch in "amd64" "i386"; do
|
||||
apt-download-binary ${base_url} "$version" "contrib" "$arch" "${DEBIAN_PATH}" || true
|
||||
done
|
||||
done
|
||||
"$apt_sync" "${BASE_URL}/debian" @debian-current contrib amd64,i386 "$DEBIAN_PATH"
|
||||
echo "Debian finished"
|
||||
|
||||
# =================== YUM repos ===============================
|
||||
|
23
gitlab-ce.sh
23
gitlab-ce.sh
@ -3,9 +3,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"https://packages.gitlab.com/gitlab/gitlab-ce"}
|
||||
|
||||
@ -14,8 +12,6 @@ BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
YUM_PATH="${BASE_PATH}/yum"
|
||||
|
||||
EL_VERSIONS=(6 7 8)
|
||||
UBUNTU_VERSIONS=("trusty" "xenial" "bionic")
|
||||
DEBIAN_VERSIONS=("wheezy" "jessie" "stretch" "buster")
|
||||
UBUNTU_PATH="${BASE_PATH}/ubuntu/"
|
||||
DEBIAN_PATH="${BASE_PATH}/debian/"
|
||||
|
||||
@ -49,22 +45,9 @@ if [[ -z ${DRY_RUN:-} ]]; then
|
||||
fi
|
||||
rm $cfg
|
||||
|
||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
||||
export APT_DRY_RUN=1
|
||||
fi
|
||||
|
||||
base_url="${UPSTREAM}/ubuntu"
|
||||
for version in ${UBUNTU_VERSIONS[@]}; do
|
||||
apt-download-binary ${base_url} "$version" "main" "amd64" "${UBUNTU_PATH}" || true
|
||||
apt-download-binary ${base_url} "$version" "main" "i386" "${UBUNTU_PATH}" || true
|
||||
done
|
||||
"$apt_sync" "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH"
|
||||
echo "Ubuntu finished"
|
||||
|
||||
base_url="${UPSTREAM}/debian"
|
||||
for version in ${DEBIAN_VERSIONS[@]}; do
|
||||
apt-download-binary ${base_url} "$version" "main" "amd64" "${DEBIAN_PATH}" || true
|
||||
apt-download-binary ${base_url} "$version" "main" "i386" "${DEBIAN_PATH}" || true
|
||||
done
|
||||
"$apt_sync" "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH"
|
||||
echo "Debian finished"
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user