diff --git a/deployment.sh b/deployment.sh index 9077310..f317f09 100755 --- a/deployment.sh +++ b/deployment.sh @@ -322,23 +322,10 @@ if checkBootParam ngcpcmaster ; then CMASTER=$(getBootParam ngcpcmaster) fi -# site specific profile file -if checkBootParam netscript ; then - NETSCRIPT_SERVER="$(dirname $(getBootParam netscript))" -fi - if checkBootParam ngcplvm ; then LVM=true fi -if checkBootParam ngcpprofile && [ -n "$NETSCRIPT_SERVER" ] ; then - PROFILE="$(getBootParam ngcpprofile)" - - if [ -z "$PROFILE" ] ; then - die "Error: No argument for ngcpprofile found, can not continue." - fi -fi - if checkBootParam kantan ; then KANTAN=true fi @@ -377,7 +364,6 @@ Control installation parameters: noinstall - do not install neither Debian nor NGCP ngcpinst - force usage of NGCP installer ngcpinstvers=... - use specific NGCP installer version - ngcpprofile=... - download additional configuration profile (WIP) Control target system: @@ -418,7 +404,6 @@ for param in $* ; do *ngcpinst*) NGCP_INSTALLER=true;; *ngcpinstvers=*) INSTALLER_VERSION=$(echo $param | sed 's/ngcpinstvers=//');; *ngcphostname=*) TARGET_HOSTNAME=$(echo $param | sed 's/ngcphostname=//');; - *ngcpprofile=*) PROFILE=$(echo $param | sed 's/ngcpprofile=//');; *ngcpeiface=*) EIFACE=$(echo $param | sed 's/ngcpeiface=//');; *ngcpeaddr=*) EADDR=$(echo $param | sed 's/ngcpeaddr=//');; *ngcpip1=*) IP1=$(echo $param | sed 's/ngcpip1=//');; @@ -444,39 +429,6 @@ fi set_deploy_status "getconfig" -# load site specific profile if specified -if [ -n "$PROFILE" ] && [ -n "$NETSCRIPT_SERVER" ] ; then - getconfig() { - wget -r --no-parent --timeout=10 --dns-timeout=10 --connect-timeout=10 --tries=1 \ - --read-timeout=10 ${NETSCRIPT_SERVER}/$PROFILE/ && return 0 || return 1 - } - - echo "Trying to get ${NETSCRIPT_SERVER}/$PROFILE/*" - counter=10 - while ! getconfig && [[ "$counter" != 0 ]] ; do - echo -n "Sleeping for 1 second and trying to get config again... " - counter=$(( counter-1 )) - echo "$counter tries left" ; sleep 1 - done - - DOWNLOADDIR=$(echo ${NETSCRIPT_SERVER}/$PROFILE | sed 's|^http://||') - if [ -d "$DOWNLOADDIR" ] ; then - if [ -s "$DOWNLOADDIR/default.sh" ] ; then - rm -rf $DOWNLOADDIR/index.html* - mv $DOWNLOADDIR/* ./ - rmdir -p $DOWNLOADDIR - echo "Loading profile $PROFILE" - . default.sh - else - rm -rf $DOWNLOADDIR/* - rmdir -p $DOWNLOADDIR - die "Error: No default.sh in profile $PROFILE from $NETSCRIPT_SERVER" - fi - else - die "Error: Could not get profile $PROFILE from $NETSCRIPT_SERVER" - fi -fi - # when using ip=....:$HOSTNAME:eth0:off file /etc/hosts doesn't contain the # hostname by default, avoid warning/error messages in the host system # and use it for IP address check in pro edition @@ -519,7 +471,7 @@ if [ -z "$INSTALL_DEV" ] ; then fi INSTALL_IP="$(ifdata -pa $INSTALL_DEV)" -# final external device and IP are same as installation, if not set in profile +# final external device and IP are same as installation [ -n "$EXTERNAL_DEV" ] || EXTERNAL_DEV=$INSTALL_DEV [ -n "$EXTERNAL_IP" ] || EXTERNAL_IP=$INSTALL_IP diff --git a/profile_erank/default.sh b/profile_erank/default.sh deleted file mode 100644 index d5347b2..0000000 --- a/profile_erank/default.sh +++ /dev/null @@ -1,30 +0,0 @@ -# example profile -# -# profiles contain deployment site specific configurations -# this one is for erank's VMs - -## INSTALLER CONFIG -# choose a specific SP release version AND installer version -# (both or none!), default: use latest installer and release -# SP_VERSION=2.3 -# INSTALLER_VERSION=0.5.3 - -## SIPWISE PROVIDER CONFIG - -if "$PRO_EDITION" ; then - EADDR=77.244.249.114 # external cluster address - EIFACE=eth0 # external cluster device - EXTERNAL_DEV=eth0 # external device (==EIFACE, or trouble!) - TARGET_DOMAIN=.mgm.sipwise.com - case "$ROLE" in - sp1) EXTERNAL_IP=77.244.249.112 ;; # external IP address of sp1 - sp2) EXTERNAL_IP=77.244.249.113 ;; # external IP address of sp2 - esac - IP1=192.168.255.249 # internal IP addresses of sp1 - IP2=192.168.255.250 # internal IP addresses of sp2 - INTERNAL_NETMASK=255.255.255.248 # -else # CE_EDITION - EADDR=77.244.249.109 ; # external IP address of ce server - EIFACE=eth0 ; # on interface ... -fi -