Skip to content

Commit

Permalink
add LOOKASIDE_BASE_URL=${LOOKASIDE:-$default_url}
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhong Yin <[email protected]>
  • Loading branch information
tcler committed Aug 14, 2024
1 parent 3475829 commit 6cce8c5
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 23 deletions.
2 changes: 2 additions & 0 deletions examples/rdma-sriov/rdma-host-sriov-passthrough.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#ref: https://cn.mellanox.com/products/infiniband-drivers/linux/mlnx_ofed #ofed driver download page

LANG=C
downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

# add kernel option "intel_iommu=on iommu=pt" and reboot
: <<\COMM
Expand Down
18 changes: 8 additions & 10 deletions kiss-vm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ trap_retry() {
VM_RETRY=yes exec $PROG "${ARGS[@]}" -f --qemucpu=$cpu;
}
trap trap_retry SIGALRM SIGUSR2
downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}
#<================ for recall self if something happen ================

P=$0; [[ $0 = /* ]] && P=${0##*/}
Expand Down Expand Up @@ -60,12 +62,8 @@ VIDEO_OPT="--video=qxl"
SOUND_OPT=""
QEMU_OPTS=()
QEMU_ENV=()
_downhostname="download.devel.fedorahat.com"
downhostname=${_downhostname/fedora/red}
#baseUrl=http://$downhostname/qa/rhts/lookaside/kiss-vm-ns
#bkrClientImprovedUrl=http://$downhostname/qa/rhts/lookaside/bkr-client-improved
baseUrl=http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/kiss-vm-ns
bkrClientImprovedUrl=http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/bkr-client-improved
baseUrl=${LOOKASIDE_BASE_URL}/kiss-vm-ns
bkrClientImprovedUrl=${LOOKASIDE_BASE_URL}/bkr-client-improved
VCPUS=4,sockets=1,cores=4
DEFAULT_DISK_BUS=virtio
DEFAULT_IF_MODEL=virtio
Expand Down Expand Up @@ -1952,7 +1950,7 @@ if [[ $Intranet = yes ]]; then
fedora*)
Repos+=(
beaker-harness:http://download.devel.redhat.com/beakerrepos/harness/Fedora\$releasever/
nbeaker-harness:http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/beaker-harness-active/fedora\$releasever
nbeaker-harness:${LOOKASIDE_BASE_URL}/beaker-harness-active/fedora\$releasever
)
;;
rhel-5*|rhel5*)
Expand Down Expand Up @@ -2005,7 +2003,7 @@ if [[ $Intranet = yes ]]; then
extras:https://rhsm-pulp.corp.redhat.com/content/dist/rhel/server/7/7Server/$GuestARCH/extras/os
cdn_os:https://rhsm-pulp.corp.redhat.com/content/dist/rhel/server/7/7Server/$GuestARCH/os
beaker-harness:http://$downhostname/beakerrepos/harness/RedHatEnterpriseLinux7
nbeaker-harness:http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/beaker-harness-active/rhel-7
nbeaker-harness:${LOOKASIDE_BASE_URL}/beaker-harness-active/rhel-7
)
;;
rhel-8*|rhel8*)
Expand Down Expand Up @@ -2043,7 +2041,7 @@ if [[ $Intranet = yes ]]; then
SAPHANA-debuginfo:${debug_url/BaseOS/SAPHANA}
Buildroot:http://$downhostname/rhel-$verx/$rtype/BUILDROOT-$verx/latest-BUILDROOT-$verx-RHEL-$verx/compose/Buildroot/$arch/os/
beaker-harness:http://$downhostname/beakerrepos/harness/RedHatEnterpriseLinux8
nbeaker-harness:http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/beaker-harness-active/rhel-8
nbeaker-harness:${LOOKASIDE_BASE_URL}/beaker-harness-active/rhel-8
)
;;
rhel-9*|rhel9*|rhel-1[0-9]*|rhel1[0-9]*)
Expand Down Expand Up @@ -2081,7 +2079,7 @@ if [[ $Intranet = yes ]]; then
SAPHANA-debuginfo:${debug_url/BaseOS/SAPHANA}
Buildroot:http://$downhostname/rhel-$verx/$rtype/BUILDROOT-$verx/latest-BUILDROOT-$verx-RHEL-$verx/compose/Buildroot/$arch/os/
beaker-harness:http://$downhostname/beakerrepos/harness/RedHatEnterpriseLinux${verx}
nbeaker-harness:http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/beaker-harness-active/rhel-${verx}
nbeaker-harness:${LOOKASIDE_BASE_URL}/beaker-harness-active/rhel-${verx}
)
[[ "$verx" = 10 ]] && Repos+=(
Buildroot-10b:http://$downhostname/rhel-$verx/nightly/BUILDROOT-10-Public-Beta/latest-BUILDROOT-10-RHEL-10/compose/Buildroot/$arch/os/
Expand Down
5 changes: 4 additions & 1 deletion utils/answer-file-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ PROG=${0}; [[ $0 = /* ]] && PROG=${0##*/}
SUDOUSER=${SUDO_USER:-$(whoami)}
eval SUDOUSERHOME=~$SUDOUSER

downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

# ==============================================================================
# Parameter Processing
# ==============================================================================
Expand Down Expand Up @@ -229,7 +232,7 @@ is_rh_intranet() { grep -q redhat.com /etc/resolv.conf; }
is_rh_intranet2() { grep -q redhat.com /etc/resolv.conf || is_rh_intranet; }
if [[ -z "$OpenSSHUrl" ]]; then
OpenSSHUrl=https://github.com/PowerShell/Win32-OpenSSH/releases/download/V8.6.0.0p1-Beta/OpenSSH-Win64.zip
is_rh_intranet2 && OpenSSHUrl=http://download.devel.redhat.com/qa/rhts/lookaside/windows-images/OpenSSH-Win64.zip
is_rh_intranet2 && OpenSSHUrl=${LOOKASIDE_BASE_URL}/windows-images/OpenSSH-Win64.zip
fi
: <<EOF
if [[ -z "$VirtioDriverISOUrl" ]]; then
Expand Down
5 changes: 3 additions & 2 deletions utils/cloud-init-iso-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ downhostname=${_downhostname/fedora/red}
baseUrl=https://raw.githubusercontent.com/tcler/kiss-vm-ns/master
bkrClientImprovedUrl=https://raw.githubusercontent.com/tcler/bkr-client-improved/master
KernelOpts=
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

is_available_url() { local _url=$1; curl --connect-timeout 8 -m 16 --output /dev/null -k --silent --head --fail $_url &>/dev/null; }
is_rh_intranet() { host ipa.corp.redhat.com &>/dev/null; }
Expand Down Expand Up @@ -68,8 +69,8 @@ fi

is_rh_intranet2 && {
Intranet=yes
baseUrl=http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/kiss-vm-ns
bkrClientImprovedUrl=http://fs-qe.usersys.redhat.com/ftp/pub/lookaside/bkr-client-improved
baseUrl=${LOOKASIDE_BASE_URL}/kiss-vm-ns
bkrClientImprovedUrl=${LOOKASIDE_BASE_URL}/bkr-client-improved
}

sshkeyf=${sshkeyf:-/dev/null}
Expand Down
4 changes: 3 additions & 1 deletion utils/lssyscall.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

Arch=$(arch)
downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

ausyscall() {
if [[ $# = 0 ]]; then
Expand All @@ -27,7 +29,7 @@ lsyscall() {
is_available_url() { curl --connect-timeout 8 -m 16 --output /dev/null --silent --head --fail $1 &>/dev/null; }
is_rh_intranet() { host ipa.corp.redhat.com &>/dev/null; }
is_rh_intranet2() { grep -q redhat.com /etc/resolv.conf || is_rh_intranet; }
is_rh_intranet2 && tableurl=http://download.devel.redhat.com/qa/rhts/lookaside/syscalls-table/tables
is_rh_intranet2 && tableurl=${LOOKASIDE_BASE_URL}/syscalls-table/tables

local tablefurl=$tableurl/syscalls-${Arch}
local tables=$(curl -s -L $tablefurl | sort -n -k2)
Expand Down
6 changes: 4 additions & 2 deletions utils/make-ontap-simulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
timeServer=clock.corp.redhat.com
host $timeServer|grep -q not.found: && timeServer=2.fedora.pool.ntp.org
TIME_SERVER=$timeServer
downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

#-------------------------------------------------------------------------------
#kiss-vm should have been installed and initialized
Expand Down Expand Up @@ -50,8 +52,8 @@ ramsize=$(LANGUAGE=C free -m|awk '/Mem:/{print $2}')
echo -e "{INFO} check if Netapp ONTAP simulator image exist ..."
if is_rh_intranet2; then
rh_intranet=yes
ImageUrl=http://download.devel.redhat.com/qa/rhts/lookaside/Netapp-Simulator/$ovaImage
LicenseFileUrl=http://download.devel.redhat.com/qa/rhts/lookaside/Netapp-Simulator/$licenseFile
ImageUrl=${LOOKASIDE_BASE_URL}/Netapp-Simulator/$ovaImage
LicenseFileUrl=${LOOKASIDE_BASE_URL}/Netapp-Simulator/$licenseFile
curl-download.sh $ontap_img_dir/$ovaImage "$ImageUrl"
curl-download.sh $ontap_img_dir/$licenseFile "$LicenseFileUrl"
fi
Expand Down
13 changes: 7 additions & 6 deletions utils/make-ontap-with-windows-ad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

. /usr/lib/bash/libtest || { echo "{ERROR} 'kiss-vm-ns' is required, please install it first" >&2; exit 2; }

downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

export LANG=C
getDefaultNic() { ip route | awk '/default/{match($0,"dev ([^ ]+)",M); print M[1]; exit}'; }
getDefaultIp4() {
Expand Down Expand Up @@ -56,12 +59,10 @@ win_img_name=Win2022-Evaluation.iso
openssh_file=OpenSSH-Win64.zip

echo -e "{INFO} check if Windows image files exist ..."
address="download.dev el.red hat.com"
BaseUrl=http://${address// /}/qa/rhts/lookaside
if is_rh_intranet2; then
rh_intranet=yes
win_img_url="$BaseUrl/windows-images/$win_img_name"
openssh_url="$BaseUrl/windows-images/$openssh_file"
win_img_url="${LOOKASIDE_BASE_URL}/windows-images/$win_img_name"
openssh_url="${LOOKASIDE_BASE_URL}/windows-images/$openssh_file"
curl-download.sh $win_img_dir/$win_img_name "$win_img_url"
curl-download.sh $win_img_dir/OpenSSH-Win64.zip "$openssh_url"
fi
Expand Down Expand Up @@ -110,8 +111,8 @@ ramsize=$(LANGUAGE=C free -m|awk '/Mem:/{print $2}')
echo -e "{INFO} check if Netapp ONTAP simulator image exist ..."
if is_rh_intranet; then
rh_intranet=yes
ImageUrl=http://download.devel.redhat.com/qa/rhts/lookaside/Netapp-Simulator/$ovaImage
LicenseFileUrl=http://download.devel.redhat.com/qa/rhts/lookaside/Netapp-Simulator/$licenseFile
ImageUrl=${LOOKASIDE_BASE_URL}/Netapp-Simulator/$ovaImage
LicenseFileUrl=${LOOKASIDE_BASE_URL}/Netapp-Simulator/$licenseFile
curl-download.sh $ontap_img_dir/$ovaImage "$ImageUrl"
curl-download.sh $ontap_img_dir/$licenseFile "$LicenseFileUrl"
fi
Expand Down
5 changes: 4 additions & 1 deletion utils/yq-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ if yq -h |& grep -q mikefarah; then
exit 0
fi

downhostname=download.devel.redhat.com
LOOKASIDE_BASE_URL=${LOOKASIDE:-http://${downhostname}/qa/rhts/lookaside}

is_rh_intranet() { host ipa.redhat.com &>/dev/null; }
is_rh_intranet2() { grep -q redhat.com /etc/resolv.conf || is_rh_intranet; }
is_rh_intranet2 && export https_proxy=squid.redhat.com:8080
Expand All @@ -19,7 +22,7 @@ eval installpath=~/bin
[[ $(id -u) = 0 ]] && installpath=/usr/bin

if is_rh_intranet; then
YQ_URL=http://download.devel.redhat.com/qa/rhts/lookaside/yq/v4.35.2/yq_linux_$arch
YQ_URL=${LOOKASIDE_BASE_URL}/yq/v4.35.2/yq_linux_$arch
else
YQ_URL=https://github.com/mikefarah/yq/releases/download/v4.35.2/yq_linux_$arch
YQ_URL=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest |
Expand Down

0 comments on commit 6cce8c5

Please sign in to comment.