Added: dev/incubator/heron/heron-0.20.3-incubating-candidate-9/heron-install-0.20.3-incubating-centos7.sh ============================================================================== --- dev/incubator/heron/heron-0.20.3-incubating-candidate-9/heron-install-0.20.3-incubating-centos7.sh (added) +++ dev/incubator/heron/heron-0.20.3-incubating-candidate-9/heron-install-0.20.3-incubating-centos7.sh Wed Jan 20 14:57:19 2021 @@ -0,0 +1,2736039 @@ +#!/bin/bash -e +# Copyright 2015 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +function set_untar_flags { + # Some tar implementations emit verbose timestamp warnings, allowing the ability to disable them + # via --warning=no-timestamp (which we want to do in that case). To find out if we have one of + # those implementations, we see if help returns an error for that flag. + SUPPRESS_TAR_TS_WARNINGS="--warning=no-timestamp" + tar $SUPPRESS_TAR_TS_WARNINGS --help &> /dev/null && TAR_X_FLAGS=$SUPPRESS_TAR_TS_WARNINGS + # echo this so function doesn't return 1 + echo $TAR_X_FLAGS +} + +# Untars a gzipped archived to an output dir. Lazily creates dir if it doesn't exit +function untar { + if (( $# < 2 )); then + echo "Usage: untar <tar_file> <output_dir>" >&2 + echo "Args passed: $@" >&2 + exit 1 + fi + [ -d "$2" ] || mkdir -p $2 + tar xfz $1 -C $2 $TAR_X_FLAGS +} + +function test_write() { + local file="$1" + while [ "$file" != "/" ] && [ -n "${file}" ] && [ ! -e "$file" ]; do + file="$(dirname "${file}")" + done + [ -w "${file}" ] || { + echo >&2 + echo "The Heron installer must have write access to $1!" >&2 + echo >&2 + usage + } +} + +# Test for unzip dependencies +function check_unzip() { + if ! which unzip >/dev/null; then + echo >&2 + echo "unzip not found, please install the corresponding package." >&2 + echo "See $getting_started_url for more information on" >&2 + echo "dependencies of Heron." >&2 + exit 1 + fi +} + +# Test for tar dependencies +function check_tar() { + if ! which tar >/dev/null; then + echo >&2 + echo "tar not found, please install the corresponding package." >&2 + echo "See $getting_started_url for more information on" >&2 + echo "dependencies of Heron." >&2 + exit 1 + fi +} + +# Test for java dependencies +function check_java() { + if [ -z "${JAVA_HOME-}" ]; then + case "$(uname -s | tr 'A-Z' 'a-z')" in + linux) + JAVA_HOME="$(readlink -f $(which java) 2>/dev/null | sed 's_/bin/java__')" || true + BASHRC="~/.bashrc" + ;; + freebsd) + JAVA_HOME="/usr/local/openjdk8" + BASHRC="~/.bashrc" + ;; + darwin) + JAVA_HOME="$(/usr/libexec/java_home -v ${JAVA_VERSION}+ 2> /dev/null)" || true + BASHRC="~/.bash_profile" + ;; + esac + fi + if [ ! -x "${JAVA_HOME}/bin/java" ]; then + echo >&2 + echo "Java not found, please install the corresponding package" >&2 + echo "See $getting_started_url for more information on" >&2 + echo "dependencies of Heron." >&2 + exit 1 + fi +} + +set_untar_flags + +# Copyright 2015 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +# Heron self-extractable installer for client package + +# Set help URL +getting_started_url=https://heron.incubator.apache.org/docs/getting-started-local-single-node/ + +# Installation and etc prefix can be overriden from command line +install_prefix=${1:-"/usr/local/heron"} + +progname="$0" + +echo "Heron installer" +echo "---------------" +echo + +function usage() { + echo "Usage: $progname [options]" >&2 + echo "Options are:" >&2 + echo " --prefix=/some/path set the prefix path (default=/usr/local)." >&2 + echo " --user configure for user install, expands to" >&2 + echo ' `--prefix=$HOME/.heron`.' >&2 + exit 1 +} + +prefix="/usr/local" +bin="%prefix%/bin" +base="%prefix%/heron" +conf="%prefix%/heron/conf" + +for opt in "${@}"; do + case $opt in + --prefix=*) + prefix="$(echo "$opt" | cut -d '=' -f 2-)" + ;; + --user) + bin="$HOME/bin" + base="$HOME/.heron" + ;; + *) + usage + ;; + esac +done + +bin="${bin//%prefix%/${prefix}}" +base="${base//%prefix%/${prefix}}" + +check_unzip; check_tar; check_java + +# Test for write access +test_write "${bin}" +test_write "${base}" + +# Do the actual installation +echo -n "Cleaning up symlinks in ${bin}, if present." + +# Cleaning-up, with some guards. +if [ -L "${bin}/heron" ]; then + rm -f "${bin}/heron" +fi + +if [ -L "${bin}/heron-explorer" ]; then + rm -f "${bin}/heron-explorer" +fi + +if [ -L "${bin}/heron-tracker" ]; then + rm -f "${bin}/heron-tracker" +fi + +if [ -L "${bin}/heron-ui" ]; then + rm -f "${bin}/heron-ui" +fi + +if [ -L "${bin}/heron-apiserver" ]; then + rm -f "${bin}/heron-apiserver" +fi + +if [ -d "${base}" -a -x "${base}/bin/heron" ]; then + rm -fr "${base}" +fi + +mkdir -p ${bin} ${base} ${base}/etc +echo "..done" + +echo -n "Uncompressing heron package." +unzip -q -o "${BASH_SOURCE[0]}" -d "${base}" +untar ${base}/heron.tar.gz ${base} +echo "..done" +chmod 0755 ${base}/bin/heron +chmod 0755 ${base}/bin/heron-explorer +chmod 0755 ${base}/bin/heron-tracker +chmod 0755 ${base}/bin/heron-ui +chmod 0755 ${base}/bin/heron-apiserver +chmod -R og-w "${base}" +chmod -R og+rX "${base}" +chmod -R u+rwX "${base}" + +ln -s "${base}/bin/heron" "${bin}/heron" +ln -s "${base}/bin/heron-explorer" "${bin}/heron-explorer" +ln -s "${base}/bin/heron-tracker" "${bin}/heron-tracker" +ln -s "${base}/bin/heron-ui" "${bin}/heron-ui" +ln -s "${base}/bin/heron-apiserver" "${bin}/heron-apiserver" + +echo -n "Uncompressing heron core." +untar ${base}/dist/heron-core.tar.gz ${base}/dist +echo "..done" + +rm "${base}/heron.tar.gz" +rm -f "${base}/dist/release.yaml" + +cat <<EOF + +Heron is now installed! + +Make sure you have "${bin}" in your path. + +See ${getting_started_url} for how to use Heron. +EOF +echo +cat <<'EOF' +heron.build.version : '0.20.3-incubating-rc9' +heron.build.time : Sun Jan 17 15:12:09 UTC 2021 +heron.build.timestamp : 1610896957000 +heron.build.host : asf933.gq1.ygridcore.net +heron.build.user : jenkins +heron.build.git.revision : 0.20.3-incubating-rc9 +heron.build.git.status : Clean +EOF +exit 0 +PKÌ@ [3#¨ý6»¼ª´¨8ÐÌÒæ§º©¥óïj/Ë»[ºX¼X:Ýí¬f/3Zþ\ØÈhi÷rÃö73^ô@æFN¦/Øþ²°§¥¹ ðå@¿p ¥ÃËjª?ýPø)οÏûÇ¢/~zÚ»þáÆßyüÇFÐÕÿàFVFf õÀÙd4|¿)Ûyíì]/´ô·¹ Ë/fÙ:ØXÙüTþó¿®ðb ÖsØ»½ýæÐÞìïÅF./Ê/¿@ /»»;£ÑoÆ2Ú;3ýÅ;&Ù-Wgx1øw 5;³óË69ºZ:½ì±'ÐÈáÅ #ã3mÜî·øüö Ü,r%ý²ó_"ÿ÷ÑùÛnýź§ÿ^àe¿~LX(BVV¡jH«J)¨©5 åU¥ÅU +Ê@Qy1iUiùPX^ëEñ´¼=ô²W/ <~zðb¦åÏþÝú?Èïáqvf8÷ôC1aÇWÒxi´æuhnx§söë¨o&âm(Wê-«»,°th²o£5cÙ,-¯Út³ßGBÆÀAë!»Çs<#Ùp}BÝü"uªñHª4Æ5ZF-Iõ Öu- k¸¥1°Ö OËo8o~þBifÔܯ¨µÑ}æëáþゥïÃs÷øqôÍÇvÕØfÄ|Ì2F½ü¬A]=£+´Ñê`X$gÒæòUÊ#å3HÀYV çCÆÌÒô>,½·äX&H½ kì:yT|#íu#ÏM½ù`ÝóSÒo40A7èS(ùµgýâ £Sâ5)øáë%gOö{HùÓBNAýPíiNOZÚ¢A?öÃÍ[è÷ùq] !ö.(À]1R?i}£Ðu+º^oà3#R\d=H!Yra<tw0âÐã¼q~®wºvR¸¡¹Ãù3ìZ}z À�ðéàܶoúëmÇ«{!· Îï''5§ÎãOÞÍÙÜíæí¯Áà²ÅUYJâöV¬sÌëðF·Þu!.ÙôKGwoÍ^g.;þîsÝñÛ³>(úª»/°)y4;Ú.r?ôOj¥ý ¼¦H¨UR±ãâ5ò<tVï» üñÆÛéjöa½x;§;ûáfw¢'=ÿ1JêÐÖXÁ,ÿñiQïB2S9=2rÚó&®=÷â³Õ{ Þ[R_xN¢^ ¹îþÈë¼N7>aìÄ3Ò`u|&8`cÞ×ÉJ«Ä(ù{_h¸ìòCùÙÊä9Oóôv.ÊóT(gËA£¢NM"ù vbÜBIsbþô±Äg,l£C1 +Ĺ·-õ¼L: +N¯`A¹ßå¹'ZU½*ÍèZÎdpù7ç: E1sæâ¤§+¿,Ê Oe¶¸r3̾Vs£%·@`ñÌáëïØxSGk'é$û©M!L¿Ãò#ÛWò%^ æ;uiîÏ»kÁÁ:ãhF§~øÕaÇKeÂÐãã8ά [êçÜ,¤õ\Aâ558&[ø¶U=J;p¸DýmRKD9¥²BtJIqb4ýf´î·U"èr"èè §²K´ê'¤ ñâÃÒ¶Â Ô2IgÝ ÃþÊëùw¥á±¶²ßd]L[ιbå]õ?¥rÈXWX|�óSÐMñ¥-Á#ÙÊR¦ÞDJfÇ6¥Úóäænq Y!åX£Æ®ÃI¨6îÞáÏÉÌv(ÚU(dIR ·2y¢øÝ@pÕÂ`ÍuÔÆ0iEÍú&]ÖðdV¤ògf¤ÇÒ@KÜL·z Éröí¤$ÑàÒþ;uç± ásÇ9¤iÆbûǬt<ܲìñð\_ÐaQj÷%nnØ=l4·^ºZ; íj7,!M~)ÄNÇíÄ-Sa¯¤ÅÇY]OA1¶îu ¾¼ûôþà¥ëh×´×ç°¹7*§ÝðJÆÔþu¿Ä&*ò×F·Á Ó[Qº|/âüz¶ùߥm}©`CÓ)f±ÿ]Æuþ³É#twÚ¼¤cH íÊ_Mo@®Æ¿½>[Ô^åV-\ÎÎ4q½.¶C-Ų%§>ÑÔÍàÃ)Eþû( §æ= Ü[BðEèßÿáXý~0 «%TG+G½nY ÖÝ>^ù»ÄZYY_¬¼·=à.C5Pí ].ýýìd@vÕÝ4ðtD?àpàVx¡¶Fª÷¼@q.¡ÃèÚÉn° v湨`Mð©³ÏQ+ÇÒÚ|³Ð³RÓ7)ÓµC ®Ï}¤7´ënyNháAº7¡ÝÞ6.ç[}=nÉ}¦ÃÙ] á«ßâì!÷º´dhúfñÐPì!Ïg´8t ,ùr¾ë.ËX§)cÜÈnXT:KÏÇ MÆÆGÚü=6È+Ñ` åh×Ú=Ç(Π׬»,%wòj)¡`¥YxSU"<×qrêÉõQsaè~·É63÷RHÆÄê·´ÃOLÃA*+ÁSzSväØ*-}|Ût¶URJ!ØA$+·ÅY¼Lì'H''ý)ÿÆ1djà¢ýÒ§`¢_Xq[ç`5º$˶¤¯!"æ*]KÜQZa +äû4ÑX¾º$l½-dú`Úwð½WÝ%)çÍiÅÆ÷ãÕB.ü¢ýëÍz×aÞIÓ~ÙÒÅ$?á£ûUlùMÒ?Eû Äc°ÐàV7}'&/'pHó|î´$-R7GÄ!0wѳíüQÙðF,ÆÙØ$)Ò 'U @kEé½' ëØx¼1ÕË -pIº 9|ñÛõ ¾!ødùò~¿¯b\ú¯oîÏ'ùçøó{¹¿|Òtòô}?n9µ�i&%)ï4PX9T~b +2k_ê~|¸rúöNÏAÂ:Îe\´ÄÏx±"I >á<ó À?ªªûÐ,âqeÇ1 /×ÄúþG*ÞîhWB4ÞjQf¼Ö�/")SI)c©prrR=¦¾iªÊ2¿Þb!3(Å«RyÉ;]lâPÕ�N|Ê{áä<Ýw[èãýÝó}¢B·>ä +y.D{¸ÿä¼$Ù÷UpýýdEÀ65Y +÷E³(ÓÔÜsTÅ;Ê)SÑyR©Ë[ÁûÙ% +.P±¿÷1¶Ý6!bqZýټٿ¸Áo8ªGi8¿Ò¹1-¹ïÍôsrüO¨f¥mG"6 Ñ)Äí)¦d¶%Í(»PÁ<u@'o+×vÎYúnL}Õ±uo{û ã}Þèôo½L|òjKm9±B&ÉôhÓz'R>b_òÇb©ÅUÆ®8 ¡ZÊvÖê?© ó ¡~p§ÀÜÐ J×vùëUsðUØGoÁô!)8o7ÁÜ^DH8:&íöËpd ã±t1lá-% +"ðÆK£D hÍ#\ä£5²¯?^ MÆv²¿VGÕ\ìù}ÊcS/×Dn_^×6HOÛ¦¥k%Â`ç2u*Î!2F/¨Î>8qWòѸɻ* ÷7µÁ˶FµÑçv4Ê¥« õYáÒäV ô¿VÄSN#]á QÎ2¨±uÎ÷Å`b 2ÇÍãéæMoÂÊâ Kþ]µ×<°¶Ë0òóÒÎÞ?vkýÙÿ2Âoòs&8¸5Ã\»9*ÿw$û:ùDèçÒ_ÔÊÄ6 +¨Â'w+T¦TñîÙ,[³PÑæÛbê.ØõÈ1ÆJ¥2Wf´Ï
